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.
23 AC_ARG_ENABLE(emulator,
24 [ --disable-emulator build only the Wine library, not the emulator],
25 [if test "$enableval" = "no"; then EMU_TARGET=""; fi])
28 [ --disable-dll build static libraries instead of DLLs],
29 [if test "$enableval" = "no"; then LIBEXT="a"; fi])
32 [ --disable-debug compile out all debugging messages],
33 [if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
36 [ --enable-opengl force usage of OpenGL even if the latter is thread-safe],
37 [if test "$enableval" = "no"; then OPENGL="no"; elif test "$enableval" = "yes"; then OPENGL="yes"; fi])
40 [ --disable-trace compile out TRACE messages],
41 [if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
44 [ --without-curses do not use curses],
45 [if test "$withval" = "no"; then CURSES="no"; fi])
47 AC_ARG_WITH(reentrant-x,
48 [ --without-reentrant-x compile for use with non-reentrant X libraries])
53 if test "$DEBUG_MSGS" = "no"
55 AC_DEFINE(NO_DEBUG_MSGS)
56 AC_DEFINE(NO_TRACE_MSGS)
58 if test "$TRACE_MSGS" = "no"
60 AC_DEFINE(NO_TRACE_MSGS)
64 dnl **** Check for some programs ****
75 AC_CHECK_PROG(C2MAN,c2man,c2man,true)
76 AC_PATH_PROG(LDCONFIG, ldconfig, true, /sbin:/usr/sbin:$PATH)
79 AC_CHECK_PROGS(LINT, lclint lint)
80 if test "$LINT" = "lint"
82 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
83 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
88 dnl **** Check for some libraries ****
90 dnl Check for -lm for BeOS
92 dnl Check for -li386 for NetBSD and OpenBSD
93 AC_CHECK_LIB(i386,i386_set_ldt)
94 dnl Check for -lossaudio for NetBSD
95 AC_CHECK_LIB(ossaudio,_oss_ioctl)
96 dnl Check for -lw for Solaris
97 AC_CHECK_LIB(w,iswalnum)
98 dnl Check for -lnsl for Solaris
99 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))
100 dnl Check for -lsocket for Solaris
101 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
102 dnl Check for -lxpg4 for FreeBSD
103 AC_CHECK_LIB(xpg4,setrunelocale)
104 dnl Check for -lmmap for OS/2
105 AC_CHECK_LIB(mmap,mmap)
106 dnl Check for openpty
107 AC_CHECK_FUNCS(openpty,,
108 AC_CHECK_LIB(util,openpty,
109 AC_DEFINE(HAVE_OPENPTY)
113 AC_CHECK_HEADERS(dlfcn.h,
114 AC_CHECK_FUNCS(dlopen,
115 AC_DEFINE(HAVE_DL_API),
116 AC_CHECK_LIB(dl,dlopen,
117 AC_DEFINE(HAVE_DL_API)
133 if test "$have_x" = "yes"
136 ac_save_CPPFLAGS="$CPPFLAGS"
137 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
140 AC_CHECK_HEADERS(X11/xpm.h)
141 if test "$ac_cv_header_X11_xpm_h" = "yes"
143 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
145 echo "When compiling with X support, you need the Xpm library, or"
146 echo "WINE will not work. This Xpm library is within the following RPM,"
147 echo "which you need to install:"
148 echo "Redhat : xpm, xpm-devel"
149 echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static"
151 echo "Debian/Corel Linux: xpm4g, xpm4g-dev"
153 echo "Or get the sources from ftp.x.org and all its mirror sites from "
154 echo "the directory /contrib/libraries."
160 dnl Check for X Shm extension
161 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
162 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
164 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
166 dnl Check for XFree86 DGA / DGA 2.0 extension
167 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
168 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
170 AC_CHECK_LIB(Xxf86dga,
172 AC_DEFINE(HAVE_LIBXXF86DGA2)
173 AC_DEFINE(HAVE_LIBXXF86DGA)
174 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
175 DGA_SRCS='$(DGA_SRCS)'
176 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS
178 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
180 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,
181 AC_DEFINE(HAVE_LIBXXF86DGA)
182 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
183 DGA_SRCS='$(DGA_SRCS)'
184 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
188 dnl Check for XFree86 VMODE extension
189 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
190 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
192 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
195 dnl Check for the presence of Mesa
196 if test $OPENGL = "yes" -o $OPENGL = "normal"
198 AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
199 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
201 dnl Check for some problems due to old Mesa versions
202 AC_CACHE_CHECK("for up-to-date OpenGL version", wine_cv_mesa_version_OK,
204 [#include <GL/gl.h>],
205 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
206 [wine_cv_mesa_version_OK="yes"],
207 [wine_cv_mesa_version_OK="no"]
211 dnl Check for the thread-safety of the OpenGL library
212 AC_CACHE_CHECK("for thread-safe OpenGL version",
213 wine_cv_mesa_version_threadsafe,
216 AC_TRY_LINK([],[pthread_getspecific();],
217 [wine_cv_mesa_version_threadsafe="yes"],
218 [wine_cv_mesa_version_threadsafe="no"])
222 if test "$wine_cv_mesa_version_OK" = "yes" -a \( "$wine_cv_mesa_version_threadsafe" = "no" -o $OPENGL = "yes" \)
224 dnl Check for the presense of the library
225 AC_CHECK_LIB(GL,glXCreateContext,
226 AC_DEFINE(HAVE_LIBMESAGL)
227 X_PRE_LIBS="$X_PRE_LIBS -lGL"
228 MESA_SRCS='$(MESA_SRCS)'
230 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
232 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
234 AC_CHECK_LIB(MesaGL,glXCreateContext,
235 AC_DEFINE(HAVE_LIBMESAGL)
236 X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
237 MESA_SRCS='$(MESA_SRCS)'
239 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
242 dnl Check for the Color Table and Paletted Texture extensions
243 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
244 AC_TRY_COMPILE([#include <GL/gl.h>],
245 [GLenum test = GL_COLOR_INDEX8_EXT;],
246 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],))
248 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
250 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
252 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
258 CPPFLAGS="$ac_save_CPPFLAGS"
267 dnl **** Check which curses lib to use ***
268 if test "$CURSES" = "yes"
270 AC_CHECK_HEADERS(ncurses.h)
271 if test "$ac_cv_header_ncurses_h" = "yes"
273 AC_CHECK_LIB(ncurses,waddch)
275 if test "$ac_cv_lib_ncurses_waddch" = "yes"
277 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
278 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
280 AC_CHECK_HEADERS(curses.h)
281 if test "$ac_cv_header_curses_h" = "yes"
283 AC_CHECK_LIB(curses,waddch)
284 if test "$ac_cv_lib_curses_waddch" = "yes"
286 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
287 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
293 dnl **** Check for IPX (currently Linux only) ****
294 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
296 [#include <sys/socket.h>
297 #include <netipx/ipx.h>],
298 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
299 [ac_cv_c_ipx_gnu="yes"],
300 [ac_cv_c_ipx_gnu="no"])
302 if test "$ac_cv_c_ipx_gnu" = "yes"
304 AC_DEFINE(HAVE_IPX_GNU)
307 if test "$ac_cv_c_ipx_gnu" = "no"
309 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
311 [#include <sys/socket.h>
312 #include <asm/types.h>
313 #include <linux/ipx.h>],
314 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
315 [ac_cv_c_ipx_linux="yes"],
316 [ac_cv_c_ipx_linux="no"])
318 if test "$ac_cv_c_ipx_linux" = "yes"
320 AC_DEFINE(HAVE_IPX_LINUX)
324 dnl **** Check for Open Sound System ****
325 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
327 AC_CACHE_CHECK("for Open Sound System",
328 ac_cv_c_opensoundsystem,
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_ defines */
340 #if !defined(SNDCTL_DSP_STEREO)
341 #error No open sound system
343 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
345 if test "$ac_cv_c_opensoundsystem" = "yes"
350 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
351 ac_cv_c_opensoundsystem_midi,
353 #if defined(HAVE_SYS_SOUNDCARD_H)
354 #include <sys/soundcard.h>
355 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
356 #include <machine/soundcard.h>
357 #elif defined(HAVE_SOUNDCARD_H)
358 #include <soundcard.h>
362 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
363 #if !defined(SNDCTL_SEQ_SYNC)
364 #error No open sound system MIDI interface
366 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
368 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
370 AC_DEFINE(HAVE_OSS_MIDI)
373 dnl **** If ln -s doesn't work, use cp instead ****
374 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
376 dnl **** Check for gcc strength-reduce bug ****
378 if test "x${GCC}" = "xyes"
380 CFLAGS="$CFLAGS -Wall"
381 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
384 static int Array[[3]];
387 for(i=0; i<B; i++) Array[[i]] = i - 3;
388 exit( Array[[1]] != -2 );
390 ac_cv_c_gcc_strength_bug="no",
391 ac_cv_c_gcc_strength_bug="yes",
392 ac_cv_c_gcc_strength_bug="yes") )
393 if test "$ac_cv_c_gcc_strength_bug" = "yes"
395 CFLAGS="$CFLAGS -fno-strength-reduce"
399 dnl **** Check for underscore on external symbols ****
401 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
402 ac_cv_c_extern_prefix,
404 LIBS="conftest_asm.s $LIBS"
405 cat > conftest_asm.s <<EOF
410 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
411 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
413 if test "$ac_cv_c_extern_prefix" = "yes"
415 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
418 dnl **** Check for .string in assembler ****
420 AC_CACHE_CHECK("whether assembler accepts .string",
423 LIBS="conftest_asm.s $LIBS"
424 cat > conftest_asm.s <<EOF
427 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
429 if test "$ac_cv_c_asm_string" = "yes"
431 AC_DEFINE(HAVE_ASM_STRING)
434 dnl **** Check for working dll ****
437 if test "$LIBEXT" = "so"
439 AC_CACHE_CHECK("whether we can build a Linux dll",
441 [saved_cflags=$CFLAGS
442 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
443 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
446 if test "$ac_cv_c_dll_linux" = "yes"
448 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
450 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
451 ac_cv_c_dll_unixware,
452 [saved_cflags=$CFLAGS
453 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
454 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
457 if test "$ac_cv_c_dll_unixware" = "yes"
459 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
461 AC_CACHE_CHECK("whether we can build a NetBSD dll",
463 [saved_cflags=$CFLAGS
464 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
465 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
468 if test "$ac_cv_c_dll_netbsd" = "yes"
470 LDSHARED="ld -Bshareable -Bforcearchive"
474 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
483 if test "$LIBEXT" = "so"; then
486 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) -L\$(TOPOBJDIR) -lwine"
488 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine \$(X_LIBS) \$(XLIB)"
489 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
490 ac_cv_c_whole_archive,
491 [saved_cflags=$CFLAGS
492 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
493 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
496 if test "$ac_cv_c_whole_archive" = "yes"
498 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
500 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
502 [saved_cflags=$CFLAGS
503 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
504 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
507 if test "$ac_cv_c_allextract" = "yes"
509 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
520 dnl **** Check for reentrant libc ****
522 dnl For cross-compiling we blindly assume that libc is reentrant. This is
523 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
525 wine_cv_libc_reentrant=no
527 dnl Linux style errno location
529 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
530 [AC_TRY_RUN([int myerrno = 0;
532 int *__errno_location(){return &myerrno;}
533 main(){connect(0,buf,255); exit(!myerrno);}],
534 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
535 wine_cv_libc_r__errno_location=yes )
537 if test "$wine_cv_libc_r__errno_location" = "yes"
539 AC_DEFINE(HAVE__ERRNO_LOCATION)
540 wine_cv_libc_reentrant=__errno_location
543 dnl FreeBSD style errno location
545 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
546 [AC_TRY_RUN([int myerrno = 0;
548 int *__error(){return &myerrno;}
549 main(){connect(0,buf,255); exit(!myerrno);}],
550 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
551 wine_cv_libc_r__error=yes )
553 if test "$wine_cv_libc_r__error" = "yes"
555 AC_DEFINE(HAVE__ERROR)
556 wine_cv_libc_reentrant=__error
559 dnl Solaris style errno location
561 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
562 [AC_TRY_RUN([int myerrno = 0;
564 int *___errno(){return &myerrno;}
565 main(){connect(0,buf,255); exit(!myerrno);}],
566 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
567 wine_cv_libc_r___errno=yes )
569 if test "$wine_cv_libc_r___errno" = "yes"
571 AC_DEFINE(HAVE___ERRNO)
572 wine_cv_libc_reentrant=___errno
575 dnl UnixWare style errno location
577 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
578 [AC_TRY_RUN([int myerrno = 0;
580 int *__thr_errno(){return &myerrno;}
581 main(){connect(0,buf,255); exit(!myerrno);}],
582 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
583 wine_cv_libc_r__thr_errno=yes )
585 if test "$wine_cv_libc_r__thr_errno" = "yes"
587 AC_DEFINE(HAVE__THR_ERRNO)
588 wine_cv_libc_reentrant=__thr_errno
590 if test "$wine_cv_libc_reentrant" = "no"
592 AC_DEFINE(NO_REENTRANT_LIBC)
595 dnl **** Check for reentrant X libraries ****
597 dnl This may fail to determine whether X libraries are reentrant if
598 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
599 dnl is possible with the --without-reentrant-x option.
601 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
603 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
604 [ if test "x$with_reentrant_x" = "xno"
606 wine_cv_x_reentrant=no
609 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
610 if test -r $dir/libX11.so; then
611 libX11_check="-D $dir/libX11.so"
614 if test -r $dir/libX11.a; then
615 libX11_check="$dir/libX11.a"
619 if test "$libX11_check" != "none"; then
620 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
622 wine_cv_x_reentrant=yes
624 wine_cv_x_reentrant=no
627 wine_cv_x_reentrant=unknown
631 wine_cv_x_reentrant=no
633 if test "$wine_cv_x_reentrant" = "no"
635 AC_DEFINE(NO_REENTRANT_X11)
638 dnl **** Check for endianness ****
642 dnl **** Check for functions ****
675 dnl **** Check for header files ****
727 dnl **** Check for types ****
732 AC_CHECK_SIZEOF(long long,0)
734 if test "$ac_cv_header_linux_joystick_h" = "yes"
736 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
737 wine_cv_linux_joystick_22_api,
739 #include <sys/ioctl.h>
740 #include <linux/joystick.h>
742 struct js_event blub;
743 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
744 #error "no 2.2 header"
747 wine_cv_linux_joystick_22_api=yes,
748 wine_cv_linux_joystick_22_api=no,
749 wine_cv_linux_joystick_22_api=no
752 if test "$wine_cv_linux_joystick_22_api" = "yes"
754 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
758 dnl **** statfs checks ****
760 if test "$ac_cv_header_sys_vfs_h" = "yes"
762 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
763 wine_cv_sys_vfs_has_statfs,
765 #include <sys/types.h>
766 #ifdef HAVE_SYS_PARAM_H
767 # include <sys/param.h>
773 memset(&stfs,0,sizeof(stfs));
774 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
777 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
779 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
783 if test "$ac_cv_header_sys_statfs_h" = "yes"
785 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
786 wine_cv_sys_statfs_has_statfs,
788 #include <sys/types.h>
789 #ifdef HAVE_SYS_PARAM_H
790 # include <sys/param.h>
792 #include <sys/statfs.h>
795 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
798 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
800 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
804 if test "$ac_cv_header_sys_mount_h" = "yes"
806 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
807 wine_cv_sys_mount_has_statfs,
809 #include <sys/types.h>
810 #ifdef HAVE_SYS_PARAM_H
811 # include <sys/param.h>
813 #include <sys/mount.h>
816 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
819 if test "$wine_cv_sys_mount_has_statfs" = "yes"
821 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
825 dnl **** FIXME: what about mixed cases, where we need two of them? ***
827 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
828 [ if test "x$statfs_bfree" = "xno"
830 wine_cv_statfs_bfree=no
833 #include <sys/types.h>
834 #ifdef HAVE_SYS_PARAM_H
835 # include <sys/param.h>
837 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
838 # include <sys/mount.h>
840 # ifdef STATFS_DEFINED_BY_SYS_VFS
841 # include <sys/vfs.h>
843 # ifdef STATFS_DEFINED_BY_SYS_STATFS
844 # include <sys/statfs.h>
852 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
855 if test "$wine_cv_statfs_bfree" = "yes"
857 AC_DEFINE(STATFS_HAS_BFREE)
860 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
861 [ if test "x$statfs_bavail" = "xno"
863 wine_cv_statfs_bavail=no
866 #include <sys/types.h>
867 #ifdef HAVE_SYS_PARAM_H
868 # include <sys/param.h>
870 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
871 # include <sys/mount.h>
873 # ifdef STATFS_DEFINED_BY_SYS_VFS
874 # include <sys/vfs.h>
876 # ifdef STATFS_DEFINED_BY_SYS_STATFS
877 # include <sys/statfs.h>
885 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
888 if test "$wine_cv_statfs_bavail" = "yes"
890 AC_DEFINE(STATFS_HAS_BAVAIL)
893 dnl *** check for file descriptor passing with msg_accrights
895 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
896 AC_TRY_COMPILE([#include <sys/types.h>
897 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
898 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
899 if test "$ac_cv_c_msg_accrights" = "yes"
901 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
904 dnl *** Check for the sun_len member in struct sockaddr_un
906 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
907 AC_TRY_COMPILE([#include <sys/types.h>
908 #include <sys/socket.h>
909 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
910 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
911 if test "$ac_cv_c_sun_len" = "yes"
913 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
916 dnl *** check for the need to define __i386__
918 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
919 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
922 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
923 if test "$ac_cv_cpp_def_i386" = "yes"
925 CFLAGS="$CFLAGS -D__i386__"
926 LINTFLAGS="$LINTFLAGS -D__i386__"
929 dnl $GCC is set by autoconf
931 if test "$GCC" = "yes"
933 GCC_NO_BUILTIN="-fno-builtin"
935 AC_SUBST(GCC_NO_BUILTIN)
937 dnl **** Generate output files ****
941 dlls/ddraw/d3ddevice \
942 dlls/ddraw/dclipper \
944 dlls/ddraw/direct3d \
945 dlls/ddraw/dpalette \
946 dlls/ddraw/dsurface \
948 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
950 MAKE_RULES=Make.rules
951 AC_SUBST_FILE(MAKE_RULES)
953 MAKE_DLL_RULES=dlls/Makedll.rules
954 AC_SUBST_FILE(MAKE_DLL_RULES)
964 dlls/advapi32/Makefile
965 dlls/avifil32/Makefile
966 dlls/comctl32/Makefile
967 dlls/commdlg/Makefile
969 dlls/dciman32/Makefile
972 dlls/display/Makefile
977 dlls/imagehlp/Makefile
979 dlls/lzexpand/Makefile
983 dlls/msacm32/Makefile
984 dlls/msnet32/Makefile
985 dlls/msvideo/Makefile
989 dlls/oleaut32/Makefile
992 dlls/olepro32/Makefile
995 dlls/rasapi32/Makefile
997 dlls/shell32/Makefile
1000 dlls/tapi32/Makefile
1001 dlls/ttydrv/Makefile
1002 dlls/urlmon/Makefile
1004 dlls/version/Makefile
1005 dlls/win32s/Makefile
1006 dlls/win87em/Makefile
1007 dlls/winaspi/Makefile
1008 dlls/windebug/Makefile
1010 dlls/wininet/Makefile
1012 dlls/winmm/joystick/Makefile
1013 dlls/winmm/mcianim/Makefile
1014 dlls/winmm/mciavi/Makefile
1015 dlls/winmm/mcicda/Makefile
1016 dlls/winmm/mciseq/Makefile
1017 dlls/winmm/mciwave/Makefile
1018 dlls/winmm/midimap/Makefile
1019 dlls/winmm/wavemap/Makefile
1020 dlls/winmm/wineoss/Makefile
1021 dlls/winsock/Makefile
1022 dlls/winspool/Makefile
1023 dlls/ttydrv/Makefile
1024 dlls/x11drv/Makefile
1025 documentation/Makefile
1026 documentation/wine.conf.man
1027 documentation/wine.man
1030 graphics/enhmetafiledrv/Makefile
1031 graphics/metafiledrv/Makefile
1032 graphics/psdrv/Makefile
1033 graphics/ttydrv/Makefile
1034 graphics/win16drv/Makefile
1035 graphics/x11drv/Makefile
1050 programs/clock/Makefile
1051 programs/cmdlgtst/Makefile
1052 programs/control/Makefile
1053 programs/avitools/Makefile
1054 programs/osversioncheck/Makefile
1055 programs/notepad/Makefile
1056 programs/progman/Makefile
1057 programs/regtest/Makefile
1058 programs/regapi/Makefile
1059 programs/view/Makefile
1060 programs/wcmd/Makefile
1061 programs/winemine/Makefile
1062 programs/winhelp/Makefile
1063 programs/winver/Makefile
1069 tools/cvdump/Makefile
1074 windows/ttydrv/Makefile
1075 windows/x11drv/Makefile ])
1077 if test "$have_x" = "no"
1080 echo "*** Warning: X development files not found. Wine will be built without"
1081 echo "*** X support, which currently does not work, and would probably not be"
1082 echo "*** what you want anyway. You will need to install devel packages of"
1083 echo "*** Xlib/Xfree86 and Xpm at the very least."
1084 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1087 echo "*** Warning: Xpm development files not found. Wine will be built without"
1088 echo "*** Xpm support, which currently does not work. You will need to install"
1089 echo "*** devel packages of Xpm."
1092 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1095 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1096 echo "*** terminal resize support. Consider upgrading ncurses."
1099 if test "$wine_cv_libc_reentrant" = "no"
1102 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1103 echo "*** thread support. Consider upgrading libc to a more recent"
1104 echo "*** reentrant version of libc."
1107 if test "$wine_cv_mesa_version_OK" = "no"
1110 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1111 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1114 if test "$wine_cv_mesa_version_threadsafe" = "yes" -a $OPENGL = "normal"
1117 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1118 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
1119 echo "*** A fix for glibc 2.1.3 that seem to work is included in this version of Wine,"
1120 echo "*** start configure with '--enable-opengl' to force OpenGL support."
1123 if test "$wine_cv_mesa_version_threadsafe" = "yes" -a $OPENGL = "yes"
1126 echo "*** Warning: you explicitely linked in a thread-safe OpenGL version. If you"
1127 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1128 echo "*** support before reporting bugs."
1133 echo "Configure finished. Do 'make depend && make' to compile Wine."
1136 dnl Local Variables:
1137 dnl comment-start: "dnl "
1139 dnl comment-start-skip: "\\bdnl\\b\\s *"
1140 dnl compile-command: "autoconf"