1 dnl Process this file with autoconf to produce a configure script.
2 dnl Original author: Michael Patra
3 dnl See ChangeLog file for detailed change history.
5 m4_define(WINE_VERSION,regexp(m4_include(VERSION),[version \([-.0-9A-Za-z]+\)],[\1]))
8 AC_INIT([Wine],WINE_VERSION,[wine-devel@winehq.org])
9 AC_CONFIG_SRCDIR(server/atom.c)
10 AC_CONFIG_HEADERS(include/config.h)
11 AC_CONFIG_AUX_DIR(tools)
13 dnl **** Command-line arguments ****
15 AC_ARG_ENABLE(win16, AC_HELP_STRING([--disable-win16],[do not include Win16 support]))
16 AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile out all debugging messages]))
17 AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE messages]))
18 AC_ARG_ENABLE(win64, AC_HELP_STRING([--enable-win64], [build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
20 AC_ARG_WITH(opengl, AC_HELP_STRING([--without-opengl],[do not use OpenGL]))
21 AC_ARG_WITH(curses, AC_HELP_STRING([--without-curses],[do not use curses]))
22 AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=<dir>],[use Wine tools from directory <dir>]))
25 if test "x$enable_debug" = "xno"
27 DLLDEFS="$DLLDEFS -DWINE_NO_DEBUG_MSGS"
29 if test "x$enable_trace" = "xno" -o "x$enable_debug" = "xno"
31 DLLDEFS="$DLLDEFS -DWINE_NO_TRACE_MSGS"
37 if test "x$enable_win64" != "xyes"
39 test -n "$CC" || CC="gcc -m32"
40 test -n "$LD" || LD="ld -m elf_i386"
41 test -n "$AS" || AS="as --32"
47 dnl enable_win16 defaults to yes on x86, to no on other CPUs
50 if test "x$enable_win16" != "xno"
57 AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)")
58 AC_SUBST(WIN16_INSTALL,"\$(WIN16_INSTALL)")
59 if test "x$enable_win16" != "xyes"
65 dnl **** Check for some programs ****
70 dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
71 AC_CHECK_TOOL(CPPBIN,cpp,cpp)
73 AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
74 [if test -z "$with_wine_tools"; then
75 if test "$cross_compiling" = "yes"; then
76 AC_MSG_ERROR([you must use the --with-wine-tools option when cross-compiling.])
78 wine_cv_toolsdir="\$(TOPOBJDIR)"
80 elif test -d "$with_wine_tools/tools/winebuild"; then
81 case $with_wine_tools in
82 /*) wine_cv_toolsdir="$with_wine_tools" ;;
83 *) wine_cv_toolsdir="\$(TOPOBJDIR)/$with_wine_tools" ;;
86 AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
88 AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
93 dnl **** Just additional warning checks, since AC_PROG just sets 'lex' even
94 dnl **** without one present.
95 AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
96 if test "$XLEX" = "none"
98 AC_MSG_ERROR([no suitable lex found. Please install the 'flex' package.])
102 AC_CHECK_PROGS(BISON,bison,none)
103 if test "$BISON" = "none"
105 AC_MSG_ERROR([no suitable bison found. Please install the 'bison' package.])
108 AC_CHECK_TOOLS(AS,[gas as],as)
109 AC_CHECK_TOOL(LD,ld,ld)
110 AC_CHECK_TOOL(AR,ar,ar)
112 AC_CHECK_TOOL(STRIP,strip,strip)
113 AC_CHECK_TOOL(WINDRES,windres,false)
117 AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
119 dnl Prepend src dir to install path dir if it's a relative path
121 [[\\/$]]* | ?:[[\\/]]* ) ;;
122 *) INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;;
126 AC_CHECK_PROGS(LINT, lclint lint)
127 if test "$LINT" = "lint"
129 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
130 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
135 dnl Check for various programs
136 AC_CHECK_PROGS(FONTFORGE, fontforge, false)
137 AC_CHECK_PROGS(PKG_CONFIG, pkg-config, false)
141 AC_CHECK_PROGS(PRELINK, prelink, false, [/sbin /usr/sbin $PATH])
145 dnl **** Check for some libraries ****
147 dnl Check for -li386 for NetBSD and OpenBSD
148 AC_CHECK_LIB(i386,i386_set_ldt)
149 dnl Check for -lossaudio for NetBSD
150 AC_CHECK_LIB(ossaudio,_oss_ioctl)
151 dnl Check for -lnsl for Solaris
152 AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
153 dnl Check for -lsocket for Solaris
154 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
155 dnl Check for -lresolv for Solaris
156 AC_CHECK_FUNCS(inet_aton,,AC_CHECK_LIB(resolv,inet_aton))
157 dnl Check for -lxpg4 for FreeBSD
158 AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
159 dnl Check for -lpoll for Mac OS X/Darwin
160 AC_CHECK_LIB(poll,poll)
161 dnl Check for -lresolv for Mac OS X/Darwin
162 AC_CHECK_LIB(resolv,res_9_init)
163 dnl Check for -lpthread
164 AC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread"))
168 AC_SUBST(OPENGLFILES,"")
169 AC_SUBST(GLU32FILES,"")
170 AC_SUBST(OPENGL_LIBS,"")
172 dnl **** Check for header files ****
187 fontconfig/fontconfig.h \
213 machine/soundcard.h \
282 dnl Check for broken kernel header that doesn't define __user
283 AC_CHECK_HEADERS([linux/capi.h],,,[#define __user])
285 dnl **** Check for X11 ****
287 if test "$have_x" = "yes"
290 ac_save_CPPFLAGS="$CPPFLAGS"
291 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
293 dnl *** All of the following tests require X11/Xlib.h
294 AC_CHECK_HEADERS([X11/Xlib.h \
297 X11/extensions/shape.h \
298 X11/extensions/XInput.h \
299 X11/extensions/XShm.h \
300 X11/extensions/Xrandr.h \
301 X11/extensions/Xrender.h \
302 X11/extensions/xf86dga.h \
303 X11/extensions/xf86vmode.h],,,
304 [#ifdef HAVE_X11_XLIB_H
305 # include <X11/Xlib.h>
307 #ifdef HAVE_X11_XUTIL_H
308 # include <X11/Xutil.h>
311 dnl *** Check for X keyboard extension
312 if test "$ac_cv_header_X11_XKBlib_h" = "yes"
314 AC_CHECK_LIB(X11, XkbQueryExtension,
315 AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
316 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
319 dnl *** Check for X Shm extension
320 if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
322 AC_CHECK_LIB(Xext, XShmQueryExtension,
323 AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
324 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
327 dnl *** Check for X shape extension
328 if test "$ac_cv_header_X11_extensions_shape_h" = "yes"
330 AC_CHECK_LIB(Xext,XShapeQueryExtension,
331 AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
332 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
335 dnl *** Check for XFree86 DGA / DGA 2.0 extension
336 if test "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
338 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
339 [ AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
340 [Define if you have the Xxf86dga library version 2])
341 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
343 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
346 dnl *** Check for XFree86 VMODE extension
347 if test "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
349 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
350 [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
351 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
353 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
356 dnl *** Check for X RandR extension
357 if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
359 AC_TRY_COMPILE([#include <X11/Xlib.h>
360 #include <X11/extensions/Xrandr.h>],[static typeof(XRRSetScreenConfigAndRate) * func;],
361 [AC_DEFINE(HAVE_LIBXRANDR, 1, [Define if you have the Xrandr library])])
364 dnl *** Check for Transform functions in Xrender
365 if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
367 AC_CHECK_LIB(Xrender, XRenderSetPictureTransform,
368 [AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
369 [Define if Xrender has the XRenderSetPictureTransform function])],,
370 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
372 dnl *** End of X11/Xlib.h check
374 dnl Check for the presence of OpenGL
375 if test "x$with_opengl" != "xno"
377 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h GL/glu.h,,,
378 [#ifdef HAVE_GL_GLX_H
381 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
383 dnl Check for some problems due to old Mesa versions
384 AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
386 [#include <GL/gl.h>],
387 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
388 [wine_cv_opengl_version_OK="yes"],
389 [wine_cv_opengl_version_OK="no"]
393 if test "$wine_cv_opengl_version_OK" = "yes"
395 dnl Check for the presence of the library
396 AC_CHECK_LIB(GL,glXCreateContext,
399 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
401 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
403 OPENGLFILES='$(OPENGLFILES)'
404 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
406 if test -f /usr/X11R6/lib/libGL.a
408 AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
409 This prevents linking to OpenGL. Delete the file and restart configure.])
413 dnl Check for GLU32 library.
414 AC_CHECK_LIB(GLU,gluLookAt,
415 [OPENGL_LIBS="$OPENGL_LIBS -lGLU"
416 GLU32FILES='$(GLU32FILES)']
418 $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
422 dnl Check for glut32 library.
423 AC_CHECK_LIB(glut,glutMainLoop,
424 [AC_SUBST(GLUT_LIBS,"-lglut -lXmu -lXi")
425 AC_SUBST(GLUT32FILES,'$(GLUT32FILES)')],,
426 $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXmu -lXi -lX11 $X_EXTRA_LIBS)
430 dnl **** Check for NAS ****
432 AC_CHECK_HEADERS(audio/audiolib.h,
433 [AC_CHECK_HEADERS(audio/soundlib.h,,,[#include <audio/audiolib.h>])
434 AC_CHECK_LIB(audio,AuCreateFlow,
435 [AC_DEFINE(HAVE_NAS,1,[Define if you have NAS including devel headers])
436 NASLIBS="-laudio -lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS"],,
437 [-lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
439 CPPFLAGS="$ac_save_CPPFLAGS"
447 dnl **** Check for libxml2 ****
449 AC_SUBST(XML2LIBS,"")
450 AC_SUBST(XML2INCL,"")
451 AC_SUBST(XSLTLIBS,"")
452 AC_SUBST(XSLTINCL,"")
453 if test "$PKG_CONFIG" != "false"
455 ac_save_CPPFLAGS="$CPPFLAGS"
456 ac_xml_libs="`$PKG_CONFIG --libs libxml-2.0`"
457 ac_xml_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
458 CPPFLAGS="$CPPFLAGS $ac_xml_cflags"
459 AC_CHECK_HEADERS(libxml/parser.h,
460 [AC_CHECK_LIB(xml2, xmlParseMemory,
461 [AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])
462 XML2LIBS="$ac_xml_libs"
463 XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)
464 AC_CHECK_LIB(xml2, xmlReadMemory,
465 [AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory function])],,$ac_xml_libs)
467 CPPFLAGS="$ac_save_CPPFLAGS"
468 ac_xslt_libs="`$PKG_CONFIG --libs libxslt`"
469 ac_xslt_cflags="`$PKG_CONFIG --cflags libxslt`"
470 CPPFLAGS="$CPPFLAGS $ac_xslt_cflags"
471 AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],
472 [AC_CHECK_LIB(xslt, xsltCompilePattern,
473 [AC_DEFINE(HAVE_LIBXSLT, 1, [Define if you have the libxslt library])
474 XSLTLIBS="$ac_xslt_libs"
475 XSLTINCL="$ac_xslt_cflags"],,$ac_xslt_libs)
477 [#ifdef HAVE_LIBXSLT_PATTERN_H
478 # include <libxslt/pattern.h>
480 CPPFLAGS="$ac_save_CPPFLAGS"
483 dnl **** Check which curses lib to use ***
485 if test "x$with_curses" != "xno"
487 if test "$ac_cv_header_ncurses_h" = "yes"
489 AC_CHECK_LIB(ncurses,waddch,
490 [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
491 CURSESLIBS="-lncurses"])
492 elif test "$ac_cv_header_curses_h" = "yes"
494 AC_CHECK_LIB(curses,waddch,
495 [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
496 CURSESLIBS="-lcurses"])
501 dnl **** Check for SANE ****
502 AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
503 AC_SUBST(SANELIBS,"")
504 AC_SUBST(SANEINCL,"")
505 if test "$sane_devel" != "no"
507 SANELIBS="`$sane_devel --libs`"
508 SANEINCL="`$sane_devel --cflags`"
509 ac_save_CPPFLAGS="$CPPFLAGS"
511 CPPFLAGS="$CPPFLAGS $SANEINCL"
512 LIBS="$LIBS $SANELIBS"
513 AC_CHECK_HEADER(sane/sane.h,
514 [AC_CHECK_LIB(sane,sane_open,
515 [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
521 CPPFLAGS="$ac_save_CPPFLAGS"
524 dnl **** Check for the ICU library ****
525 if test "$ac_cv_header_unicode_ubidi_h" = "yes"
528 ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}"
529 ICUUC_LIB="${ICUUC_LIB-$ICU_LIB_DIR/libsicuuc.a}"
530 ICUDATA_LIB="${ICUDATA_LIB-$ICU_LIB_DIR/libsicudata.a}"
531 AC_MSG_CHECKING(whether can link with ICU libraries $ICUUC_LIB and $ICUDATA_LIB)
532 LIBS="$LIBS $ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s"
533 AC_TRY_LINK([#include <unicode/ubidi.h>],[ubidi_open()],
534 [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed])
535 AC_SUBST(ICULIBS,"$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s")
541 dnl **** Check for LittleCMS ***
542 AC_SUBST(LCMSLIBS,"")
543 if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes"
545 AC_CHECK_LIB(lcms, cmsOpenProfileFromFile,
546 [AC_DEFINE(HAVE_LCMS, 1, [Define if you have the LittleCMS development environment])
550 dnl **** Check for OpenLDAP ***
551 AC_SUBST(LDAPLIBS,"")
552 if test "$ac_cv_header_ldap_h" = "yes" -a "$ac_cv_header_lber_h" = "yes"
554 AC_CHECK_LIB(ldap_r, ldap_initialize,
555 [AC_CHECK_LIB(lber, ber_init,
556 [AC_DEFINE(HAVE_LDAP, 1, [Define if you have the OpenLDAP development environment])
557 LDAPLIBS="-lldap_r -llber"],,
560 WINE_CHECK_LIB_FUNCS(\
561 ldap_count_references \
562 ldap_first_reference \
563 ldap_next_reference \
564 ldap_parse_reference,
565 [$LDAPLIBS $LIBPTHREAD])
568 dnl **** Check for FreeType 2 ****
569 AC_SUBST(FREETYPELIBS,"")
570 AC_SUBST(FREETYPEINCL,"")
571 AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
572 if test "$ft_lib" = "no"
574 wine_cv_msg_freetype=no
576 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
577 if test "$ft_devel" = "no"
579 AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
580 if test "$ft_devel2" = "freetype2-config"
585 if test "$ft_devel" = "no"
587 wine_cv_msg_freetype=yes
589 FREETYPELIBS=`$ft_devel --libs`
590 FREETYPEINCL=`$ft_devel --cflags`
591 ac_save_CPPFLAGS="$CPPFLAGS"
592 CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
593 AC_CHECK_HEADERS(ft2build.h \
594 freetype/freetype.h \
596 freetype/tttables.h \
598 freetype/ftsnames.h \
599 freetype/ttnameid.h \
601 freetype/ftwinfnt.h \
602 freetype/ftmodapi.h \
603 freetype/internal/sfnt.h,,,
605 #include <ft2build.h>
607 AC_TRY_CPP([#include <ft2build.h>
608 #include <freetype/fttrigon.h>],
609 [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
610 [Define if you have the <freetype/fttrigon.h> header file.])
611 wine_cv_fttrigon=yes],
613 AC_CHECK_TYPES(FT_TrueTypeEngineType,,,[#include <freetype/ftmodapi.h>])
614 CPPFLAGS="$ac_save_CPPFLAGS"
615 dnl Check that we have at least freetype/freetype.h
616 if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
618 AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
619 wine_cv_msg_freetype=no
623 wine_cv_msg_freetype=yes
628 dnl Only build the fonts dir if we have both freetype and fontforge
629 if test "$FONTFORGE" != "false" -a -n "$FREETYPELIBS"
631 AC_SUBST(FONTSSUBDIRS,"fonts")
634 wine_cv_msg_fonts=yes
637 dnl **** Check for parport (currently Linux only) ****
638 AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
640 [#include <linux/ppdev.h>],
641 [ioctl (1,PPCLAIM,0)],
642 [ac_cv_c_ppdev="yes"],
643 [ac_cv_c_ppdev="no"])
645 if test "$ac_cv_c_ppdev" = "yes"
647 AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
650 dnl **** Check for va_copy ****
651 AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
653 [#include <stdarg.h>],
657 [ac_cv_c_va_copy="yes"],
658 [ac_cv_c_va_copy="no"])
660 if test "$ac_cv_c_va_copy" = "yes"
662 AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy])
664 AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
666 [#include <stdarg.h>],
670 [ac_cv_c___va_copy="yes"],
671 [ac_cv_c___va_copy="no"])
673 if test "$ac_cv_c___va_copy" = "yes"
675 AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
678 dnl **** Check for sigsetjmp ****
679 AC_CACHE_CHECK([for sigsetjmp], ac_cv_c_sigsetjmp,
681 [#include <setjmp.h>],
684 siglongjmp( buf, 1 );],
685 [ac_cv_c_sigsetjmp="yes"],
686 [ac_cv_c_sigsetjmp="no"])
688 if test "$ac_cv_c_sigsetjmp" = "yes"
690 AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have the sigsetjmp (and siglongjmp) function])
693 dnl **** Check for pthread_rwlock_t ****
694 AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
695 #include <pthread.h>])
697 dnl **** Check for pthread functions ****
698 WINE_CHECK_LIB_FUNCS(\
700 pthread_get_stackaddr_np \
701 pthread_get_stacksize_np,
704 dnl **** Check for aRts Sound Server ****
705 AC_PATH_PROG(ARTSCCONFIG, artsc-config)
706 if test x$ARTSCCONFIG != x -a x$ARTSCCONFIG != x'"$ARTSCCONFIG"';
709 for i in `$ARTSCCONFIG --cflags`
712 -I*) ARTSC_CFLAGS="$ARTSC_CFLAGS $i";;
716 for i in `$ARTSCCONFIG --libs`
719 -L/usr/lib|-L/usr/lib64) ;;
720 -L*|-l*) ARTSC_LIBS="$ARTSC_LIBS $i";;
723 save_CFLAGS="$CFLAGS"
724 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
725 AC_CHECK_LIB(artsc,arts_init,
726 [AC_TRY_COMPILE([#include <artsc.h>],[arts_stream_t stream;],
727 [AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
728 AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
729 AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])])],,
731 CFLAGS="$save_CFLAGS"
734 dnl **** Check for EsounD ****
735 AC_PATH_PROG(ESDCONFIG, esd-config)
736 if test x$ESDCONFIG != x -a x$ESDCONFIG != x'"$ESDCONFIG"';
739 for i in `$ESDCONFIG --cflags`
742 -I*) ESD_CFLAGS="$ESD_CFLAGS $i";;
745 ESD_LIBS=`$ESDCONFIG --libs`
746 save_CFLAGS="$CFLAGS"
747 CFLAGS="$CFLAGS $ESD_CFLAGS"
748 AC_CHECK_LIB(esd,esd_open_sound,
749 [AC_SUBST(ESDLIBS, $ESD_LIBS)
750 AC_SUBST(ESDINCL, $ESD_CFLAGS)
751 AC_DEFINE(HAVE_ESD, 1, [Define if you have EsounD sound server])])
752 CFLAGS="$save_CFLAGS"
755 dnl **** Check for ALSA 1.x ****
756 AC_SUBST(ALSALIBS,"")
757 if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
759 AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access,
760 [AC_TRY_COMPILE([#ifdef HAVE_ALSA_ASOUNDLIB_H
761 #include <alsa/asoundlib.h>
762 #elif defined(HAVE_SYS_ASOUNDLIB_H)
763 #include <sys/asoundlib.h>
765 [int ret = snd_pcm_hw_params_get_access(NULL, NULL)],
766 [AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA 1.x including devel headers])
767 ALSALIBS="-lasound"])])
770 dnl **** Check for libaudioio (which can be used to get solaris audio support) ****
772 AC_SUBST(AUDIOIOLIBS,"")
773 if test "$ac_cv_header_libaudioio_h" = "yes"
775 AC_CHECK_LIB(audioio,AudioIOGetVersion,
776 [AUDIOIOLIBS="-laudioio"
777 AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])
780 dnl **** Check for capi4linux ****
782 if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
784 AC_CHECK_LIB(capi20,capi20_register,[AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])])
787 dnl **** Check for gcc specific options ****
789 AC_SUBST(EXTRACFLAGS,"")
790 if test "x${GCC}" = "xyes"
792 EXTRACFLAGS="-Wall -pipe"
794 dnl Check for strength-reduce bug
795 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
797 int L[[4]] = {0,1,2,3};
799 static int Array[[3]];
802 for(i=0; i<B; i++) Array[[i]] = i - 3;
803 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
806 exit( Array[[1]] != -2 || L[[2]] != 3);
808 ac_cv_c_gcc_strength_bug="no",
809 ac_cv_c_gcc_strength_bug="yes",
810 ac_cv_c_gcc_strength_bug="yes") )
811 if test "$ac_cv_c_gcc_strength_bug" = "yes"
813 EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
816 dnl Check for -fshort-wchar
817 AC_CACHE_CHECK([for gcc -fshort-wchar support], ac_cv_c_gcc_fshort_wchar,
818 [WINE_TRY_CFLAGS([-fshort-wchar],
819 ac_cv_c_gcc_fshort_wchar="yes",ac_cv_c_gcc_fshort_wchar="no")])
820 if test "$ac_cv_c_gcc_fshort_wchar" = "yes"
822 AC_DEFINE(CC_FLAG_SHORT_WCHAR, "-fshort-wchar", [Specifies the compiler flag that forces a short wchar_t])
825 dnl Check for -fno-strict-aliasing
826 AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing,
827 [WINE_TRY_CFLAGS([-fno-strict-aliasing],
828 ac_cv_c_gcc_no_strict_aliasing="yes",ac_cv_c_gcc_no_strict_aliasing="no")])
829 if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes"
831 EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
834 dnl Check for -gstabs+ option
835 AC_CACHE_CHECK([for gcc -gstabs+ support], ac_cv_c_gcc_gstabs,
836 [WINE_TRY_CFLAGS([-gstabs+],ac_cv_c_gcc_gstabs="yes", ac_cv_c_gcc_gstabs="no")])
837 if test "$ac_cv_c_gcc_gstabs" = "yes"
839 EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
842 dnl Check for -Wdeclaration-after-statement option
843 AC_CACHE_CHECK([for gcc -Wdeclaration-after-statement support], ac_cv_c_gcc_decl_after_statement,
844 [WINE_TRY_CFLAGS([-Wdeclaration-after-statement],ac_cv_c_gcc_decl_after_statement="yes", ac_cv_c_gcc_decl_after_statement="no")])
845 if test "$ac_cv_c_gcc_decl_after_statement" = "yes"
847 EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
850 dnl Check for noisy string.h
851 saved_CFLAGS="$CFLAGS"
852 CFLAGS="$CFLAGS -Wpointer-arith -Werror"
853 AC_CACHE_CHECK([for broken string.h that generates warnings], ac_cv_c_string_h_warnings,
854 AC_TRY_COMPILE([#include <string.h>],[],
855 [ac_cv_c_string_h_warnings=no],[ac_cv_c_string_h_warnings=yes]))
856 CFLAGS="$saved_CFLAGS"
857 if test "$ac_cv_c_string_h_warnings" = "no"
859 EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
862 AC_SUBST(BUILTINFLAG,"")
863 saved_CFLAGS="$CFLAGS"
864 CFLAGS="$CFLAGS -Werror"
865 AC_CACHE_CHECK([for builtin wchar inlines], ac_cv_c_builtin_wchar_ctype,
867 [int iswlower(unsigned short);],
868 [ac_cv_c_builtin_wchar_ctype=no],[ac_cv_c_builtin_wchar_ctype=yes]))
869 CFLAGS="$saved_CFLAGS"
870 if test "$ac_cv_c_builtin_wchar_ctype" = "yes"
874 iswalnum iswalpha iswcntrl iswdigit iswgraph iswlower \
875 iswprint iswpunct iswspace iswupper iswxdigit towlower towupper
877 BUILTINFLAG="$BUILTINFLAG -fno-builtin-$builtin"
882 dnl **** Check how to define a function in assembly code ****
884 AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
886 ["\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0"],,,
887 ac_cv_asm_func_def=".def",
888 [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0"],,,
889 ac_cv_asm_func_def=".type @function",
890 [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0"],,,
891 ac_cv_asm_func_def=".type 2",
892 ac_cv_asm_func_def="unknown")])]))
894 AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function directive])
895 case "$ac_cv_asm_func_def" in
897 AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"]) ;;
899 AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"]) ;;
901 AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"]) ;;
903 AC_DEFINE([__ASM_FUNC(name)], [""]) ;;
906 dnl **** Check for underscore on external symbols ****
908 AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
909 WINE_TRY_ASM_LINK([".globl _ac_test\n_ac_test:\t.long 0"],
910 [extern int ac_test;],
911 [if (ac_test) return 1],
912 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
914 AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
915 if test "$ac_cv_c_extern_prefix" = "yes"
917 AC_DEFINE([__ASM_NAME(name)], ["_" name])
919 AC_DEFINE([__ASM_NAME(name)], [name])
922 dnl **** Check for working dll ****
925 AC_SUBST(DLLFLAGS,"-D_REENTRANT")
927 AC_SUBST(LDSHARED,"")
928 AC_SUBST(LDDLLFLAGS,"")
929 AC_SUBST(LIBEXT,"so")
930 AC_SUBST(IMPLIBEXT,"def")
934 AC_CHECK_TOOL(DLLTOOL,dlltool,false)
935 AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
936 if test "$DLLWRAP" = "false"; then
939 dnl FIXME - check whether dllwrap works correctly...
943 dnl We can't build 16-bit NE dlls
948 if test "$ac_cv_header_dlfcn_h" = "yes"
950 AC_CHECK_FUNCS(dlopen,,
951 [AC_CHECK_LIB(dl,dlopen,
952 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
955 WINE_CHECK_LIB_FUNCS(dladdr,[$DLLIBS])
960 if test "$LIBEXT" = "so"
962 DLLFLAGS="$DLLFLAGS -fPIC"
964 AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
965 [WINE_TRY_SHLIB_FLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
966 ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
967 if test "$ac_cv_c_dll_gnuelf" = "yes"
969 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
970 LDDLLFLAGS="-shared -Wl,-Bsymbolic"
971 AC_CACHE_CHECK([whether the linker accepts -z defs], ac_cv_c_dll_zdefs,
972 [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-z,defs],
973 ac_cv_c_dll_zdefs="yes",ac_cv_c_dll_zdefs="no")])
974 if test "$ac_cv_c_dll_zdefs" = "yes"
976 LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
979 AC_CACHE_CHECK([whether the linker accepts -init and -fini], ac_cv_c_dll_init_fini,
980 [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini],
981 ac_cv_c_dll_init_fini="yes",ac_cv_c_dll_init_fini="no")])
982 if test "$ac_cv_c_dll_init_fini" = "yes"
984 LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
987 AC_CACHE_CHECK([whether the linker accepts version scripts], ac_cv_c_ld_version_scripts,
988 [echo '{ global: *; };' >conftest.map
989 WINE_TRY_CFLAGS([-fPIC -shared -Wl,--version-script=conftest.map],
990 ac_cv_c_ld_version_scripts="yes",ac_cv_c_ld_version_scripts="no")
992 if test "$ac_cv_c_ld_version_scripts" = "yes"
994 LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"
997 AC_CACHE_CHECK([whether the linker accepts --export-dynamic], ac_cv_c_export_dynamic,
998 [WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
999 ac_cv_c_export_dynamic="yes",ac_cv_c_export_dynamic="no")])
1000 if test "$ac_cv_c_export_dynamic" = "yes"
1002 AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])
1005 AC_CACHE_CHECK([whether the linker accepts --rpath], ac_cv_ld_rpath,
1006 [WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
1007 ac_cv_ld_rpath="yes",ac_cv_ld_rpath="no")])
1008 if test "$ac_cv_ld_rpath" = "yes"
1010 AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])
1011 AC_SUBST(LDDLLRPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(dlldir) \$(libdir)\`"])
1016 AC_CACHE_CHECK([whether we can relocate the executable to 0x7bf00000], ac_cv_ld_reloc_exec,
1017 [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
1018 ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")])
1019 if test "$ac_cv_ld_reloc_exec" = "yes"
1021 LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
1027 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
1028 [WINE_TRY_SHLIB_FLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
1029 ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
1030 if test "$ac_cv_c_dll_unixware" = "yes"
1032 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
1033 LDDLLFLAGS="-Wl,-G,-B,symbolic"
1036 AC_CACHE_CHECK(whether we can build a Mach-O (Mac OS X/Darwin) dll, ac_cv_c_dll_macho,
1037 [WINE_TRY_SHLIB_FLAGS([-bundle], ac_cv_c_dll_macho="yes", ac_cv_c_dll_macho="no")])
1038 if test "$ac_cv_c_dll_macho" = "yes"
1041 LDDLLFLAGS="-bundle"
1042 LDSHARED="\$(CC) -dynamiclib"
1043 STRIP="$STRIP -u -r"
1044 dnl declare needed frameworks
1045 AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
1046 AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation")
1047 AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00000000,-segaddr,WINE_SHARED_HEAP,0x7ffe0000"])
1050 CFLAGS="$CFLAGS -ffixed-r13"
1051 LDDLLFLAGS="$LDDLLFLAGS -read_only_relocs warning"
1056 AC_CACHE_CHECK(whether we can build an HP-UX dll, ac_cv_c_dll_hpux,
1057 [WINE_TRY_SHLIB_FLAGS([-shared], ac_cv_c_dll_hpux="yes", ac_cv_c_dll_hpux="no")])
1058 if test "$ac_cv_c_dll_hpux" = "yes"
1062 LDDLLFLAGS="-shared -fPIC"
1063 LDSHARED="\$(CC) -shared"
1070 dnl Check for cross compiler to build test programs
1071 AC_SUBST(CROSSTEST,"")
1072 if test "$cross_compiling" = "no"
1074 AC_CHECK_PROGS(CROSSCC,i586-mingw32msvc-gcc i386-mingw32msvc-gcc i386-mingw32-gcc mingw-gcc,false)
1075 AC_CHECK_PROGS(DLLTOOL,i586-mingw32msvc-dlltool i386-mingw32msvc-dlltool i386-mingw32-dlltool mingw-dlltool,false)
1076 AC_CHECK_PROGS(CROSSWINDRES,i586-mingw32msvc-windres i386-mingw32msvc-windres i386-mingw32-windres mingw-windres,false)
1077 if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
1082 if test "$LIBEXT" = "a"; then
1084 [could not find a way to build shared libraries.
1085 It is currently not possible to build Wine without shared library
1086 (.so) support to allow transparent switch between .so and .dll files.
1087 If you are using Linux, you will need a newer binutils.]
1093 AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$PATH\"") ;;
1095 AC_SUBST(LDPATH,"DYLD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$DYLD_LIBRARY_PATH\"") ;;
1097 AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$LD_LIBRARY_PATH\"") ;;
1100 dnl Mingw needs explicit msvcrt for linking libwine and winsock for wininet
1103 AC_SUBST(CRTLIBS,"-lmsvcrt")
1104 AC_SUBST(SOCKETLIBS,"-lws2_32")
1111 linux* | k*bsd*-gnu)
1112 AC_SUBST(MAIN_BINARY,"wine-glibc")
1113 AC_SUBST(EXTRA_BINARIES,"wine-kthread wine-pthread wine-preloader") ;;
1115 AC_SUBST(MAIN_BINARY,"wine-pthread") ;;
1117 AC_SUBST(MAIN_BINARY,"wine-kthread") ;;
1120 *) AC_SUBST(MAIN_BINARY,"wine-pthread") ;;
1123 dnl **** Get the soname for libraries that we load dynamically ****
1125 if test "$LIBEXT" = "so" -o "$LIBEXT" = "dylib"
1127 WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
1128 WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
1129 WINE_GET_SONAME(Xi,XOpenDevice,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1130 WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1131 WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1132 WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
1133 WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS])
1134 WINE_GET_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
1135 WINE_GET_SONAME(cups,cupsGetDefault)
1136 WINE_GET_SONAME(jack,jack_client_new)
1137 WINE_GET_SONAME(fontconfig,FcInit)
1138 WINE_GET_SONAME(ssl,SSL_library_init)
1139 WINE_GET_SONAME(crypto,BIO_new_socket)
1140 WINE_GET_SONAME(ncurses,waddch)
1141 WINE_GET_SONAME(curses,waddch)
1142 WINE_GET_SONAME(jpeg,jpeg_start_decompress)
1143 WINE_GET_SONAME(ungif,DGifOpen)
1144 WINE_GET_SONAME(gif,DGifOpen)
1145 WINE_GET_SONAME(capi20,capi20_isinstalled)
1149 dnl **** Check for functions ****
1218 dnl **** Checks for headers that depend on other ones ****
1220 AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
1221 [#include <sys/types.h>
1222 #if HAVE_SYS_PARAM_H
1223 # include <sys/param.h>
1226 AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
1227 [#include <sys/types.h>
1228 #if HAVE_SYS_SOCKET_H
1229 # include <sys/socket.h>
1232 AC_CHECK_HEADERS([resolv.h],,,
1233 [#include <sys/types.h>
1234 #if HAVE_SYS_SOCKET_H
1235 # include <sys/socket.h>
1237 #if HAVE_NETINET_IN_H
1238 # include <netinet/in.h>
1240 #if HAVE_ARPA_NAMESER_H
1241 # include <arpa/nameser.h>
1244 AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])
1246 AC_CHECK_HEADERS([linux/ipx.h linux/videodev.h],,,
1247 [#ifdef HAVE_SYS_TIME_H
1248 #include <sys/time.h>
1250 #include <sys/types.h>
1251 #ifdef HAVE_ASM_TYPES_H
1252 #include <asm/types.h>
1255 dnl **** Check for types ****
1259 AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t])
1260 AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])
1261 AC_CHECK_TYPES([request_sense],,,[#include <linux/cdrom.h>])
1263 AC_CHECK_MEMBERS([struct ff_effect.direction],,,
1264 [#ifdef HAVE_LINUX_INPUT_H
1265 #include <linux/input.h>
1268 AC_CACHE_CHECK([for sigaddset],wine_cv_have_sigaddset,
1269 AC_TRY_LINK([#include <signal.h>],[sigset_t set; sigaddset(&set,SIGTERM);],
1270 wine_cv_have_sigaddset=yes,wine_cv_have_sigaddset=no))
1271 if test "$wine_cv_have_sigaddset" = "yes"
1273 AC_DEFINE(HAVE_SIGADDSET, 1, [Define if sigaddset is supported])
1277 AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
1278 wine_cv_linux_gethostbyname_r_6,
1284 struct hostent *result;
1291 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1292 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1294 wine_cv_linux_gethostbyname_r_6=yes,
1295 wine_cv_linux_gethostbyname_r_6=no
1298 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1300 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1301 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
1304 if test "$ac_cv_header_linux_joystick_h" = "yes"
1306 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
1307 wine_cv_linux_joystick_22_api,
1309 #include <sys/ioctl.h>
1310 #include <linux/joystick.h>
1312 struct js_event blub;
1313 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1314 #error "no 2.2 header"
1317 wine_cv_linux_joystick_22_api=yes,
1318 wine_cv_linux_joystick_22_api=no,
1319 wine_cv_linux_joystick_22_api=no
1322 if test "$wine_cv_linux_joystick_22_api" = "yes"
1324 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1325 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
1329 dnl **** FIXME: what about mixed cases, where we need two of them? ***
1331 dnl Check for statfs members
1332 AC_CHECK_MEMBERS([struct statfs.f_bfree, struct statfs.f_bavail, struct statfs.f_frsize, struct statfs.f_ffree, struct statfs.f_favail, struct statfs.f_namelen],,,
1333 [#include <sys/types.h>
1334 #ifdef HAVE_SYS_PARAM_H
1335 # include <sys/param.h>
1337 #ifdef HAVE_SYS_MOUNT_H
1338 # include <sys/mount.h>
1340 #ifdef HAVE_SYS_VFS_H
1341 # include <sys/vfs.h>
1343 #ifdef HAVE_SYS_STATFS_H
1344 # include <sys/statfs.h>
1347 AC_CHECK_MEMBERS([struct statvfs.f_blocks],,,
1348 [#ifdef HAVE_SYS_STATVFS_H
1349 #include <sys/statvfs.h>
1352 dnl Check for socket structure members
1353 AC_CHECK_MEMBERS([struct msghdr.msg_accrights, struct sockaddr.sa_len, struct sockaddr_un.sun_len],,,
1354 [#include <sys/types.h>
1355 #ifdef HAVE_SYS_SOCKET_H
1356 # include <sys/socket.h>
1358 #ifdef HAVE_SYS_UN_H
1359 # include <sys/un.h>
1362 dnl Check for scsireq_t and sg_io_hdr_t members
1363 AC_CHECK_MEMBERS([scsireq_t.cmd, sg_io_hdr_t.interface_id],,,
1364 [#include <sys/types.h>
1365 #ifdef HAVE_SCSI_SG_H
1366 #include <scsi/sg.h>
1369 dnl Check for siginfo_t members
1370 AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
1372 dnl Check for struct mtget members
1373 AC_CHECK_MEMBERS([struct mtget.mt_blksiz, struct mtget.mt_gstat, struct mtget.mt_blkno],,,
1374 [#include <sys/types.h>
1375 #ifdef HAVE_SYS_MTIO_H
1376 #include <sys/mtio.h>
1379 dnl Check for struct option
1380 AC_CHECK_MEMBERS([struct option.name],,,
1381 [#ifdef HAVE_GETOPT_H
1385 dnl Check for stat.st_blocks
1386 AC_CHECK_MEMBERS([struct stat.st_blocks])
1388 dnl Check for sin6_scope_id
1389 AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
1390 [#ifdef HAVE_SYS_TYPES_H
1391 #include <sys/types.h>
1393 #ifdef HAVE_NETINET_IN_H
1394 #include <netinet/in.h>
1397 dnl Check for the external timezone variables timezone and daylight
1398 AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
1399 AC_TRY_LINK([#include <time.h>],[timezone;],
1400 ac_cv_have_timezone="yes", ac_cv_have_timezone="no"))
1401 if test "$ac_cv_have_timezone" = "yes"
1403 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if you have the timezone variable])
1405 AC_CACHE_CHECK([for daylight variable], ac_cv_have_daylight,
1406 AC_TRY_LINK([#include <time.h>],[daylight;],
1407 ac_cv_have_daylight="yes", ac_cv_have_daylight="no"))
1408 if test "$ac_cv_have_daylight" = "yes"
1410 AC_DEFINE(HAVE_DAYLIGHT, 1, [Define if you have the daylight variable])
1413 dnl *** check for the need to define platform-specific symbols
1416 *i[[3456789]]86*) WINE_CHECK_DEFINE([__i386__]) ;;
1417 *x86_64*) WINE_CHECK_DEFINE([__x86_64__]) ;;
1418 *alpha*) WINE_CHECK_DEFINE([__ALPHA__]) ;;
1419 *sparc*) WINE_CHECK_DEFINE([__sparc__]) ;;
1420 *powerpc*) WINE_CHECK_DEFINE([__powerpc__]) ;;
1423 case $host_vendor in
1424 *sun*) WINE_CHECK_DEFINE([__sun__]) ;;
1427 dnl **** Generate output files ****
1429 AH_TOP([#define __WINE_CONFIG_H])
1431 WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1432 WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1433 WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
1434 WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
1435 WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
1436 WINE_CONFIG_EXTRA_DIR(include/wine)
1438 MAKE_RULES=Make.rules
1439 AC_SUBST_FILE(MAKE_RULES)
1441 MAKE_DLL_RULES=dlls/Makedll.rules
1442 AC_SUBST_FILE(MAKE_DLL_RULES)
1444 MAKE_IMPLIB_RULES=dlls/Makeimplib.rules
1445 AC_SUBST_FILE(MAKE_IMPLIB_RULES)
1447 MAKE_TEST_RULES=dlls/Maketest.rules
1448 AC_SUBST_FILE(MAKE_TEST_RULES)
1450 MAKE_LIB_RULES=libs/Makelib.rules
1451 AC_SUBST_FILE(MAKE_LIB_RULES)
1453 MAKE_PROG_RULES=programs/Makeprog.rules
1454 AC_SUBST_FILE(MAKE_PROG_RULES)
1459 dlls/Makeimplib.rules
1462 programs/Makeprog.rules
1465 dlls/activeds/Makefile
1466 dlls/advapi32/Makefile
1467 dlls/advapi32/tests/Makefile
1468 dlls/advpack/Makefile
1469 dlls/advpack/tests/Makefile
1470 dlls/amstream/Makefile
1472 dlls/avicap32/Makefile
1473 dlls/avifil32/Makefile
1474 dlls/cabinet/Makefile
1475 dlls/cabinet/tests/Makefile
1476 dlls/capi2032/Makefile
1478 dlls/cfgmgr32/Makefile
1479 dlls/comcat/Makefile
1480 dlls/comctl32/Makefile
1481 dlls/comctl32/tests/Makefile
1482 dlls/commdlg/Makefile
1483 dlls/crtdll/Makefile
1484 dlls/crypt32/Makefile
1485 dlls/crypt32/tests/Makefile
1486 dlls/cryptdll/Makefile
1487 dlls/ctl3d32/Makefile
1490 dlls/d3d9/tests/Makefile
1494 dlls/d3dxof/Makefile
1495 dlls/dbghelp/Makefile
1496 dlls/dciman32/Makefile
1498 dlls/ddraw/tests/Makefile
1499 dlls/devenum/Makefile
1500 dlls/dinput/Makefile
1501 dlls/dinput/tests/Makefile
1502 dlls/dinput8/Makefile
1503 dlls/dmband/Makefile
1504 dlls/dmcompos/Makefile
1506 dlls/dmloader/Makefile
1507 dlls/dmscript/Makefile
1508 dlls/dmstyle/Makefile
1509 dlls/dmsynth/Makefile
1510 dlls/dmusic/Makefile
1511 dlls/dmusic32/Makefile
1513 dlls/dplayx/Makefile
1515 dlls/dpnhpast/Makefile
1516 dlls/dsound/Makefile
1517 dlls/dsound/tests/Makefile
1518 dlls/dswave/Makefile
1519 dlls/dxdiagn/Makefile
1520 dlls/dxerr8/Makefile
1521 dlls/dxerr9/Makefile
1522 dlls/dxguid/Makefile
1524 dlls/gdi/tests/Makefile
1526 dlls/glut32/Makefile
1527 dlls/hhctrl.ocx/Makefile
1528 dlls/iccvid/Makefile
1530 dlls/ifsmgr.vxd/Makefile
1531 dlls/imaadp32.acm/Makefile
1532 dlls/imagehlp/Makefile
1534 dlls/iphlpapi/Makefile
1535 dlls/iphlpapi/tests/Makefile
1537 dlls/kernel/Makefile
1538 dlls/kernel/tests/Makefile
1540 dlls/lz32/tests/Makefile
1541 dlls/mapi32/Makefile
1542 dlls/mapi32/tests/Makefile
1543 dlls/mciavi32/Makefile
1544 dlls/mcicda/Makefile
1545 dlls/mciseq/Makefile
1546 dlls/midimap/Makefile
1548 dlls/mlang/tests/Makefile
1549 dlls/mmdevldr.vxd/Makefile
1550 dlls/monodebg.vxd/Makefile
1553 dlls/msacm/tests/Makefile
1554 dlls/msadp32.acm/Makefile
1556 dlls/mscms/tests/Makefile
1558 dlls/msftedit/Makefile
1559 dlls/msg711.acm/Makefile
1560 dlls/mshtml/Makefile
1561 dlls/mshtml/tests/Makefile
1563 dlls/msi/tests/Makefile
1564 dlls/msimg32/Makefile
1565 dlls/msisys/Makefile
1566 dlls/msnet32/Makefile
1567 dlls/msrle32/Makefile
1568 dlls/msvcrt/Makefile
1569 dlls/msvcrt/tests/Makefile
1570 dlls/msvcrt20/Makefile
1571 dlls/msvcrt40/Makefile
1572 dlls/msvcrtd/Makefile
1573 dlls/msvcrtd/tests/Makefile
1574 dlls/msvfw32/Makefile
1575 dlls/msvidc32/Makefile
1576 dlls/mswsock/Makefile
1577 dlls/msxml3/Makefile
1578 dlls/msxml3/tests/Makefile
1579 dlls/netapi32/Makefile
1580 dlls/netapi32/tests/Makefile
1581 dlls/newdev/Makefile
1583 dlls/ntdll/tests/Makefile
1584 dlls/objsel/Makefile
1585 dlls/odbc32/Makefile
1586 dlls/odbccp32/Makefile
1588 dlls/ole32/tests/Makefile
1589 dlls/oleacc/Makefile
1590 dlls/oleaut32/Makefile
1591 dlls/oleaut32/tests/Makefile
1592 dlls/olecli32/Makefile
1593 dlls/oledlg/Makefile
1594 dlls/olepro32/Makefile
1595 dlls/olesvr32/Makefile
1596 dlls/opengl32/Makefile
1597 dlls/powrprof/Makefile
1599 dlls/psapi/tests/Makefile
1601 dlls/quartz/Makefile
1602 dlls/quartz/tests/Makefile
1603 dlls/rasapi32/Makefile
1604 dlls/riched20/Makefile
1605 dlls/riched20/tests/Makefile
1606 dlls/richedit/Makefile
1607 dlls/rpcrt4/Makefile
1608 dlls/rpcrt4/tests/Makefile
1609 dlls/rsabase/Makefile
1610 dlls/rsabase/tests/Makefile
1611 dlls/rsaenh/Makefile
1612 dlls/rsaenh/tests/Makefile
1613 dlls/secur32/Makefile
1614 dlls/secur32/tests/Makefile
1615 dlls/security/Makefile
1616 dlls/sensapi/Makefile
1617 dlls/serialui/Makefile
1618 dlls/setupapi/Makefile
1619 dlls/setupapi/tests/Makefile
1621 dlls/shdocvw/Makefile
1622 dlls/shdocvw/tests/Makefile
1623 dlls/shell32/Makefile
1624 dlls/shell32/tests/Makefile
1625 dlls/shfolder/Makefile
1626 dlls/shlwapi/Makefile
1627 dlls/shlwapi/tests/Makefile
1628 dlls/snmpapi/Makefile
1629 dlls/spoolss/Makefile
1630 dlls/stdole2.tlb/Makefile
1631 dlls/stdole32.tlb/Makefile
1633 dlls/strmiids/Makefile
1634 dlls/tapi32/Makefile
1636 dlls/unicows/Makefile
1638 dlls/urlmon/Makefile
1639 dlls/urlmon/tests/Makefile
1641 dlls/user/tests/Makefile
1643 dlls/usp10/tests/Makefile
1645 dlls/uxtheme/Makefile
1646 dlls/vdhcp.vxd/Makefile
1647 dlls/vdmdbg/Makefile
1648 dlls/version/Makefile
1649 dlls/version/tests/Makefile
1650 dlls/vmm.vxd/Makefile
1651 dlls/vnbt.vxd/Makefile
1652 dlls/vnetbios.vxd/Makefile
1653 dlls/vtdapi.vxd/Makefile
1654 dlls/vwin32.vxd/Makefile
1655 dlls/w32skrnl/Makefile
1656 dlls/winecrt0/Makefile
1657 dlls/wined3d/Makefile
1658 dlls/winedos/Makefile
1659 dlls/winemp3.acm/Makefile
1660 dlls/wineps/Makefile
1661 dlls/wininet/Makefile
1662 dlls/wininet/tests/Makefile
1664 dlls/winmm/joystick/Makefile
1665 dlls/winmm/mciwave/Makefile
1666 dlls/winmm/tests/Makefile
1667 dlls/winmm/wavemap/Makefile
1668 dlls/winmm/winealsa/Makefile
1669 dlls/winmm/winearts/Makefile
1670 dlls/winmm/wineaudioio/Makefile
1671 dlls/winmm/wineesd/Makefile
1672 dlls/winmm/winejack/Makefile
1673 dlls/winmm/winenas/Makefile
1674 dlls/winmm/wineoss/Makefile
1675 dlls/winnls32/Makefile
1676 dlls/winspool/Makefile
1677 dlls/winspool/tests/Makefile
1678 dlls/wintab32/Makefile
1679 dlls/wintrust/Makefile
1680 dlls/wldap32/Makefile
1681 dlls/wnaspi32/Makefile
1683 dlls/ws2_32/Makefile
1684 dlls/ws2_32/tests/Makefile
1685 dlls/wsock32/Makefile
1686 dlls/wtsapi32/Makefile
1687 dlls/x11drv/Makefile
1688 documentation/Makefile
1693 libs/unicode/Makefile
1698 programs/clock/Makefile
1699 programs/cmdlgtst/Makefile
1700 programs/control/Makefile
1701 programs/eject/Makefile
1702 programs/expand/Makefile
1703 programs/explorer/Makefile
1704 programs/hh/Makefile
1705 programs/icinfo/Makefile
1706 programs/iexplore/Makefile
1707 programs/msiexec/Makefile
1708 programs/notepad/Makefile
1709 programs/progman/Makefile
1710 programs/regedit/Makefile
1711 programs/regsvr32/Makefile
1712 programs/rpcss/Makefile
1713 programs/rundll32/Makefile
1714 programs/start/Makefile
1715 programs/taskmgr/Makefile
1716 programs/uninstaller/Makefile
1717 programs/view/Makefile
1718 programs/wcmd/Makefile
1719 programs/wineboot/Makefile
1720 programs/winebrowser/Makefile
1721 programs/winecfg/Makefile
1722 programs/wineconsole/Makefile
1723 programs/winedbg/Makefile
1724 programs/winefile/Makefile
1725 programs/winemenubuilder/Makefile
1726 programs/winemine/Makefile
1727 programs/winepath/Makefile
1728 programs/winetest/Makefile
1729 programs/winevdm/Makefile
1730 programs/winhelp/Makefile
1731 programs/winver/Makefile
1732 programs/wordpad/Makefile
1736 tools/winapi/Makefile
1737 tools/winebuild/Makefile
1738 tools/winedump/Makefile
1739 tools/winegcc/Makefile
1741 tools/wrc/Makefile])
1745 if test "$have_x" = "no"
1748 echo "*** Warning: X development files not found. Wine will be built without"
1749 echo "*** X support, which currently does not work, and would probably not be"
1750 echo "*** what you want anyway. You will need to install devel packages of"
1751 echo "*** Xlib/Xfree86 at the very least."
1754 if test "$wine_cv_opengl_version_OK" = "no"
1757 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1758 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1761 if test "$wine_cv_msg_freetype" = "yes"
1764 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
1765 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1766 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1767 echo "*** enable Wine to use TrueType fonts."
1770 if test "$wine_cv_msg_fonts" = "yes"
1773 echo "*** Warning: Freetype or Fontforge is missing."
1774 echo "*** Fonts will not be built. Dialog text may be invisible or unaligned."
1777 if test -z "$ALSALIBS" -a \
1778 -z "$ARTSC_LIBS" -a \
1779 -z "$AUDIOIOLIBS" -a \
1782 -z "$ac_cv_lib_soname_jack" -a \
1783 "$ac_cv_header_sys_soundcard_h" != "yes" -a \
1784 "$ac_cv_header_machine_soundcard_h" != "yes" -a \
1785 "$ac_cv_header_soundcard_h" != "yes"
1787 echo "*** No sound system was found. Windows applications will be silent."
1788 echo "*** The currently supported sound systems are:"
1789 echo "*** ALSA, ARTS, EsounD, AudioIO, Jack, NAS and OSS"
1793 echo "Configure finished. Do '${ac_make} depend && ${ac_make}' to compile Wine."
1796 dnl Local Variables:
1797 dnl comment-start: "dnl "
1799 dnl comment-start-skip: "\\bdnl\\b\\s *"
1800 dnl compile-command: "autoconf && autoheader"