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)
128 if test "$have_x" = "yes"
131 ac_save_CPPFLAGS="$CPPFLAGS"
132 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
135 AC_CHECK_HEADERS(X11/xpm.h)
136 if test "$ac_cv_header_X11_xpm_h" = "yes"
138 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
140 echo "When compiling with X support, you need the Xpm library, or"
141 echo "WINE will not work. This Xpm library is within the following RPM,"
142 echo "which you need to install:"
143 echo "Redhat : xpm, xpm-devel"
144 echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static"
146 echo "Debian/Corel Linux: xpm4g, xpm4g-dev"
148 echo "Or get the sources from ftp.x.org and all its mirror sites from "
149 echo "the directory /contrib/libraries."
155 dnl Check for X Shm extension
156 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
157 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
159 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
161 dnl Check for XFree86 DGA / DGA 2.0 extension
162 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
163 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
165 AC_CHECK_LIB(Xxf86dga,
167 AC_DEFINE(HAVE_LIBXXF86DGA2)
168 AC_DEFINE(HAVE_LIBXXF86DGA)
169 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
170 DGA_SRCS='$(DGA_SRCS)'
171 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS
173 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
175 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,
176 AC_DEFINE(HAVE_LIBXXF86DGA)
177 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
178 DGA_SRCS='$(DGA_SRCS)'
179 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
183 dnl Check for XFree86 VMODE extension
184 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
185 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
187 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
190 dnl Check for the presence of Mesa
191 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/osmesa.h)
192 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
194 dnl Check for some problems due to old Mesa versions
195 AC_CACHE_CHECK("for up-to-date Mesa version", wine_cv_mesa_version_OK,
197 [#include <GL/gl.h>],
198 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
199 [wine_cv_mesa_version_OK="yes"],
200 [wine_cv_mesa_version_OK="no"]
204 dnl Check for the thread-safety of the OpenGL library
205 AC_CACHE_CHECK("for thread-safe Mesa version",
206 wine_cv_mesa_version_threadsafe,
209 AC_TRY_LINK([],[pthread_getspecific();],
210 [wine_cv_mesa_version_threadsafe="yes"],
211 [wine_cv_mesa_version_threadsafe="no"])
215 if test "$wine_cv_mesa_version_OK" = "yes" -a "$wine_cv_mesa_version_threadsafe" = "no"
217 dnl Check for the presense of the library
218 AC_CHECK_LIB(GL,glXCreateContext,
219 AC_DEFINE(HAVE_LIBMESAGL)
220 X_PRE_LIBS="$X_PRE_LIBS -lGL"
221 MESA_SRCS='$(MESA_SRCS)'
223 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
224 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
226 AC_CHECK_LIB(MesaGL,glXCreateContext,
227 AC_DEFINE(HAVE_LIBMESAGL)
228 X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
229 MESA_SRCS='$(MESA_SRCS)'
231 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
234 dnl Check for the Color Table and Paletted Texture extensions
235 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
237 [#include <GL/gl.h>],
238 [GLenum test = GL_COLOR_INDEX8_EXT;],
239 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],
242 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
244 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
246 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
251 CPPFLAGS="$ac_save_CPPFLAGS"
260 dnl **** Check which curses lib to use ***
261 if test "$CURSES" = "yes"
263 AC_CHECK_HEADERS(ncurses.h)
264 if test "$ac_cv_header_ncurses_h" = "yes"
266 AC_CHECK_LIB(ncurses,waddch)
268 if test "$ac_cv_lib_ncurses_waddch" = "yes"
270 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
271 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
273 AC_CHECK_HEADERS(curses.h)
274 if test "$ac_cv_header_curses_h" = "yes"
276 AC_CHECK_LIB(curses,waddch)
277 if test "$ac_cv_lib_curses_waddch" = "yes"
279 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
280 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
286 dnl **** Check for IPX (currently Linux only) ****
287 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
289 [#include <sys/socket.h>
290 #include <netipx/ipx.h>],
291 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
292 [ac_cv_c_ipx_gnu="yes"],
293 [ac_cv_c_ipx_gnu="no"])
295 if test "$ac_cv_c_ipx_gnu" = "yes"
297 AC_DEFINE(HAVE_IPX_GNU)
300 if test "$ac_cv_c_ipx_gnu" = "no"
302 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
304 [#include <sys/socket.h>
305 #include <asm/types.h>
306 #include <linux/ipx.h>],
307 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
308 [ac_cv_c_ipx_linux="yes"],
309 [ac_cv_c_ipx_linux="no"])
311 if test "$ac_cv_c_ipx_linux" = "yes"
313 AC_DEFINE(HAVE_IPX_LINUX)
317 dnl **** Check for Open Sound System ****
318 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
320 AC_CACHE_CHECK("for Open Sound System",
321 ac_cv_c_opensoundsystem,
323 #if defined(HAVE_SYS_SOUNDCARD_H)
324 #include <sys/soundcard.h>
325 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
326 #include <machine/soundcard.h>
327 #elif defined(HAVE_SOUNDCARD_H)
328 #include <soundcard.h>
332 /* check for one of the Open Sound System specific SNDCTL_ defines */
333 #if !defined(SNDCTL_DSP_STEREO)
334 #error No open sound system
336 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
338 if test "$ac_cv_c_opensoundsystem" = "yes"
343 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
344 ac_cv_c_opensoundsystem_midi,
346 #if defined(HAVE_SYS_SOUNDCARD_H)
347 #include <sys/soundcard.h>
348 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
349 #include <machine/soundcard.h>
350 #elif defined(HAVE_SOUNDCARD_H)
351 #include <soundcard.h>
355 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
356 #if !defined(SNDCTL_SEQ_SYNC)
357 #error No open sound system MIDI interface
359 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
361 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
363 AC_DEFINE(HAVE_OSS_MIDI)
366 dnl **** If ln -s doesn't work, use cp instead ****
367 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
369 dnl **** Check for gcc strength-reduce bug ****
371 if test "x${GCC}" = "xyes"
373 CFLAGS="$CFLAGS -Wall"
374 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
377 static int Array[[3]];
380 for(i=0; i<B; i++) Array[[i]] = i - 3;
381 exit( Array[[1]] != -2 );
383 ac_cv_c_gcc_strength_bug="no",
384 ac_cv_c_gcc_strength_bug="yes",
385 ac_cv_c_gcc_strength_bug="yes") )
386 if test "$ac_cv_c_gcc_strength_bug" = "yes"
388 CFLAGS="$CFLAGS -fno-strength-reduce"
392 dnl **** Check for underscore on external symbols ****
394 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
395 ac_cv_c_extern_prefix,
397 LIBS="conftest_asm.s $LIBS"
398 cat > conftest_asm.s <<EOF
403 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
404 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
406 if test "$ac_cv_c_extern_prefix" = "yes"
408 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
411 dnl **** Check for .string in assembler ****
413 AC_CACHE_CHECK("whether assembler accepts .string",
416 LIBS="conftest_asm.s $LIBS"
417 cat > conftest_asm.s <<EOF
420 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
422 if test "$ac_cv_c_asm_string" = "yes"
424 AC_DEFINE(HAVE_ASM_STRING)
427 dnl **** Check for working dll ****
430 if test "$LIBEXT" = "so"
432 AC_CACHE_CHECK("whether we can build a Linux dll",
434 [saved_cflags=$CFLAGS
435 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
436 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
439 if test "$ac_cv_c_dll_linux" = "yes"
441 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
443 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
444 ac_cv_c_dll_unixware,
445 [saved_cflags=$CFLAGS
446 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
447 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
450 if test "$ac_cv_c_dll_unixware" = "yes"
452 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
454 AC_CACHE_CHECK("whether we can build a NetBSD dll",
456 [saved_cflags=$CFLAGS
457 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
458 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
461 if test "$ac_cv_c_dll_netbsd" = "yes"
463 LDSHARED="ld -Bshareable -Bforcearchive"
467 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
476 if test "$LIBEXT" = "so"; then
479 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) -L\$(TOPOBJDIR) -lwine"
481 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine \$(X_LIBS) \$(XLIB)"
482 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
483 ac_cv_c_whole_archive,
484 [saved_cflags=$CFLAGS
485 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
486 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
489 if test "$ac_cv_c_whole_archive" = "yes"
491 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
493 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
495 [saved_cflags=$CFLAGS
496 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
497 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
500 if test "$ac_cv_c_allextract" = "yes"
502 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
513 dnl **** Check for reentrant libc ****
515 dnl For cross-compiling we blindly assume that libc is reentrant. This is
516 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
518 wine_cv_libc_reentrant=no
520 dnl Linux style errno location
522 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
523 [AC_TRY_RUN([int myerrno = 0;
525 int *__errno_location(){return &myerrno;}
526 main(){connect(0,buf,255); exit(!myerrno);}],
527 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
528 wine_cv_libc_r__errno_location=yes )
530 if test "$wine_cv_libc_r__errno_location" = "yes"
532 AC_DEFINE(HAVE__ERRNO_LOCATION)
533 wine_cv_libc_reentrant=__errno_location
536 dnl FreeBSD style errno location
538 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
539 [AC_TRY_RUN([int myerrno = 0;
541 int *__error(){return &myerrno;}
542 main(){connect(0,buf,255); exit(!myerrno);}],
543 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
544 wine_cv_libc_r__error=yes )
546 if test "$wine_cv_libc_r__error" = "yes"
548 AC_DEFINE(HAVE__ERROR)
549 wine_cv_libc_reentrant=__error
552 dnl Solaris style errno location
554 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
555 [AC_TRY_RUN([int myerrno = 0;
557 int *___errno(){return &myerrno;}
558 main(){connect(0,buf,255); exit(!myerrno);}],
559 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
560 wine_cv_libc_r___errno=yes )
562 if test "$wine_cv_libc_r___errno" = "yes"
564 AC_DEFINE(HAVE___ERRNO)
565 wine_cv_libc_reentrant=___errno
568 dnl UnixWare style errno location
570 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
571 [AC_TRY_RUN([int myerrno = 0;
573 int *__thr_errno(){return &myerrno;}
574 main(){connect(0,buf,255); exit(!myerrno);}],
575 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
576 wine_cv_libc_r__thr_errno=yes )
578 if test "$wine_cv_libc_r__thr_errno" = "yes"
580 AC_DEFINE(HAVE__THR_ERRNO)
581 wine_cv_libc_reentrant=__thr_errno
583 if test "$wine_cv_libc_reentrant" = "no"
585 AC_DEFINE(NO_REENTRANT_LIBC)
588 dnl **** Check for reentrant X libraries ****
590 dnl This may fail to determine whether X libraries are reentrant if
591 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
592 dnl is possible with the --without-reentrant-x option.
594 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
596 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
597 [ if test "x$with_reentrant_x" = "xno"
599 wine_cv_x_reentrant=no
602 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
603 if test -r $dir/libX11.so; then
604 libX11_check="-D $dir/libX11.so"
607 if test -r $dir/libX11.a; then
608 libX11_check="$dir/libX11.a"
612 if test "$libX11_check" != "none"; then
613 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
615 wine_cv_x_reentrant=yes
617 wine_cv_x_reentrant=no
620 wine_cv_x_reentrant=unknown
624 wine_cv_x_reentrant=no
626 if test "$wine_cv_x_reentrant" = "no"
628 AC_DEFINE(NO_REENTRANT_X11)
631 dnl **** Check for endianness ****
635 dnl **** Check for functions ****
667 dnl **** Check for header files ****
719 dnl **** Check for types ****
724 AC_CHECK_SIZEOF(long long,0)
726 if test "$ac_cv_header_linux_joystick_h" = "yes"
728 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
729 wine_cv_linux_joystick_22_api,
731 #include <sys/ioctl.h>
732 #include <linux/joystick.h>
734 struct js_event blub;
735 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
736 #error "no 2.2 header"
739 wine_cv_linux_joystick_22_api=yes,
740 wine_cv_linux_joystick_22_api=no,
741 wine_cv_linux_joystick_22_api=no
744 if test "$wine_cv_linux_joystick_22_api" = "yes"
746 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
750 dnl **** statfs checks ****
752 if test "$ac_cv_header_sys_vfs_h" = "yes"
754 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
755 wine_cv_sys_vfs_has_statfs,
757 #include <sys/types.h>
758 #ifdef HAVE_SYS_PARAM_H
759 # include <sys/param.h>
765 memset(&stfs,0,sizeof(stfs));
766 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
769 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
771 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
775 if test "$ac_cv_header_sys_statfs_h" = "yes"
777 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
778 wine_cv_sys_statfs_has_statfs,
780 #include <sys/types.h>
781 #ifdef HAVE_SYS_PARAM_H
782 # include <sys/param.h>
784 #include <sys/statfs.h>
787 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
790 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
792 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
796 if test "$ac_cv_header_sys_mount_h" = "yes"
798 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
799 wine_cv_sys_mount_has_statfs,
801 #include <sys/types.h>
802 #ifdef HAVE_SYS_PARAM_H
803 # include <sys/param.h>
805 #include <sys/mount.h>
808 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
811 if test "$wine_cv_sys_mount_has_statfs" = "yes"
813 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
817 dnl **** FIXME: what about mixed cases, where we need two of them? ***
819 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
820 [ if test "x$statfs_bfree" = "xno"
822 wine_cv_statfs_bfree=no
825 #include <sys/types.h>
826 #ifdef HAVE_SYS_PARAM_H
827 # include <sys/param.h>
829 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
830 # include <sys/mount.h>
832 # ifdef STATFS_DEFINED_BY_SYS_VFS
833 # include <sys/vfs.h>
835 # ifdef STATFS_DEFINED_BY_SYS_STATFS
836 # include <sys/statfs.h>
844 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
847 if test "$wine_cv_statfs_bfree" = "yes"
849 AC_DEFINE(STATFS_HAS_BFREE)
852 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
853 [ if test "x$statfs_bavail" = "xno"
855 wine_cv_statfs_bavail=no
858 #include <sys/types.h>
859 #ifdef HAVE_SYS_PARAM_H
860 # include <sys/param.h>
862 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
863 # include <sys/mount.h>
865 # ifdef STATFS_DEFINED_BY_SYS_VFS
866 # include <sys/vfs.h>
868 # ifdef STATFS_DEFINED_BY_SYS_STATFS
869 # include <sys/statfs.h>
877 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
880 if test "$wine_cv_statfs_bavail" = "yes"
882 AC_DEFINE(STATFS_HAS_BAVAIL)
885 dnl *** check for file descriptor passing with msg_accrights
887 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
888 AC_TRY_COMPILE([#include <sys/types.h>
889 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
890 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
891 if test "$ac_cv_c_msg_accrights" = "yes"
893 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
896 dnl *** Check for the sun_len member in struct sockaddr_un
898 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
899 AC_TRY_COMPILE([#include <sys/types.h>
900 #include <sys/socket.h>
901 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
902 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
903 if test "$ac_cv_c_sun_len" = "yes"
905 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
908 dnl *** check for the need to define __i386__
910 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
911 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
914 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
915 if test "$ac_cv_cpp_def_i386" = "yes"
917 CFLAGS="$CFLAGS -D__i386__"
918 LINTFLAGS="$LINTFLAGS -D__i386__"
921 dnl $GCC is set by autoconf
923 if test "$GCC" = "yes"
925 GCC_NO_BUILTIN="-fno-builtin"
927 AC_SUBST(GCC_NO_BUILTIN)
929 dnl **** Generate output files ****
933 dlls/ddraw/d3ddevice \
934 dlls/ddraw/dclipper \
936 dlls/ddraw/direct3d \
937 dlls/ddraw/dpalette \
938 dlls/ddraw/dsurface \
940 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
942 MAKE_RULES=Make.rules
943 AC_SUBST_FILE(MAKE_RULES)
945 MAKE_DLL_RULES=dlls/Makedll.rules
946 AC_SUBST_FILE(MAKE_DLL_RULES)
956 dlls/advapi32/Makefile
957 dlls/avifil32/Makefile
958 dlls/comctl32/Makefile
959 dlls/commdlg/Makefile
961 dlls/dciman32/Makefile
964 dlls/display/Makefile
969 dlls/imagehlp/Makefile
971 dlls/lzexpand/Makefile
975 dlls/msacm32/Makefile
976 dlls/msnet32/Makefile
977 dlls/msvideo/Makefile
981 dlls/oleaut32/Makefile
984 dlls/olepro32/Makefile
987 dlls/rasapi32/Makefile
989 dlls/shell32/Makefile
996 dlls/version/Makefile
998 dlls/win87em/Makefile
999 dlls/winaspi/Makefile
1000 dlls/windebug/Makefile
1002 dlls/wininet/Makefile
1004 dlls/winmm/joystick/Makefile
1005 dlls/winmm/mcianim/Makefile
1006 dlls/winmm/mciavi/Makefile
1007 dlls/winmm/mcicda/Makefile
1008 dlls/winmm/mciseq/Makefile
1009 dlls/winmm/mciwave/Makefile
1010 dlls/winmm/midimap/Makefile
1011 dlls/winmm/wavemap/Makefile
1012 dlls/winmm/wineoss/Makefile
1013 dlls/winsock/Makefile
1014 dlls/winspool/Makefile
1015 dlls/ttydrv/Makefile
1016 dlls/x11drv/Makefile
1017 documentation/Makefile
1018 documentation/wine.conf.man
1019 documentation/wine.man
1022 graphics/enhmetafiledrv/Makefile
1023 graphics/metafiledrv/Makefile
1024 graphics/psdrv/Makefile
1025 graphics/ttydrv/Makefile
1026 graphics/win16drv/Makefile
1027 graphics/x11drv/Makefile
1042 programs/clock/Makefile
1043 programs/cmdlgtst/Makefile
1044 programs/control/Makefile
1045 programs/avitools/Makefile
1046 programs/osversioncheck/Makefile
1047 programs/notepad/Makefile
1048 programs/progman/Makefile
1049 programs/regtest/Makefile
1050 programs/regapi/Makefile
1051 programs/view/Makefile
1052 programs/wcmd/Makefile
1053 programs/winemine/Makefile
1054 programs/winhelp/Makefile
1055 programs/winver/Makefile
1061 tools/cvdump/Makefile
1066 windows/ttydrv/Makefile
1067 windows/x11drv/Makefile ])
1069 if test "$have_x" = "no"
1072 echo "*** Warning: X development files not found. Wine will be built without"
1073 echo "*** X support, which currently does not work, and would probably not be"
1074 echo "*** what you want anyway. You will need to install devel packages of"
1075 echo "*** Xlib/Xfree86 and Xpm at the very least."
1076 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1079 echo "*** Warning: Xpm development files not found. Wine will be built without"
1080 echo "*** Xpm support, which currently does not work. You will need to install"
1081 echo "*** devel packages of Xpm."
1084 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1087 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1088 echo "*** terminal resize support. Consider upgrading ncurses."
1091 if test "$wine_cv_libc_reentrant" = "no"
1094 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1095 echo "*** thread support. Consider upgrading libc to a more recent"
1096 echo "*** reentrant version of libc."
1099 if test "$wine_cv_mesa_version_OK" = "no"
1102 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1103 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1106 if test "$wine_cv_mesa_version_threadsafe" = "yes"
1109 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1110 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed"
1111 echo "*** (while we work on a better fix)."
1115 echo "Configure finished. Do 'make depend && make' to compile Wine."
1118 dnl Local Variables:
1119 dnl comment-start: "dnl "
1121 dnl comment-start-skip: "\\bdnl\\b\\s *"
1122 dnl compile-command: "autoconf"