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"
131 echo "Debian/Corel Linux: xpm4g, xpm4g-dev"
133 echo "Or get the sources from ftp.x.org and all its mirror sites from "
134 echo "the directory /contrib/libraries."
140 dnl Check for X Shm extension
141 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
142 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
144 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
146 dnl Check for XFree86 DGA / DGA 2.0 extension
147 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
148 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
150 AC_CHECK_LIB(Xxf86dga,
152 AC_DEFINE(HAVE_LIBXXF86DGA2) AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
153 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
155 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
159 dnl Check for XFree86 VMODE extension
160 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
161 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
163 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
166 dnl Check for the presence of Mesa
167 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
168 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
170 dnl Check for some problems due to old Mesa versions
171 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
173 [#include <GL/gl.h>],
174 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
175 [wine_cv_mesa_version_OK="yes"],
176 [wine_cv_mesa_version_OK="no"]
180 if test "$wine_cv_mesa_version_OK" = "yes"
182 dnl Check for the presense of the library
183 AC_CHECK_LIB(GL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
184 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
186 AC_CHECK_LIB(MesaGL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lMesaGL",,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
189 dnl Check for the Color Table and Paletted Texture extensions
190 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
192 [#include <GL/gl.h>],
193 [GLenum test = GL_COLOR_INDEX8_EXT;],
194 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],
197 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
199 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
201 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
206 CPPFLAGS="$ac_save_CPPFLAGS"
213 dnl **** Check which curses lib to use ***
214 AC_CHECK_HEADERS(ncurses.h)
215 if test "$ac_cv_header_ncurses_h" = "yes"
217 AC_CHECK_LIB(ncurses,waddch)
219 if test "$ac_cv_lib_ncurses_waddch" = "yes"
221 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
222 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
224 AC_CHECK_HEADERS(curses.h)
225 if test "$ac_cv_header_curses_h" = "yes"
227 AC_CHECK_LIB(curses,waddch)
228 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
229 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
233 dnl **** Check for IPX (currently Linux only) ****
234 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
236 [#include <sys/socket.h>
237 #include <netipx/ipx.h>],
238 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
239 [ac_cv_c_ipx_gnu="yes"],
240 [ac_cv_c_ipx_gnu="no"])
242 if test "$ac_cv_c_ipx_gnu" = "yes"
244 AC_DEFINE(HAVE_IPX_GNU)
247 if test "$ac_cv_c_ipx_gnu" = "no"
249 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
251 [#include <sys/socket.h>
252 #include <asm/types.h>
253 #include <linux/ipx.h>],
254 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
255 [ac_cv_c_ipx_linux="yes"],
256 [ac_cv_c_ipx_linux="no"])
258 if test "$ac_cv_c_ipx_linux" = "yes"
260 AC_DEFINE(HAVE_IPX_LINUX)
264 dnl **** Check for Open Sound System ****
265 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
267 AC_CACHE_CHECK("for Open Sound System",
268 ac_cv_c_opensoundsystem,
270 #if defined(HAVE_SYS_SOUNDCARD_H)
271 #include <sys/soundcard.h>
272 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
273 #include <machine/soundcard.h>
274 #elif defined(HAVE_SOUNDCARD_H)
275 #include <soundcard.h>
279 /* check for one of the Open Sound System specific SNDCTL_ defines */
280 #if !defined(SNDCTL_DSP_STEREO)
281 #error No open sound system
283 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
285 if test "$ac_cv_c_opensoundsystem" = "yes"
290 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
291 ac_cv_c_opensoundsystem_midi,
293 #if defined(HAVE_SYS_SOUNDCARD_H)
294 #include <sys/soundcard.h>
295 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
296 #include <machine/soundcard.h>
297 #elif defined(HAVE_SOUNDCARD_H)
298 #include <soundcard.h>
302 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
303 #if !defined(SNDCTL_SEQ_SYNC)
304 #error No open sound system MIDI interface
306 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
308 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
310 AC_DEFINE(HAVE_OSS_MIDI)
313 dnl **** If ln -s doesn't work, use cp instead ****
314 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
316 dnl **** Check for gcc strength-reduce bug ****
318 if test "x${GCC}" = "xyes"
320 CFLAGS="$CFLAGS -Wall"
321 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
324 static int Array[[3]];
327 for(i=0; i<B; i++) Array[[i]] = i - 3;
328 exit( Array[[1]] != -2 );
330 ac_cv_c_gcc_strength_bug="no",
331 ac_cv_c_gcc_strength_bug="yes",
332 ac_cv_c_gcc_strength_bug="yes") )
333 if test "$ac_cv_c_gcc_strength_bug" = "yes"
335 CFLAGS="$CFLAGS -fno-strength-reduce"
339 dnl **** Check for underscore on external symbols ****
341 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
342 ac_cv_c_extern_prefix,
344 LIBS="conftest_asm.s $LIBS"
345 cat > conftest_asm.s <<EOF
350 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
351 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
353 if test "$ac_cv_c_extern_prefix" = "yes"
355 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
358 dnl **** Check for .string in assembler ****
360 AC_CACHE_CHECK("whether assembler accepts .string",
363 LIBS="conftest_asm.s $LIBS"
364 cat > conftest_asm.s <<EOF
367 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
369 if test "$ac_cv_c_asm_string" = "yes"
371 AC_DEFINE(HAVE_ASM_STRING)
374 dnl **** Check for working dll ****
377 if test "$LIBEXT" = "so"
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"
388 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
390 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
391 ac_cv_c_dll_unixware,
392 [saved_cflags=$CFLAGS
393 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
394 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
397 if test "$ac_cv_c_dll_unixware" = "yes"
399 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
401 AC_CACHE_CHECK("whether we can build a NetBSD dll",
403 [saved_cflags=$CFLAGS
404 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
405 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
408 if test "$ac_cv_c_dll_netbsd" = "yes"
410 LDSHARED="ld -Bshareable -Bforcearchive"
414 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
422 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine"
424 if test "$LIBEXT" = "so"; then
428 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
429 ac_cv_c_whole_archive,
430 [saved_cflags=$CFLAGS
431 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
432 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
435 if test "$ac_cv_c_whole_archive" = "yes"
437 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
439 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
441 [saved_cflags=$CFLAGS
442 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
443 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
446 if test "$ac_cv_c_allextract" = "yes"
448 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
459 dnl **** Check for reentrant libc ****
461 dnl For cross-compiling we blindly assume that libc is reentrant. This is
462 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
464 wine_cv_libc_reentrant=no
466 dnl Linux style errno location
468 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
469 [AC_TRY_RUN([int myerrno = 0;
471 int *__errno_location(){return &myerrno;}
472 main(){connect(0,buf,255); exit(!myerrno);}],
473 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
474 wine_cv_libc_r__errno_location=yes )
476 if test "$wine_cv_libc_r__errno_location" = "yes"
478 AC_DEFINE(HAVE__ERRNO_LOCATION)
479 wine_cv_libc_reentrant=__errno_location
482 dnl FreeBSD style errno location
484 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
485 [AC_TRY_RUN([int myerrno = 0;
487 int *__error(){return &myerrno;}
488 main(){connect(0,buf,255); exit(!myerrno);}],
489 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
490 wine_cv_libc_r__error=yes )
492 if test "$wine_cv_libc_r__error" = "yes"
494 AC_DEFINE(HAVE__ERROR)
495 wine_cv_libc_reentrant=__error
498 dnl Solaris style errno location
500 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
501 [AC_TRY_RUN([int myerrno = 0;
503 int *___errno(){return &myerrno;}
504 main(){connect(0,buf,255); exit(!myerrno);}],
505 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
506 wine_cv_libc_r___errno=yes )
508 if test "$wine_cv_libc_r___errno" = "yes"
510 AC_DEFINE(HAVE___ERRNO)
511 wine_cv_libc_reentrant=___errno
514 dnl UnixWare style errno location
516 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
517 [AC_TRY_RUN([int myerrno = 0;
519 int *__thr_errno(){return &myerrno;}
520 main(){connect(0,buf,255); exit(!myerrno);}],
521 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
522 wine_cv_libc_r__thr_errno=yes )
524 if test "$wine_cv_libc_r__thr_errno" = "yes"
526 AC_DEFINE(HAVE__THR_ERRNO)
527 wine_cv_libc_reentrant=__thr_errno
529 if test "$wine_cv_libc_reentrant" = "no"
531 AC_DEFINE(NO_REENTRANT_LIBC)
534 dnl **** Check for reentrant X libraries ****
536 dnl This may fail to determine whether X libraries are reentrant if
537 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
538 dnl is possible with the --without-reentrant-x option.
540 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
542 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
543 [ if test "x$with_reentrant_x" = "xno"
545 wine_cv_x_reentrant=no
548 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
549 if test -r $dir/libX11.so; then
550 libX11_check="-D $dir/libX11.so"
553 if test -r $dir/libX11.a; then
554 libX11_check="$dir/libX11.a"
558 if test "$libX11_check" != "none"; then
559 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
561 wine_cv_x_reentrant=yes
563 wine_cv_x_reentrant=no
566 wine_cv_x_reentrant=unknown
570 wine_cv_x_reentrant=no
572 if test "$wine_cv_x_reentrant" = "no"
574 AC_DEFINE(NO_REENTRANT_X11)
577 dnl **** Check for endianness ****
581 dnl **** Check for functions ****
613 dnl **** Check for header files ****
667 dnl **** Check for types ****
672 AC_CHECK_SIZEOF(long long,0)
674 if test "$ac_cv_header_linux_joystick_h" = "yes"
676 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
677 wine_cv_linux_joystick_22_api,
679 #include <sys/ioctl.h>
680 #include <linux/joystick.h>
682 struct js_event blub;
683 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
684 #error "no 2.2 header"
687 wine_cv_linux_joystick_22_api=yes,
688 wine_cv_linux_joystick_22_api=no,
689 wine_cv_linux_joystick_22_api=no
692 if test "$wine_cv_linux_joystick_22_api"
694 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
698 dnl **** statfs checks ****
700 if test "$ac_cv_header_sys_vfs_h" = "yes"
702 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
703 wine_cv_sys_vfs_has_statfs,
705 #include <sys/types.h>
706 #ifdef HAVE_SYS_PARAM_H
707 # include <sys/param.h>
713 memset(&stfs,0,sizeof(stfs));
714 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
717 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
719 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
723 if test "$ac_cv_header_sys_statfs_h" = "yes"
725 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
726 wine_cv_sys_statfs_has_statfs,
728 #include <sys/types.h>
729 #ifdef HAVE_SYS_PARAM_H
730 # include <sys/param.h>
732 #include <sys/statfs.h>
735 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
738 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
740 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
744 if test "$ac_cv_header_sys_mount_h" = "yes"
746 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
747 wine_cv_sys_mount_has_statfs,
749 #include <sys/types.h>
750 #ifdef HAVE_SYS_PARAM_H
751 # include <sys/param.h>
753 #include <sys/mount.h>
756 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
759 if test "$wine_cv_sys_mount_has_statfs" = "yes"
761 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
765 dnl **** FIXME: what about mixed cases, where we need two of them? ***
767 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
768 [ if test "x$statfs_bfree" = "xno"
770 wine_cv_statfs_bfree=no
773 #include <sys/types.h>
774 #ifdef HAVE_SYS_PARAM_H
775 # include <sys/param.h>
777 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
778 # include <sys/mount.h>
780 # ifdef STATFS_DEFINED_BY_SYS_VFS
781 # include <sys/vfs.h>
783 # ifdef STATFS_DEFINED_BY_SYS_STATFS
784 # include <sys/statfs.h>
792 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
795 if test "$wine_cv_statfs_bfree" = "yes"
797 AC_DEFINE(STATFS_HAS_BFREE)
800 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
801 [ if test "x$statfs_bavail" = "xno"
803 wine_cv_statfs_bavail=no
806 #include <sys/types.h>
807 #ifdef HAVE_SYS_PARAM_H
808 # include <sys/param.h>
810 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
811 # include <sys/mount.h>
813 # ifdef STATFS_DEFINED_BY_SYS_VFS
814 # include <sys/vfs.h>
816 # ifdef STATFS_DEFINED_BY_SYS_STATFS
817 # include <sys/statfs.h>
825 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
828 if test "$wine_cv_statfs_bavail" = "yes"
830 AC_DEFINE(STATFS_HAS_BAVAIL)
833 dnl *** check for working sigaltstack
834 dnl glibc 2.0x defines it, but it always fails... so it is useless for us.
836 AC_CACHE_CHECK("for working sigaltstack",
837 ac_cv_c_working_sigaltstack,
840 #include <time.h> /* <sys/time.h> ? bad magic without end */
841 #include <sys/types.h>
842 #include <sys/signal.h>
843 #ifdef HAVE_SYS_PARAM_H
844 # include <sys/param.h>
846 #ifdef HAVE_SYSCALL_H
847 # include <syscall.h>
849 # ifdef HAVE_SYS_SYSCALL_H
850 # include <sys/syscall.h>
854 unsigned char *xaltstack;
857 main(int argc,char **argv) {
858 struct sigaltstack ss;
860 xaltstack = malloc(16384);
861 ss.ss_sp = xaltstack;
864 if (sigaltstack(&ss, NULL) < 0) {
865 /* this catches the glibc case */
866 perror("sigaltstack");
867 return (1); /* aka exit(1) aka fail */
869 /* assume it works. */
873 ac_cv_c_working_sigaltstack="yes",
874 ac_cv_c_working_sigaltstack="no",
875 ac_cv_c_working_sigaltstack="no"
878 if test "$ac_cv_c_working_sigaltstack" = "yes"
880 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
884 dnl *** check for file descriptor passing with msg_accrights
886 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
887 AC_TRY_COMPILE([#include <sys/types.h>
888 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
889 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
890 if test "$ac_cv_c_msg_accrights" = "yes"
892 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
895 dnl *** Check for the sun_len member in struct sockaddr_un
897 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
898 AC_TRY_COMPILE([#include <sys/types.h>
899 #include <sys/socket.h>
900 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
901 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
902 if test "$ac_cv_c_sun_len" = "yes"
904 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
907 dnl *** check for the need to define __i386__
909 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
910 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
913 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
914 if test "$ac_cv_cpp_def_i386" = "yes"
916 CFLAGS="$CFLAGS -D__i386__"
917 LINTFLAGS="$LINTFLAGS -D__i386__"
920 dnl $GCC is set by autoconf
922 if test "$GCC" = "yes"
924 GCC_NO_BUILTIN="-fno-builtin"
926 AC_SUBST(GCC_NO_BUILTIN)
928 dnl **** Generate output files ****
930 MAKE_RULES=Make.rules
931 AC_SUBST_FILE(MAKE_RULES)
933 MAKE_DLL_RULES=dlls/Makedll.rules
934 AC_SUBST_FILE(MAKE_DLL_RULES)
944 dlls/advapi32/Makefile
945 dlls/avifil32/Makefile
946 dlls/comctl32/Makefile
947 dlls/commdlg/Makefile
949 dlls/dciman32/Makefile
952 dlls/display/Makefile
957 dlls/imagehlp/Makefile
959 dlls/lzexpand/Makefile
963 dlls/msacm32/Makefile
964 dlls/msnet32/Makefile
965 dlls/msvideo/Makefile
969 dlls/oleaut32/Makefile
972 dlls/olepro32/Makefile
975 dlls/rasapi32/Makefile
977 dlls/shell32/Makefile
983 dlls/version/Makefile
985 dlls/win87em/Makefile
986 dlls/winaspi/Makefile
987 dlls/windebug/Makefile
990 dlls/winmm/joystick/Makefile
991 dlls/winmm/mcianim/Makefile
992 dlls/winmm/mciavi/Makefile
993 dlls/winmm/mcicda/Makefile
994 dlls/winmm/mciseq/Makefile
995 dlls/winmm/mciwave/Makefile
996 dlls/winmm/midimap/Makefile
997 dlls/winmm/wavemap/Makefile
998 dlls/winmm/wineoss/Makefile
999 dlls/winsock/Makefile
1000 dlls/winspool/Makefile
1001 dlls/ttydrv/Makefile
1002 dlls/x11drv/Makefile
1003 documentation/Makefile
1004 documentation/wine.conf.man
1005 documentation/wine.man
1008 graphics/enhmetafiledrv/Makefile
1009 graphics/metafiledrv/Makefile
1010 graphics/psdrv/Makefile
1011 graphics/ttydrv/Makefile
1012 graphics/win16drv/Makefile
1013 graphics/x11drv/Makefile
1028 programs/clock/Makefile
1029 programs/cmdlgtst/Makefile
1030 programs/control/Makefile
1031 programs/avitools/Makefile
1032 programs/osversioncheck/Makefile
1033 programs/notepad/Makefile
1034 programs/progman/Makefile
1035 programs/regtest/Makefile
1036 programs/regapi/Makefile
1037 programs/view/Makefile
1038 programs/wcmd/Makefile
1039 programs/winemine/Makefile
1040 programs/winhelp/Makefile
1041 programs/winver/Makefile
1052 windows/ttydrv/Makefile
1053 windows/x11drv/Makefile ])
1055 if test "$have_x" = "no"
1058 echo "*** Warning: X development files not found. Wine will be built without"
1059 echo "*** X support, which currently does not work, and would probably not be"
1060 echo "*** what you want anyway. You will need to install devel packages of"
1061 echo "*** Xlib/Xfree86 and Xpm at the very least."
1062 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1065 echo "*** Warning: Xpm development files not found. Wine will be built without"
1066 echo "*** Xpm support, which currently does not work. You will need to install"
1067 echo "*** devel packages of Xpm."
1070 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1073 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1074 echo "*** terminal resize support. Consider upgrading ncurses."
1077 if test "$wine_cv_libc_reentrant" = "no"
1080 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1081 echo "*** thread support. Consider upgrading libc to a more recent"
1082 echo "*** reentrant version of libc."
1085 if test "$wine_cv_mesa_version_OK" = "no"
1088 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1089 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)"
1093 echo "Configure finished. Do 'make depend && make' to compile Wine."
1096 dnl Local Variables:
1097 dnl comment-start: "dnl "
1099 dnl comment-start-skip: "\\bdnl\\b\\s *"
1100 dnl compile-command: "autoconf"