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 dnl **** Command-line arguments ****
12 LIBEXT=so # library type .so or .a
13 TRACE_MSGS=yes # the TRACE() macro
14 DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
19 [ --disable-dll build static libraries instead of DLLs],
20 [if test "$enableval" = "no"; then LIBEXT="a"; fi])
23 [ --disable-debug compile out all debugging messages],
24 [if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
27 [ --enable-opengl force usage of OpenGL even if the latter is thread-safe],
28 [if test "$enableval" = "no"; then OPENGL="no"; elif test "$enableval" = "yes"; then OPENGL="yes"; fi])
31 [ --disable-trace compile out TRACE messages],
32 [if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
35 [ --without-curses do not use curses],
36 [if test "$withval" = "no"; then CURSES="no"; fi])
38 AC_ARG_WITH(reentrant-x,
39 [ --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)
119 AC_SUBST(OPENGLFILES)
121 AC_SUBST(OPENGL32_DLL)
129 if test "$have_x" = "yes"
132 ac_save_CPPFLAGS="$CPPFLAGS"
133 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
135 dnl *** Check for -lXpm
136 AC_CHECK_HEADERS(X11/xpm.h,
137 [ dnl *** If X11/xpm.h exists...
138 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
139 [ AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm"],,
140 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
143 [ dnl *** If X11/xpm.h does not exist...
144 dnl NOTE: autoconf does not allow commas inside the third
145 dnl parameter to AC_CHECK_HEADERS, due to some quoting
147 echo "Redhat : xpm xpm-devel"
148 echo "Caldera OpenLinux : xpm xpm-devel xpm-devel-static"
150 echo "Debian/Corel Linux: xpm4g xpm4g-dev"
152 echo "Or get the sources from ftp.x.org and all its mirror sites from "
153 echo "the directory /contrib/libraries."
159 dnl *** All three of the following tests require X11/Xlib.h
160 AC_CHECK_HEADERS(X11/Xlib.h,
162 dnl *** Check for X Shm extension
163 AC_CHECK_HEADERS(X11/extensions/XShm.h,
164 [ dnl *** If X11/extensions/XShm.h exists...
165 AC_CHECK_LIB(Xext, XShmQueryExtension,
166 AC_DEFINE(HAVE_LIBXXSHM),,
167 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
169 AC_MSG_WARN([Xshm extension not found!!])
172 dnl *** Check for XFree86 DGA / DGA 2.0 extension
173 AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
174 [ dnl *** If X11/extensions/xf86dga.h exists, check
175 dnl *** for XDGAQueryExtension()...
176 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
177 [ dnl *** If found...
178 AC_DEFINE(HAVE_LIBXXF86DGA2)
179 AC_DEFINE(HAVE_LIBXXF86DGA)
180 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
181 DGA_SRCS='$(DGA_SRCS)'
182 DGA2_SRCS='$(DGA2_SRCS)'
184 [ dnl *** If not found, look for XF86DGAQueryExtension()
185 dnl *** instead (DGA 2.0 not found)...
186 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
187 [ AC_DEFINE(HAVE_LIBXXF86DGA)
188 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
189 DGA_SRCS='$(DGA_SRCS)'
191 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
194 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
197 AC_MSG_WARN([DGA extension not found!!])
200 dnl *** Check for XFree86 VMODE extension
201 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
202 [ dnl *** If X11/extensions/xf86vmode.h exists...
203 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
204 [ AC_DEFINE(HAVE_LIBXXF86VM)
205 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
207 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
210 AC_MSG_WARN([XFree86 VMODE extension not found!!])
213 ) dnl *** End of X11/Xlib.h check
215 dnl Check for the presence of OpenGL
216 if test $OPENGL = "yes" -o $OPENGL = "normal"
218 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h)
219 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes" -a "$ac_cv_header_GL_glext_h" = "yes"
221 dnl Check for some problems due to old Mesa versions
222 AC_CACHE_CHECK("for up-to-date OpenGL version", wine_cv_opengl_version_OK,
224 [#include <GL/gl.h>],
225 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
226 [wine_cv_opengl_version_OK="yes"],
227 [wine_cv_opengl_version_OK="no"]
231 dnl Check for the thread-safety of the OpenGL library
232 AC_CACHE_CHECK("for thread-safe OpenGL version",
233 wine_cv_opengl_version_threadsafe,
236 AC_TRY_LINK([],[pthread_getspecific();],
237 [wine_cv_opengl_version_threadsafe="yes"],
238 [wine_cv_opengl_version_threadsafe="no"])
242 if test "$wine_cv_opengl_version_OK" = "yes" -a \( "$wine_cv_opengl_version_threadsafe" = "no" -o $OPENGL = "yes" \)
244 dnl Check for the presense of the library
245 AC_CHECK_LIB(GL,glXCreateContext,
246 X_PRE_LIBS="$X_PRE_LIBS -lGL"
247 MESA_SRCS='$(MESA_SRCS)'
249 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
251 if test $ac_cv_lib_GL_glXCreateContext = "yes"
253 dnl Check for the Color Table and Paletted Texture extensions
254 AC_CACHE_CHECK("for the OpenGL Color Index extension",dummy,
255 AC_TRY_COMPILE([#include <GL/gl.h>],
256 [GLenum test = GL_COLOR_INDEX8_EXT;],
257 [AC_DEFINE(HAVE_GL_COLOR_TABLE)],))
259 AC_CHECK_LIB(GL,glColorTableEXT,AC_DEFINE(HAVE_GL_PALETTED_TEXTURE),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
260 AC_CHECK_LIB(GL,glXGetProcAddressARB,AC_DEFINE(HAVE_GLX_GETPROCADDRESS),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
262 if test $ac_cv_lib_GL_glXGetProcAddressARB = "yes"
264 AC_DEFINE(HAVE_OPENGL)
265 OPENGL32_DLL=opengl32
266 OPENGLFILES='$(OPENGLFILES)'
273 CPPFLAGS="$ac_save_CPPFLAGS"
282 dnl **** Check which curses lib to use ***
283 if test "$CURSES" = "yes"
285 AC_CHECK_HEADERS(ncurses.h)
286 if test "$ac_cv_header_ncurses_h" = "yes"
288 AC_CHECK_LIB(ncurses,waddch)
290 if test "$ac_cv_lib_ncurses_waddch" = "yes"
292 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
293 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
295 AC_CHECK_HEADERS(curses.h)
296 if test "$ac_cv_header_curses_h" = "yes"
298 AC_CHECK_LIB(curses,waddch)
299 if test "$ac_cv_lib_curses_waddch" = "yes"
301 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
302 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
308 dnl **** Check for IPX (currently Linux only) ****
309 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
311 [#include <sys/socket.h>
312 #include <netipx/ipx.h>],
313 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
314 [ac_cv_c_ipx_gnu="yes"],
315 [ac_cv_c_ipx_gnu="no"])
317 if test "$ac_cv_c_ipx_gnu" = "yes"
319 AC_DEFINE(HAVE_IPX_GNU)
322 if test "$ac_cv_c_ipx_gnu" = "no"
324 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
326 [#include <sys/socket.h>
327 #include <asm/types.h>
328 #include <linux/ipx.h>],
329 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
330 [ac_cv_c_ipx_linux="yes"],
331 [ac_cv_c_ipx_linux="no"])
333 if test "$ac_cv_c_ipx_linux" = "yes"
335 AC_DEFINE(HAVE_IPX_LINUX)
339 dnl **** Check for Open Sound System ****
340 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
342 AC_CACHE_CHECK("for Open Sound System",
343 ac_cv_c_opensoundsystem,
345 #if defined(HAVE_SYS_SOUNDCARD_H)
346 #include <sys/soundcard.h>
347 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
348 #include <machine/soundcard.h>
349 #elif defined(HAVE_SOUNDCARD_H)
350 #include <soundcard.h>
354 /* check for one of the Open Sound System specific SNDCTL_ defines */
355 #if !defined(SNDCTL_DSP_STEREO)
356 #error No open sound system
358 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
360 if test "$ac_cv_c_opensoundsystem" = "yes"
365 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
366 ac_cv_c_opensoundsystem_midi,
368 #if defined(HAVE_SYS_SOUNDCARD_H)
369 #include <sys/soundcard.h>
370 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
371 #include <machine/soundcard.h>
372 #elif defined(HAVE_SOUNDCARD_H)
373 #include <soundcard.h>
377 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
378 #if !defined(SNDCTL_SEQ_SYNC)
379 #error No open sound system MIDI interface
381 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
383 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
385 AC_DEFINE(HAVE_OSS_MIDI)
388 dnl **** If ln -s doesn't work, use cp instead ****
389 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
391 dnl **** Check for gcc strength-reduce bug ****
393 if test "x${GCC}" = "xyes"
395 CFLAGS="$CFLAGS -Wall"
396 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
399 static int Array[[3]];
402 for(i=0; i<B; i++) Array[[i]] = i - 3;
403 exit( Array[[1]] != -2 );
405 ac_cv_c_gcc_strength_bug="no",
406 ac_cv_c_gcc_strength_bug="yes",
407 ac_cv_c_gcc_strength_bug="yes") )
408 if test "$ac_cv_c_gcc_strength_bug" = "yes"
410 CFLAGS="$CFLAGS -fno-strength-reduce"
414 dnl **** Check for underscore on external symbols ****
416 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
417 ac_cv_c_extern_prefix,
419 LIBS="conftest_asm.s $LIBS"
420 cat > conftest_asm.s <<EOF
425 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
426 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
428 if test "$ac_cv_c_extern_prefix" = "yes"
430 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
433 dnl **** Check for .string in assembler ****
435 AC_CACHE_CHECK("whether assembler accepts .string",
438 LIBS="conftest_asm.s $LIBS"
439 cat > conftest_asm.s <<EOF
442 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
444 if test "$ac_cv_c_asm_string" = "yes"
446 AC_DEFINE(HAVE_ASM_STRING)
449 dnl **** Check for working dll ****
452 if test "$LIBEXT" = "so"
454 AC_CACHE_CHECK("whether we can build a Linux dll",
456 [saved_cflags=$CFLAGS
457 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
458 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
461 if test "$ac_cv_c_dll_linux" = "yes"
463 LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
465 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
466 ac_cv_c_dll_unixware,
467 [saved_cflags=$CFLAGS
468 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0"
469 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
472 if test "$ac_cv_c_dll_unixware" = "yes"
474 LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
476 AC_CACHE_CHECK("whether we can build a NetBSD dll",
478 [saved_cflags=$CFLAGS
479 CFLAGS="$CFLAGS -fPIC -Bshareable -Bforcearchive"
480 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
483 if test "$ac_cv_c_dll_netbsd" = "yes"
485 LDSHARED="ld -Bshareable -Bforcearchive"
489 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
498 if test "$LIBEXT" = "so"; then
501 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) -L\$(TOPOBJDIR) -lwine"
503 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine \$(X_LIBS) \$(XLIB)"
504 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
505 ac_cv_c_whole_archive,
506 [saved_cflags=$CFLAGS
507 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
508 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
511 if test "$ac_cv_c_whole_archive" = "yes"
513 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
515 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
517 [saved_cflags=$CFLAGS
518 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
519 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
522 if test "$ac_cv_c_allextract" = "yes"
524 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
535 dnl **** Check for reentrant libc ****
537 dnl For cross-compiling we blindly assume that libc is reentrant. This is
538 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
540 wine_cv_libc_reentrant=no
542 dnl Linux style errno location
544 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
545 [AC_TRY_RUN([int myerrno = 0;
547 int *__errno_location(){return &myerrno;}
548 main(){connect(0,buf,255); exit(!myerrno);}],
549 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
550 wine_cv_libc_r__errno_location=yes )
552 if test "$wine_cv_libc_r__errno_location" = "yes"
554 AC_DEFINE(HAVE__ERRNO_LOCATION)
555 wine_cv_libc_reentrant=__errno_location
558 dnl FreeBSD style errno location
560 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
561 [AC_TRY_RUN([int myerrno = 0;
563 int *__error(){return &myerrno;}
564 main(){connect(0,buf,255); exit(!myerrno);}],
565 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
566 wine_cv_libc_r__error=yes )
568 if test "$wine_cv_libc_r__error" = "yes"
570 AC_DEFINE(HAVE__ERROR)
571 wine_cv_libc_reentrant=__error
574 dnl Solaris style errno location
576 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
577 [AC_TRY_RUN([int myerrno = 0;
579 int *___errno(){return &myerrno;}
580 main(){connect(0,buf,255); exit(!myerrno);}],
581 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
582 wine_cv_libc_r___errno=yes )
584 if test "$wine_cv_libc_r___errno" = "yes"
586 AC_DEFINE(HAVE___ERRNO)
587 wine_cv_libc_reentrant=___errno
590 dnl UnixWare style errno location
592 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
593 [AC_TRY_RUN([int myerrno = 0;
595 int *__thr_errno(){return &myerrno;}
596 main(){connect(0,buf,255); exit(!myerrno);}],
597 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
598 wine_cv_libc_r__thr_errno=yes )
600 if test "$wine_cv_libc_r__thr_errno" = "yes"
602 AC_DEFINE(HAVE__THR_ERRNO)
603 wine_cv_libc_reentrant=__thr_errno
605 if test "$wine_cv_libc_reentrant" = "no"
607 AC_DEFINE(NO_REENTRANT_LIBC)
610 dnl **** Check for reentrant X libraries ****
612 dnl This may fail to determine whether X libraries are reentrant if
613 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
614 dnl is possible with the --without-reentrant-x option.
616 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
618 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
619 [ if test "x$with_reentrant_x" = "xno"
621 wine_cv_x_reentrant=no
624 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
625 if test -r $dir/libX11.so; then
626 libX11_check="-D $dir/libX11.so"
629 if test -r $dir/libX11.a; then
630 libX11_check="$dir/libX11.a"
634 if test "$libX11_check" != "none"; then
635 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
637 wine_cv_x_reentrant=yes
639 wine_cv_x_reentrant=no
642 wine_cv_x_reentrant=unknown
646 wine_cv_x_reentrant=no
648 if test "$wine_cv_x_reentrant" = "no"
650 AC_DEFINE(NO_REENTRANT_X11)
653 dnl **** Check for endianness ****
657 dnl **** Check for functions ****
690 dnl **** Check for header files ****
742 dnl **** Check for types ****
747 AC_CHECK_SIZEOF(long long,0)
749 if test "$ac_cv_header_linux_joystick_h" = "yes"
751 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
752 wine_cv_linux_joystick_22_api,
754 #include <sys/ioctl.h>
755 #include <linux/joystick.h>
757 struct js_event blub;
758 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
759 #error "no 2.2 header"
762 wine_cv_linux_joystick_22_api=yes,
763 wine_cv_linux_joystick_22_api=no,
764 wine_cv_linux_joystick_22_api=no
767 if test "$wine_cv_linux_joystick_22_api" = "yes"
769 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
773 dnl **** statfs checks ****
775 if test "$ac_cv_header_sys_vfs_h" = "yes"
777 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
778 wine_cv_sys_vfs_has_statfs,
780 #include <sys/types.h>
781 #ifdef HAVE_SYS_PARAM_H
782 # include <sys/param.h>
788 memset(&stfs,0,sizeof(stfs));
789 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
792 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
794 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
798 if test "$ac_cv_header_sys_statfs_h" = "yes"
800 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
801 wine_cv_sys_statfs_has_statfs,
803 #include <sys/types.h>
804 #ifdef HAVE_SYS_PARAM_H
805 # include <sys/param.h>
807 #include <sys/statfs.h>
810 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
813 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
815 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
819 if test "$ac_cv_header_sys_mount_h" = "yes"
821 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
822 wine_cv_sys_mount_has_statfs,
824 #include <sys/types.h>
825 #ifdef HAVE_SYS_PARAM_H
826 # include <sys/param.h>
828 #include <sys/mount.h>
831 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
834 if test "$wine_cv_sys_mount_has_statfs" = "yes"
836 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
840 dnl **** FIXME: what about mixed cases, where we need two of them? ***
842 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
843 [ if test "x$statfs_bfree" = "xno"
845 wine_cv_statfs_bfree=no
848 #include <sys/types.h>
849 #ifdef HAVE_SYS_PARAM_H
850 # include <sys/param.h>
852 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
853 # include <sys/mount.h>
855 # ifdef STATFS_DEFINED_BY_SYS_VFS
856 # include <sys/vfs.h>
858 # ifdef STATFS_DEFINED_BY_SYS_STATFS
859 # include <sys/statfs.h>
867 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
870 if test "$wine_cv_statfs_bfree" = "yes"
872 AC_DEFINE(STATFS_HAS_BFREE)
875 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
876 [ if test "x$statfs_bavail" = "xno"
878 wine_cv_statfs_bavail=no
881 #include <sys/types.h>
882 #ifdef HAVE_SYS_PARAM_H
883 # include <sys/param.h>
885 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
886 # include <sys/mount.h>
888 # ifdef STATFS_DEFINED_BY_SYS_VFS
889 # include <sys/vfs.h>
891 # ifdef STATFS_DEFINED_BY_SYS_STATFS
892 # include <sys/statfs.h>
900 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
903 if test "$wine_cv_statfs_bavail" = "yes"
905 AC_DEFINE(STATFS_HAS_BAVAIL)
908 dnl *** check for file descriptor passing with msg_accrights
910 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
911 AC_TRY_COMPILE([#include <sys/types.h>
912 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
913 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
914 if test "$ac_cv_c_msg_accrights" = "yes"
916 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
919 dnl *** Check for the sun_len member in struct sockaddr_un
921 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
922 AC_TRY_COMPILE([#include <sys/types.h>
923 #include <sys/socket.h>
924 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
925 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
926 if test "$ac_cv_c_sun_len" = "yes"
928 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
931 dnl *** check for the need to define __i386__
933 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
934 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
937 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
938 if test "$ac_cv_cpp_def_i386" = "yes"
940 CFLAGS="$CFLAGS -D__i386__"
941 LINTFLAGS="$LINTFLAGS -D__i386__"
944 dnl $GCC is set by autoconf
946 if test "$GCC" = "yes"
948 GCC_NO_BUILTIN="-fno-builtin"
950 AC_SUBST(GCC_NO_BUILTIN)
952 dnl **** Generate output files ****
956 dlls/ddraw/d3ddevice \
957 dlls/ddraw/dclipper \
959 dlls/ddraw/direct3d \
960 dlls/ddraw/dpalette \
961 dlls/ddraw/dsurface \
963 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
965 MAKE_RULES=Make.rules
966 AC_SUBST_FILE(MAKE_RULES)
968 MAKE_DLL_RULES=dlls/Makedll.rules
969 AC_SUBST_FILE(MAKE_DLL_RULES)
979 dlls/advapi32/Makefile
980 dlls/avifil32/Makefile
981 dlls/comctl32/Makefile
982 dlls/commdlg/Makefile
984 dlls/dciman32/Makefile
991 dlls/imagehlp/Makefile
994 dlls/lzexpand/Makefile
997 dlls/msacm32/Makefile
998 dlls/msnet32/Makefile
999 dlls/msvideo/Makefile
1001 dlls/odbc32/Makefile
1003 dlls/oleaut32/Makefile
1004 dlls/olecli/Makefile
1005 dlls/oledlg/Makefile
1006 dlls/olepro32/Makefile
1007 dlls/olesvr/Makefile
1008 dlls/opengl32/Makefile
1010 dlls/rasapi32/Makefile
1011 dlls/richedit/Makefile
1012 dlls/setupx/Makefile
1013 dlls/shell32/Makefile
1015 dlls/stress/Makefile
1016 dlls/tapi32/Makefile
1017 dlls/ttydrv/Makefile
1018 dlls/urlmon/Makefile
1020 dlls/version/Makefile
1021 dlls/win32s/Makefile
1022 dlls/win87em/Makefile
1023 dlls/winaspi/Makefile
1024 dlls/windebug/Makefile
1025 dlls/wineps/Makefile
1027 dlls/wininet/Makefile
1029 dlls/winmm/joystick/Makefile
1030 dlls/winmm/mcianim/Makefile
1031 dlls/winmm/mciavi/Makefile
1032 dlls/winmm/mcicda/Makefile
1033 dlls/winmm/mciseq/Makefile
1034 dlls/winmm/mciwave/Makefile
1035 dlls/winmm/midimap/Makefile
1036 dlls/winmm/wavemap/Makefile
1037 dlls/winmm/wineoss/Makefile
1038 dlls/winsock/Makefile
1039 dlls/winspool/Makefile
1040 dlls/ttydrv/Makefile
1041 dlls/x11drv/Makefile
1042 documentation/Makefile
1043 documentation/wine.conf.man
1044 documentation/wine.man
1047 graphics/enhmetafiledrv/Makefile
1048 graphics/metafiledrv/Makefile
1049 graphics/ttydrv/Makefile
1050 graphics/win16drv/Makefile
1051 graphics/x11drv/Makefile
1066 programs/clock/Makefile
1067 programs/cmdlgtst/Makefile
1068 programs/control/Makefile
1069 programs/avitools/Makefile
1070 programs/osversioncheck/Makefile
1071 programs/notepad/Makefile
1072 programs/progman/Makefile
1073 programs/regtest/Makefile
1074 programs/regapi/Makefile
1075 programs/view/Makefile
1076 programs/wcmd/Makefile
1077 programs/winemine/Makefile
1078 programs/winhelp/Makefile
1079 programs/winver/Makefile
1085 tools/cvdump/Makefile
1092 windows/ttydrv/Makefile
1093 windows/x11drv/Makefile ])
1095 if test "$have_x" = "no"
1098 echo "*** Warning: X development files not found. Wine will be built without"
1099 echo "*** X support, which currently does not work, and would probably not be"
1100 echo "*** what you want anyway. You will need to install devel packages of"
1101 echo "*** Xlib/Xfree86 and Xpm at the very least."
1102 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1105 echo "*** Warning: Xpm development files not found. Wine will be built without"
1106 echo "*** Xpm support, which currently does not work. You will need to install"
1107 echo "*** devel packages of Xpm."
1110 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1113 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1114 echo "*** terminal resize support. Consider upgrading ncurses."
1117 if test "$wine_cv_libc_reentrant" = "no"
1120 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1121 echo "*** thread support. Consider upgrading libc to a more recent"
1122 echo "*** reentrant version of libc."
1125 if test "$wine_cv_opengl_version_OK" = "no"
1128 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1129 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1132 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "normal"
1135 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1136 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
1137 echo "*** A fix for glibc 2.1.3 that seem to work is included in this version of Wine,"
1138 echo "*** start configure with '--enable-opengl' to force OpenGL support."
1141 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
1144 echo "*** Warning: you explicitely linked in a thread-safe OpenGL version. If you"
1145 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1146 echo "*** support before reporting bugs."
1151 echo "Configure finished. Do 'make depend && make' to compile Wine."
1154 dnl Local Variables:
1155 dnl comment-start: "dnl "
1157 dnl comment-start-skip: "\\bdnl\\b\\s *"
1158 dnl compile-command: "autoconf"