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)
103 dnl Check for openpty
104 AC_CHECK_FUNCS(openpty,,
105 AC_CHECK_LIB(util,openpty,
106 AC_DEFINE(HAVE_OPENPTY)
110 AC_CHECK_HEADERS(dlfcn.h,
111 AC_CHECK_FUNCS(dlopen,
112 AC_DEFINE(HAVE_DL_API),
113 AC_CHECK_LIB(dl,dlopen,
114 AC_DEFINE(HAVE_DL_API)
120 if test "$have_x" = "yes"
123 ac_save_CPPFLAGS="$CPPFLAGS"
124 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
127 AC_CHECK_HEADERS(X11/xpm.h)
128 if test "$ac_cv_header_X11_xpm_h" = "yes"
130 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11)
132 echo "When compiling with X support, you need the Xpm library, or"
133 echo "WINE will not work. This Xpm library is within the following RPM,"
134 echo "which you need to install:"
135 echo "Redhat : xpm, xpm-devel"
136 echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static"
139 echo "Or get the sources from ftp.x.org and all its mirror sites from "
140 echo "the directory /contrib/libraries."
146 dnl Check for X Shm extension
147 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
148 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
150 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11)
152 dnl Check for XFree86 DGA / DGA 2.0 extension
153 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
154 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
156 AC_CHECK_LIB(Xxf86dga,XDGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA2) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11)
157 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11)
160 dnl Check for XFree86 VMODE extension
161 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
162 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
164 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11)
167 dnl Check for the presence of Mesa
168 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
169 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
171 dnl Check for some problems due to old Mesa versions
172 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
174 [#include <GL/gl.h>],
175 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
176 [wine_cv_mesa_version_OK="yes"],
177 [wine_cv_mesa_version_OK="no"]
181 if test "$wine_cv_mesa_version_OK" = "yes"
183 dnl Check for the presense of the library
184 AC_CHECK_LIB(GL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm)
185 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
187 AC_CHECK_LIB(MesaGL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lMesaGL",,$X_LIBS -lXext -lX11 -lm)
192 CPPFLAGS="$ac_save_CPPFLAGS"
199 dnl **** Check which curses lib to use ***
200 AC_CHECK_HEADERS(ncurses.h)
201 if test "$ac_cv_header_ncurses_h" = "yes"
203 AC_CHECK_LIB(ncurses,waddch)
205 if test "$ac_cv_lib_ncurses_waddch" = "yes"
207 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
208 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
210 AC_CHECK_HEADERS(curses.h)
211 if test "$ac_cv_header_curses_h" = "yes"
213 AC_CHECK_LIB(curses,waddch)
214 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
215 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
219 dnl **** Check for IPX (currently Linux only) ****
220 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
222 [#include <sys/socket.h>
223 #include <netipx/ipx.h>],
224 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
225 [AC_DEFINE(HAVE_IPX_GNU)
226 ac_cv_c_ipx_gnu="yes"],
227 [ac_cv_c_ipx_gnu="no"])
230 if test "$ac_cv_c_ipx_gnu" = "no"
232 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
234 [#include <sys/socket.h>
235 #include <asm/types.h>
236 #include <linux/ipx.h>],
237 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
238 [AC_DEFINE(HAVE_IPX_LINUX)
239 ac_cv_c_ipx_linux="yes"],
240 [ac_cv_c_ipx_linux="no"])
244 dnl **** Check for Open Sound System ****
245 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
247 AC_CACHE_CHECK("for Open Sound System",
248 ac_cv_c_opensoundsystem,
250 #if defined(HAVE_SYS_SOUNDCARD_H)
251 #include <sys/soundcard.h>
252 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
253 #include <machine/soundcard.h>
254 #elif defined(HAVE_SOUNDCARD_H)
255 #include <soundcard.h>
259 /* check for one of the Open Sound System specific SNDCTL_ defines */
260 #if !defined(SNDCTL_DSP_STEREO)
261 #error No open sound system
263 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
265 if test "$ac_cv_c_opensoundsystem" = "yes"
270 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
271 ac_cv_c_opensoundsystem_midi,
273 #if defined(HAVE_SYS_SOUNDCARD_H)
274 #include <sys/soundcard.h>
275 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
276 #include <machine/soundcard.h>
277 #elif defined(HAVE_SOUNDCARD_H)
278 #include <soundcard.h>
282 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
283 #if !defined(SNDCTL_SEQ_SYNC)
284 #error No open sound system MIDI interface
286 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
288 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
290 AC_DEFINE(HAVE_OSS_MIDI)
293 dnl **** If ln -s doesn't work, use cp instead ****
294 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
296 dnl **** Check for gcc strength-reduce bug ****
298 if test "x${GCC}" = "xyes"
300 CFLAGS="$CFLAGS -Wall"
301 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
304 static int Array[[3]];
307 for(i=0; i<B; i++) Array[[i]] = i - 3;
308 exit( Array[[1]] != -2 );
310 ac_cv_c_gcc_strength_bug="no",
311 ac_cv_c_gcc_strength_bug="yes",
312 ac_cv_c_gcc_strength_bug="yes") )
313 if test "$ac_cv_c_gcc_strength_bug" = "yes"
315 CFLAGS="$CFLAGS -fno-strength-reduce"
319 dnl **** Check for underscore on external symbols ****
321 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
322 ac_cv_c_extern_prefix,
324 LIBS="conftest_asm.s $LIBS"
325 cat > conftest_asm.s <<EOF
330 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
331 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
333 if test "$ac_cv_c_extern_prefix" = "yes"
335 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
338 dnl **** Check for .string in assembler ****
340 AC_CACHE_CHECK("whether assembler accepts .string",
343 LIBS="conftest_asm.s $LIBS"
344 cat > conftest_asm.s <<EOF
347 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
349 if test "$ac_cv_c_asm_string" = "yes"
351 AC_DEFINE(HAVE_ASM_STRING)
354 dnl **** Check for working dll ****
359 if test "$LIB_TARGET" = "libwine.so.1.0"
361 AC_CACHE_CHECK("whether we can build a Linux dll",
363 [saved_cflags=$CFLAGS
364 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
365 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
368 if test "$ac_cv_c_dll_linux" = "yes"
372 LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so,-rpath,\$(libdir)"
374 AC_CACHE_CHECK("whether we can build a UnixWare dll",
375 ac_cv_c_dll_unixware,
376 [saved_cflags=$CFLAGS
377 CFLAGS="$CFLAGS -fPIC -Wl,-G,conftest.so.1.0"
378 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
381 if test "$ac_cv_c_dll_unixware" = "yes"
385 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/libwine.so"
387 AC_CACHE_CHECK("whether we can build a NetBSD dll",
389 [saved_cflags=$CFLAGS
390 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
391 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
394 if test "$ac_cv_c_dll_netbsd" = "yes"
398 LDSHARED="ld -Bshareable -Bforcearchive"
402 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
404 LIB_TARGET="libwine.a"
411 dnl **** Check for reentrant libc ****
413 dnl For cross-compiling we blindly assume that libc is reentrant. This is
414 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
416 wine_cv_libc_reentrant=no
418 dnl Linux style errno location
420 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
421 [AC_TRY_RUN([int myerrno = 0;
423 int *__errno_location(){return &myerrno;}
424 main(){connect(0,buf,255); exit(!myerrno);}],
425 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
426 wine_cv_libc_r__errno_location=yes )
428 if test "$wine_cv_libc_r__errno_location" = "yes"
430 AC_DEFINE(HAVE__ERRNO_LOCATION)
431 wine_cv_libc_reentrant=__errno_location
434 dnl FreeBSD style errno location
436 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
437 [AC_TRY_RUN([int myerrno = 0;
439 int *__error(){return &myerrno;}
440 main(){connect(0,buf,255); exit(!myerrno);}],
441 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
442 wine_cv_libc_r__error=yes )
444 if test "$wine_cv_libc_r__error" = "yes"
446 AC_DEFINE(HAVE__ERROR)
447 wine_cv_libc_reentrant=__error
450 dnl Solaris style errno location
452 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
453 [AC_TRY_RUN([int myerrno = 0;
455 int *___errno(){return &myerrno;}
456 main(){connect(0,buf,255); exit(!myerrno);}],
457 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
458 wine_cv_libc_r___errno=yes )
460 if test "$wine_cv_libc_r___errno" = "yes"
462 AC_DEFINE(HAVE___ERRNO)
463 wine_cv_libc_reentrant=___errno
466 dnl UnixWare style errno location
468 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
469 [AC_TRY_RUN([int myerrno = 0;
471 int *__thr_errno(){return &myerrno;}
472 main(){connect(0,buf,255); exit(!myerrno);}],
473 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
474 wine_cv_libc_r__thr_errno=yes )
476 if test "$wine_cv_libc_r__thr_errno" = "yes"
478 AC_DEFINE(HAVE__THR_ERRNO)
479 wine_cv_libc_reentrant=__thr_errno
481 if test "$wine_cv_libc_reentrant" = "no"
483 AC_DEFINE(NO_REENTRANT_LIBC)
486 dnl **** Check for reentrant X libraries ****
488 dnl This may fail to determine whether X libraries are reentrant if
489 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
490 dnl is possible with the --without-reentrant-x option.
492 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
494 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
495 [ if test "x$with_reentrant_x" = "xno"
497 wine_cv_x_reentrant=no
500 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
501 if test -r $dir/libX11.so; then
502 libX11_check="-D $dir/libX11.so"
505 if test -r $dir/libX11.a; then
506 libX11_check="$dir/libX11.a"
510 if test "$libX11_check" != "none"; then
511 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
513 wine_cv_x_reentrant=yes
515 wine_cv_x_reentrant=no
518 wine_cv_x_reentrant=unknown
522 wine_cv_x_reentrant=no
524 if test "$wine_cv_x_reentrant" = "no"
526 AC_DEFINE(NO_REENTRANT_X11)
529 dnl **** Check for endianness ****
533 dnl **** Check for functions ****
565 dnl **** Check for header files ****
618 dnl **** Check for types ****
623 AC_CHECK_SIZEOF(long long,0)
625 if test "$ac_cv_header_linux_joystick_h" = "yes"
627 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
628 wine_cv_linux_joystick_22_api,
630 #include <sys/ioctl.h>
631 #include <linux/joystick.h>
633 struct js_event blub;
634 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
635 #error "no 2.2 header"
638 wine_cv_linux_joystick_22_api=yes,
639 wine_cv_linux_joystick_22_api=no,
640 wine_cv_linux_joystick_22_api=no
643 if test "$wine_cv_linux_joystick_22_api"
645 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
649 dnl **** statfs checks ****
651 if test "$ac_cv_header_sys_vfs_h" = "yes"
653 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
654 wine_cv_sys_vfs_has_statfs,
656 #include <sys/types.h>
657 #ifdef HAVE_SYS_PARAM_H
658 # include <sys/param.h>
664 memset(&stfs,0,sizeof(stfs));
665 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
668 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
670 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
674 if test "$ac_cv_header_sys_statfs_h" = "yes"
676 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
677 wine_cv_sys_statfs_has_statfs,
679 #include <sys/types.h>
680 #ifdef HAVE_SYS_PARAM_H
681 # include <sys/param.h>
683 #include <sys/statfs.h>
686 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
689 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
691 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
695 if test "$ac_cv_header_sys_mount_h" = "yes"
697 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
698 wine_cv_sys_mount_has_statfs,
700 #include <sys/types.h>
701 #ifdef HAVE_SYS_PARAM_H
702 # include <sys/param.h>
704 #include <sys/mount.h>
707 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
710 if test "$wine_cv_sys_mount_has_statfs" = "yes"
712 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
716 dnl **** FIXME: what about mixed cases, where we need two of them? ***
718 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
719 [ if test "x$statfs_bfree" = "xno"
721 wine_cv_statfs_bfree=no
724 #include <sys/types.h>
725 #ifdef HAVE_SYS_PARAM_H
726 # include <sys/param.h>
728 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
729 # include <sys/mount.h>
731 # ifdef STATFS_DEFINED_BY_SYS_VFS
732 # include <sys/vfs.h>
734 # ifdef STATFS_DEFINED_BY_SYS_STATFS
735 # include <sys/statfs.h>
743 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
746 if test "$wine_cv_statfs_bfree" = "yes"
748 AC_DEFINE(STATFS_HAS_BFREE)
751 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
752 [ if test "x$statfs_bavail" = "xno"
754 wine_cv_statfs_bavail=no
757 #include <sys/types.h>
758 #ifdef HAVE_SYS_PARAM_H
759 # include <sys/param.h>
761 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
762 # include <sys/mount.h>
764 # ifdef STATFS_DEFINED_BY_SYS_VFS
765 # include <sys/vfs.h>
767 # ifdef STATFS_DEFINED_BY_SYS_STATFS
768 # include <sys/statfs.h>
776 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
779 if test "$wine_cv_statfs_bavail" = "yes"
781 AC_DEFINE(STATFS_HAS_BAVAIL)
784 dnl *** check for working sigaltstack
785 dnl glibc 2.0x defines it, but it always fails... so it is useless for us.
787 AC_CACHE_CHECK("for working sigaltstack",
788 ac_cv_c_working_sigaltstack,
791 #include <time.h> /* <sys/time.h> ? bad magic without end */
792 #include <sys/types.h>
793 #include <sys/signal.h>
794 #ifdef HAVE_SYS_PARAM_H
795 # include <sys/param.h>
797 #ifdef HAVE_SYSCALL_H
798 # include <syscall.h>
800 # ifdef HAVE_SYS_SYSCALL_H
801 # include <sys/syscall.h>
805 unsigned char *xaltstack;
808 main(int argc,char **argv) {
809 struct sigaltstack ss;
811 xaltstack = malloc(16384);
812 ss.ss_sp = xaltstack;
815 if (sigaltstack(&ss, NULL) < 0) {
816 /* this catches the glibc case */
817 perror("sigaltstack");
818 return (1); /* aka exit(1) aka fail */
820 /* assume it works. */
824 ac_cv_c_working_sigaltstack="yes",
825 ac_cv_c_working_sigaltstack="no",
826 ac_cv_c_working_sigaltstack="no"
829 if test "$ac_cv_c_working_sigaltstack" = "yes"
831 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
835 dnl *** check for file descriptor passing with msg_accrights
837 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
838 AC_TRY_COMPILE([#include <sys/types.h>
839 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
840 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
841 if test "$ac_cv_c_msg_accrights" = "yes"
843 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
846 dnl *** check for the need to define __i386__
848 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
849 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
852 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
853 if test "$ac_cv_cpp_def_i386" = "yes"
855 CFLAGS="$CFLAGS -D__i386__"
856 LINTFLAGS="$LINTFLAGS -D__i386__"
859 dnl $GCC is set by autoconf
861 if test "$GCC" = "yes"
863 GCC_NO_BUILTIN="-fno-builtin"
865 AC_SUBST(GCC_NO_BUILTIN)
867 dnl **** Generate output files ****
869 MAKE_RULES=Make.rules
870 AC_SUBST_FILE(MAKE_RULES)
879 dlls/advapi32/Makefile
880 dlls/avifil32/Makefile
881 dlls/comctl32/Makefile
882 dlls/commdlg/Makefile
884 dlls/dciman32/Makefile
885 dlls/display/Makefile
889 dlls/imagehlp/Makefile
891 dlls/lzexpand/Makefile
895 dlls/msacm32/Makefile
896 dlls/msnet32/Makefile
897 dlls/msvideo/Makefile
901 dlls/oleaut32/Makefile
906 dlls/rasapi32/Makefile
907 dlls/shell32/Makefile
912 dlls/version/Makefile
914 dlls/win87em/Makefile
915 dlls/winaspi/Makefile
916 dlls/windebug/Makefile
919 dlls/winmm/mcianim/Makefile
920 dlls/winmm/mciavi/Makefile
921 dlls/winmm/mcicda/Makefile
922 dlls/winmm/mciseq/Makefile
923 dlls/winmm/mciwave/Makefile
924 dlls/winmm/midimap/Makefile
925 dlls/winmm/wavemap/Makefile
926 dlls/winmm/wineoss/Makefile
927 dlls/winspool/Makefile
928 dlls/wnaspi32/Makefile
929 documentation/Makefile
930 documentation/wine.conf.man
931 documentation/wine.man
934 graphics/enhmetafiledrv/Makefile
935 graphics/metafiledrv/Makefile
936 graphics/psdrv/Makefile
937 graphics/ttydrv/Makefile
938 graphics/win16drv/Makefile
939 graphics/x11drv/Makefile
954 programs/clock/Makefile
955 programs/cmdlgtst/Makefile
956 programs/control/Makefile
957 programs/avitools/Makefile
958 programs/osversioncheck/Makefile
959 programs/notepad/Makefile
960 programs/progman/Makefile
961 programs/regtest/Makefile
962 programs/regapi/Makefile
963 programs/view/Makefile
964 programs/wcmd/Makefile
965 programs/winhelp/Makefile
966 programs/winver/Makefile
977 windows/ttydrv/Makefile
978 windows/x11drv/Makefile ])
980 if test "$have_x" = "no"
983 echo "*** Warning: X development files not found. Wine will be built without"
984 echo "*** X support, which currently does not work, and would probably not be"
985 echo "*** what you want anyway. You will need to install devel packages of"
986 echo "*** Xlib/Xfree86 and Xpm at the very least."
987 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
990 echo "*** Warning: Xpm development files not found. Wine will be built without"
991 echo "*** Xpm support, which currently does not work. You will need to install"
992 echo "*** devel packages of Xpm."
995 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
998 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
999 echo "*** terminal resize support. Consider upgrading ncurses."
1002 if test "$wine_cv_libc_reentrant" = "no"
1005 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1006 echo "*** thread support. Consider upgrading libc to a more recent"
1007 echo "*** reentrant version of libc."
1010 if test "$wine_cv_mesa_version_OK" = "no"
1013 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1014 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)"
1018 echo "Configure finished. Do 'make depend && make' to compile Wine."
1021 dnl Local Variables:
1022 dnl comment-start: "dnl "
1024 dnl comment-start-skip: "\\bdnl\\b\\s *"
1025 dnl compile-command: "autoconf"