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.
22 AC_ARG_ENABLE(emulator,
23 [ --disable-emulator build only the Wine library, not the emulator],
24 [if test "$enableval" = "no"; then EMU_TARGET=""; fi])
27 [ --disable-dll build static libraries instead of DLLs],
28 [if test "$enableval" = "no"; then LIBEXT="a"; fi])
31 [ --disable-debug compile out all debugging messages],
32 [if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
35 [ --disable-trace compile out TRACE messages],
36 [if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
39 [ --without-curses do not use curses],
40 [if test "$withval" = "no"; then CURSES="no"; fi])
42 AC_ARG_WITH(reentrant-x,
43 [ --without-reentrant-x compile for use with non-reentrant X libraries])
48 if test "$DEBUG_MSGS" = "no"
50 AC_DEFINE(NO_DEBUG_MSGS)
51 AC_DEFINE(NO_TRACE_MSGS)
53 if test "$TRACE_MSGS" = "no"
55 AC_DEFINE(NO_TRACE_MSGS)
59 dnl **** Check for some programs ****
70 AC_CHECK_PROG(C2MAN,c2man,c2man,true)
71 AC_PATH_PROG(LDCONFIG, ldconfig, true, /sbin:/usr/sbin:$PATH)
74 AC_CHECK_PROGS(LINT, lclint lint)
75 if test "$LINT" = "lint"
77 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
78 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
83 dnl **** Check for some libraries ****
85 dnl Check for -lm for BeOS
87 dnl Check for -li386 for NetBSD and OpenBSD
88 AC_CHECK_LIB(i386,i386_set_ldt)
89 dnl Check for -lossaudio for NetBSD
90 AC_CHECK_LIB(ossaudio,_oss_ioctl)
91 dnl Check for -lw for Solaris
92 AC_CHECK_LIB(w,iswalnum)
93 dnl Check for -lnsl for Solaris
94 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))
95 dnl Check for -lsocket for Solaris
96 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
97 dnl Check for -lxpg4 for FreeBSD
98 AC_CHECK_LIB(xpg4,setrunelocale)
99 dnl Check for -lmmap for OS/2
100 AC_CHECK_LIB(mmap,mmap)
101 dnl Check for openpty
102 AC_CHECK_FUNCS(openpty,,
103 AC_CHECK_LIB(util,openpty,
104 AC_DEFINE(HAVE_OPENPTY)
108 AC_CHECK_HEADERS(dlfcn.h,
109 AC_CHECK_FUNCS(dlopen,
110 AC_DEFINE(HAVE_DL_API),
111 AC_CHECK_LIB(dl,dlopen,
112 AC_DEFINE(HAVE_DL_API)
126 if test "$have_x" = "yes"
129 ac_save_CPPFLAGS="$CPPFLAGS"
130 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
133 AC_CHECK_HEADERS(X11/xpm.h)
134 if test "$ac_cv_header_X11_xpm_h" = "yes"
136 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
138 echo "When compiling with X support, you need the Xpm library, or"
139 echo "WINE will not work. This Xpm library is within the following RPM,"
140 echo "which you need to install:"
141 echo "Redhat : xpm, xpm-devel"
142 echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static"
144 echo "Debian/Corel Linux: xpm4g, xpm4g-dev"
146 echo "Or get the sources from ftp.x.org and all its mirror sites from "
147 echo "the directory /contrib/libraries."
153 dnl Check for X Shm extension
154 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
155 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
157 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
159 dnl Check for XFree86 DGA / DGA 2.0 extension
160 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
161 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
163 AC_CHECK_LIB(Xxf86dga,
165 AC_DEFINE(HAVE_LIBXXF86DGA2)
166 AC_DEFINE(HAVE_LIBXXF86DGA)
167 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
168 DGA_SRCS='$(DGA_SRCS)'
169 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS
171 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
173 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,
174 AC_DEFINE(HAVE_LIBXXF86DGA)
175 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
176 DGA_SRCS='$(DGA_SRCS)'
177 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
181 dnl Check for XFree86 VMODE extension
182 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
183 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
185 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
188 dnl Check for the presence of Mesa
189 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
190 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
192 dnl Check for some problems due to old Mesa versions
193 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
195 [#include <GL/gl.h>],
196 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
197 [wine_cv_mesa_version_OK="yes"],
198 [wine_cv_mesa_version_OK="no"]
202 dnl Check for the thread-safety of the OpenGL library
203 AC_CACHE_CHECK("for thread-safe Mesa version",
204 wine_cv_mesa_version_threadsafe,
207 AC_TRY_LINK([],[pthread_getspecific();],
208 [wine_cv_mesa_version_threadsafe="yes"],
209 [wine_cv_mesa_version_threadsafe="no"])
213 if test "$wine_cv_mesa_version_OK" = "yes" -a "$wine_cv_mesa_version_threadsafe" = "no"
215 dnl Check for the presense of the library
216 AC_CHECK_LIB(GL,glXCreateContext,
217 AC_DEFINE(HAVE_LIBMESAGL)
218 X_PRE_LIBS="$X_PRE_LIBS -lGL"
219 MESA_SRCS='$(MESA_SRCS)'
221 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
222 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
224 AC_CHECK_LIB(MesaGL,glXCreateContext,
225 AC_DEFINE(HAVE_LIBMESAGL)
226 X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
227 MESA_SRCS='$(MESA_SRCS)'
229 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
232 dnl Check for the Color Table and Paletted Texture extensions
233 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
235 [#include <GL/gl.h>],
236 [GLenum test = GL_COLOR_INDEX8_EXT;],
237 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],
240 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
242 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
244 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
249 CPPFLAGS="$ac_save_CPPFLAGS"
257 dnl **** Check which curses lib to use ***
258 if test "$CURSES" = "yes"
260 AC_CHECK_HEADERS(ncurses.h)
261 if test "$ac_cv_header_ncurses_h" = "yes"
263 AC_CHECK_LIB(ncurses,waddch)
265 if test "$ac_cv_lib_ncurses_waddch" = "yes"
267 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
268 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
270 AC_CHECK_HEADERS(curses.h)
271 if test "$ac_cv_header_curses_h" = "yes"
273 AC_CHECK_LIB(curses,waddch)
274 if test "$ac_cv_lib_curses_waddch" = "yes"
276 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
277 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
283 dnl **** Check for IPX (currently Linux only) ****
284 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
286 [#include <sys/socket.h>
287 #include <netipx/ipx.h>],
288 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
289 [ac_cv_c_ipx_gnu="yes"],
290 [ac_cv_c_ipx_gnu="no"])
292 if test "$ac_cv_c_ipx_gnu" = "yes"
294 AC_DEFINE(HAVE_IPX_GNU)
297 if test "$ac_cv_c_ipx_gnu" = "no"
299 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
301 [#include <sys/socket.h>
302 #include <asm/types.h>
303 #include <linux/ipx.h>],
304 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
305 [ac_cv_c_ipx_linux="yes"],
306 [ac_cv_c_ipx_linux="no"])
308 if test "$ac_cv_c_ipx_linux" = "yes"
310 AC_DEFINE(HAVE_IPX_LINUX)
314 dnl **** Check for Open Sound System ****
315 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
317 AC_CACHE_CHECK("for Open Sound System",
318 ac_cv_c_opensoundsystem,
320 #if defined(HAVE_SYS_SOUNDCARD_H)
321 #include <sys/soundcard.h>
322 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
323 #include <machine/soundcard.h>
324 #elif defined(HAVE_SOUNDCARD_H)
325 #include <soundcard.h>
329 /* check for one of the Open Sound System specific SNDCTL_ defines */
330 #if !defined(SNDCTL_DSP_STEREO)
331 #error No open sound system
333 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
335 if test "$ac_cv_c_opensoundsystem" = "yes"
340 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
341 ac_cv_c_opensoundsystem_midi,
343 #if defined(HAVE_SYS_SOUNDCARD_H)
344 #include <sys/soundcard.h>
345 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
346 #include <machine/soundcard.h>
347 #elif defined(HAVE_SOUNDCARD_H)
348 #include <soundcard.h>
352 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
353 #if !defined(SNDCTL_SEQ_SYNC)
354 #error No open sound system MIDI interface
356 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
358 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
360 AC_DEFINE(HAVE_OSS_MIDI)
363 dnl **** If ln -s doesn't work, use cp instead ****
364 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
366 dnl **** Check for gcc strength-reduce bug ****
368 if test "x${GCC}" = "xyes"
370 CFLAGS="$CFLAGS -Wall"
371 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
374 static int Array[[3]];
377 for(i=0; i<B; i++) Array[[i]] = i - 3;
378 exit( Array[[1]] != -2 );
380 ac_cv_c_gcc_strength_bug="no",
381 ac_cv_c_gcc_strength_bug="yes",
382 ac_cv_c_gcc_strength_bug="yes") )
383 if test "$ac_cv_c_gcc_strength_bug" = "yes"
385 CFLAGS="$CFLAGS -fno-strength-reduce"
389 dnl **** Check for underscore on external symbols ****
391 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
392 ac_cv_c_extern_prefix,
394 LIBS="conftest_asm.s $LIBS"
395 cat > conftest_asm.s <<EOF
400 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
401 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
403 if test "$ac_cv_c_extern_prefix" = "yes"
405 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
408 dnl **** Check for .string in assembler ****
410 AC_CACHE_CHECK("whether assembler accepts .string",
413 LIBS="conftest_asm.s $LIBS"
414 cat > conftest_asm.s <<EOF
417 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
419 if test "$ac_cv_c_asm_string" = "yes"
421 AC_DEFINE(HAVE_ASM_STRING)
424 dnl **** Check for working dll ****
427 if test "$LIBEXT" = "so"
429 AC_CACHE_CHECK("whether we can build a Linux dll",
431 [saved_cflags=$CFLAGS
432 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
433 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
436 if test "$ac_cv_c_dll_linux" = "yes"
438 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
440 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
441 ac_cv_c_dll_unixware,
442 [saved_cflags=$CFLAGS
443 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
444 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
447 if test "$ac_cv_c_dll_unixware" = "yes"
449 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
451 AC_CACHE_CHECK("whether we can build a NetBSD dll",
453 [saved_cflags=$CFLAGS
454 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
455 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
458 if test "$ac_cv_c_dll_netbsd" = "yes"
460 LDSHARED="ld -Bshareable -Bforcearchive"
464 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
473 if test "$LIBEXT" = "so"; then
476 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) -L\$(TOPOBJDIR) -lwine"
478 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine \$(X_LIBS) \$(XLIB)"
479 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
480 ac_cv_c_whole_archive,
481 [saved_cflags=$CFLAGS
482 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
483 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
486 if test "$ac_cv_c_whole_archive" = "yes"
488 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
490 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
492 [saved_cflags=$CFLAGS
493 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
494 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
497 if test "$ac_cv_c_allextract" = "yes"
499 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
510 dnl **** Check for reentrant libc ****
512 dnl For cross-compiling we blindly assume that libc is reentrant. This is
513 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
515 wine_cv_libc_reentrant=no
517 dnl Linux style errno location
519 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
520 [AC_TRY_RUN([int myerrno = 0;
522 int *__errno_location(){return &myerrno;}
523 main(){connect(0,buf,255); exit(!myerrno);}],
524 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
525 wine_cv_libc_r__errno_location=yes )
527 if test "$wine_cv_libc_r__errno_location" = "yes"
529 AC_DEFINE(HAVE__ERRNO_LOCATION)
530 wine_cv_libc_reentrant=__errno_location
533 dnl FreeBSD style errno location
535 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
536 [AC_TRY_RUN([int myerrno = 0;
538 int *__error(){return &myerrno;}
539 main(){connect(0,buf,255); exit(!myerrno);}],
540 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
541 wine_cv_libc_r__error=yes )
543 if test "$wine_cv_libc_r__error" = "yes"
545 AC_DEFINE(HAVE__ERROR)
546 wine_cv_libc_reentrant=__error
549 dnl Solaris style errno location
551 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
552 [AC_TRY_RUN([int myerrno = 0;
554 int *___errno(){return &myerrno;}
555 main(){connect(0,buf,255); exit(!myerrno);}],
556 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
557 wine_cv_libc_r___errno=yes )
559 if test "$wine_cv_libc_r___errno" = "yes"
561 AC_DEFINE(HAVE___ERRNO)
562 wine_cv_libc_reentrant=___errno
565 dnl UnixWare style errno location
567 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
568 [AC_TRY_RUN([int myerrno = 0;
570 int *__thr_errno(){return &myerrno;}
571 main(){connect(0,buf,255); exit(!myerrno);}],
572 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
573 wine_cv_libc_r__thr_errno=yes )
575 if test "$wine_cv_libc_r__thr_errno" = "yes"
577 AC_DEFINE(HAVE__THR_ERRNO)
578 wine_cv_libc_reentrant=__thr_errno
580 if test "$wine_cv_libc_reentrant" = "no"
582 AC_DEFINE(NO_REENTRANT_LIBC)
585 dnl **** Check for reentrant X libraries ****
587 dnl This may fail to determine whether X libraries are reentrant if
588 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
589 dnl is possible with the --without-reentrant-x option.
591 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
593 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
594 [ if test "x$with_reentrant_x" = "xno"
596 wine_cv_x_reentrant=no
599 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
600 if test -r $dir/libX11.so; then
601 libX11_check="-D $dir/libX11.so"
604 if test -r $dir/libX11.a; then
605 libX11_check="$dir/libX11.a"
609 if test "$libX11_check" != "none"; then
610 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
612 wine_cv_x_reentrant=yes
614 wine_cv_x_reentrant=no
617 wine_cv_x_reentrant=unknown
621 wine_cv_x_reentrant=no
623 if test "$wine_cv_x_reentrant" = "no"
625 AC_DEFINE(NO_REENTRANT_X11)
628 dnl **** Check for endianness ****
632 dnl **** Check for functions ****
664 dnl **** Check for header files ****
716 dnl **** Check for types ****
721 AC_CHECK_SIZEOF(long long,0)
723 if test "$ac_cv_header_linux_joystick_h" = "yes"
725 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
726 wine_cv_linux_joystick_22_api,
728 #include <sys/ioctl.h>
729 #include <linux/joystick.h>
731 struct js_event blub;
732 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
733 #error "no 2.2 header"
736 wine_cv_linux_joystick_22_api=yes,
737 wine_cv_linux_joystick_22_api=no,
738 wine_cv_linux_joystick_22_api=no
741 if test "$wine_cv_linux_joystick_22_api"
743 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
747 dnl **** statfs checks ****
749 if test "$ac_cv_header_sys_vfs_h" = "yes"
751 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
752 wine_cv_sys_vfs_has_statfs,
754 #include <sys/types.h>
755 #ifdef HAVE_SYS_PARAM_H
756 # include <sys/param.h>
762 memset(&stfs,0,sizeof(stfs));
763 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
766 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
768 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
772 if test "$ac_cv_header_sys_statfs_h" = "yes"
774 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
775 wine_cv_sys_statfs_has_statfs,
777 #include <sys/types.h>
778 #ifdef HAVE_SYS_PARAM_H
779 # include <sys/param.h>
781 #include <sys/statfs.h>
784 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
787 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
789 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
793 if test "$ac_cv_header_sys_mount_h" = "yes"
795 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
796 wine_cv_sys_mount_has_statfs,
798 #include <sys/types.h>
799 #ifdef HAVE_SYS_PARAM_H
800 # include <sys/param.h>
802 #include <sys/mount.h>
805 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
808 if test "$wine_cv_sys_mount_has_statfs" = "yes"
810 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
814 dnl **** FIXME: what about mixed cases, where we need two of them? ***
816 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
817 [ if test "x$statfs_bfree" = "xno"
819 wine_cv_statfs_bfree=no
822 #include <sys/types.h>
823 #ifdef HAVE_SYS_PARAM_H
824 # include <sys/param.h>
826 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
827 # include <sys/mount.h>
829 # ifdef STATFS_DEFINED_BY_SYS_VFS
830 # include <sys/vfs.h>
832 # ifdef STATFS_DEFINED_BY_SYS_STATFS
833 # include <sys/statfs.h>
841 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
844 if test "$wine_cv_statfs_bfree" = "yes"
846 AC_DEFINE(STATFS_HAS_BFREE)
849 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
850 [ if test "x$statfs_bavail" = "xno"
852 wine_cv_statfs_bavail=no
855 #include <sys/types.h>
856 #ifdef HAVE_SYS_PARAM_H
857 # include <sys/param.h>
859 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
860 # include <sys/mount.h>
862 # ifdef STATFS_DEFINED_BY_SYS_VFS
863 # include <sys/vfs.h>
865 # ifdef STATFS_DEFINED_BY_SYS_STATFS
866 # include <sys/statfs.h>
874 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
877 if test "$wine_cv_statfs_bavail" = "yes"
879 AC_DEFINE(STATFS_HAS_BAVAIL)
882 dnl *** check for file descriptor passing with msg_accrights
884 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
885 AC_TRY_COMPILE([#include <sys/types.h>
886 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
887 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
888 if test "$ac_cv_c_msg_accrights" = "yes"
890 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
893 dnl *** Check for the sun_len member in struct sockaddr_un
895 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
896 AC_TRY_COMPILE([#include <sys/types.h>
897 #include <sys/socket.h>
898 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
899 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
900 if test "$ac_cv_c_sun_len" = "yes"
902 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
905 dnl *** check for the need to define __i386__
907 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
908 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
911 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
912 if test "$ac_cv_cpp_def_i386" = "yes"
914 CFLAGS="$CFLAGS -D__i386__"
915 LINTFLAGS="$LINTFLAGS -D__i386__"
918 dnl $GCC is set by autoconf
920 if test "$GCC" = "yes"
922 GCC_NO_BUILTIN="-fno-builtin"
924 AC_SUBST(GCC_NO_BUILTIN)
926 dnl **** Generate output files ****
930 dlls/ddraw/d3ddevice \
931 dlls/ddraw/dclipper \
933 dlls/ddraw/direct3d \
934 dlls/ddraw/dpalette \
935 dlls/ddraw/dsurface \
937 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
939 MAKE_RULES=Make.rules
940 AC_SUBST_FILE(MAKE_RULES)
942 MAKE_DLL_RULES=dlls/Makedll.rules
943 AC_SUBST_FILE(MAKE_DLL_RULES)
953 dlls/advapi32/Makefile
954 dlls/avifil32/Makefile
955 dlls/comctl32/Makefile
956 dlls/commdlg/Makefile
958 dlls/dciman32/Makefile
961 dlls/display/Makefile
966 dlls/imagehlp/Makefile
968 dlls/lzexpand/Makefile
972 dlls/msacm32/Makefile
973 dlls/msnet32/Makefile
974 dlls/msvideo/Makefile
978 dlls/oleaut32/Makefile
981 dlls/olepro32/Makefile
984 dlls/rasapi32/Makefile
986 dlls/shell32/Makefile
993 dlls/version/Makefile
995 dlls/win87em/Makefile
996 dlls/winaspi/Makefile
997 dlls/windebug/Makefile
999 dlls/wininet/Makefile
1001 dlls/winmm/joystick/Makefile
1002 dlls/winmm/mcianim/Makefile
1003 dlls/winmm/mciavi/Makefile
1004 dlls/winmm/mcicda/Makefile
1005 dlls/winmm/mciseq/Makefile
1006 dlls/winmm/mciwave/Makefile
1007 dlls/winmm/midimap/Makefile
1008 dlls/winmm/wavemap/Makefile
1009 dlls/winmm/wineoss/Makefile
1010 dlls/winsock/Makefile
1011 dlls/winspool/Makefile
1012 dlls/ttydrv/Makefile
1013 dlls/x11drv/Makefile
1014 documentation/Makefile
1015 documentation/wine.conf.man
1016 documentation/wine.man
1019 graphics/enhmetafiledrv/Makefile
1020 graphics/metafiledrv/Makefile
1021 graphics/psdrv/Makefile
1022 graphics/ttydrv/Makefile
1023 graphics/win16drv/Makefile
1024 graphics/x11drv/Makefile
1039 programs/clock/Makefile
1040 programs/cmdlgtst/Makefile
1041 programs/control/Makefile
1042 programs/avitools/Makefile
1043 programs/osversioncheck/Makefile
1044 programs/notepad/Makefile
1045 programs/progman/Makefile
1046 programs/regtest/Makefile
1047 programs/regapi/Makefile
1048 programs/view/Makefile
1049 programs/wcmd/Makefile
1050 programs/winemine/Makefile
1051 programs/winhelp/Makefile
1052 programs/winver/Makefile
1058 tools/cvdump/Makefile
1063 windows/ttydrv/Makefile
1064 windows/x11drv/Makefile ])
1066 if test "$have_x" = "no"
1069 echo "*** Warning: X development files not found. Wine will be built without"
1070 echo "*** X support, which currently does not work, and would probably not be"
1071 echo "*** what you want anyway. You will need to install devel packages of"
1072 echo "*** Xlib/Xfree86 and Xpm at the very least."
1073 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1076 echo "*** Warning: Xpm development files not found. Wine will be built without"
1077 echo "*** Xpm support, which currently does not work. You will need to install"
1078 echo "*** devel packages of Xpm."
1081 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1084 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1085 echo "*** terminal resize support. Consider upgrading ncurses."
1088 if test "$wine_cv_libc_reentrant" = "no"
1091 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1092 echo "*** thread support. Consider upgrading libc to a more recent"
1093 echo "*** reentrant version of libc."
1096 if test "$wine_cv_mesa_version_OK" = "no"
1099 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1100 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1103 if test "$wine_cv_mesa_version_threadsafe" = "yes"
1106 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1107 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed"
1108 echo "*** (while we work on a better fix)."
1112 echo "Configure finished. Do 'make depend && make' to compile Wine."
1115 dnl Local Variables:
1116 dnl comment-start: "dnl "
1118 dnl comment-start-skip: "\\bdnl\\b\\s *"
1119 dnl compile-command: "autoconf"