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 LIBEXT=so # library type .so or .a
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 EMU_TARGET=""; fi])
26 [ --disable-dll build static libraries instead of DLLs],
27 [if test "$enableval" = "no"; then LIBEXT="a"; fi])
30 [ --disable-debug compile out all debugging messages],
31 [if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
34 [ --disable-trace compile out TRACE messages],
35 [if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
37 AC_ARG_WITH(reentrant-x,
38 [ --without-reentrant-x compile for use with non-reentrant X libraries])
43 if test "$DEBUG_MSGS" = "no"
45 AC_DEFINE(NO_DEBUG_MSGS)
46 AC_DEFINE(NO_TRACE_MSGS)
48 if test "$TRACE_MSGS" = "no"
50 AC_DEFINE(NO_TRACE_MSGS)
54 dnl **** Check for some programs ****
65 AC_CHECK_PROG(C2MAN,c2man,c2man,true)
66 AC_PATH_PROG(LDCONFIG, ldconfig, true, /sbin:/usr/sbin:$PATH)
69 AC_CHECK_PROGS(LINT, lclint lint)
70 if test "$LINT" = "lint"
72 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
73 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
78 dnl **** Check for some libraries ****
80 dnl Check for -lm for BeOS
82 dnl Check for -li386 for NetBSD and OpenBSD
83 AC_CHECK_LIB(i386,i386_set_ldt)
84 dnl Check for -lossaudio for NetBSD
85 AC_CHECK_LIB(ossaudio,_oss_ioctl)
86 dnl Check for -lw for Solaris
87 AC_CHECK_LIB(w,iswalnum)
88 dnl Check for -lnsl for Solaris
89 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))
90 dnl Check for -lsocket for Solaris
91 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
92 dnl Check for -lxpg4 for FreeBSD
93 AC_CHECK_LIB(xpg4,setrunelocale)
94 dnl Check for -lmmap for OS/2
95 AC_CHECK_LIB(mmap,mmap)
97 AC_CHECK_FUNCS(openpty,,
98 AC_CHECK_LIB(util,openpty,
99 AC_DEFINE(HAVE_OPENPTY)
103 AC_CHECK_HEADERS(dlfcn.h,
104 AC_CHECK_FUNCS(dlopen,
105 AC_DEFINE(HAVE_DL_API),
106 AC_CHECK_LIB(dl,dlopen,
107 AC_DEFINE(HAVE_DL_API)
113 if test "$have_x" = "yes"
116 ac_save_CPPFLAGS="$CPPFLAGS"
117 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
120 AC_CHECK_HEADERS(X11/xpm.h)
121 if test "$ac_cv_header_X11_xpm_h" = "yes"
123 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
125 echo "When compiling with X support, you need the Xpm library, or"
126 echo "WINE will not work. This Xpm library is within the following RPM,"
127 echo "which you need to install:"
128 echo "Redhat : xpm, xpm-devel"
129 echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static"
132 echo "Or get the sources from ftp.x.org and all its mirror sites from "
133 echo "the directory /contrib/libraries."
139 dnl Check for X Shm extension
140 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
141 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
143 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
145 dnl Check for XFree86 DGA / DGA 2.0 extension
146 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
147 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
149 AC_CHECK_LIB(Xxf86dga,
151 AC_DEFINE(HAVE_LIBXXF86DGA2) AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
152 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
154 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
158 dnl Check for XFree86 VMODE extension
159 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
160 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
162 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
165 dnl Check for the presence of Mesa
166 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
167 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
169 dnl Check for some problems due to old Mesa versions
170 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
172 [#include <GL/gl.h>],
173 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
174 [wine_cv_mesa_version_OK="yes"],
175 [wine_cv_mesa_version_OK="no"]
179 if test "$wine_cv_mesa_version_OK" = "yes"
181 dnl Check for the presense of the library
182 AC_CHECK_LIB(GL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
183 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
185 AC_CHECK_LIB(MesaGL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lMesaGL",,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
188 dnl Check for the Color Table and Paletted Texture extensions
189 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
191 [#include <GL/gl.h>],
192 [GLenum test = GL_COLOR_INDEX8_EXT;],
193 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],
196 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
198 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
200 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
205 CPPFLAGS="$ac_save_CPPFLAGS"
212 dnl **** Check which curses lib to use ***
213 AC_CHECK_HEADERS(ncurses.h)
214 if test "$ac_cv_header_ncurses_h" = "yes"
216 AC_CHECK_LIB(ncurses,waddch)
218 if test "$ac_cv_lib_ncurses_waddch" = "yes"
220 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
221 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
223 AC_CHECK_HEADERS(curses.h)
224 if test "$ac_cv_header_curses_h" = "yes"
226 AC_CHECK_LIB(curses,waddch)
227 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
228 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
232 dnl **** Check for IPX (currently Linux only) ****
233 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
235 [#include <sys/socket.h>
236 #include <netipx/ipx.h>],
237 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
238 [ac_cv_c_ipx_gnu="yes"],
239 [ac_cv_c_ipx_gnu="no"])
241 if test "$ac_cv_c_ipx_gnu" = "yes"
243 AC_DEFINE(HAVE_IPX_GNU)
246 if test "$ac_cv_c_ipx_gnu" = "no"
248 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
250 [#include <sys/socket.h>
251 #include <asm/types.h>
252 #include <linux/ipx.h>],
253 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
254 [ac_cv_c_ipx_linux="yes"],
255 [ac_cv_c_ipx_linux="no"])
257 if test "$ac_cv_c_ipx_linux" = "yes"
259 AC_DEFINE(HAVE_IPX_LINUX)
263 dnl **** Check for Open Sound System ****
264 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
266 AC_CACHE_CHECK("for Open Sound System",
267 ac_cv_c_opensoundsystem,
269 #if defined(HAVE_SYS_SOUNDCARD_H)
270 #include <sys/soundcard.h>
271 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
272 #include <machine/soundcard.h>
273 #elif defined(HAVE_SOUNDCARD_H)
274 #include <soundcard.h>
278 /* check for one of the Open Sound System specific SNDCTL_ defines */
279 #if !defined(SNDCTL_DSP_STEREO)
280 #error No open sound system
282 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
284 if test "$ac_cv_c_opensoundsystem" = "yes"
289 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
290 ac_cv_c_opensoundsystem_midi,
292 #if defined(HAVE_SYS_SOUNDCARD_H)
293 #include <sys/soundcard.h>
294 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
295 #include <machine/soundcard.h>
296 #elif defined(HAVE_SOUNDCARD_H)
297 #include <soundcard.h>
301 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
302 #if !defined(SNDCTL_SEQ_SYNC)
303 #error No open sound system MIDI interface
305 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
307 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
309 AC_DEFINE(HAVE_OSS_MIDI)
312 dnl **** If ln -s doesn't work, use cp instead ****
313 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
315 dnl **** Check for gcc strength-reduce bug ****
317 if test "x${GCC}" = "xyes"
319 CFLAGS="$CFLAGS -Wall"
320 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
323 static int Array[[3]];
326 for(i=0; i<B; i++) Array[[i]] = i - 3;
327 exit( Array[[1]] != -2 );
329 ac_cv_c_gcc_strength_bug="no",
330 ac_cv_c_gcc_strength_bug="yes",
331 ac_cv_c_gcc_strength_bug="yes") )
332 if test "$ac_cv_c_gcc_strength_bug" = "yes"
334 CFLAGS="$CFLAGS -fno-strength-reduce"
338 dnl **** Check for underscore on external symbols ****
340 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
341 ac_cv_c_extern_prefix,
343 LIBS="conftest_asm.s $LIBS"
344 cat > conftest_asm.s <<EOF
349 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
350 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
352 if test "$ac_cv_c_extern_prefix" = "yes"
354 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
357 dnl **** Check for .string in assembler ****
359 AC_CACHE_CHECK("whether assembler accepts .string",
362 LIBS="conftest_asm.s $LIBS"
363 cat > conftest_asm.s <<EOF
366 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
368 if test "$ac_cv_c_asm_string" = "yes"
370 AC_DEFINE(HAVE_ASM_STRING)
373 dnl **** Check for working dll ****
376 if test "$LIBEXT" = "so"
378 AC_CACHE_CHECK("whether we can build a Linux dll",
380 [saved_cflags=$CFLAGS
381 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
382 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
385 if test "$ac_cv_c_dll_linux" = "yes"
387 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
389 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
390 ac_cv_c_dll_unixware,
391 [saved_cflags=$CFLAGS
392 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
393 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
396 if test "$ac_cv_c_dll_unixware" = "yes"
398 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
400 AC_CACHE_CHECK("whether we can build a NetBSD dll",
402 [saved_cflags=$CFLAGS
403 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
404 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
407 if test "$ac_cv_c_dll_netbsd" = "yes"
409 LDSHARED="ld -Bshareable -Bforcearchive"
413 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
421 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine"
423 if test "$LIBEXT" = "so"; then
427 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
428 ac_cv_c_whole_archive,
429 [saved_cflags=$CFLAGS
430 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
431 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
434 if test "$ac_cv_c_whole_archive" = "yes"
436 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
438 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
440 [saved_cflags=$CFLAGS
441 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
442 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
445 if test "$ac_cv_c_allextract" = "yes"
447 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
458 dnl **** Check for reentrant libc ****
460 dnl For cross-compiling we blindly assume that libc is reentrant. This is
461 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
463 wine_cv_libc_reentrant=no
465 dnl Linux style errno location
467 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
468 [AC_TRY_RUN([int myerrno = 0;
470 int *__errno_location(){return &myerrno;}
471 main(){connect(0,buf,255); exit(!myerrno);}],
472 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
473 wine_cv_libc_r__errno_location=yes )
475 if test "$wine_cv_libc_r__errno_location" = "yes"
477 AC_DEFINE(HAVE__ERRNO_LOCATION)
478 wine_cv_libc_reentrant=__errno_location
481 dnl FreeBSD style errno location
483 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
484 [AC_TRY_RUN([int myerrno = 0;
486 int *__error(){return &myerrno;}
487 main(){connect(0,buf,255); exit(!myerrno);}],
488 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
489 wine_cv_libc_r__error=yes )
491 if test "$wine_cv_libc_r__error" = "yes"
493 AC_DEFINE(HAVE__ERROR)
494 wine_cv_libc_reentrant=__error
497 dnl Solaris style errno location
499 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
500 [AC_TRY_RUN([int myerrno = 0;
502 int *___errno(){return &myerrno;}
503 main(){connect(0,buf,255); exit(!myerrno);}],
504 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
505 wine_cv_libc_r___errno=yes )
507 if test "$wine_cv_libc_r___errno" = "yes"
509 AC_DEFINE(HAVE___ERRNO)
510 wine_cv_libc_reentrant=___errno
513 dnl UnixWare style errno location
515 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
516 [AC_TRY_RUN([int myerrno = 0;
518 int *__thr_errno(){return &myerrno;}
519 main(){connect(0,buf,255); exit(!myerrno);}],
520 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
521 wine_cv_libc_r__thr_errno=yes )
523 if test "$wine_cv_libc_r__thr_errno" = "yes"
525 AC_DEFINE(HAVE__THR_ERRNO)
526 wine_cv_libc_reentrant=__thr_errno
528 if test "$wine_cv_libc_reentrant" = "no"
530 AC_DEFINE(NO_REENTRANT_LIBC)
533 dnl **** Check for reentrant X libraries ****
535 dnl This may fail to determine whether X libraries are reentrant if
536 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
537 dnl is possible with the --without-reentrant-x option.
539 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
541 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
542 [ if test "x$with_reentrant_x" = "xno"
544 wine_cv_x_reentrant=no
547 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
548 if test -r $dir/libX11.so; then
549 libX11_check="-D $dir/libX11.so"
552 if test -r $dir/libX11.a; then
553 libX11_check="$dir/libX11.a"
557 if test "$libX11_check" != "none"; then
558 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
560 wine_cv_x_reentrant=yes
562 wine_cv_x_reentrant=no
565 wine_cv_x_reentrant=unknown
569 wine_cv_x_reentrant=no
571 if test "$wine_cv_x_reentrant" = "no"
573 AC_DEFINE(NO_REENTRANT_X11)
576 dnl **** Check for endianness ****
580 dnl **** Check for functions ****
612 dnl **** Check for header files ****
666 dnl **** Check for types ****
671 AC_CHECK_SIZEOF(long long,0)
673 if test "$ac_cv_header_linux_joystick_h" = "yes"
675 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
676 wine_cv_linux_joystick_22_api,
678 #include <sys/ioctl.h>
679 #include <linux/joystick.h>
681 struct js_event blub;
682 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
683 #error "no 2.2 header"
686 wine_cv_linux_joystick_22_api=yes,
687 wine_cv_linux_joystick_22_api=no,
688 wine_cv_linux_joystick_22_api=no
691 if test "$wine_cv_linux_joystick_22_api"
693 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
697 dnl **** statfs checks ****
699 if test "$ac_cv_header_sys_vfs_h" = "yes"
701 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
702 wine_cv_sys_vfs_has_statfs,
704 #include <sys/types.h>
705 #ifdef HAVE_SYS_PARAM_H
706 # include <sys/param.h>
712 memset(&stfs,0,sizeof(stfs));
713 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
716 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
718 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
722 if test "$ac_cv_header_sys_statfs_h" = "yes"
724 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
725 wine_cv_sys_statfs_has_statfs,
727 #include <sys/types.h>
728 #ifdef HAVE_SYS_PARAM_H
729 # include <sys/param.h>
731 #include <sys/statfs.h>
734 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
737 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
739 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
743 if test "$ac_cv_header_sys_mount_h" = "yes"
745 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
746 wine_cv_sys_mount_has_statfs,
748 #include <sys/types.h>
749 #ifdef HAVE_SYS_PARAM_H
750 # include <sys/param.h>
752 #include <sys/mount.h>
755 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
758 if test "$wine_cv_sys_mount_has_statfs" = "yes"
760 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
764 dnl **** FIXME: what about mixed cases, where we need two of them? ***
766 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
767 [ if test "x$statfs_bfree" = "xno"
769 wine_cv_statfs_bfree=no
772 #include <sys/types.h>
773 #ifdef HAVE_SYS_PARAM_H
774 # include <sys/param.h>
776 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
777 # include <sys/mount.h>
779 # ifdef STATFS_DEFINED_BY_SYS_VFS
780 # include <sys/vfs.h>
782 # ifdef STATFS_DEFINED_BY_SYS_STATFS
783 # include <sys/statfs.h>
791 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
794 if test "$wine_cv_statfs_bfree" = "yes"
796 AC_DEFINE(STATFS_HAS_BFREE)
799 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
800 [ if test "x$statfs_bavail" = "xno"
802 wine_cv_statfs_bavail=no
805 #include <sys/types.h>
806 #ifdef HAVE_SYS_PARAM_H
807 # include <sys/param.h>
809 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
810 # include <sys/mount.h>
812 # ifdef STATFS_DEFINED_BY_SYS_VFS
813 # include <sys/vfs.h>
815 # ifdef STATFS_DEFINED_BY_SYS_STATFS
816 # include <sys/statfs.h>
824 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
827 if test "$wine_cv_statfs_bavail" = "yes"
829 AC_DEFINE(STATFS_HAS_BAVAIL)
832 dnl *** check for working sigaltstack
833 dnl glibc 2.0x defines it, but it always fails... so it is useless for us.
835 AC_CACHE_CHECK("for working sigaltstack",
836 ac_cv_c_working_sigaltstack,
839 #include <time.h> /* <sys/time.h> ? bad magic without end */
840 #include <sys/types.h>
841 #include <sys/signal.h>
842 #ifdef HAVE_SYS_PARAM_H
843 # include <sys/param.h>
845 #ifdef HAVE_SYSCALL_H
846 # include <syscall.h>
848 # ifdef HAVE_SYS_SYSCALL_H
849 # include <sys/syscall.h>
853 unsigned char *xaltstack;
856 main(int argc,char **argv) {
857 struct sigaltstack ss;
859 xaltstack = malloc(16384);
860 ss.ss_sp = xaltstack;
863 if (sigaltstack(&ss, NULL) < 0) {
864 /* this catches the glibc case */
865 perror("sigaltstack");
866 return (1); /* aka exit(1) aka fail */
868 /* assume it works. */
872 ac_cv_c_working_sigaltstack="yes",
873 ac_cv_c_working_sigaltstack="no",
874 ac_cv_c_working_sigaltstack="no"
877 if test "$ac_cv_c_working_sigaltstack" = "yes"
879 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
883 dnl *** check for file descriptor passing with msg_accrights
885 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
886 AC_TRY_COMPILE([#include <sys/types.h>
887 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
888 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
889 if test "$ac_cv_c_msg_accrights" = "yes"
891 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
894 dnl *** check for the need to define __i386__
896 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
897 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
900 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
901 if test "$ac_cv_cpp_def_i386" = "yes"
903 CFLAGS="$CFLAGS -D__i386__"
904 LINTFLAGS="$LINTFLAGS -D__i386__"
907 dnl $GCC is set by autoconf
909 if test "$GCC" = "yes"
911 GCC_NO_BUILTIN="-fno-builtin"
913 AC_SUBST(GCC_NO_BUILTIN)
915 dnl **** Generate output files ****
917 MAKE_RULES=Make.rules
918 AC_SUBST_FILE(MAKE_RULES)
927 dlls/advapi32/Makefile
928 dlls/avifil32/Makefile
929 dlls/comctl32/Makefile
930 dlls/commdlg/Makefile
932 dlls/dciman32/Makefile
933 dlls/display/Makefile
937 dlls/imagehlp/Makefile
939 dlls/lzexpand/Makefile
943 dlls/msacm32/Makefile
944 dlls/msnet32/Makefile
945 dlls/msvideo/Makefile
949 dlls/oleaut32/Makefile
952 dlls/olepro32/Makefile
955 dlls/rasapi32/Makefile
957 dlls/shell32/Makefile
961 dlls/version/Makefile
963 dlls/win87em/Makefile
964 dlls/winaspi/Makefile
965 dlls/windebug/Makefile
968 dlls/winmm/mcianim/Makefile
969 dlls/winmm/mciavi/Makefile
970 dlls/winmm/mcicda/Makefile
971 dlls/winmm/mciseq/Makefile
972 dlls/winmm/mciwave/Makefile
973 dlls/winmm/midimap/Makefile
974 dlls/winmm/wavemap/Makefile
975 dlls/winmm/wineoss/Makefile
976 dlls/winsock/Makefile
977 dlls/winspool/Makefile
978 dlls/wnaspi32/Makefile
979 documentation/Makefile
980 documentation/wine.conf.man
981 documentation/wine.man
984 graphics/enhmetafiledrv/Makefile
985 graphics/metafiledrv/Makefile
986 graphics/psdrv/Makefile
987 graphics/ttydrv/Makefile
988 graphics/win16drv/Makefile
989 graphics/x11drv/Makefile
1004 programs/clock/Makefile
1005 programs/cmdlgtst/Makefile
1006 programs/control/Makefile
1007 programs/avitools/Makefile
1008 programs/osversioncheck/Makefile
1009 programs/notepad/Makefile
1010 programs/progman/Makefile
1011 programs/regtest/Makefile
1012 programs/regapi/Makefile
1013 programs/view/Makefile
1014 programs/wcmd/Makefile
1015 programs/winhelp/Makefile
1016 programs/winver/Makefile
1027 windows/ttydrv/Makefile
1028 windows/x11drv/Makefile ])
1030 if test "$have_x" = "no"
1033 echo "*** Warning: X development files not found. Wine will be built without"
1034 echo "*** X support, which currently does not work, and would probably not be"
1035 echo "*** what you want anyway. You will need to install devel packages of"
1036 echo "*** Xlib/Xfree86 and Xpm at the very least."
1037 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1040 echo "*** Warning: Xpm development files not found. Wine will be built without"
1041 echo "*** Xpm support, which currently does not work. You will need to install"
1042 echo "*** devel packages of Xpm."
1045 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1048 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1049 echo "*** terminal resize support. Consider upgrading ncurses."
1052 if test "$wine_cv_libc_reentrant" = "no"
1055 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1056 echo "*** thread support. Consider upgrading libc to a more recent"
1057 echo "*** reentrant version of libc."
1060 if test "$wine_cv_mesa_version_OK" = "no"
1063 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1064 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)"
1068 echo "Configure finished. Do 'make depend && make' to compile Wine."
1071 dnl Local Variables:
1072 dnl comment-start: "dnl "
1074 dnl comment-start-skip: "\\bdnl\\b\\s *"
1075 dnl compile-command: "autoconf"