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 ****
17 LIB_TYPE=dll # one of static, dll, nolib
18 TRACE_MSGS=yes # the TRACE() macro
19 DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
21 AC_ARG_ENABLE(emulator,
22 [ --disable-emulator build only the Wine library, not the emulator],
23 [if test "$enableval" = "no"; then MAIN_TARGET="lib"; fi])
26 [ --disable-dll build static libraries instead of DLLs],
27 [if test "$enableval" = "no"; then LIB_TYPE="static"; fi])
30 [ --disable-lib build the Wine without building libwine.a],
31 [if test "$enableval" = "no"; then LIB_TYPE="nolib"; fi])
34 [ --disable-debug compile out all debugging messages],
35 [if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
38 [ --disable-trace compile out TRACE messages],
39 [if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
41 AC_ARG_WITH(reentrant-x,
42 [ --without-reentrant-x compile for use with non-reentrant X libraries])
47 if test "$DEBUG_MSGS" = "no"
49 AC_DEFINE(NO_DEBUG_MSGS)
50 AC_DEFINE(NO_TRACE_MSGS)
52 if test "$TRACE_MSGS" = "no"
54 AC_DEFINE(NO_TRACE_MSGS)
58 dnl **** Check for some programs ****
69 AC_CHECK_PROG(C2MAN,c2man,c2man,true)
70 AC_PATH_PROG(LDCONFIG, ldconfig, false, /sbin:/usr/sbin:$PATH)
73 AC_CHECK_PROGS(LINT, lclint lint)
74 if test "$LINT" = "lint"
76 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
77 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
82 dnl **** Check for some libraries ****
84 dnl Check for -lm for BeOS
86 dnl Check for -li386 for NetBSD and OpenBSD
87 AC_CHECK_LIB(i386,i386_set_ldt)
88 dnl Check for -lossaudio for NetBSD
89 AC_CHECK_LIB(ossaudio,_oss_ioctl)
90 dnl Check for -lw for Solaris
91 AC_CHECK_LIB(w,iswalnum)
92 dnl Check for -lnsl for Solaris
93 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))
94 dnl Check for -lsocket for Solaris
95 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
96 dnl Check for -lxpg4 for FreeBSD
97 AC_CHECK_LIB(xpg4,setrunelocale)
98 dnl Check for -lmmap for OS/2
99 AC_CHECK_LIB(mmap,mmap)
100 dnl Check for openpty
101 AC_CHECK_FUNCS(openpty,,
102 AC_CHECK_LIB(util,openpty,
103 AC_DEFINE(HAVE_OPENPTY)
107 AC_CHECK_HEADERS(dlfcn.h,
108 AC_CHECK_FUNCS(dlopen,
109 AC_DEFINE(HAVE_DL_API),
110 AC_CHECK_LIB(dl,dlopen,
111 AC_DEFINE(HAVE_DL_API)
117 if test "$have_x" = "yes"
120 ac_save_CPPFLAGS="$CPPFLAGS"
121 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
124 AC_CHECK_HEADERS(X11/xpm.h)
125 if test "$ac_cv_header_X11_xpm_h" = "yes"
127 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
129 echo "When compiling with X support, you need the Xpm library, or"
130 echo "WINE will not work. This Xpm library is within the following RPM,"
131 echo "which you need to install:"
132 echo "Redhat : xpm, xpm-devel"
133 echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static"
136 echo "Or get the sources from ftp.x.org and all its mirror sites from "
137 echo "the directory /contrib/libraries."
143 dnl Check for X Shm extension
144 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
145 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
147 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
149 dnl Check for XFree86 DGA / DGA 2.0 extension
150 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
151 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
153 AC_CHECK_LIB(Xxf86dga,
155 AC_DEFINE(HAVE_LIBXXF86DGA2) AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
156 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
158 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
162 dnl Check for XFree86 VMODE extension
163 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
164 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
166 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
169 dnl Check for the presence of Mesa
170 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
171 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
173 dnl Check for some problems due to old Mesa versions
174 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
176 [#include <GL/gl.h>],
177 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
178 [wine_cv_mesa_version_OK="yes"],
179 [wine_cv_mesa_version_OK="no"]
183 if test "$wine_cv_mesa_version_OK" = "yes"
185 dnl Check for the presense of the library
186 AC_CHECK_LIB(GL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
187 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
189 AC_CHECK_LIB(MesaGL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lMesaGL",,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
192 dnl Check for the Color Table and Paletted Texture extensions
193 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
195 [#include <GL/gl.h>],
196 [GLenum test = GL_COLOR_INDEX8_EXT;],
197 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],
200 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
202 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
204 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
209 CPPFLAGS="$ac_save_CPPFLAGS"
216 dnl **** Check which curses lib to use ***
217 AC_CHECK_HEADERS(ncurses.h)
218 if test "$ac_cv_header_ncurses_h" = "yes"
220 AC_CHECK_LIB(ncurses,waddch)
222 if test "$ac_cv_lib_ncurses_waddch" = "yes"
224 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
225 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
227 AC_CHECK_HEADERS(curses.h)
228 if test "$ac_cv_header_curses_h" = "yes"
230 AC_CHECK_LIB(curses,waddch)
231 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
232 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
236 dnl **** Check for IPX (currently Linux only) ****
237 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
239 [#include <sys/socket.h>
240 #include <netipx/ipx.h>],
241 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
242 [ac_cv_c_ipx_gnu="yes"],
243 [ac_cv_c_ipx_gnu="no"])
245 if test "$ac_cv_c_ipx_gnu" = "yes"
247 AC_DEFINE(HAVE_IPX_GNU)
250 if test "$ac_cv_c_ipx_gnu" = "no"
252 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
254 [#include <sys/socket.h>
255 #include <asm/types.h>
256 #include <linux/ipx.h>],
257 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
258 [ac_cv_c_ipx_linux="yes"],
259 [ac_cv_c_ipx_linux="no"])
261 if test "$ac_cv_c_ipx_linux" = "yes"
263 AC_DEFINE(HAVE_IPX_LINUX)
267 dnl **** Check for Open Sound System ****
268 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
270 AC_CACHE_CHECK("for Open Sound System",
271 ac_cv_c_opensoundsystem,
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_ defines */
283 #if !defined(SNDCTL_DSP_STEREO)
284 #error No open sound system
286 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
288 if test "$ac_cv_c_opensoundsystem" = "yes"
293 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
294 ac_cv_c_opensoundsystem_midi,
296 #if defined(HAVE_SYS_SOUNDCARD_H)
297 #include <sys/soundcard.h>
298 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
299 #include <machine/soundcard.h>
300 #elif defined(HAVE_SOUNDCARD_H)
301 #include <soundcard.h>
305 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
306 #if !defined(SNDCTL_SEQ_SYNC)
307 #error No open sound system MIDI interface
309 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
311 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
313 AC_DEFINE(HAVE_OSS_MIDI)
316 dnl **** If ln -s doesn't work, use cp instead ****
317 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
319 dnl **** Check for gcc strength-reduce bug ****
321 if test "x${GCC}" = "xyes"
323 CFLAGS="$CFLAGS -Wall"
324 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
327 static int Array[[3]];
330 for(i=0; i<B; i++) Array[[i]] = i - 3;
331 exit( Array[[1]] != -2 );
333 ac_cv_c_gcc_strength_bug="no",
334 ac_cv_c_gcc_strength_bug="yes",
335 ac_cv_c_gcc_strength_bug="yes") )
336 if test "$ac_cv_c_gcc_strength_bug" = "yes"
338 CFLAGS="$CFLAGS -fno-strength-reduce"
342 dnl **** Check for underscore on external symbols ****
344 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
345 ac_cv_c_extern_prefix,
347 LIBS="conftest_asm.s $LIBS"
348 cat > conftest_asm.s <<EOF
353 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
354 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
356 if test "$ac_cv_c_extern_prefix" = "yes"
358 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
361 dnl **** Check for .string in assembler ****
363 AC_CACHE_CHECK("whether assembler accepts .string",
366 LIBS="conftest_asm.s $LIBS"
367 cat > conftest_asm.s <<EOF
370 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
372 if test "$ac_cv_c_asm_string" = "yes"
374 AC_DEFINE(HAVE_ASM_STRING)
377 dnl **** Check for working dll ****
380 if test "$LIB_TYPE" = "dll"
382 AC_CACHE_CHECK("whether we can build a Linux dll",
384 [saved_cflags=$CFLAGS
385 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
386 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
389 if test "$ac_cv_c_dll_linux" = "yes"
391 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
393 AC_CACHE_CHECK("whether we can build a UnixWare dll",
394 ac_cv_c_dll_unixware,
395 [saved_cflags=$CFLAGS
396 CFLAGS="$CFLAGS -fPIC -Wl,-G,conftest.so.1.0"
397 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
400 if test "$ac_cv_c_dll_unixware" = "yes"
402 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
404 AC_CACHE_CHECK("whether we can build a NetBSD dll",
406 [saved_cflags=$CFLAGS
407 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
408 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
411 if test "$ac_cv_c_dll_netbsd" = "yes"
413 LDSHARED="ld -Bshareable -Bforcearchive"
417 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
427 if test "$LIB_TYPE" = "nolib"; then
428 ALT_LINK="\$(LIBOBJS) \$(X11OBJS)"
431 ALT_LINK="-Wl,--whole-archive -L\$(TOPOBJDIR) -lwine -Wl,--no-whole-archive"
432 if test "$LIB_TYPE" = "dll"; then
433 LIB_TARGET="libwine.so"
438 LIB_TARGET="libwine.a"
450 dnl **** Check for reentrant libc ****
452 dnl For cross-compiling we blindly assume that libc is reentrant. This is
453 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
455 wine_cv_libc_reentrant=no
457 dnl Linux style errno location
459 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
460 [AC_TRY_RUN([int myerrno = 0;
462 int *__errno_location(){return &myerrno;}
463 main(){connect(0,buf,255); exit(!myerrno);}],
464 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
465 wine_cv_libc_r__errno_location=yes )
467 if test "$wine_cv_libc_r__errno_location" = "yes"
469 AC_DEFINE(HAVE__ERRNO_LOCATION)
470 wine_cv_libc_reentrant=__errno_location
473 dnl FreeBSD style errno location
475 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
476 [AC_TRY_RUN([int myerrno = 0;
478 int *__error(){return &myerrno;}
479 main(){connect(0,buf,255); exit(!myerrno);}],
480 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
481 wine_cv_libc_r__error=yes )
483 if test "$wine_cv_libc_r__error" = "yes"
485 AC_DEFINE(HAVE__ERROR)
486 wine_cv_libc_reentrant=__error
489 dnl Solaris style errno location
491 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
492 [AC_TRY_RUN([int myerrno = 0;
494 int *___errno(){return &myerrno;}
495 main(){connect(0,buf,255); exit(!myerrno);}],
496 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
497 wine_cv_libc_r___errno=yes )
499 if test "$wine_cv_libc_r___errno" = "yes"
501 AC_DEFINE(HAVE___ERRNO)
502 wine_cv_libc_reentrant=___errno
505 dnl UnixWare style errno location
507 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
508 [AC_TRY_RUN([int myerrno = 0;
510 int *__thr_errno(){return &myerrno;}
511 main(){connect(0,buf,255); exit(!myerrno);}],
512 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
513 wine_cv_libc_r__thr_errno=yes )
515 if test "$wine_cv_libc_r__thr_errno" = "yes"
517 AC_DEFINE(HAVE__THR_ERRNO)
518 wine_cv_libc_reentrant=__thr_errno
520 if test "$wine_cv_libc_reentrant" = "no"
522 AC_DEFINE(NO_REENTRANT_LIBC)
525 dnl **** Check for reentrant X libraries ****
527 dnl This may fail to determine whether X libraries are reentrant if
528 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
529 dnl is possible with the --without-reentrant-x option.
531 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
533 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
534 [ if test "x$with_reentrant_x" = "xno"
536 wine_cv_x_reentrant=no
539 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
540 if test -r $dir/libX11.so; then
541 libX11_check="-D $dir/libX11.so"
544 if test -r $dir/libX11.a; then
545 libX11_check="$dir/libX11.a"
549 if test "$libX11_check" != "none"; then
550 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
552 wine_cv_x_reentrant=yes
554 wine_cv_x_reentrant=no
557 wine_cv_x_reentrant=unknown
561 wine_cv_x_reentrant=no
563 if test "$wine_cv_x_reentrant" = "no"
565 AC_DEFINE(NO_REENTRANT_X11)
568 dnl **** Check for endianness ****
572 dnl **** Check for functions ****
604 dnl **** Check for header files ****
657 dnl **** Check for types ****
662 AC_CHECK_SIZEOF(long long,0)
664 if test "$ac_cv_header_linux_joystick_h" = "yes"
666 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
667 wine_cv_linux_joystick_22_api,
669 #include <sys/ioctl.h>
670 #include <linux/joystick.h>
672 struct js_event blub;
673 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
674 #error "no 2.2 header"
677 wine_cv_linux_joystick_22_api=yes,
678 wine_cv_linux_joystick_22_api=no,
679 wine_cv_linux_joystick_22_api=no
682 if test "$wine_cv_linux_joystick_22_api"
684 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
688 dnl **** statfs checks ****
690 if test "$ac_cv_header_sys_vfs_h" = "yes"
692 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
693 wine_cv_sys_vfs_has_statfs,
695 #include <sys/types.h>
696 #ifdef HAVE_SYS_PARAM_H
697 # include <sys/param.h>
703 memset(&stfs,0,sizeof(stfs));
704 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
707 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
709 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
713 if test "$ac_cv_header_sys_statfs_h" = "yes"
715 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
716 wine_cv_sys_statfs_has_statfs,
718 #include <sys/types.h>
719 #ifdef HAVE_SYS_PARAM_H
720 # include <sys/param.h>
722 #include <sys/statfs.h>
725 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
728 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
730 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
734 if test "$ac_cv_header_sys_mount_h" = "yes"
736 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
737 wine_cv_sys_mount_has_statfs,
739 #include <sys/types.h>
740 #ifdef HAVE_SYS_PARAM_H
741 # include <sys/param.h>
743 #include <sys/mount.h>
746 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
749 if test "$wine_cv_sys_mount_has_statfs" = "yes"
751 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
755 dnl **** FIXME: what about mixed cases, where we need two of them? ***
757 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
758 [ if test "x$statfs_bfree" = "xno"
760 wine_cv_statfs_bfree=no
763 #include <sys/types.h>
764 #ifdef HAVE_SYS_PARAM_H
765 # include <sys/param.h>
767 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
768 # include <sys/mount.h>
770 # ifdef STATFS_DEFINED_BY_SYS_VFS
771 # include <sys/vfs.h>
773 # ifdef STATFS_DEFINED_BY_SYS_STATFS
774 # include <sys/statfs.h>
782 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
785 if test "$wine_cv_statfs_bfree" = "yes"
787 AC_DEFINE(STATFS_HAS_BFREE)
790 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
791 [ if test "x$statfs_bavail" = "xno"
793 wine_cv_statfs_bavail=no
796 #include <sys/types.h>
797 #ifdef HAVE_SYS_PARAM_H
798 # include <sys/param.h>
800 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
801 # include <sys/mount.h>
803 # ifdef STATFS_DEFINED_BY_SYS_VFS
804 # include <sys/vfs.h>
806 # ifdef STATFS_DEFINED_BY_SYS_STATFS
807 # include <sys/statfs.h>
815 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
818 if test "$wine_cv_statfs_bavail" = "yes"
820 AC_DEFINE(STATFS_HAS_BAVAIL)
823 dnl *** check for working sigaltstack
824 dnl glibc 2.0x defines it, but it always fails... so it is useless for us.
826 AC_CACHE_CHECK("for working sigaltstack",
827 ac_cv_c_working_sigaltstack,
830 #include <time.h> /* <sys/time.h> ? bad magic without end */
831 #include <sys/types.h>
832 #include <sys/signal.h>
833 #ifdef HAVE_SYS_PARAM_H
834 # include <sys/param.h>
836 #ifdef HAVE_SYSCALL_H
837 # include <syscall.h>
839 # ifdef HAVE_SYS_SYSCALL_H
840 # include <sys/syscall.h>
844 unsigned char *xaltstack;
847 main(int argc,char **argv) {
848 struct sigaltstack ss;
850 xaltstack = malloc(16384);
851 ss.ss_sp = xaltstack;
854 if (sigaltstack(&ss, NULL) < 0) {
855 /* this catches the glibc case */
856 perror("sigaltstack");
857 return (1); /* aka exit(1) aka fail */
859 /* assume it works. */
863 ac_cv_c_working_sigaltstack="yes",
864 ac_cv_c_working_sigaltstack="no",
865 ac_cv_c_working_sigaltstack="no"
868 if test "$ac_cv_c_working_sigaltstack" = "yes"
870 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
874 dnl *** check for file descriptor passing with msg_accrights
876 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
877 AC_TRY_COMPILE([#include <sys/types.h>
878 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
879 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
880 if test "$ac_cv_c_msg_accrights" = "yes"
882 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
885 dnl *** check for the need to define __i386__
887 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
888 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
891 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
892 if test "$ac_cv_cpp_def_i386" = "yes"
894 CFLAGS="$CFLAGS -D__i386__"
895 LINTFLAGS="$LINTFLAGS -D__i386__"
898 dnl $GCC is set by autoconf
900 if test "$GCC" = "yes"
902 GCC_NO_BUILTIN="-fno-builtin"
904 AC_SUBST(GCC_NO_BUILTIN)
906 dnl **** Generate output files ****
908 MAKE_RULES=Make.rules
909 AC_SUBST_FILE(MAKE_RULES)
918 dlls/advapi32/Makefile
919 dlls/avifil32/Makefile
920 dlls/comctl32/Makefile
921 dlls/commdlg/Makefile
923 dlls/dciman32/Makefile
924 dlls/display/Makefile
928 dlls/imagehlp/Makefile
930 dlls/lzexpand/Makefile
934 dlls/msacm32/Makefile
935 dlls/msnet32/Makefile
936 dlls/msvideo/Makefile
940 dlls/oleaut32/Makefile
945 dlls/rasapi32/Makefile
946 dlls/shell32/Makefile
950 dlls/version/Makefile
952 dlls/win87em/Makefile
953 dlls/winaspi/Makefile
954 dlls/windebug/Makefile
957 dlls/winmm/mcianim/Makefile
958 dlls/winmm/mciavi/Makefile
959 dlls/winmm/mcicda/Makefile
960 dlls/winmm/mciseq/Makefile
961 dlls/winmm/mciwave/Makefile
962 dlls/winmm/midimap/Makefile
963 dlls/winmm/wavemap/Makefile
964 dlls/winmm/wineoss/Makefile
965 dlls/winsock/Makefile
966 dlls/winspool/Makefile
967 dlls/wnaspi32/Makefile
968 documentation/Makefile
969 documentation/wine.conf.man
970 documentation/wine.man
973 graphics/enhmetafiledrv/Makefile
974 graphics/metafiledrv/Makefile
975 graphics/psdrv/Makefile
976 graphics/ttydrv/Makefile
977 graphics/win16drv/Makefile
978 graphics/x11drv/Makefile
993 programs/clock/Makefile
994 programs/cmdlgtst/Makefile
995 programs/control/Makefile
996 programs/avitools/Makefile
997 programs/osversioncheck/Makefile
998 programs/notepad/Makefile
999 programs/progman/Makefile
1000 programs/regtest/Makefile
1001 programs/regapi/Makefile
1002 programs/view/Makefile
1003 programs/wcmd/Makefile
1004 programs/winhelp/Makefile
1005 programs/winver/Makefile
1016 windows/ttydrv/Makefile
1017 windows/x11drv/Makefile ])
1019 if test "$have_x" = "no"
1022 echo "*** Warning: X development files not found. Wine will be built without"
1023 echo "*** X support, which currently does not work, and would probably not be"
1024 echo "*** what you want anyway. You will need to install devel packages of"
1025 echo "*** Xlib/Xfree86 and Xpm at the very least."
1026 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1029 echo "*** Warning: Xpm development files not found. Wine will be built without"
1030 echo "*** Xpm support, which currently does not work. You will need to install"
1031 echo "*** devel packages of Xpm."
1034 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1037 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1038 echo "*** terminal resize support. Consider upgrading ncurses."
1041 if test "$wine_cv_libc_reentrant" = "no"
1044 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1045 echo "*** thread support. Consider upgrading libc to a more recent"
1046 echo "*** reentrant version of libc."
1049 if test "$wine_cv_mesa_version_OK" = "no"
1052 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1053 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)"
1057 echo "Configure finished. Do 'make depend && make' to compile Wine."
1060 dnl Local Variables:
1061 dnl comment-start: "dnl "
1063 dnl comment-start-skip: "\\bdnl\\b\\s *"
1064 dnl compile-command: "autoconf"