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 dnl Check for the thread-safety of the OpenGL library
181 AC_CACHE_CHECK("for thread-safe Mesa version",
182 wine_cv_mesa_version_threadsafe,
185 AC_TRY_LINK([],[pthread_getspecific();],
186 [wine_cv_mesa_version_threadsafe="yes"],
187 [wine_cv_mesa_version_threadsafe="no"])
191 if test "$wine_cv_mesa_version_OK" = "yes" -a "$wine_cv_mesa_version_threadsafe" = "no"
193 dnl Check for the presense of the library
194 AC_CHECK_LIB(GL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lGL",,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
195 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
197 AC_CHECK_LIB(MesaGL,glXCreateContext,AC_DEFINE(HAVE_LIBMESAGL) X_PRE_LIBS="$X_PRE_LIBS -lMesaGL",,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
200 dnl Check for the Color Table and Paletted Texture extensions
201 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
203 [#include <GL/gl.h>],
204 [GLenum test = GL_COLOR_INDEX8_EXT;],
205 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],
208 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
210 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
212 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
217 CPPFLAGS="$ac_save_CPPFLAGS"
224 dnl **** Check which curses lib to use ***
225 AC_CHECK_HEADERS(ncurses.h)
226 if test "$ac_cv_header_ncurses_h" = "yes"
228 AC_CHECK_LIB(ncurses,waddch)
230 if test "$ac_cv_lib_ncurses_waddch" = "yes"
232 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
233 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
235 AC_CHECK_HEADERS(curses.h)
236 if test "$ac_cv_header_curses_h" = "yes"
238 AC_CHECK_LIB(curses,waddch)
239 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
240 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
244 dnl **** Check for IPX (currently Linux only) ****
245 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
247 [#include <sys/socket.h>
248 #include <netipx/ipx.h>],
249 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
250 [ac_cv_c_ipx_gnu="yes"],
251 [ac_cv_c_ipx_gnu="no"])
253 if test "$ac_cv_c_ipx_gnu" = "yes"
255 AC_DEFINE(HAVE_IPX_GNU)
258 if test "$ac_cv_c_ipx_gnu" = "no"
260 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
262 [#include <sys/socket.h>
263 #include <asm/types.h>
264 #include <linux/ipx.h>],
265 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
266 [ac_cv_c_ipx_linux="yes"],
267 [ac_cv_c_ipx_linux="no"])
269 if test "$ac_cv_c_ipx_linux" = "yes"
271 AC_DEFINE(HAVE_IPX_LINUX)
275 dnl **** Check for Open Sound System ****
276 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
278 AC_CACHE_CHECK("for Open Sound System",
279 ac_cv_c_opensoundsystem,
281 #if defined(HAVE_SYS_SOUNDCARD_H)
282 #include <sys/soundcard.h>
283 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
284 #include <machine/soundcard.h>
285 #elif defined(HAVE_SOUNDCARD_H)
286 #include <soundcard.h>
290 /* check for one of the Open Sound System specific SNDCTL_ defines */
291 #if !defined(SNDCTL_DSP_STEREO)
292 #error No open sound system
294 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
296 if test "$ac_cv_c_opensoundsystem" = "yes"
301 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
302 ac_cv_c_opensoundsystem_midi,
304 #if defined(HAVE_SYS_SOUNDCARD_H)
305 #include <sys/soundcard.h>
306 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
307 #include <machine/soundcard.h>
308 #elif defined(HAVE_SOUNDCARD_H)
309 #include <soundcard.h>
313 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
314 #if !defined(SNDCTL_SEQ_SYNC)
315 #error No open sound system MIDI interface
317 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
319 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
321 AC_DEFINE(HAVE_OSS_MIDI)
324 dnl **** If ln -s doesn't work, use cp instead ****
325 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
327 dnl **** Check for gcc strength-reduce bug ****
329 if test "x${GCC}" = "xyes"
331 CFLAGS="$CFLAGS -Wall"
332 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
335 static int Array[[3]];
338 for(i=0; i<B; i++) Array[[i]] = i - 3;
339 exit( Array[[1]] != -2 );
341 ac_cv_c_gcc_strength_bug="no",
342 ac_cv_c_gcc_strength_bug="yes",
343 ac_cv_c_gcc_strength_bug="yes") )
344 if test "$ac_cv_c_gcc_strength_bug" = "yes"
346 CFLAGS="$CFLAGS -fno-strength-reduce"
350 dnl **** Check for underscore on external symbols ****
352 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
353 ac_cv_c_extern_prefix,
355 LIBS="conftest_asm.s $LIBS"
356 cat > conftest_asm.s <<EOF
361 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
362 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
364 if test "$ac_cv_c_extern_prefix" = "yes"
366 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
369 dnl **** Check for .string in assembler ****
371 AC_CACHE_CHECK("whether assembler accepts .string",
374 LIBS="conftest_asm.s $LIBS"
375 cat > conftest_asm.s <<EOF
378 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
380 if test "$ac_cv_c_asm_string" = "yes"
382 AC_DEFINE(HAVE_ASM_STRING)
385 dnl **** Check for working dll ****
388 if test "$LIBEXT" = "so"
390 AC_CACHE_CHECK("whether we can build a Linux dll",
392 [saved_cflags=$CFLAGS
393 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
394 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
397 if test "$ac_cv_c_dll_linux" = "yes"
399 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
401 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
402 ac_cv_c_dll_unixware,
403 [saved_cflags=$CFLAGS
404 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
405 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
408 if test "$ac_cv_c_dll_unixware" = "yes"
410 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
412 AC_CACHE_CHECK("whether we can build a NetBSD dll",
414 [saved_cflags=$CFLAGS
415 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
416 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
419 if test "$ac_cv_c_dll_netbsd" = "yes"
421 LDSHARED="ld -Bshareable -Bforcearchive"
425 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
433 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine"
435 if test "$LIBEXT" = "so"; then
439 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
440 ac_cv_c_whole_archive,
441 [saved_cflags=$CFLAGS
442 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
443 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
446 if test "$ac_cv_c_whole_archive" = "yes"
448 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
450 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
452 [saved_cflags=$CFLAGS
453 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
454 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
457 if test "$ac_cv_c_allextract" = "yes"
459 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
470 dnl **** Check for reentrant libc ****
472 dnl For cross-compiling we blindly assume that libc is reentrant. This is
473 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
475 wine_cv_libc_reentrant=no
477 dnl Linux style errno location
479 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
480 [AC_TRY_RUN([int myerrno = 0;
482 int *__errno_location(){return &myerrno;}
483 main(){connect(0,buf,255); exit(!myerrno);}],
484 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
485 wine_cv_libc_r__errno_location=yes )
487 if test "$wine_cv_libc_r__errno_location" = "yes"
489 AC_DEFINE(HAVE__ERRNO_LOCATION)
490 wine_cv_libc_reentrant=__errno_location
493 dnl FreeBSD style errno location
495 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
496 [AC_TRY_RUN([int myerrno = 0;
498 int *__error(){return &myerrno;}
499 main(){connect(0,buf,255); exit(!myerrno);}],
500 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
501 wine_cv_libc_r__error=yes )
503 if test "$wine_cv_libc_r__error" = "yes"
505 AC_DEFINE(HAVE__ERROR)
506 wine_cv_libc_reentrant=__error
509 dnl Solaris style errno location
511 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
512 [AC_TRY_RUN([int myerrno = 0;
514 int *___errno(){return &myerrno;}
515 main(){connect(0,buf,255); exit(!myerrno);}],
516 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
517 wine_cv_libc_r___errno=yes )
519 if test "$wine_cv_libc_r___errno" = "yes"
521 AC_DEFINE(HAVE___ERRNO)
522 wine_cv_libc_reentrant=___errno
525 dnl UnixWare style errno location
527 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
528 [AC_TRY_RUN([int myerrno = 0;
530 int *__thr_errno(){return &myerrno;}
531 main(){connect(0,buf,255); exit(!myerrno);}],
532 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
533 wine_cv_libc_r__thr_errno=yes )
535 if test "$wine_cv_libc_r__thr_errno" = "yes"
537 AC_DEFINE(HAVE__THR_ERRNO)
538 wine_cv_libc_reentrant=__thr_errno
540 if test "$wine_cv_libc_reentrant" = "no"
542 AC_DEFINE(NO_REENTRANT_LIBC)
545 dnl **** Check for reentrant X libraries ****
547 dnl This may fail to determine whether X libraries are reentrant if
548 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
549 dnl is possible with the --without-reentrant-x option.
551 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
553 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
554 [ if test "x$with_reentrant_x" = "xno"
556 wine_cv_x_reentrant=no
559 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
560 if test -r $dir/libX11.so; then
561 libX11_check="-D $dir/libX11.so"
564 if test -r $dir/libX11.a; then
565 libX11_check="$dir/libX11.a"
569 if test "$libX11_check" != "none"; then
570 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
572 wine_cv_x_reentrant=yes
574 wine_cv_x_reentrant=no
577 wine_cv_x_reentrant=unknown
581 wine_cv_x_reentrant=no
583 if test "$wine_cv_x_reentrant" = "no"
585 AC_DEFINE(NO_REENTRANT_X11)
588 dnl **** Check for endianness ****
592 dnl **** Check for functions ****
624 dnl **** Check for header files ****
678 dnl **** Check for types ****
683 AC_CHECK_SIZEOF(long long,0)
685 if test "$ac_cv_header_linux_joystick_h" = "yes"
687 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
688 wine_cv_linux_joystick_22_api,
690 #include <sys/ioctl.h>
691 #include <linux/joystick.h>
693 struct js_event blub;
694 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
695 #error "no 2.2 header"
698 wine_cv_linux_joystick_22_api=yes,
699 wine_cv_linux_joystick_22_api=no,
700 wine_cv_linux_joystick_22_api=no
703 if test "$wine_cv_linux_joystick_22_api"
705 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
709 dnl **** statfs checks ****
711 if test "$ac_cv_header_sys_vfs_h" = "yes"
713 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
714 wine_cv_sys_vfs_has_statfs,
716 #include <sys/types.h>
717 #ifdef HAVE_SYS_PARAM_H
718 # include <sys/param.h>
724 memset(&stfs,0,sizeof(stfs));
725 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
728 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
730 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
734 if test "$ac_cv_header_sys_statfs_h" = "yes"
736 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
737 wine_cv_sys_statfs_has_statfs,
739 #include <sys/types.h>
740 #ifdef HAVE_SYS_PARAM_H
741 # include <sys/param.h>
743 #include <sys/statfs.h>
746 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
749 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
751 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
755 if test "$ac_cv_header_sys_mount_h" = "yes"
757 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
758 wine_cv_sys_mount_has_statfs,
760 #include <sys/types.h>
761 #ifdef HAVE_SYS_PARAM_H
762 # include <sys/param.h>
764 #include <sys/mount.h>
767 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
770 if test "$wine_cv_sys_mount_has_statfs" = "yes"
772 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
776 dnl **** FIXME: what about mixed cases, where we need two of them? ***
778 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
779 [ if test "x$statfs_bfree" = "xno"
781 wine_cv_statfs_bfree=no
784 #include <sys/types.h>
785 #ifdef HAVE_SYS_PARAM_H
786 # include <sys/param.h>
788 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
789 # include <sys/mount.h>
791 # ifdef STATFS_DEFINED_BY_SYS_VFS
792 # include <sys/vfs.h>
794 # ifdef STATFS_DEFINED_BY_SYS_STATFS
795 # include <sys/statfs.h>
803 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
806 if test "$wine_cv_statfs_bfree" = "yes"
808 AC_DEFINE(STATFS_HAS_BFREE)
811 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
812 [ if test "x$statfs_bavail" = "xno"
814 wine_cv_statfs_bavail=no
817 #include <sys/types.h>
818 #ifdef HAVE_SYS_PARAM_H
819 # include <sys/param.h>
821 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
822 # include <sys/mount.h>
824 # ifdef STATFS_DEFINED_BY_SYS_VFS
825 # include <sys/vfs.h>
827 # ifdef STATFS_DEFINED_BY_SYS_STATFS
828 # include <sys/statfs.h>
836 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
839 if test "$wine_cv_statfs_bavail" = "yes"
841 AC_DEFINE(STATFS_HAS_BAVAIL)
844 dnl *** check for working sigaltstack
845 dnl glibc 2.0x defines it, but it always fails... so it is useless for us.
847 AC_CACHE_CHECK("for working sigaltstack",
848 ac_cv_c_working_sigaltstack,
851 #include <time.h> /* <sys/time.h> ? bad magic without end */
852 #include <sys/types.h>
853 #include <sys/signal.h>
854 #ifdef HAVE_SYS_PARAM_H
855 # include <sys/param.h>
857 #ifdef HAVE_SYSCALL_H
858 # include <syscall.h>
860 # ifdef HAVE_SYS_SYSCALL_H
861 # include <sys/syscall.h>
865 unsigned char *xaltstack;
868 main(int argc,char **argv) {
869 struct sigaltstack ss;
871 xaltstack = malloc(16384);
872 ss.ss_sp = xaltstack;
875 if (sigaltstack(&ss, NULL) < 0) {
876 /* this catches the glibc case */
877 perror("sigaltstack");
878 return (1); /* aka exit(1) aka fail */
880 /* assume it works. */
884 ac_cv_c_working_sigaltstack="yes",
885 ac_cv_c_working_sigaltstack="no",
886 ac_cv_c_working_sigaltstack="no"
889 if test "$ac_cv_c_working_sigaltstack" = "yes"
891 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
895 dnl *** check for file descriptor passing with msg_accrights
897 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
898 AC_TRY_COMPILE([#include <sys/types.h>
899 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
900 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
901 if test "$ac_cv_c_msg_accrights" = "yes"
903 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
906 dnl *** Check for the sun_len member in struct sockaddr_un
908 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
909 AC_TRY_COMPILE([#include <sys/types.h>
910 #include <sys/socket.h>
911 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
912 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
913 if test "$ac_cv_c_sun_len" = "yes"
915 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
918 dnl *** check for the need to define __i386__
920 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
921 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
924 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
925 if test "$ac_cv_cpp_def_i386" = "yes"
927 CFLAGS="$CFLAGS -D__i386__"
928 LINTFLAGS="$LINTFLAGS -D__i386__"
931 dnl $GCC is set by autoconf
933 if test "$GCC" = "yes"
935 GCC_NO_BUILTIN="-fno-builtin"
937 AC_SUBST(GCC_NO_BUILTIN)
939 dnl **** Generate output files ****
941 MAKE_RULES=Make.rules
942 AC_SUBST_FILE(MAKE_RULES)
944 MAKE_DLL_RULES=dlls/Makedll.rules
945 AC_SUBST_FILE(MAKE_DLL_RULES)
955 dlls/advapi32/Makefile
956 dlls/avifil32/Makefile
957 dlls/comctl32/Makefile
958 dlls/commdlg/Makefile
960 dlls/dciman32/Makefile
963 dlls/display/Makefile
968 dlls/imagehlp/Makefile
970 dlls/lzexpand/Makefile
974 dlls/msacm32/Makefile
975 dlls/msnet32/Makefile
976 dlls/msvideo/Makefile
980 dlls/oleaut32/Makefile
983 dlls/olepro32/Makefile
986 dlls/rasapi32/Makefile
988 dlls/shell32/Makefile
994 dlls/version/Makefile
996 dlls/win87em/Makefile
997 dlls/winaspi/Makefile
998 dlls/windebug/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
1059 tools/cvdump/Makefile
1064 windows/ttydrv/Makefile
1065 windows/x11drv/Makefile ])
1067 if test "$have_x" = "no"
1070 echo "*** Warning: X development files not found. Wine will be built without"
1071 echo "*** X support, which currently does not work, and would probably not be"
1072 echo "*** what you want anyway. You will need to install devel packages of"
1073 echo "*** Xlib/Xfree86 and Xpm at the very least."
1074 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1077 echo "*** Warning: Xpm development files not found. Wine will be built without"
1078 echo "*** Xpm support, which currently does not work. You will need to install"
1079 echo "*** devel packages of Xpm."
1082 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1085 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1086 echo "*** terminal resize support. Consider upgrading ncurses."
1089 if test "$wine_cv_libc_reentrant" = "no"
1092 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1093 echo "*** thread support. Consider upgrading libc to a more recent"
1094 echo "*** reentrant version of libc."
1097 if test "$wine_cv_mesa_version_OK" = "no"
1100 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1101 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1104 if test "$wine_cv_mesa_version_threadsafe" = "yes"
1107 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1108 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed"
1109 echo "*** (while we work on a better fix)."
1113 echo "Configure finished. Do 'make depend && make' to compile Wine."
1116 dnl Local Variables:
1117 dnl comment-start: "dnl "
1119 dnl comment-start-skip: "\\bdnl\\b\\s *"
1120 dnl compile-command: "autoconf"