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)
135 if test "$have_x" = "yes"
138 ac_save_CPPFLAGS="$CPPFLAGS"
139 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
142 AC_CHECK_HEADERS(X11/xpm.h)
143 if test "$ac_cv_header_X11_xpm_h" = "yes"
145 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
147 echo "When compiling with X support, you need the Xpm library, or"
148 echo "WINE will not work. This Xpm library is within the following RPM,"
149 echo "which you need to install:"
150 echo "Redhat : xpm, xpm-devel"
151 echo "Caldera OpenLinux : xpm, xpm-devel, xpm-devel-static"
153 echo "Debian/Corel Linux: xpm4g, xpm4g-dev"
155 echo "Or get the sources from ftp.x.org and all its mirror sites from "
156 echo "the directory /contrib/libraries."
162 dnl Check for X Shm extension
163 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/XShm.h)
164 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_XShm_h" = "yes"
166 AC_CHECK_LIB(Xext,XShmQueryExtension,AC_DEFINE(HAVE_LIBXXSHM),,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
168 dnl Check for XFree86 DGA / DGA 2.0 extension
169 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86dga.h)
170 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
172 AC_CHECK_LIB(Xxf86dga,
174 AC_DEFINE(HAVE_LIBXXF86DGA2)
175 AC_DEFINE(HAVE_LIBXXF86DGA)
176 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
177 DGA_SRCS='$(DGA_SRCS)'
178 DGA2_SRCS='$(DGA2_SRCS)'
179 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS
181 if test "$ac_cv_lib_Xxf86dga_XDGAQueryExtension" = "no"
183 AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,
184 AC_DEFINE(HAVE_LIBXXF86DGA)
185 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
186 DGA_SRCS='$(DGA_SRCS)'
187 ,,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
191 dnl Check for XFree86 VMODE extension
192 AC_CHECK_HEADERS(X11/Xlib.h X11/extensions/xf86vmode.h)
193 if test "$ac_cv_header_X11_Xlib_h" = "yes" -a "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
195 AC_CHECK_LIB(Xxf86vm,XF86VidModeQueryExtension,AC_DEFINE(HAVE_LIBXXF86VM) X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm",,$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
198 dnl Check for the presence of Mesa
199 if test $OPENGL = "yes" -o $OPENGL = "normal"
201 AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
202 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
204 dnl Check for some problems due to old Mesa versions
205 AC_CACHE_CHECK("for up-to-date OpenGL version", wine_cv_mesa_version_OK,
207 [#include <GL/gl.h>],
208 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
209 [wine_cv_mesa_version_OK="yes"],
210 [wine_cv_mesa_version_OK="no"]
214 dnl Check for the thread-safety of the OpenGL library
215 AC_CACHE_CHECK("for thread-safe OpenGL version",
216 wine_cv_mesa_version_threadsafe,
219 AC_TRY_LINK([],[pthread_getspecific();],
220 [wine_cv_mesa_version_threadsafe="yes"],
221 [wine_cv_mesa_version_threadsafe="no"])
225 if test "$wine_cv_mesa_version_OK" = "yes" -a \( "$wine_cv_mesa_version_threadsafe" = "no" -o $OPENGL = "yes" \)
227 dnl Check for the presense of the library
228 AC_CHECK_LIB(GL,glXCreateContext,
229 AC_DEFINE(HAVE_LIBMESAGL)
230 X_PRE_LIBS="$X_PRE_LIBS -lGL"
231 MESA_SRCS='$(MESA_SRCS)'
233 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
235 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
237 AC_CHECK_LIB(MesaGL,glXCreateContext,
238 AC_DEFINE(HAVE_LIBMESAGL)
239 X_PRE_LIBS="$X_PRE_LIBS -lMesaGL"
240 MESA_SRCS='$(MESA_SRCS)'
242 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
245 dnl Check for the Color Table and Paletted Texture extensions
246 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
247 AC_TRY_COMPILE([#include <GL/gl.h>],
248 [GLenum test = GL_COLOR_INDEX8_EXT;],
249 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],))
251 if test "$ac_cv_lib_GL_glXCreateContext" = "no"
253 AC_CHECK_LIB(MesaGL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
255 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
261 CPPFLAGS="$ac_save_CPPFLAGS"
270 dnl **** Check which curses lib to use ***
271 if test "$CURSES" = "yes"
273 AC_CHECK_HEADERS(ncurses.h)
274 if test "$ac_cv_header_ncurses_h" = "yes"
276 AC_CHECK_LIB(ncurses,waddch)
278 if test "$ac_cv_lib_ncurses_waddch" = "yes"
280 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
281 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
283 AC_CHECK_HEADERS(curses.h)
284 if test "$ac_cv_header_curses_h" = "yes"
286 AC_CHECK_LIB(curses,waddch)
287 if test "$ac_cv_lib_curses_waddch" = "yes"
289 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
290 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
296 dnl **** Check for IPX (currently Linux only) ****
297 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
299 [#include <sys/socket.h>
300 #include <netipx/ipx.h>],
301 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
302 [ac_cv_c_ipx_gnu="yes"],
303 [ac_cv_c_ipx_gnu="no"])
305 if test "$ac_cv_c_ipx_gnu" = "yes"
307 AC_DEFINE(HAVE_IPX_GNU)
310 if test "$ac_cv_c_ipx_gnu" = "no"
312 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
314 [#include <sys/socket.h>
315 #include <asm/types.h>
316 #include <linux/ipx.h>],
317 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
318 [ac_cv_c_ipx_linux="yes"],
319 [ac_cv_c_ipx_linux="no"])
321 if test "$ac_cv_c_ipx_linux" = "yes"
323 AC_DEFINE(HAVE_IPX_LINUX)
327 dnl **** Check for Open Sound System ****
328 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
330 AC_CACHE_CHECK("for Open Sound System",
331 ac_cv_c_opensoundsystem,
333 #if defined(HAVE_SYS_SOUNDCARD_H)
334 #include <sys/soundcard.h>
335 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
336 #include <machine/soundcard.h>
337 #elif defined(HAVE_SOUNDCARD_H)
338 #include <soundcard.h>
342 /* check for one of the Open Sound System specific SNDCTL_ defines */
343 #if !defined(SNDCTL_DSP_STEREO)
344 #error No open sound system
346 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
348 if test "$ac_cv_c_opensoundsystem" = "yes"
353 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
354 ac_cv_c_opensoundsystem_midi,
356 #if defined(HAVE_SYS_SOUNDCARD_H)
357 #include <sys/soundcard.h>
358 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
359 #include <machine/soundcard.h>
360 #elif defined(HAVE_SOUNDCARD_H)
361 #include <soundcard.h>
365 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
366 #if !defined(SNDCTL_SEQ_SYNC)
367 #error No open sound system MIDI interface
369 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
371 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
373 AC_DEFINE(HAVE_OSS_MIDI)
376 dnl **** If ln -s doesn't work, use cp instead ****
377 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
379 dnl **** Check for gcc strength-reduce bug ****
381 if test "x${GCC}" = "xyes"
383 CFLAGS="$CFLAGS -Wall"
384 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
387 static int Array[[3]];
390 for(i=0; i<B; i++) Array[[i]] = i - 3;
391 exit( Array[[1]] != -2 );
393 ac_cv_c_gcc_strength_bug="no",
394 ac_cv_c_gcc_strength_bug="yes",
395 ac_cv_c_gcc_strength_bug="yes") )
396 if test "$ac_cv_c_gcc_strength_bug" = "yes"
398 CFLAGS="$CFLAGS -fno-strength-reduce"
402 dnl **** Check for underscore on external symbols ****
404 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
405 ac_cv_c_extern_prefix,
407 LIBS="conftest_asm.s $LIBS"
408 cat > conftest_asm.s <<EOF
413 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
414 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
416 if test "$ac_cv_c_extern_prefix" = "yes"
418 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
421 dnl **** Check for .string in assembler ****
423 AC_CACHE_CHECK("whether assembler accepts .string",
426 LIBS="conftest_asm.s $LIBS"
427 cat > conftest_asm.s <<EOF
430 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
432 if test "$ac_cv_c_asm_string" = "yes"
434 AC_DEFINE(HAVE_ASM_STRING)
437 dnl **** Check for working dll ****
440 if test "$LIBEXT" = "so"
442 AC_CACHE_CHECK("whether we can build a Linux dll",
444 [saved_cflags=$CFLAGS
445 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
446 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
449 if test "$ac_cv_c_dll_linux" = "yes"
451 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
453 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
454 ac_cv_c_dll_unixware,
455 [saved_cflags=$CFLAGS
456 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
457 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
460 if test "$ac_cv_c_dll_unixware" = "yes"
462 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
464 AC_CACHE_CHECK("whether we can build a NetBSD dll",
466 [saved_cflags=$CFLAGS
467 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
468 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
471 if test "$ac_cv_c_dll_netbsd" = "yes"
473 LDSHARED="ld -Bshareable -Bforcearchive"
477 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
486 if test "$LIBEXT" = "so"; then
489 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) -L\$(TOPOBJDIR) -lwine"
491 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine \$(X_LIBS) \$(XLIB)"
492 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
493 ac_cv_c_whole_archive,
494 [saved_cflags=$CFLAGS
495 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
496 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
499 if test "$ac_cv_c_whole_archive" = "yes"
501 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
503 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
505 [saved_cflags=$CFLAGS
506 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
507 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
510 if test "$ac_cv_c_allextract" = "yes"
512 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
523 dnl **** Check for reentrant libc ****
525 dnl For cross-compiling we blindly assume that libc is reentrant. This is
526 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
528 wine_cv_libc_reentrant=no
530 dnl Linux style errno location
532 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
533 [AC_TRY_RUN([int myerrno = 0;
535 int *__errno_location(){return &myerrno;}
536 main(){connect(0,buf,255); exit(!myerrno);}],
537 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
538 wine_cv_libc_r__errno_location=yes )
540 if test "$wine_cv_libc_r__errno_location" = "yes"
542 AC_DEFINE(HAVE__ERRNO_LOCATION)
543 wine_cv_libc_reentrant=__errno_location
546 dnl FreeBSD style errno location
548 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
549 [AC_TRY_RUN([int myerrno = 0;
551 int *__error(){return &myerrno;}
552 main(){connect(0,buf,255); exit(!myerrno);}],
553 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
554 wine_cv_libc_r__error=yes )
556 if test "$wine_cv_libc_r__error" = "yes"
558 AC_DEFINE(HAVE__ERROR)
559 wine_cv_libc_reentrant=__error
562 dnl Solaris style errno location
564 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
565 [AC_TRY_RUN([int myerrno = 0;
567 int *___errno(){return &myerrno;}
568 main(){connect(0,buf,255); exit(!myerrno);}],
569 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
570 wine_cv_libc_r___errno=yes )
572 if test "$wine_cv_libc_r___errno" = "yes"
574 AC_DEFINE(HAVE___ERRNO)
575 wine_cv_libc_reentrant=___errno
578 dnl UnixWare style errno location
580 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
581 [AC_TRY_RUN([int myerrno = 0;
583 int *__thr_errno(){return &myerrno;}
584 main(){connect(0,buf,255); exit(!myerrno);}],
585 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
586 wine_cv_libc_r__thr_errno=yes )
588 if test "$wine_cv_libc_r__thr_errno" = "yes"
590 AC_DEFINE(HAVE__THR_ERRNO)
591 wine_cv_libc_reentrant=__thr_errno
593 if test "$wine_cv_libc_reentrant" = "no"
595 AC_DEFINE(NO_REENTRANT_LIBC)
598 dnl **** Check for reentrant X libraries ****
600 dnl This may fail to determine whether X libraries are reentrant if
601 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
602 dnl is possible with the --without-reentrant-x option.
604 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
606 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
607 [ if test "x$with_reentrant_x" = "xno"
609 wine_cv_x_reentrant=no
612 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
613 if test -r $dir/libX11.so; then
614 libX11_check="-D $dir/libX11.so"
617 if test -r $dir/libX11.a; then
618 libX11_check="$dir/libX11.a"
622 if test "$libX11_check" != "none"; then
623 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
625 wine_cv_x_reentrant=yes
627 wine_cv_x_reentrant=no
630 wine_cv_x_reentrant=unknown
634 wine_cv_x_reentrant=no
636 if test "$wine_cv_x_reentrant" = "no"
638 AC_DEFINE(NO_REENTRANT_X11)
641 dnl **** Check for endianness ****
645 dnl **** Check for functions ****
678 dnl **** Check for header files ****
730 dnl **** Check for types ****
735 AC_CHECK_SIZEOF(long long,0)
737 if test "$ac_cv_header_linux_joystick_h" = "yes"
739 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
740 wine_cv_linux_joystick_22_api,
742 #include <sys/ioctl.h>
743 #include <linux/joystick.h>
745 struct js_event blub;
746 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
747 #error "no 2.2 header"
750 wine_cv_linux_joystick_22_api=yes,
751 wine_cv_linux_joystick_22_api=no,
752 wine_cv_linux_joystick_22_api=no
755 if test "$wine_cv_linux_joystick_22_api" = "yes"
757 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
761 dnl **** statfs checks ****
763 if test "$ac_cv_header_sys_vfs_h" = "yes"
765 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
766 wine_cv_sys_vfs_has_statfs,
768 #include <sys/types.h>
769 #ifdef HAVE_SYS_PARAM_H
770 # include <sys/param.h>
776 memset(&stfs,0,sizeof(stfs));
777 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
780 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
782 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
786 if test "$ac_cv_header_sys_statfs_h" = "yes"
788 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
789 wine_cv_sys_statfs_has_statfs,
791 #include <sys/types.h>
792 #ifdef HAVE_SYS_PARAM_H
793 # include <sys/param.h>
795 #include <sys/statfs.h>
798 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
801 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
803 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
807 if test "$ac_cv_header_sys_mount_h" = "yes"
809 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
810 wine_cv_sys_mount_has_statfs,
812 #include <sys/types.h>
813 #ifdef HAVE_SYS_PARAM_H
814 # include <sys/param.h>
816 #include <sys/mount.h>
819 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
822 if test "$wine_cv_sys_mount_has_statfs" = "yes"
824 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
828 dnl **** FIXME: what about mixed cases, where we need two of them? ***
830 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
831 [ if test "x$statfs_bfree" = "xno"
833 wine_cv_statfs_bfree=no
836 #include <sys/types.h>
837 #ifdef HAVE_SYS_PARAM_H
838 # include <sys/param.h>
840 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
841 # include <sys/mount.h>
843 # ifdef STATFS_DEFINED_BY_SYS_VFS
844 # include <sys/vfs.h>
846 # ifdef STATFS_DEFINED_BY_SYS_STATFS
847 # include <sys/statfs.h>
855 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
858 if test "$wine_cv_statfs_bfree" = "yes"
860 AC_DEFINE(STATFS_HAS_BFREE)
863 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
864 [ if test "x$statfs_bavail" = "xno"
866 wine_cv_statfs_bavail=no
869 #include <sys/types.h>
870 #ifdef HAVE_SYS_PARAM_H
871 # include <sys/param.h>
873 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
874 # include <sys/mount.h>
876 # ifdef STATFS_DEFINED_BY_SYS_VFS
877 # include <sys/vfs.h>
879 # ifdef STATFS_DEFINED_BY_SYS_STATFS
880 # include <sys/statfs.h>
888 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
891 if test "$wine_cv_statfs_bavail" = "yes"
893 AC_DEFINE(STATFS_HAS_BAVAIL)
896 dnl *** check for file descriptor passing with msg_accrights
898 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
899 AC_TRY_COMPILE([#include <sys/types.h>
900 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
901 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
902 if test "$ac_cv_c_msg_accrights" = "yes"
904 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
907 dnl *** Check for the sun_len member in struct sockaddr_un
909 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
910 AC_TRY_COMPILE([#include <sys/types.h>
911 #include <sys/socket.h>
912 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
913 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
914 if test "$ac_cv_c_sun_len" = "yes"
916 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
919 dnl *** check for the need to define __i386__
921 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
922 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
925 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
926 if test "$ac_cv_cpp_def_i386" = "yes"
928 CFLAGS="$CFLAGS -D__i386__"
929 LINTFLAGS="$LINTFLAGS -D__i386__"
932 dnl $GCC is set by autoconf
934 if test "$GCC" = "yes"
936 GCC_NO_BUILTIN="-fno-builtin"
938 AC_SUBST(GCC_NO_BUILTIN)
940 dnl **** Generate output files ****
944 dlls/ddraw/d3ddevice \
945 dlls/ddraw/dclipper \
947 dlls/ddraw/direct3d \
948 dlls/ddraw/dpalette \
949 dlls/ddraw/dsurface \
951 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
953 MAKE_RULES=Make.rules
954 AC_SUBST_FILE(MAKE_RULES)
956 MAKE_DLL_RULES=dlls/Makedll.rules
957 AC_SUBST_FILE(MAKE_DLL_RULES)
967 dlls/advapi32/Makefile
968 dlls/avifil32/Makefile
969 dlls/comctl32/Makefile
970 dlls/commdlg/Makefile
972 dlls/dciman32/Makefile
975 dlls/display/Makefile
980 dlls/imagehlp/Makefile
982 dlls/lzexpand/Makefile
986 dlls/msacm32/Makefile
987 dlls/msnet32/Makefile
988 dlls/msvideo/Makefile
992 dlls/oleaut32/Makefile
995 dlls/olepro32/Makefile
998 dlls/rasapi32/Makefile
999 dlls/richedit/Makefile
1000 dlls/setupx/Makefile
1001 dlls/shell32/Makefile
1003 dlls/stress/Makefile
1004 dlls/tapi32/Makefile
1005 dlls/ttydrv/Makefile
1006 dlls/urlmon/Makefile
1008 dlls/version/Makefile
1009 dlls/win32s/Makefile
1010 dlls/win87em/Makefile
1011 dlls/winaspi/Makefile
1012 dlls/windebug/Makefile
1014 dlls/wininet/Makefile
1016 dlls/winmm/joystick/Makefile
1017 dlls/winmm/mcianim/Makefile
1018 dlls/winmm/mciavi/Makefile
1019 dlls/winmm/mcicda/Makefile
1020 dlls/winmm/mciseq/Makefile
1021 dlls/winmm/mciwave/Makefile
1022 dlls/winmm/midimap/Makefile
1023 dlls/winmm/wavemap/Makefile
1024 dlls/winmm/wineoss/Makefile
1025 dlls/winsock/Makefile
1026 dlls/winspool/Makefile
1027 dlls/ttydrv/Makefile
1028 dlls/x11drv/Makefile
1029 documentation/Makefile
1030 documentation/wine.conf.man
1031 documentation/wine.man
1034 graphics/enhmetafiledrv/Makefile
1035 graphics/metafiledrv/Makefile
1036 graphics/psdrv/Makefile
1037 graphics/ttydrv/Makefile
1038 graphics/win16drv/Makefile
1039 graphics/x11drv/Makefile
1054 programs/clock/Makefile
1055 programs/cmdlgtst/Makefile
1056 programs/control/Makefile
1057 programs/avitools/Makefile
1058 programs/osversioncheck/Makefile
1059 programs/notepad/Makefile
1060 programs/progman/Makefile
1061 programs/regtest/Makefile
1062 programs/regapi/Makefile
1063 programs/view/Makefile
1064 programs/wcmd/Makefile
1065 programs/winemine/Makefile
1066 programs/winhelp/Makefile
1067 programs/winver/Makefile
1073 tools/cvdump/Makefile
1078 windows/ttydrv/Makefile
1079 windows/x11drv/Makefile ])
1081 if test "$have_x" = "no"
1084 echo "*** Warning: X development files not found. Wine will be built without"
1085 echo "*** X support, which currently does not work, and would probably not be"
1086 echo "*** what you want anyway. You will need to install devel packages of"
1087 echo "*** Xlib/Xfree86 and Xpm at the very least."
1088 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1091 echo "*** Warning: Xpm development files not found. Wine will be built without"
1092 echo "*** Xpm support, which currently does not work. You will need to install"
1093 echo "*** devel packages of Xpm."
1096 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1099 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1100 echo "*** terminal resize support. Consider upgrading ncurses."
1103 if test "$wine_cv_libc_reentrant" = "no"
1106 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1107 echo "*** thread support. Consider upgrading libc to a more recent"
1108 echo "*** reentrant version of libc."
1111 if test "$wine_cv_mesa_version_OK" = "no"
1114 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1115 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1118 if test "$wine_cv_mesa_version_threadsafe" = "yes" -a $OPENGL = "normal"
1121 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1122 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
1123 echo "*** A fix for glibc 2.1.3 that seem to work is included in this version of Wine,"
1124 echo "*** start configure with '--enable-opengl' to force OpenGL support."
1127 if test "$wine_cv_mesa_version_threadsafe" = "yes" -a $OPENGL = "yes"
1130 echo "*** Warning: you explicitely linked in a thread-safe OpenGL version. If you"
1131 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1132 echo "*** support before reporting bugs."
1137 echo "Configure finished. Do 'make depend && make' to compile Wine."
1140 dnl Local Variables:
1141 dnl comment-start: "dnl "
1143 dnl comment-start-skip: "\\bdnl\\b\\s *"
1144 dnl compile-command: "autoconf"