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 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
159 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11)
163 dnl Check for XFree86 VMODE extension
164 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
165 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
167 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11)
170 dnl Check for the presence of Mesa
171 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
172 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
174 dnl Check for some problems due to old Mesa versions
175 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
177 [#include <GL/gl.h>],
178 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
179 [wine_cv_mesa_version_OK="yes"],
180 [wine_cv_mesa_version_OK="no"]
184 if test "$wine_cv_mesa_version_OK" = "yes"
186 dnl Check for the presense of the library
187 AC_CHECK_LIB(GL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm)
188 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
190 AC_CHECK_LIB(MesaGL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lMesaGL",,$X_LIBS -lXext -lX11 -lm)
193 dnl Check for the Color Table and Paletted Texture extensions
194 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
196 [#include <GL/gl.h>],
197 [GLenum test = GL_COLOR_INDEX8_EXT;],
198 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],
201 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
203 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm)
205 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm)
210 CPPFLAGS="$ac_save_CPPFLAGS"
217 dnl **** Check which curses lib to use ***
218 AC_CHECK_HEADERS(ncurses.h)
219 if test "$ac_cv_header_ncurses_h" = "yes"
221 AC_CHECK_LIB(ncurses,waddch)
223 if test "$ac_cv_lib_ncurses_waddch" = "yes"
225 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
226 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
228 AC_CHECK_HEADERS(curses.h)
229 if test "$ac_cv_header_curses_h" = "yes"
231 AC_CHECK_LIB(curses,waddch)
232 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
233 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
237 dnl **** Check for IPX (currently Linux only) ****
238 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
240 [#include <sys/socket.h>
241 #include <netipx/ipx.h>],
242 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
243 [AC_DEFINE(HAVE_IPX_GNU)
244 ac_cv_c_ipx_gnu="yes"],
245 [ac_cv_c_ipx_gnu="no"])
248 if test "$ac_cv_c_ipx_gnu" = "no"
250 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
252 [#include <sys/socket.h>
253 #include <asm/types.h>
254 #include <linux/ipx.h>],
255 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
256 [AC_DEFINE(HAVE_IPX_LINUX)
257 ac_cv_c_ipx_linux="yes"],
258 [ac_cv_c_ipx_linux="no"])
262 dnl **** Check for Open Sound System ****
263 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
265 AC_CACHE_CHECK("for Open Sound System",
266 ac_cv_c_opensoundsystem,
268 #if defined(HAVE_SYS_SOUNDCARD_H)
269 #include <sys/soundcard.h>
270 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
271 #include <machine/soundcard.h>
272 #elif defined(HAVE_SOUNDCARD_H)
273 #include <soundcard.h>
277 /* check for one of the Open Sound System specific SNDCTL_ defines */
278 #if !defined(SNDCTL_DSP_STEREO)
279 #error No open sound system
281 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
283 if test "$ac_cv_c_opensoundsystem" = "yes"
288 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
289 ac_cv_c_opensoundsystem_midi,
291 #if defined(HAVE_SYS_SOUNDCARD_H)
292 #include <sys/soundcard.h>
293 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
294 #include <machine/soundcard.h>
295 #elif defined(HAVE_SOUNDCARD_H)
296 #include <soundcard.h>
300 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
301 #if !defined(SNDCTL_SEQ_SYNC)
302 #error No open sound system MIDI interface
304 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
306 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
308 AC_DEFINE(HAVE_OSS_MIDI)
311 dnl **** If ln -s doesn't work, use cp instead ****
312 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
314 dnl **** Check for gcc strength-reduce bug ****
316 if test "x${GCC}" = "xyes"
318 CFLAGS="$CFLAGS -Wall"
319 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
322 static int Array[[3]];
325 for(i=0; i<B; i++) Array[[i]] = i - 3;
326 exit( Array[[1]] != -2 );
328 ac_cv_c_gcc_strength_bug="no",
329 ac_cv_c_gcc_strength_bug="yes",
330 ac_cv_c_gcc_strength_bug="yes") )
331 if test "$ac_cv_c_gcc_strength_bug" = "yes"
333 CFLAGS="$CFLAGS -fno-strength-reduce"
337 dnl **** Check for underscore on external symbols ****
339 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
340 ac_cv_c_extern_prefix,
342 LIBS="conftest_asm.s $LIBS"
343 cat > conftest_asm.s <<EOF
348 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
349 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
351 if test "$ac_cv_c_extern_prefix" = "yes"
353 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
356 dnl **** Check for .string in assembler ****
358 AC_CACHE_CHECK("whether assembler accepts .string",
361 LIBS="conftest_asm.s $LIBS"
362 cat > conftest_asm.s <<EOF
365 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
367 if test "$ac_cv_c_asm_string" = "yes"
369 AC_DEFINE(HAVE_ASM_STRING)
372 dnl **** Check for working dll ****
377 if test "$LIB_TARGET" = "libwine.so.1.0"
379 AC_CACHE_CHECK("whether we can build a Linux dll",
381 [saved_cflags=$CFLAGS
382 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
383 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
386 if test "$ac_cv_c_dll_linux" = "yes"
390 LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so,-rpath,\$(libdir)"
392 AC_CACHE_CHECK("whether we can build a UnixWare dll",
393 ac_cv_c_dll_unixware,
394 [saved_cflags=$CFLAGS
395 CFLAGS="$CFLAGS -fPIC -Wl,-G,conftest.so.1.0"
396 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
399 if test "$ac_cv_c_dll_unixware" = "yes"
403 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/libwine.so"
405 AC_CACHE_CHECK("whether we can build a NetBSD dll",
407 [saved_cflags=$CFLAGS
408 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
409 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
412 if test "$ac_cv_c_dll_netbsd" = "yes"
416 LDSHARED="ld -Bshareable -Bforcearchive"
420 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
422 LIB_TARGET="libwine.a"
429 dnl **** Check for reentrant libc ****
431 dnl For cross-compiling we blindly assume that libc is reentrant. This is
432 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
434 wine_cv_libc_reentrant=no
436 dnl Linux style errno location
438 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
439 [AC_TRY_RUN([int myerrno = 0;
441 int *__errno_location(){return &myerrno;}
442 main(){connect(0,buf,255); exit(!myerrno);}],
443 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
444 wine_cv_libc_r__errno_location=yes )
446 if test "$wine_cv_libc_r__errno_location" = "yes"
448 AC_DEFINE(HAVE__ERRNO_LOCATION)
449 wine_cv_libc_reentrant=__errno_location
452 dnl FreeBSD style errno location
454 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
455 [AC_TRY_RUN([int myerrno = 0;
457 int *__error(){return &myerrno;}
458 main(){connect(0,buf,255); exit(!myerrno);}],
459 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
460 wine_cv_libc_r__error=yes )
462 if test "$wine_cv_libc_r__error" = "yes"
464 AC_DEFINE(HAVE__ERROR)
465 wine_cv_libc_reentrant=__error
468 dnl Solaris style errno location
470 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
471 [AC_TRY_RUN([int myerrno = 0;
473 int *___errno(){return &myerrno;}
474 main(){connect(0,buf,255); exit(!myerrno);}],
475 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
476 wine_cv_libc_r___errno=yes )
478 if test "$wine_cv_libc_r___errno" = "yes"
480 AC_DEFINE(HAVE___ERRNO)
481 wine_cv_libc_reentrant=___errno
484 dnl UnixWare style errno location
486 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
487 [AC_TRY_RUN([int myerrno = 0;
489 int *__thr_errno(){return &myerrno;}
490 main(){connect(0,buf,255); exit(!myerrno);}],
491 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
492 wine_cv_libc_r__thr_errno=yes )
494 if test "$wine_cv_libc_r__thr_errno" = "yes"
496 AC_DEFINE(HAVE__THR_ERRNO)
497 wine_cv_libc_reentrant=__thr_errno
499 if test "$wine_cv_libc_reentrant" = "no"
501 AC_DEFINE(NO_REENTRANT_LIBC)
504 dnl **** Check for reentrant X libraries ****
506 dnl This may fail to determine whether X libraries are reentrant if
507 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
508 dnl is possible with the --without-reentrant-x option.
510 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
512 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
513 [ if test "x$with_reentrant_x" = "xno"
515 wine_cv_x_reentrant=no
518 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
519 if test -r $dir/libX11.so; then
520 libX11_check="-D $dir/libX11.so"
523 if test -r $dir/libX11.a; then
524 libX11_check="$dir/libX11.a"
528 if test "$libX11_check" != "none"; then
529 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
531 wine_cv_x_reentrant=yes
533 wine_cv_x_reentrant=no
536 wine_cv_x_reentrant=unknown
540 wine_cv_x_reentrant=no
542 if test "$wine_cv_x_reentrant" = "no"
544 AC_DEFINE(NO_REENTRANT_X11)
547 dnl **** Check for endianness ****
551 dnl **** Check for functions ****
583 dnl **** Check for header files ****
636 dnl **** Check for types ****
641 AC_CHECK_SIZEOF(long long,0)
643 if test "$ac_cv_header_linux_joystick_h" = "yes"
645 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
646 wine_cv_linux_joystick_22_api,
648 #include <sys/ioctl.h>
649 #include <linux/joystick.h>
651 struct js_event blub;
652 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
653 #error "no 2.2 header"
656 wine_cv_linux_joystick_22_api=yes,
657 wine_cv_linux_joystick_22_api=no,
658 wine_cv_linux_joystick_22_api=no
661 if test "$wine_cv_linux_joystick_22_api"
663 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
667 dnl **** statfs checks ****
669 if test "$ac_cv_header_sys_vfs_h" = "yes"
671 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
672 wine_cv_sys_vfs_has_statfs,
674 #include <sys/types.h>
675 #ifdef HAVE_SYS_PARAM_H
676 # include <sys/param.h>
682 memset(&stfs,0,sizeof(stfs));
683 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
686 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
688 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
692 if test "$ac_cv_header_sys_statfs_h" = "yes"
694 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
695 wine_cv_sys_statfs_has_statfs,
697 #include <sys/types.h>
698 #ifdef HAVE_SYS_PARAM_H
699 # include <sys/param.h>
701 #include <sys/statfs.h>
704 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
707 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
709 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
713 if test "$ac_cv_header_sys_mount_h" = "yes"
715 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
716 wine_cv_sys_mount_has_statfs,
718 #include <sys/types.h>
719 #ifdef HAVE_SYS_PARAM_H
720 # include <sys/param.h>
722 #include <sys/mount.h>
725 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
728 if test "$wine_cv_sys_mount_has_statfs" = "yes"
730 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
734 dnl **** FIXME: what about mixed cases, where we need two of them? ***
736 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
737 [ if test "x$statfs_bfree" = "xno"
739 wine_cv_statfs_bfree=no
742 #include <sys/types.h>
743 #ifdef HAVE_SYS_PARAM_H
744 # include <sys/param.h>
746 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
747 # include <sys/mount.h>
749 # ifdef STATFS_DEFINED_BY_SYS_VFS
750 # include <sys/vfs.h>
752 # ifdef STATFS_DEFINED_BY_SYS_STATFS
753 # include <sys/statfs.h>
761 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
764 if test "$wine_cv_statfs_bfree" = "yes"
766 AC_DEFINE(STATFS_HAS_BFREE)
769 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
770 [ if test "x$statfs_bavail" = "xno"
772 wine_cv_statfs_bavail=no
775 #include <sys/types.h>
776 #ifdef HAVE_SYS_PARAM_H
777 # include <sys/param.h>
779 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
780 # include <sys/mount.h>
782 # ifdef STATFS_DEFINED_BY_SYS_VFS
783 # include <sys/vfs.h>
785 # ifdef STATFS_DEFINED_BY_SYS_STATFS
786 # include <sys/statfs.h>
794 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
797 if test "$wine_cv_statfs_bavail" = "yes"
799 AC_DEFINE(STATFS_HAS_BAVAIL)
802 dnl *** check for working sigaltstack
803 dnl glibc 2.0x defines it, but it always fails... so it is useless for us.
805 AC_CACHE_CHECK("for working sigaltstack",
806 ac_cv_c_working_sigaltstack,
809 #include <time.h> /* <sys/time.h> ? bad magic without end */
810 #include <sys/types.h>
811 #include <sys/signal.h>
812 #ifdef HAVE_SYS_PARAM_H
813 # include <sys/param.h>
815 #ifdef HAVE_SYSCALL_H
816 # include <syscall.h>
818 # ifdef HAVE_SYS_SYSCALL_H
819 # include <sys/syscall.h>
823 unsigned char *xaltstack;
826 main(int argc,char **argv) {
827 struct sigaltstack ss;
829 xaltstack = malloc(16384);
830 ss.ss_sp = xaltstack;
833 if (sigaltstack(&ss, NULL) < 0) {
834 /* this catches the glibc case */
835 perror("sigaltstack");
836 return (1); /* aka exit(1) aka fail */
838 /* assume it works. */
842 ac_cv_c_working_sigaltstack="yes",
843 ac_cv_c_working_sigaltstack="no",
844 ac_cv_c_working_sigaltstack="no"
847 if test "$ac_cv_c_working_sigaltstack" = "yes"
849 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
853 dnl *** check for file descriptor passing with msg_accrights
855 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
856 AC_TRY_COMPILE([#include <sys/types.h>
857 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
858 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
859 if test "$ac_cv_c_msg_accrights" = "yes"
861 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
864 dnl *** check for the need to define __i386__
866 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
867 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
870 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
871 if test "$ac_cv_cpp_def_i386" = "yes"
873 CFLAGS="$CFLAGS -D__i386__"
874 LINTFLAGS="$LINTFLAGS -D__i386__"
877 dnl $GCC is set by autoconf
879 if test "$GCC" = "yes"
881 GCC_NO_BUILTIN="-fno-builtin"
883 AC_SUBST(GCC_NO_BUILTIN)
885 dnl **** Generate output files ****
887 MAKE_RULES=Make.rules
888 AC_SUBST_FILE(MAKE_RULES)
897 dlls/advapi32/Makefile
898 dlls/avifil32/Makefile
899 dlls/comctl32/Makefile
900 dlls/commdlg/Makefile
902 dlls/dciman32/Makefile
903 dlls/display/Makefile
907 dlls/imagehlp/Makefile
909 dlls/lzexpand/Makefile
913 dlls/msacm32/Makefile
914 dlls/msnet32/Makefile
915 dlls/msvideo/Makefile
919 dlls/oleaut32/Makefile
924 dlls/rasapi32/Makefile
925 dlls/shell32/Makefile
930 dlls/version/Makefile
932 dlls/win87em/Makefile
933 dlls/winaspi/Makefile
934 dlls/windebug/Makefile
937 dlls/winmm/mcianim/Makefile
938 dlls/winmm/mciavi/Makefile
939 dlls/winmm/mcicda/Makefile
940 dlls/winmm/mciseq/Makefile
941 dlls/winmm/mciwave/Makefile
942 dlls/winmm/midimap/Makefile
943 dlls/winmm/wavemap/Makefile
944 dlls/winmm/wineoss/Makefile
945 dlls/winspool/Makefile
946 dlls/wnaspi32/Makefile
947 documentation/Makefile
948 documentation/wine.conf.man
949 documentation/wine.man
952 graphics/enhmetafiledrv/Makefile
953 graphics/metafiledrv/Makefile
954 graphics/psdrv/Makefile
955 graphics/ttydrv/Makefile
956 graphics/win16drv/Makefile
957 graphics/x11drv/Makefile
972 programs/clock/Makefile
973 programs/cmdlgtst/Makefile
974 programs/control/Makefile
975 programs/avitools/Makefile
976 programs/osversioncheck/Makefile
977 programs/notepad/Makefile
978 programs/progman/Makefile
979 programs/regtest/Makefile
980 programs/regapi/Makefile
981 programs/view/Makefile
982 programs/wcmd/Makefile
983 programs/winhelp/Makefile
984 programs/winver/Makefile
995 windows/ttydrv/Makefile
996 windows/x11drv/Makefile ])
998 if test "$have_x" = "no"
1001 echo "*** Warning: X development files not found. Wine will be built without"
1002 echo "*** X support, which currently does not work, and would probably not be"
1003 echo "*** what you want anyway. You will need to install devel packages of"
1004 echo "*** Xlib/Xfree86 and Xpm at the very least."
1005 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1008 echo "*** Warning: Xpm development files not found. Wine will be built without"
1009 echo "*** Xpm support, which currently does not work. You will need to install"
1010 echo "*** devel packages of Xpm."
1013 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1016 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1017 echo "*** terminal resize support. Consider upgrading ncurses."
1020 if test "$wine_cv_libc_reentrant" = "no"
1023 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1024 echo "*** thread support. Consider upgrading libc to a more recent"
1025 echo "*** reentrant version of libc."
1028 if test "$wine_cv_mesa_version_OK" = "no"
1031 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1032 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)"
1036 echo "Configure finished. Do 'make depend && make' to compile Wine."
1039 dnl Local Variables:
1040 dnl comment-start: "dnl "
1042 dnl comment-start-skip: "\\bdnl\\b\\s *"
1043 dnl compile-command: "autoconf"