1 dnl Process this file with autoconf to produce a configure script.
2 dnl Author: Michael Patra <micky@marie.physik.tu-berlin.de>
3 dnl <patra@itp1.physik.tu-berlin.de>
4 AC_REVISION([configure.in 1.00])
5 AC_INIT(controls/edit.c)
6 AC_CONFIG_HEADER(include/config.h)
7 AC_CONFIG_AUX_DIR(tools)
9 # We want these before the checks, so the checks can modify their values.
11 test -z "$PROGEXT" && PROGEXT="" AC_SUBST(PROGEXT)
13 dnl **** Command-line arguments ****
18 ALT_LINK="-L\$(TOPOBJDIR) -lwine"
19 TRACE_MSGS=yes # the TRACE() macro
20 DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
22 AC_ARG_ENABLE(emulator,
23 [ --disable-emulator build only the Wine library, not the emulator],
24 [if test "$enableval" = "no"; then MAIN_TARGET="lib"; fi])
27 [ --enable-dll build the Wine library as a DLL],
28 [if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi])
31 [ --disable-lib build the Wine without building libwine.a],
32 [if test "$enableval" = "no"; then ALT_LINK="\$(LIBOBJS) \$(X11OBJS)"; LIB_TARGET=""; fi])
35 [ --disable-debug compile out all debugging messages],
36 [if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
39 [ --disable-trace compile out TRACE messages],
40 [if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
42 AC_ARG_WITH(reentrant-x,
43 [ --without-reentrant-x compile for use with non-reentrant X libraries])
50 if test "$DEBUG_MSGS" = "no"
52 AC_DEFINE(NO_DEBUG_MSGS)
53 AC_DEFINE(NO_TRACE_MSGS)
55 if test "$TRACE_MSGS" = "no"
57 AC_DEFINE(NO_TRACE_MSGS)
61 dnl **** Check for some programs ****
72 AC_CHECK_PROG(C2MAN,c2man,c2man,true)
73 AC_PATH_PROG(LDCONFIG, ldconfig, false, /sbin:/usr/sbin:$PATH)
76 AC_CHECK_PROGS(LINT, lclint lint)
77 if test "$LINT" = "lint"
79 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
80 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
85 dnl **** Check for some libraries ****
87 dnl Check for -lm for BeOS
89 dnl Check for -li386 for NetBSD and OpenBSD
90 AC_CHECK_LIB(i386,i386_set_ldt)
91 dnl Check for -lossaudio for NetBSD
92 AC_CHECK_LIB(ossaudio,_oss_ioctl)
93 dnl Check for -lw for Solaris
94 AC_CHECK_LIB(w,iswalnum)
95 dnl Check for -lnsl for Solaris
96 AC_CHECK_FUNCS(gethostbyname,, AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl", AC_CHECK_LIB(socket, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl", , -lnsl), -lsocket))
97 dnl Check for -lsocket for Solaris
98 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
99 dnl Check for -lxpg4 for FreeBSD
100 AC_CHECK_LIB(xpg4,setrunelocale)
101 dnl Check for -lmmap for OS/2
102 AC_CHECK_LIB(mmap,mmap)
104 AC_CHECK_HEADERS(dlfcn.h,
105 AC_CHECK_FUNCS(dlopen,
106 AC_DEFINE(HAVE_DL_API),
107 AC_CHECK_LIB(dl,dlopen,
108 AC_DEFINE(HAVE_DL_API)
114 if test "$have_x" = "yes"
117 ac_save_CPPFLAGS="$CPPFLAGS"
118 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
121 AC_CHECK_HEADERS(X11/xpm.h)
122 if test "$ac_cv_header_X11_xpm_h" = "yes"
124 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11)
127 dnl Check for X Shm extension
128 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
129 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
131 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11)
133 dnl Check for XFree86 DGA / DGA 2.0 extension
134 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
135 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
137 AC_CHECK_LIB(Xxf86dga,XDGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA2) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11)
138 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11)
141 dnl Check for XFree86 VMODE extension
142 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
143 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
145 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11)
148 dnl Check for the presence of Mesa
149 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
150 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
152 dnl Check for some problems due to old Mesa versions
153 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
155 [#include <GL/gl.h>],
156 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
157 [wine_cv_mesa_version_OK="yes"],
158 [wine_cv_mesa_version_OK="no"]
162 if test "$wine_cv_mesa_version_OK" = "yes"
164 dnl Check for the presense of the library
165 AC_CHECK_LIB(GL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm)
166 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
168 AC_CHECK_LIB(MesaGL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lMesaGL",,$X_LIBS -lXext -lX11 -lm)
173 CPPFLAGS="$ac_save_CPPFLAGS"
180 dnl **** Check which curses lib to use ***
181 AC_CHECK_HEADERS(ncurses.h)
182 if test "$ac_cv_header_ncurses_h" = "yes"
184 AC_CHECK_LIB(ncurses,waddch)
186 if test "$ac_cv_lib_ncurses_waddch" = "yes"
188 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
189 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
191 AC_CHECK_HEADERS(curses.h)
192 if test "$ac_cv_header_curses_h" = "yes"
194 AC_CHECK_LIB(curses,waddch)
195 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
196 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
200 dnl **** Check for IPX (currently Linux only) ****
201 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
203 [#include <sys/socket.h>
204 #include <netipx/ipx.h>],
205 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
206 [AC_DEFINE(HAVE_IPX_GNU)
207 ac_cv_c_ipx_gnu="yes"],
208 [ac_cv_c_ipx_gnu="no"])
211 if test "$ac_cv_c_ipx_gnu" = "no"
213 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
215 [#include <sys/socket.h>
216 #include <asm/types.h>
217 #include <linux/ipx.h>],
218 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
219 [AC_DEFINE(HAVE_IPX_LINUX)
220 ac_cv_c_ipx_linux="yes"],
221 [ac_cv_c_ipx_linux="no"])
225 dnl **** Check for Open Sound System ****
226 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
228 AC_CACHE_CHECK("for Open Sound System",
229 ac_cv_c_opensoundsystem,
231 #if defined(HAVE_SYS_SOUNDCARD_H)
232 #include <sys/soundcard.h>
233 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
234 #include <machine/soundcard.h>
235 #elif defined(HAVE_SOUNDCARD_H)
236 #include <soundcard.h>
240 /* check for one of the Open Sound System specific SNDCTL_ defines */
241 #if !defined(SNDCTL_DSP_STEREO)
242 #error No open sound system
244 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
246 if test "$ac_cv_c_opensoundsystem" = "yes"
251 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
252 ac_cv_c_opensoundsystem_midi,
254 #if defined(HAVE_SYS_SOUNDCARD_H)
255 #include <sys/soundcard.h>
256 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
257 #include <machine/soundcard.h>
258 #elif defined(HAVE_SOUNDCARD_H)
259 #include <soundcard.h>
263 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
264 #if !defined(SNDCTL_SEQ_SYNC)
265 #error No open sound system MIDI interface
267 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
269 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
271 AC_DEFINE(HAVE_OSS_MIDI)
274 dnl **** If ln -s doesn't work, use cp instead ****
275 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
277 dnl **** Check for gcc strength-reduce bug ****
279 if test "x${GCC}" = "xyes"
281 CFLAGS="$CFLAGS -Wall"
282 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
285 static int Array[[3]];
288 for(i=0; i<B; i++) Array[[i]] = i - 3;
289 exit( Array[[1]] != -2 );
291 ac_cv_c_gcc_strength_bug="no",
292 ac_cv_c_gcc_strength_bug="yes",
293 ac_cv_c_gcc_strength_bug="yes") )
294 if test "$ac_cv_c_gcc_strength_bug" = "yes"
296 CFLAGS="$CFLAGS -fno-strength-reduce"
300 dnl **** Check for underscore on external symbols ****
302 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
303 ac_cv_c_extern_prefix,
305 LIBS="conftest_asm.s $LIBS"
306 cat > conftest_asm.s <<EOF
311 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
312 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
314 if test "$ac_cv_c_extern_prefix" = "yes"
316 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
319 dnl **** Check for .string in assembler ****
321 AC_CACHE_CHECK("whether assembler accepts .string",
324 LIBS="conftest_asm.s $LIBS"
325 cat > conftest_asm.s <<EOF
328 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
330 if test "$ac_cv_c_asm_string" = "yes"
332 AC_DEFINE(HAVE_ASM_STRING)
335 dnl **** Check for working dll ****
340 if test "$LIB_TARGET" = "libwine.so.1.0"
342 AC_CACHE_CHECK("whether we can build a Linux dll",
344 [saved_cflags=$CFLAGS
345 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
346 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
349 if test "$ac_cv_c_dll_linux" = "yes"
353 LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so"
355 AC_CACHE_CHECK("whether we can build a UnixWare dll",
356 ac_cv_c_dll_unixware,
357 [saved_cflags=$CFLAGS
358 CFLAGS="$CFLAGS -fPIC -Wl,-G,conftest.so.1.0"
359 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
362 if test "$ac_cv_c_dll_unixware" = "yes"
366 LDSHARED="\$(CC) -Wl,-G,-h,/usr/local/lib/libwine.so"
368 AC_CACHE_CHECK("whether we can build a NetBSD dll",
370 [saved_cflags=$CFLAGS
371 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
372 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
375 if test "$ac_cv_c_dll_netbsd" = "yes"
379 LDSHARED="ld -Bshareable -Bforcearchive"
383 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
385 LIB_TARGET="libwine.a"
392 dnl **** Check for reentrant libc ****
394 dnl For cross-compiling we blindly assume that libc is reentrant. This is
395 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
397 wine_cv_libc_reentrant=no
399 dnl Linux style errno location
401 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
402 [AC_TRY_RUN([int myerrno = 0;
404 int *__errno_location(){return &myerrno;}
405 main(){connect(0,buf,255); exit(!myerrno);}],
406 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
407 wine_cv_libc_r__errno_location=yes )
409 if test "$wine_cv_libc_r__errno_location" = "yes"
411 AC_DEFINE(HAVE__ERRNO_LOCATION)
412 wine_cv_libc_reentrant=__errno_location
415 dnl FreeBSD style errno location
417 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
418 [AC_TRY_RUN([int myerrno = 0;
420 int *__error(){return &myerrno;}
421 main(){connect(0,buf,255); exit(!myerrno);}],
422 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
423 wine_cv_libc_r__error=yes )
425 if test "$wine_cv_libc_r__error" = "yes"
427 AC_DEFINE(HAVE__ERROR)
428 wine_cv_libc_reentrant=__error
431 dnl Solaris style errno location
433 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
434 [AC_TRY_RUN([int myerrno = 0;
436 int *___errno(){return &myerrno;}
437 main(){connect(0,buf,255); exit(!myerrno);}],
438 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
439 wine_cv_libc_r___errno=yes )
441 if test "$wine_cv_libc_r___errno" = "yes"
443 AC_DEFINE(HAVE___ERRNO)
444 wine_cv_libc_reentrant=___errno
447 dnl UnixWare style errno location
449 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
450 [AC_TRY_RUN([int myerrno = 0;
452 int *__thr_errno(){return &myerrno;}
453 main(){connect(0,buf,255); exit(!myerrno);}],
454 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
455 wine_cv_libc_r__thr_errno=yes )
457 if test "$wine_cv_libc_r__thr_errno" = "yes"
459 AC_DEFINE(HAVE__THR_ERRNO)
460 wine_cv_libc_reentrant=__thr_errno
462 if test "$wine_cv_libc_reentrant" = "no"
464 AC_DEFINE(NO_REENTRANT_LIBC)
467 dnl **** Check for reentrant X libraries ****
469 dnl This may fail to determine whether X libraries are reentrant if
470 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
471 dnl is possible with the --without-reentrant-x option.
473 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
475 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
476 [ if test "x$with_reentrant_x" = "xno"
478 wine_cv_x_reentrant=no
481 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
482 if test -r $dir/libX11.so; then
483 libX11_check="-D $dir/libX11.so"
486 if test -r $dir/libX11.a; then
487 libX11_check="$dir/libX11.a"
491 if test "$libX11_check" != "none"; then
492 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
494 wine_cv_x_reentrant=yes
496 wine_cv_x_reentrant=no
499 wine_cv_x_reentrant=unknown
503 wine_cv_x_reentrant=no
505 if test "$wine_cv_x_reentrant" = "no"
507 AC_DEFINE(NO_REENTRANT_X11)
510 dnl **** Check for endianness ****
514 dnl **** Check for functions ****
546 dnl **** Check for header files ****
598 dnl **** Check for types ****
603 AC_CHECK_SIZEOF(long long,0)
605 if test "$ac_cv_header_linux_joystick_h" = "yes"
607 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
608 wine_cv_linux_joystick_22_api,
610 #include <sys/ioctl.h>
611 #include <linux/joystick.h>
613 struct js_event blub;
614 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
615 #error "no 2.2 header"
618 wine_cv_linux_joystick_22_api=yes,
619 wine_cv_linux_joystick_22_api=no,
620 wine_cv_linux_joystick_22_api=no
623 if test "$wine_cv_linux_joystick_22_api"
625 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
629 dnl **** statfs checks ****
631 if test "$ac_cv_header_sys_vfs_h" = "yes"
633 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
634 wine_cv_sys_vfs_has_statfs,
636 #include <sys/types.h>
637 #ifdef HAVE_SYS_PARAM_H
638 # include <sys/param.h>
644 memset(&stfs,0,sizeof(stfs));
645 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
648 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
650 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
654 if test "$ac_cv_header_sys_statfs_h" = "yes"
656 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
657 wine_cv_sys_statfs_has_statfs,
659 #include <sys/types.h>
660 #ifdef HAVE_SYS_PARAM_H
661 # include <sys/param.h>
663 #include <sys/statfs.h>
666 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
669 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
671 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
675 if test "$ac_cv_header_sys_mount_h" = "yes"
677 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
678 wine_cv_sys_mount_has_statfs,
680 #include <sys/types.h>
681 #ifdef HAVE_SYS_PARAM_H
682 # include <sys/param.h>
684 #include <sys/mount.h>
687 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
690 if test "$wine_cv_sys_mount_has_statfs" = "yes"
692 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
696 dnl **** FIXME: what about mixed cases, where we need two of them? ***
698 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
699 [ if test "x$statfs_bfree" = "xno"
701 wine_cv_statfs_bfree=no
704 #include <sys/types.h>
705 #ifdef HAVE_SYS_PARAM_H
706 # include <sys/param.h>
708 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
709 # include <sys/mount.h>
711 # ifdef STATFS_DEFINED_BY_SYS_VFS
712 # include <sys/vfs.h>
714 # ifdef STATFS_DEFINED_BY_SYS_STATFS
715 # include <sys/statfs.h>
723 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
726 if test "$wine_cv_statfs_bfree" = "yes"
728 AC_DEFINE(STATFS_HAS_BFREE)
731 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
732 [ if test "x$statfs_bavail" = "xno"
734 wine_cv_statfs_bavail=no
737 #include <sys/types.h>
738 #ifdef HAVE_SYS_PARAM_H
739 # include <sys/param.h>
741 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
742 # include <sys/mount.h>
744 # ifdef STATFS_DEFINED_BY_SYS_VFS
745 # include <sys/vfs.h>
747 # ifdef STATFS_DEFINED_BY_SYS_STATFS
748 # include <sys/statfs.h>
756 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
759 if test "$wine_cv_statfs_bavail" = "yes"
761 AC_DEFINE(STATFS_HAS_BAVAIL)
764 dnl *** check for working sigaltstack
765 dnl glibc 2.0x defines it, but it always fails... so it is useless for us.
767 AC_CACHE_CHECK("for working sigaltstack",
768 ac_cv_c_working_sigaltstack,
771 #include <time.h> /* <sys/time.h> ? bad magic without end */
772 #include <sys/types.h>
773 #include <sys/signal.h>
774 #ifdef HAVE_SYS_PARAM_H
775 # include <sys/param.h>
777 #ifdef HAVE_SYSCALL_H
778 # include <syscall.h>
780 # ifdef HAVE_SYS_SYSCALL_H
781 # include <sys/syscall.h>
785 unsigned char *xaltstack;
788 main(int argc,char **argv) {
789 struct sigaltstack ss;
791 xaltstack = malloc(16384);
792 ss.ss_sp = xaltstack;
795 if (sigaltstack(&ss, NULL) < 0) {
796 /* this catches the glibc case */
797 perror("sigaltstack");
798 return (1); /* aka exit(1) aka fail */
800 /* assume it works. */
804 ac_cv_c_working_sigaltstack="yes",
805 ac_cv_c_working_sigaltstack="no",
806 ac_cv_c_working_sigaltstack="no"
809 if test "$ac_cv_c_working_sigaltstack" = "yes"
811 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
815 dnl *** check for file descriptor passing with msg_accrights
817 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
818 AC_TRY_COMPILE([#include <sys/types.h>
819 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
820 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
821 if test "$ac_cv_c_msg_accrights" = "yes"
823 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
826 dnl *** check for the need to define __i386__
828 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
829 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
832 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
833 if test "$ac_cv_cpp_def_i386" = "yes"
835 CFLAGS="$CFLAGS -D__i386__"
836 LINTFLAGS="$LINTFLAGS -D__i386__"
839 dnl $GCC is set by autoconf
841 if test "$GCC" = "yes"
843 GCC_NO_BUILTIN="-fno-builtin"
845 AC_SUBST(GCC_NO_BUILTIN)
847 dnl **** Generate output files ****
849 MAKE_RULES=Make.rules
850 AC_SUBST_FILE(MAKE_RULES)
859 dlls/advapi32/Makefile
860 dlls/avifil32/Makefile
861 dlls/comctl32/Makefile
862 dlls/commdlg/Makefile
864 dlls/dciman32/Makefile
868 dlls/imagehlp/Makefile
870 dlls/lzexpand/Makefile
873 dlls/msacm32/Makefile
874 dlls/msnet32/Makefile
875 dlls/msvideo/Makefile
878 dlls/oleaut32/Makefile
883 dlls/rasapi32/Makefile
884 dlls/shell32/Makefile
889 dlls/version/Makefile
891 dlls/win87em/Makefile
892 dlls/winaspi/Makefile
893 dlls/windebug/Makefile
896 dlls/winmm/mcianim/Makefile
897 dlls/winmm/mciavi/Makefile
898 dlls/winmm/mcicda/Makefile
899 dlls/winmm/mciseq/Makefile
900 dlls/winmm/mciwave/Makefile
901 dlls/winmm/midimap/Makefile
902 dlls/winmm/wavemap/Makefile
903 dlls/winmm/wineoss/Makefile
904 dlls/winspool/Makefile
905 dlls/wnaspi32/Makefile
906 documentation/Makefile
907 documentation/wine.conf.man
908 documentation/wine.man
911 graphics/enhmetafiledrv/Makefile
912 graphics/metafiledrv/Makefile
913 graphics/psdrv/Makefile
914 graphics/ttydrv/Makefile
915 graphics/win16drv/Makefile
916 graphics/x11drv/Makefile
931 programs/clock/Makefile
932 programs/cmdlgtst/Makefile
933 programs/control/Makefile
934 programs/avitools/Makefile
935 programs/osversioncheck/Makefile
936 programs/notepad/Makefile
937 programs/progman/Makefile
938 programs/regtest/Makefile
939 programs/regapi/Makefile
940 programs/view/Makefile
941 programs/wcmd/Makefile
942 programs/winhelp/Makefile
943 programs/winver/Makefile
954 windows/ttydrv/Makefile
955 windows/x11drv/Makefile ])
957 if test "$have_x" = "no"
960 echo "*** Warning: X development files not found. Wine will be built without"
961 echo "*** X support, which currently does not work, and would probably not be"
962 echo "*** what you want anyway. You will need to install devel packages of"
963 echo "*** Xlib/Xfree86 and Xpm at the very least."
964 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
967 echo "*** Warning: Xpm development files not found. Wine will be built without"
968 echo "*** Xpm support, which currently does not work. You will need to install"
969 echo "*** devel packages of Xpm."
972 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
975 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
976 echo "*** terminal resize support. Consider upgrading ncurses."
979 if test "$wine_cv_libc_reentrant" = "no"
982 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
983 echo "*** thread support. Consider upgrading libc to a more recent"
984 echo "*** reentrant version of libc."
987 if test "$wine_cv_mesa_version_OK" = "no"
990 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
991 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)"
995 echo "Configure finished. Do 'make depend && make' to compile Wine."
999 dnl comment-start: "dnl "
1001 dnl comment-start-skip: "\\bdnl\\b\\s *"
1002 dnl compile-command: "autoconf"