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)
119 if test "$have_x" = "yes"
122 ac_save_CPPFLAGS="$CPPFLAGS"
123 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
126 AC_CHECK_HEADERS(X11/xpm.h)
127 if test "$ac_cv_header_X11_xpm_h" = "yes"
129 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
131 echo "When compiling with X support, you need the Xpm library, or"
132 echo "WINE will not work. This Xpm library is within the following RPM,"
133 echo "which you need to install:"
134 echo "Redhat : xpm, xpm-devel"
135 echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static"
137 echo "Debian/Corel Linux: xpm4g, xpm4g-dev"
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 $X_EXTRA_LIBS)
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,
158 AC_DEFINE(HAVE_LIBXXF86DGA2)
159 AC_DEFINE(HAVE_LIBXXF86DGA)
160 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
161 DGA_SRCS='$(DGA_SRCS)'
162 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS
164 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
166 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,
167 AC_DEFINE(HAVE_LIBXXF86DGA)
168 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
169 DGA_SRCS='$(DGA_SRCS)'
170 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
174 dnl Check for XFree86 VMODE extension
175 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
176 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
178 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
181 dnl Check for the presence of Mesa
182 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
183 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
185 dnl Check for some problems due to old Mesa versions
186 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
188 [#include <GL/gl.h>],
189 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
190 [wine_cv_mesa_version_OK="yes"],
191 [wine_cv_mesa_version_OK="no"]
195 dnl Check for the thread-safety of the OpenGL library
196 AC_CACHE_CHECK("for thread-safe Mesa version",
197 wine_cv_mesa_version_threadsafe,
200 AC_TRY_LINK([],[pthread_getspecific();],
201 [wine_cv_mesa_version_threadsafe="yes"],
202 [wine_cv_mesa_version_threadsafe="no"])
206 if test "$wine_cv_mesa_version_OK" = "yes" -a "$wine_cv_mesa_version_threadsafe" = "no"
208 dnl Check for the presense of the library
209 AC_CHECK_LIB(GL,glXCreateContext,
210 AC_DEFINE(HAVE_LIBMESAGL)
211 X_PRE_LIBS="$X_PRE_LIBS -lGL"
212 MESA_SRCS='$(MESA_SRCS)'
214 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
215 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
217 AC_CHECK_LIB(MesaGL,glXCreateContext,
218 AC_DEFINE(HAVE_LIBMESAGL)
219 X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
220 MESA_SRCS='$(MESA_SRCS)'
222 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
225 dnl Check for the Color Table and Paletted Texture extensions
226 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
228 [#include <GL/gl.h>],
229 [GLenum test = GL_COLOR_INDEX8_EXT;],
230 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],
233 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
235 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
237 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
242 CPPFLAGS="$ac_save_CPPFLAGS"
250 dnl **** Check which curses lib to use ***
251 AC_CHECK_HEADERS(ncurses.h)
252 if test "$ac_cv_header_ncurses_h" = "yes"
254 AC_CHECK_LIB(ncurses,waddch)
256 if test "$ac_cv_lib_ncurses_waddch" = "yes"
258 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
259 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
261 AC_CHECK_HEADERS(curses.h)
262 if test "$ac_cv_header_curses_h" = "yes"
264 AC_CHECK_LIB(curses,waddch)
265 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
266 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
270 dnl **** Check for IPX (currently Linux only) ****
271 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
273 [#include <sys/socket.h>
274 #include <netipx/ipx.h>],
275 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
276 [ac_cv_c_ipx_gnu="yes"],
277 [ac_cv_c_ipx_gnu="no"])
279 if test "$ac_cv_c_ipx_gnu" = "yes"
281 AC_DEFINE(HAVE_IPX_GNU)
284 if test "$ac_cv_c_ipx_gnu" = "no"
286 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
288 [#include <sys/socket.h>
289 #include <asm/types.h>
290 #include <linux/ipx.h>],
291 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
292 [ac_cv_c_ipx_linux="yes"],
293 [ac_cv_c_ipx_linux="no"])
295 if test "$ac_cv_c_ipx_linux" = "yes"
297 AC_DEFINE(HAVE_IPX_LINUX)
301 dnl **** Check for Open Sound System ****
302 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
304 AC_CACHE_CHECK("for Open Sound System",
305 ac_cv_c_opensoundsystem,
307 #if defined(HAVE_SYS_SOUNDCARD_H)
308 #include <sys/soundcard.h>
309 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
310 #include <machine/soundcard.h>
311 #elif defined(HAVE_SOUNDCARD_H)
312 #include <soundcard.h>
316 /* check for one of the Open Sound System specific SNDCTL_ defines */
317 #if !defined(SNDCTL_DSP_STEREO)
318 #error No open sound system
320 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
322 if test "$ac_cv_c_opensoundsystem" = "yes"
327 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
328 ac_cv_c_opensoundsystem_midi,
330 #if defined(HAVE_SYS_SOUNDCARD_H)
331 #include <sys/soundcard.h>
332 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
333 #include <machine/soundcard.h>
334 #elif defined(HAVE_SOUNDCARD_H)
335 #include <soundcard.h>
339 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
340 #if !defined(SNDCTL_SEQ_SYNC)
341 #error No open sound system MIDI interface
343 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
345 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
347 AC_DEFINE(HAVE_OSS_MIDI)
350 dnl **** If ln -s doesn't work, use cp instead ****
351 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
353 dnl **** Check for gcc strength-reduce bug ****
355 if test "x${GCC}" = "xyes"
357 CFLAGS="$CFLAGS -Wall"
358 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
361 static int Array[[3]];
364 for(i=0; i<B; i++) Array[[i]] = i - 3;
365 exit( Array[[1]] != -2 );
367 ac_cv_c_gcc_strength_bug="no",
368 ac_cv_c_gcc_strength_bug="yes",
369 ac_cv_c_gcc_strength_bug="yes") )
370 if test "$ac_cv_c_gcc_strength_bug" = "yes"
372 CFLAGS="$CFLAGS -fno-strength-reduce"
376 dnl **** Check for underscore on external symbols ****
378 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
379 ac_cv_c_extern_prefix,
381 LIBS="conftest_asm.s $LIBS"
382 cat > conftest_asm.s <<EOF
387 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
388 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
390 if test "$ac_cv_c_extern_prefix" = "yes"
392 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
395 dnl **** Check for .string in assembler ****
397 AC_CACHE_CHECK("whether assembler accepts .string",
400 LIBS="conftest_asm.s $LIBS"
401 cat > conftest_asm.s <<EOF
404 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
406 if test "$ac_cv_c_asm_string" = "yes"
408 AC_DEFINE(HAVE_ASM_STRING)
411 dnl **** Check for working dll ****
414 if test "$LIBEXT" = "so"
416 AC_CACHE_CHECK("whether we can build a Linux dll",
418 [saved_cflags=$CFLAGS
419 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
420 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
423 if test "$ac_cv_c_dll_linux" = "yes"
425 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
427 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
428 ac_cv_c_dll_unixware,
429 [saved_cflags=$CFLAGS
430 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
431 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
434 if test "$ac_cv_c_dll_unixware" = "yes"
436 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
438 AC_CACHE_CHECK("whether we can build a NetBSD dll",
440 [saved_cflags=$CFLAGS
441 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
442 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
445 if test "$ac_cv_c_dll_netbsd" = "yes"
447 LDSHARED="ld -Bshareable -Bforcearchive"
451 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
459 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine"
461 if test "$LIBEXT" = "so"; then
465 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
466 ac_cv_c_whole_archive,
467 [saved_cflags=$CFLAGS
468 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
469 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
472 if test "$ac_cv_c_whole_archive" = "yes"
474 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
476 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
478 [saved_cflags=$CFLAGS
479 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
480 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
483 if test "$ac_cv_c_allextract" = "yes"
485 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
496 dnl **** Check for reentrant libc ****
498 dnl For cross-compiling we blindly assume that libc is reentrant. This is
499 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
501 wine_cv_libc_reentrant=no
503 dnl Linux style errno location
505 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
506 [AC_TRY_RUN([int myerrno = 0;
508 int *__errno_location(){return &myerrno;}
509 main(){connect(0,buf,255); exit(!myerrno);}],
510 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
511 wine_cv_libc_r__errno_location=yes )
513 if test "$wine_cv_libc_r__errno_location" = "yes"
515 AC_DEFINE(HAVE__ERRNO_LOCATION)
516 wine_cv_libc_reentrant=__errno_location
519 dnl FreeBSD style errno location
521 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
522 [AC_TRY_RUN([int myerrno = 0;
524 int *__error(){return &myerrno;}
525 main(){connect(0,buf,255); exit(!myerrno);}],
526 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
527 wine_cv_libc_r__error=yes )
529 if test "$wine_cv_libc_r__error" = "yes"
531 AC_DEFINE(HAVE__ERROR)
532 wine_cv_libc_reentrant=__error
535 dnl Solaris style errno location
537 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
538 [AC_TRY_RUN([int myerrno = 0;
540 int *___errno(){return &myerrno;}
541 main(){connect(0,buf,255); exit(!myerrno);}],
542 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
543 wine_cv_libc_r___errno=yes )
545 if test "$wine_cv_libc_r___errno" = "yes"
547 AC_DEFINE(HAVE___ERRNO)
548 wine_cv_libc_reentrant=___errno
551 dnl UnixWare style errno location
553 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
554 [AC_TRY_RUN([int myerrno = 0;
556 int *__thr_errno(){return &myerrno;}
557 main(){connect(0,buf,255); exit(!myerrno);}],
558 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
559 wine_cv_libc_r__thr_errno=yes )
561 if test "$wine_cv_libc_r__thr_errno" = "yes"
563 AC_DEFINE(HAVE__THR_ERRNO)
564 wine_cv_libc_reentrant=__thr_errno
566 if test "$wine_cv_libc_reentrant" = "no"
568 AC_DEFINE(NO_REENTRANT_LIBC)
571 dnl **** Check for reentrant X libraries ****
573 dnl This may fail to determine whether X libraries are reentrant if
574 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
575 dnl is possible with the --without-reentrant-x option.
577 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
579 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
580 [ if test "x$with_reentrant_x" = "xno"
582 wine_cv_x_reentrant=no
585 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
586 if test -r $dir/libX11.so; then
587 libX11_check="-D $dir/libX11.so"
590 if test -r $dir/libX11.a; then
591 libX11_check="$dir/libX11.a"
595 if test "$libX11_check" != "none"; then
596 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
598 wine_cv_x_reentrant=yes
600 wine_cv_x_reentrant=no
603 wine_cv_x_reentrant=unknown
607 wine_cv_x_reentrant=no
609 if test "$wine_cv_x_reentrant" = "no"
611 AC_DEFINE(NO_REENTRANT_X11)
614 dnl **** Check for endianness ****
618 dnl **** Check for functions ****
650 dnl **** Check for header files ****
704 dnl **** Check for types ****
709 AC_CHECK_SIZEOF(long long,0)
711 if test "$ac_cv_header_linux_joystick_h" = "yes"
713 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
714 wine_cv_linux_joystick_22_api,
716 #include <sys/ioctl.h>
717 #include <linux/joystick.h>
719 struct js_event blub;
720 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
721 #error "no 2.2 header"
724 wine_cv_linux_joystick_22_api=yes,
725 wine_cv_linux_joystick_22_api=no,
726 wine_cv_linux_joystick_22_api=no
729 if test "$wine_cv_linux_joystick_22_api"
731 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
735 dnl **** statfs checks ****
737 if test "$ac_cv_header_sys_vfs_h" = "yes"
739 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
740 wine_cv_sys_vfs_has_statfs,
742 #include <sys/types.h>
743 #ifdef HAVE_SYS_PARAM_H
744 # include <sys/param.h>
750 memset(&stfs,0,sizeof(stfs));
751 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
754 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
756 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
760 if test "$ac_cv_header_sys_statfs_h" = "yes"
762 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
763 wine_cv_sys_statfs_has_statfs,
765 #include <sys/types.h>
766 #ifdef HAVE_SYS_PARAM_H
767 # include <sys/param.h>
769 #include <sys/statfs.h>
772 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
775 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
777 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
781 if test "$ac_cv_header_sys_mount_h" = "yes"
783 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
784 wine_cv_sys_mount_has_statfs,
786 #include <sys/types.h>
787 #ifdef HAVE_SYS_PARAM_H
788 # include <sys/param.h>
790 #include <sys/mount.h>
793 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
796 if test "$wine_cv_sys_mount_has_statfs" = "yes"
798 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
802 dnl **** FIXME: what about mixed cases, where we need two of them? ***
804 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
805 [ if test "x$statfs_bfree" = "xno"
807 wine_cv_statfs_bfree=no
810 #include <sys/types.h>
811 #ifdef HAVE_SYS_PARAM_H
812 # include <sys/param.h>
814 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
815 # include <sys/mount.h>
817 # ifdef STATFS_DEFINED_BY_SYS_VFS
818 # include <sys/vfs.h>
820 # ifdef STATFS_DEFINED_BY_SYS_STATFS
821 # include <sys/statfs.h>
829 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
832 if test "$wine_cv_statfs_bfree" = "yes"
834 AC_DEFINE(STATFS_HAS_BFREE)
837 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
838 [ if test "x$statfs_bavail" = "xno"
840 wine_cv_statfs_bavail=no
843 #include <sys/types.h>
844 #ifdef HAVE_SYS_PARAM_H
845 # include <sys/param.h>
847 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
848 # include <sys/mount.h>
850 # ifdef STATFS_DEFINED_BY_SYS_VFS
851 # include <sys/vfs.h>
853 # ifdef STATFS_DEFINED_BY_SYS_STATFS
854 # include <sys/statfs.h>
862 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
865 if test "$wine_cv_statfs_bavail" = "yes"
867 AC_DEFINE(STATFS_HAS_BAVAIL)
870 dnl *** check for file descriptor passing with msg_accrights
872 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
873 AC_TRY_COMPILE([#include <sys/types.h>
874 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
875 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
876 if test "$ac_cv_c_msg_accrights" = "yes"
878 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
881 dnl *** Check for the sun_len member in struct sockaddr_un
883 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
884 AC_TRY_COMPILE([#include <sys/types.h>
885 #include <sys/socket.h>
886 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
887 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
888 if test "$ac_cv_c_sun_len" = "yes"
890 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
893 dnl *** check for the need to define __i386__
895 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
896 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
899 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
900 if test "$ac_cv_cpp_def_i386" = "yes"
902 CFLAGS="$CFLAGS -D__i386__"
903 LINTFLAGS="$LINTFLAGS -D__i386__"
906 dnl $GCC is set by autoconf
908 if test "$GCC" = "yes"
910 GCC_NO_BUILTIN="-fno-builtin"
912 AC_SUBST(GCC_NO_BUILTIN)
914 dnl **** Generate output files ****
918 dlls/ddraw/d3ddevice \
919 dlls/ddraw/dclipper \
921 dlls/ddraw/direct3d \
922 dlls/ddraw/dpalette \
923 dlls/ddraw/dsurface \
925 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
927 MAKE_RULES=Make.rules
928 AC_SUBST_FILE(MAKE_RULES)
930 MAKE_DLL_RULES=dlls/Makedll.rules
931 AC_SUBST_FILE(MAKE_DLL_RULES)
941 dlls/advapi32/Makefile
942 dlls/avifil32/Makefile
943 dlls/comctl32/Makefile
944 dlls/commdlg/Makefile
946 dlls/dciman32/Makefile
949 dlls/display/Makefile
954 dlls/imagehlp/Makefile
956 dlls/lzexpand/Makefile
960 dlls/msacm32/Makefile
961 dlls/msnet32/Makefile
962 dlls/msvideo/Makefile
966 dlls/oleaut32/Makefile
969 dlls/olepro32/Makefile
972 dlls/rasapi32/Makefile
974 dlls/shell32/Makefile
981 dlls/version/Makefile
983 dlls/win87em/Makefile
984 dlls/winaspi/Makefile
985 dlls/windebug/Makefile
987 dlls/wininet/Makefile
989 dlls/winmm/joystick/Makefile
990 dlls/winmm/mcianim/Makefile
991 dlls/winmm/mciavi/Makefile
992 dlls/winmm/mcicda/Makefile
993 dlls/winmm/mciseq/Makefile
994 dlls/winmm/mciwave/Makefile
995 dlls/winmm/midimap/Makefile
996 dlls/winmm/wavemap/Makefile
997 dlls/winmm/wineoss/Makefile
998 dlls/winsock/Makefile
999 dlls/winspool/Makefile
1000 dlls/ttydrv/Makefile
1001 dlls/x11drv/Makefile
1002 documentation/Makefile
1003 documentation/wine.conf.man
1004 documentation/wine.man
1007 graphics/enhmetafiledrv/Makefile
1008 graphics/metafiledrv/Makefile
1009 graphics/psdrv/Makefile
1010 graphics/ttydrv/Makefile
1011 graphics/win16drv/Makefile
1012 graphics/x11drv/Makefile
1027 programs/clock/Makefile
1028 programs/cmdlgtst/Makefile
1029 programs/control/Makefile
1030 programs/avitools/Makefile
1031 programs/osversioncheck/Makefile
1032 programs/notepad/Makefile
1033 programs/progman/Makefile
1034 programs/regtest/Makefile
1035 programs/regapi/Makefile
1036 programs/view/Makefile
1037 programs/wcmd/Makefile
1038 programs/winemine/Makefile
1039 programs/winhelp/Makefile
1040 programs/winver/Makefile
1046 tools/cvdump/Makefile
1051 windows/ttydrv/Makefile
1052 windows/x11drv/Makefile ])
1054 if test "$have_x" = "no"
1057 echo "*** Warning: X development files not found. Wine will be built without"
1058 echo "*** X support, which currently does not work, and would probably not be"
1059 echo "*** what you want anyway. You will need to install devel packages of"
1060 echo "*** Xlib/Xfree86 and Xpm at the very least."
1061 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1064 echo "*** Warning: Xpm development files not found. Wine will be built without"
1065 echo "*** Xpm support, which currently does not work. You will need to install"
1066 echo "*** devel packages of Xpm."
1069 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1072 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1073 echo "*** terminal resize support. Consider upgrading ncurses."
1076 if test "$wine_cv_libc_reentrant" = "no"
1079 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1080 echo "*** thread support. Consider upgrading libc to a more recent"
1081 echo "*** reentrant version of libc."
1084 if test "$wine_cv_mesa_version_OK" = "no"
1087 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1088 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1091 if test "$wine_cv_mesa_version_threadsafe" = "yes"
1094 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1095 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed"
1096 echo "*** (while we work on a better fix)."
1100 echo "Configure finished. Do 'make depend && make' to compile Wine."
1103 dnl Local Variables:
1104 dnl comment-start: "dnl "
1106 dnl comment-start-skip: "\\bdnl\\b\\s *"
1107 dnl compile-command: "autoconf"