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)
138 dnl **** Check for some libraries ****
140 dnl Check for -li386 for NetBSD and OpenBSD
141 AC_CHECK_LIB(i386,i386_set_ldt)
142 dnl Check for -lossaudio for NetBSD
143 AC_CHECK_LIB(ossaudio,_oss_ioctl)
144 dnl Check for -lnsl for Solaris
145 AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
146 dnl Check for -lsocket for Solaris
147 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
148 dnl Check for -lresolv for Solaris
149 AC_CHECK_FUNCS(inet_aton,,AC_CHECK_LIB(resolv,inet_aton))
150 dnl Check for -lxpg4 for FreeBSD
151 AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
152 dnl Check for -lpoll for Mac OS X/Darwin
153 AC_CHECK_LIB(poll,poll)
154 dnl Check for -lresolv for Mac OS X/Darwin
155 AC_CHECK_LIB(resolv,res_9_init)
156 dnl Check for -lpthread
157 AC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread"))
161 AC_SUBST(OPENGLFILES,"")
162 AC_SUBST(GLU32FILES,"")
163 AC_SUBST(OPENGL_LIBS,"")
165 dnl **** Check for header files ****
180 fontconfig/fontconfig.h \
207 machine/soundcard.h \
271 dnl **** Check for X11 ****
273 if test "$have_x" = "yes"
276 ac_save_CPPFLAGS="$CPPFLAGS"
277 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
279 dnl *** All of the following tests require X11/Xlib.h
280 AC_CHECK_HEADERS([X11/Xlib.h \
283 X11/extensions/shape.h \
284 X11/extensions/XInput.h \
285 X11/extensions/XShm.h \
286 X11/extensions/Xrandr.h \
287 X11/extensions/Xrender.h \
288 X11/extensions/xf86dga.h \
289 X11/extensions/xf86vmode.h],,,
290 [#ifdef HAVE_X11_XLIB_H
291 # include <X11/Xlib.h>
293 #ifdef HAVE_X11_XUTIL_H
294 # include <X11/Xutil.h>
297 dnl *** Check for X keyboard extension
298 if test "$ac_cv_header_X11_XKBlib_h" = "yes"
300 AC_CHECK_LIB(X11, XkbQueryExtension,
301 AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
302 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
305 dnl *** Check for X Shm extension
306 if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
308 AC_CHECK_LIB(Xext, XShmQueryExtension,
309 AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
310 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
313 dnl *** Check for X shape extension
314 if test "$ac_cv_header_X11_extensions_shape_h" = "yes"
316 AC_CHECK_LIB(Xext,XShapeQueryExtension,
317 AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
318 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
321 dnl *** Check for XFree86 DGA / DGA 2.0 extension
322 if test "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
324 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
325 [ AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
326 [Define if you have the Xxf86dga library version 2])
327 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
329 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
332 dnl *** Check for XFree86 VMODE extension
333 if test "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
335 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
336 [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
337 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
339 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
342 dnl *** Check for X RandR extension
343 if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
345 AC_TRY_COMPILE([#include <X11/Xlib.h>
346 #include <X11/extensions/Xrandr.h>],[static typeof(XRRSetScreenConfigAndRate) * func;],
347 [AC_DEFINE(HAVE_LIBXRANDR, 1, [Define if you have the Xrandr library])])
350 dnl *** Check for Transform functions in Xrender
351 if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
353 AC_CHECK_LIB(Xrender, XRenderSetPictureTransform,
354 [AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
355 [Define if Xrender has the XRenderSetPictureTransform function])],,
356 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
358 dnl *** End of X11/Xlib.h check
360 dnl Check for the presence of OpenGL
361 if test "x$with_opengl" != "xno"
363 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h,,,
364 [#ifdef HAVE_GL_GLX_H
367 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
369 dnl Check for some problems due to old Mesa versions
370 AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
372 [#include <GL/gl.h>],
373 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
374 [wine_cv_opengl_version_OK="yes"],
375 [wine_cv_opengl_version_OK="no"]
379 if test "$wine_cv_opengl_version_OK" = "yes"
381 dnl Check for the presence of the library
382 AC_CHECK_LIB(GL,glXCreateContext,
385 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
387 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
389 OPENGLFILES='$(OPENGLFILES)'
390 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
392 if test -f /usr/X11R6/lib/libGL.a
394 AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
395 This prevents linking to OpenGL. Delete the file and restart configure.])
399 dnl Check for GLU32 library.
400 AC_CHECK_LIB(GLU,gluLookAt,
401 [OPENGL_LIBS="$OPENGL_LIBS -lGLU"
402 GLU32FILES='$(GLU32FILES)']
404 $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
408 dnl Check for glut32 library.
409 AC_CHECK_LIB(glut,glutMainLoop,
410 [AC_SUBST(GLUT_LIBS,"-lglut -lXmu -lXi")
411 AC_SUBST(GLUT32FILES,'$(GLUT32FILES)')],,
412 $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXmu -lXi -lX11 $X_EXTRA_LIBS)
416 dnl **** Check for NAS ****
418 AC_CHECK_HEADERS(audio/audiolib.h,
419 [AC_CHECK_HEADERS(audio/soundlib.h,,,[#include <audio/audiolib.h>])
420 AC_CHECK_LIB(audio,AuCreateFlow,
421 [AC_DEFINE(HAVE_NAS,1,[Define if you have NAS including devel headers])
422 NASLIBS="-laudio -lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS"],,
423 [-lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
425 CPPFLAGS="$ac_save_CPPFLAGS"
433 dnl **** Check for libxml2 ****
435 AC_SUBST(XML2LIBS,"")
436 AC_SUBST(XML2INCL,"")
437 ac_save_CPPFLAGS="$CPPFLAGS"
438 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
439 AC_CHECK_HEADERS(libxml/parser.h,
440 [AC_CHECK_LIB(xml2, xmlReadIO,
441 [AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])
443 XML2INCL="-I/usr/include/libxml2"])])
444 CPPFLAGS="$ac_save_CPPFLAGS"
446 dnl **** Check which curses lib to use ***
448 if test "x$with_curses" != "xno"
450 if test "$ac_cv_header_ncurses_h" = "yes"
452 AC_CHECK_LIB(ncurses,waddch,
453 [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
454 CURSESLIBS="-lncurses"])
455 elif test "$ac_cv_header_curses_h" = "yes"
457 AC_CHECK_LIB(curses,waddch,
458 [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
459 CURSESLIBS="-lcurses"])
464 dnl **** Check for SANE ****
465 AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
466 AC_SUBST(SANELIBS,"")
467 AC_SUBST(SANEINCL,"")
468 if test "$sane_devel" != "no"
470 SANELIBS="`$sane_devel --libs`"
471 SANEINCL="`$sane_devel --cflags`"
472 ac_save_CPPFLAGS="$CPPFLAGS"
474 CPPFLAGS="$CPPFLAGS $SANEINCL"
475 LIBS="$LIBS $SANELIBS"
476 AC_CHECK_HEADER(sane/sane.h,
477 [AC_CHECK_LIB(sane,sane_open,
478 [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
484 CPPFLAGS="$ac_save_CPPFLAGS"
487 dnl **** Check for the ICU library ****
488 if test "$ac_cv_header_unicode_ubidi_h" = "yes"
491 ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}"
492 ICUUC_LIB="${ICUUC_LIB-$ICU_LIB_DIR/libsicuuc.a}"
493 ICUDATA_LIB="${ICUDATA_LIB-$ICU_LIB_DIR/libsicudata.a}"
494 AC_MSG_CHECKING(whether can link with ICU libraries $ICUUC_LIB and $ICUDATA_LIB)
495 LIBS="$LIBS $ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s"
496 AC_TRY_LINK([#include <unicode/ubidi.h>],[ubidi_open()],
497 [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed])
498 AC_SUBST(ICULIBS,"$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s")
504 dnl **** Check for LittleCMS ***
505 AC_SUBST(LCMSLIBS,"")
506 if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes"
508 AC_CHECK_LIB(lcms, cmsOpenProfileFromFile,
509 [AC_DEFINE(HAVE_LCMS, 1, [Define if you have the LittleCMS development environment])
513 dnl **** Check for OpenLDAP ***
514 AC_SUBST(LDAPLIBS,"")
515 if test "$ac_cv_header_ldap_h" = "yes" -a "$ac_cv_header_lber_h" = "yes"
517 AC_CHECK_LIB(ldap, ldap_init,
518 [AC_CHECK_LIB(lber, ber_init,
519 [AC_DEFINE(HAVE_LDAP, 1, [Define if you have the OpenLDAP development environment])
520 LDAPLIBS="-lldap -llber"])])
523 dnl **** Check for FreeType 2 ****
524 AC_SUBST(FREETYPELIBS,"")
525 AC_SUBST(FREETYPEINCL,"")
526 AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
527 if test "$ft_lib" = "no"
529 wine_cv_msg_freetype=no
531 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
532 if test "$ft_devel" = "no"
534 AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
535 if test "$ft_devel2" = "freetype2-config"
540 if test "$ft_devel" = "no"
542 wine_cv_msg_freetype=yes
544 FREETYPELIBS=`$ft_devel --libs`
545 FREETYPEINCL=`$ft_devel --cflags`
546 ac_save_CPPFLAGS="$CPPFLAGS"
547 CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
548 AC_CHECK_HEADERS(ft2build.h \
549 freetype/freetype.h \
551 freetype/tttables.h \
553 freetype/ftsnames.h \
554 freetype/ttnameid.h \
556 freetype/ftwinfnt.h \
557 freetype/internal/sfnt.h,,,
559 #include <ft2build.h>
561 AC_TRY_CPP([#include <ft2build.h>
562 #include <freetype/fttrigon.h>],
563 [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
564 [Define if you have the <freetype/fttrigon.h> header file.])
565 wine_cv_fttrigon=yes],
567 CPPFLAGS="$ac_save_CPPFLAGS"
568 dnl Check that we have at least freetype/freetype.h
569 if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
571 AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
572 wine_cv_msg_freetype=no
576 wine_cv_msg_freetype=yes
581 dnl Only build the fonts dir if we have both freetype and fontforge
582 if test "$FONTFORGE" != "false" -a -n "$FREETYPELIBS"
584 AC_SUBST(FONTSSUBDIRS,"fonts")
587 dnl **** Check for parport (currently Linux only) ****
588 AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
590 [#include <linux/ppdev.h>],
591 [ioctl (1,PPCLAIM,0)],
592 [ac_cv_c_ppdev="yes"],
593 [ac_cv_c_ppdev="no"])
595 if test "$ac_cv_c_ppdev" = "yes"
597 AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
600 dnl **** Check for va_copy ****
601 AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
603 [#include <stdarg.h>],
607 [ac_cv_c_va_copy="yes"],
608 [ac_cv_c_va_copy="no"])
610 if test "$ac_cv_c_va_copy" = "yes"
612 AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy])
614 AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
616 [#include <stdarg.h>],
620 [ac_cv_c___va_copy="yes"],
621 [ac_cv_c___va_copy="no"])
623 if test "$ac_cv_c___va_copy" = "yes"
625 AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
628 dnl **** Check for sigsetjmp ****
629 AC_CACHE_CHECK([for sigsetjmp], ac_cv_c_sigsetjmp,
631 [#include <setjmp.h>],
634 siglongjmp( buf, 1 );],
635 [ac_cv_c_sigsetjmp="yes"],
636 [ac_cv_c_sigsetjmp="no"])
638 if test "$ac_cv_c_sigsetjmp" = "yes"
640 AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have the sigsetjmp (and siglongjmp) function])
643 dnl **** Check for pthread_rwlock_t ****
644 AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
645 #include <pthread.h>])
647 dnl **** Check for pthread functions ****
649 LIBS="$LIBS $LIBPTHREAD"
652 pthread_get_stackaddr_np \
653 pthread_get_stacksize_np \
657 dnl **** Check for aRts Sound Server ****
658 AC_PATH_PROG(ARTSCCONFIG, artsc-config)
659 if test x$ARTSCCONFIG != x -a x$ARTSCCONFIG != x'"$ARTSCCONFIG"';
662 for i in `$ARTSCCONFIG --cflags`
665 -I*) ARTSC_CFLAGS="$ARTSC_CFLAGS $i";;
668 ARTSC_LIBS=`$ARTSCCONFIG --libs`
669 save_CFLAGS="$CFLAGS"
670 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
671 AC_CHECK_LIB(artsc,arts_init,
672 [AC_TRY_COMPILE([#include <artsc.h>],[arts_stream_t stream;],
673 [AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
674 AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
675 AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])])],,
677 CFLAGS="$save_CFLAGS"
680 dnl **** Check for EsounD ****
681 AC_PATH_PROG(ESDCONFIG, esd-config)
682 if test x$ESDCONFIG != x -a x$ESDCONFIG != x'"$ESDCONFIG"';
685 for i in `$ESDCONFIG --cflags`
688 -I*) ESD_CFLAGS="$ESD_CFLAGS $i";;
691 ESD_LIBS=`$ESDCONFIG --libs`
692 save_CFLAGS="$CFLAGS"
693 CFLAGS="$CFLAGS $ESD_CFLAGS"
694 AC_CHECK_LIB(esd,esd_open_sound,
695 [AC_SUBST(ESDLIBS, $ESD_LIBS)
696 AC_SUBST(ESDINCL, $ESD_CFLAGS)
697 AC_DEFINE(HAVE_ESD, 1, [Define if you have EsounD sound server])])
698 CFLAGS="$save_CFLAGS"
701 dnl **** Check for ALSA 1.x ****
702 AC_SUBST(ALSALIBS,"")
703 if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
705 AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access,
706 [AC_TRY_COMPILE([#ifdef HAVE_ALSA_ASOUNDLIB_H
707 #include <alsa/asoundlib.h>
708 #elif defined(HAVE_SYS_ASOUNDLIB_H)
709 #include <sys/asoundlib.h>
711 [int ret = snd_pcm_hw_params_get_access(NULL, NULL)],
712 [AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA 1.x including devel headers])
713 ALSALIBS="-lasound"])])
716 dnl **** Check for libaudioio (which can be used to get solaris audio support) ****
718 AC_SUBST(AUDIOIOLIBS,"")
719 if test "$ac_cv_header_libaudioio_h" = "yes"
721 AC_CHECK_LIB(audioio,AudioIOGetVersion,
722 [AUDIOIOLIBS="-laudioio"
723 AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])
726 dnl **** Check for capi4linux ****
728 if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
730 AC_CHECK_LIB(capi20,capi20_register,[AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])])
733 dnl **** Check for gcc specific options ****
735 AC_SUBST(EXTRACFLAGS,"")
736 if test "x${GCC}" = "xyes"
738 EXTRACFLAGS="-Wall -pipe"
740 dnl Check for strength-reduce bug
741 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
743 int L[[4]] = {0,1,2,3};
745 static int Array[[3]];
748 for(i=0; i<B; i++) Array[[i]] = i - 3;
749 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
752 exit( Array[[1]] != -2 || L[[2]] != 3);
754 ac_cv_c_gcc_strength_bug="no",
755 ac_cv_c_gcc_strength_bug="yes",
756 ac_cv_c_gcc_strength_bug="yes") )
757 if test "$ac_cv_c_gcc_strength_bug" = "yes"
759 EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
762 dnl Check for -fshort-wchar
763 AC_CACHE_CHECK([for gcc -fshort-wchar support], ac_cv_c_gcc_fshort_wchar,
764 [WINE_TRY_CFLAGS([-fshort-wchar],
765 ac_cv_c_gcc_fshort_wchar="yes",ac_cv_c_gcc_fshort_wchar="no")])
766 if test "$ac_cv_c_gcc_fshort_wchar" = "yes"
768 AC_DEFINE(CC_FLAG_SHORT_WCHAR, "-fshort-wchar", [Specifies the compiler flag that forces a short wchar_t])
771 dnl Check for -mpreferred-stack-boundary
772 AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support], ac_cv_c_gcc_stack_boundary,
773 [WINE_TRY_CFLAGS([-mpreferred-stack-boundary=2],
774 ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
775 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
777 EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2"
780 dnl Check for -fno-strict-aliasing
781 AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing,
782 [WINE_TRY_CFLAGS([-fno-strict-aliasing],
783 ac_cv_c_gcc_no_strict_aliasing="yes",ac_cv_c_gcc_no_strict_aliasing="no")])
784 if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes"
786 EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
789 dnl Check for -gstabs+ option
790 AC_CACHE_CHECK([for gcc -gstabs+ support], ac_cv_c_gcc_gstabs,
791 [WINE_TRY_CFLAGS([-gstabs+],ac_cv_c_gcc_gstabs="yes", ac_cv_c_gcc_gstabs="no")])
792 if test "$ac_cv_c_gcc_gstabs" = "yes"
794 EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
797 dnl Check for noisy string.h
798 saved_CFLAGS="$CFLAGS"
799 CFLAGS="$CFLAGS -Wpointer-arith -Werror"
800 AC_CACHE_CHECK([for broken string.h that generates warnings], ac_cv_c_string_h_warnings,
801 AC_TRY_COMPILE([#include <string.h>],[],
802 [ac_cv_c_string_h_warnings=no],[ac_cv_c_string_h_warnings=yes]))
803 CFLAGS="$saved_CFLAGS"
804 if test "$ac_cv_c_string_h_warnings" = "no"
806 EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
810 dnl **** Check how to define a function in assembly code ****
812 AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
814 ["\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0"],,,
815 ac_cv_asm_func_def=".def",
816 [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0"],,,
817 ac_cv_asm_func_def=".type @function",
818 [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0"],,,
819 ac_cv_asm_func_def=".type 2",
820 ac_cv_asm_func_def="unknown")])]))
822 AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function directive])
823 case "$ac_cv_asm_func_def" in
825 AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"]) ;;
827 AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"]) ;;
829 AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"]) ;;
831 AC_DEFINE([__ASM_FUNC(name)], [""]) ;;
834 dnl **** Check for underscore on external symbols ****
836 AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
837 WINE_TRY_ASM_LINK([".globl _ac_test\n_ac_test:\t.long 0"],
838 [extern int ac_test;],
839 [if (ac_test) return 1],
840 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
842 AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
843 if test "$ac_cv_c_extern_prefix" = "yes"
845 AC_DEFINE([__ASM_NAME(name)], ["_" name])
847 AC_DEFINE([__ASM_NAME(name)], [name])
850 dnl **** Check for working dll ****
853 AC_SUBST(DLLFLAGS,"-D_REENTRANT")
855 AC_SUBST(LDSHARED,"")
856 AC_SUBST(LDDLLFLAGS,"")
857 AC_SUBST(LIBEXT,"so")
858 AC_SUBST(IMPLIBEXT,"def")
862 AC_CHECK_TOOL(DLLTOOL,dlltool,false)
863 AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
864 if test "$DLLWRAP" = "false"; then
867 dnl FIXME - check whether dllwrap works correctly...
871 dnl We can't build 16-bit NE dlls
876 if test "$ac_cv_header_dlfcn_h" = "yes"
878 AC_CHECK_FUNCS(dlopen,,
879 [AC_CHECK_LIB(dl,dlopen,
880 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
887 if test "$LIBEXT" = "so"
889 DLLFLAGS="$DLLFLAGS -fPIC"
891 AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
892 [WINE_TRY_SHLIB_FLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
893 ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
894 if test "$ac_cv_c_dll_gnuelf" = "yes"
896 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
897 LDDLLFLAGS="-shared -Wl,-Bsymbolic"
898 AC_CACHE_CHECK([whether the linker accepts -z defs], ac_cv_c_dll_zdefs,
899 [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-z,defs],
900 ac_cv_c_dll_zdefs="yes",ac_cv_c_dll_zdefs="no")])
901 if test "$ac_cv_c_dll_zdefs" = "yes"
903 LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
906 AC_CACHE_CHECK([whether the linker accepts -init and -fini], ac_cv_c_dll_init_fini,
907 [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini],
908 ac_cv_c_dll_init_fini="yes",ac_cv_c_dll_init_fini="no")])
909 if test "$ac_cv_c_dll_init_fini" = "yes"
911 LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
914 AC_CACHE_CHECK([whether the linker accepts version scripts], ac_cv_c_ld_version_scripts,
915 [echo '{ global: *; };' >conftest.map
916 WINE_TRY_CFLAGS([-fPIC -shared -Wl,--version-script=conftest.map],
917 ac_cv_c_ld_version_scripts="yes",ac_cv_c_ld_version_scripts="no")
919 if test "$ac_cv_c_ld_version_scripts" = "yes"
921 LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"
924 AC_CACHE_CHECK([whether the linker accepts --export-dynamic], ac_cv_c_export_dynamic,
925 [WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
926 ac_cv_c_export_dynamic="yes",ac_cv_c_export_dynamic="no")])
927 if test "$ac_cv_c_export_dynamic" = "yes"
929 AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])
934 AC_CACHE_CHECK([whether we can relocate the executable to 0x7bf00000], ac_cv_ld_reloc_exec,
935 [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
936 ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")])
937 if test "$ac_cv_ld_reloc_exec" = "yes"
939 LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
945 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
946 [WINE_TRY_SHLIB_FLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
947 ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
948 if test "$ac_cv_c_dll_unixware" = "yes"
950 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
951 LDDLLFLAGS="-Wl,-G,-B,symbolic"
954 AC_CACHE_CHECK(whether we can build a Mach-O (Mac OS X/Darwin) dll, ac_cv_c_dll_macho,
955 [WINE_TRY_SHLIB_FLAGS([-bundle], ac_cv_c_dll_macho="yes", ac_cv_c_dll_macho="no")])
956 if test "$ac_cv_c_dll_macho" = "yes"
959 LDDLLFLAGS="-bundle -flat_namespace -undefined suppress -read_only_relocs warning"
960 LDSHARED="\$(CC) -dynamiclib"
961 CFLAGS="$CFLAGS -ffixed-r13 -no-cpp-precomp"
963 dnl Relocate wine executable
964 AC_SUBST(LDEXECFLAGS,"-seg1addr 0x120000")
965 dnl Relocate libwine.dyld too
966 AC_SUBST(LDLIBWINEFLAGS,"-seg1addr 0x140000")
967 dnl declare needed frameworks
968 AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
969 AC_SUBST(IOKITLIB,"-framework IOKit")
970 dnl using IOKit imply we use CoreFoundation too
971 IOKITLIB="$IOKITLIB $COREFOUNDATIONLIB"
973 AC_CACHE_CHECK(whether we can build an HP-UX dll, ac_cv_c_dll_hpux,
974 [WINE_TRY_SHLIB_FLAGS([-shared], ac_cv_c_dll_hpux="yes", ac_cv_c_dll_hpux="no")])
975 if test "$ac_cv_c_dll_hpux" = "yes"
979 LDDLLFLAGS="-shared -fPIC"
980 LDSHARED="\$(CC) -shared"
987 dnl Check for cross compiler to build test programs
988 AC_SUBST(CROSSTEST,"")
989 if test "$cross_compiling" = "no"
991 AC_CHECK_PROGS(CROSSCC,i586-mingw32msvc-gcc i386-mingw32msvc-gcc i386-mingw32-gcc mingw-gcc,false)
992 AC_CHECK_PROGS(DLLTOOL,i586-mingw32msvc-dlltool i386-mingw32msvc-dlltool i386-mingw32-dlltool mingw-dlltool,false)
993 AC_CHECK_PROGS(CROSSWINDRES,i586-mingw32msvc-windres i386-mingw32msvc-windres i386-mingw32-windres mingw-windres,false)
994 if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
999 if test "$LIBEXT" = "a"; then
1001 [could not find a way to build shared libraries.
1002 It is currently not possible to build Wine without shared library
1003 (.so) support to allow transparent switch between .so and .dll files.
1004 If you are using Linux, you will need a newer binutils.]
1010 AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$PATH\"") ;;
1012 AC_SUBST(LDPATH,"DYLD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$DYLD_LIBRARY_PATH\"") ;;
1014 AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$LD_LIBRARY_PATH\"") ;;
1017 dnl Mingw needs explicit msvcrt for linking libwine and winsock for wininet
1020 AC_SUBST(CRTLIBS,"-lmsvcrt")
1021 AC_SUBST(SOCKETLIBS,"-lws2_32")
1028 *i[[3456789]]86*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread wine-preloader") ;;
1029 *) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread") ;;
1031 AC_SUBST(MAIN_BINARY,"wine-glibc")
1034 AC_SUBST(WINE_BINARIES,"wine-pthread")
1035 AC_SUBST(MAIN_BINARY,"wine-pthread")
1038 AC_SUBST(WINE_BINARIES,"wine-kthread")
1039 AC_SUBST(MAIN_BINARY,"wine-kthread")
1043 dnl **** Get the soname for libraries that we load dynamically ****
1045 if test "$LIBEXT" = "so" -o "$LIBEXT" = "dylib"
1047 WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
1048 WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
1049 WINE_GET_SONAME(Xi,XOpenDevice,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1050 WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1051 WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1052 WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
1053 WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS])
1054 WINE_GET_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
1055 WINE_GET_SONAME(cups,cupsGetDefault)
1056 WINE_GET_SONAME(jack,jack_client_new)
1057 WINE_GET_SONAME(fontconfig,FcInit)
1058 WINE_GET_SONAME(ssl,SSL_library_init)
1059 WINE_GET_SONAME(crypto,BIO_new_socket)
1060 WINE_GET_SONAME(ncurses,waddch)
1061 WINE_GET_SONAME(curses,waddch)
1062 WINE_GET_SONAME(jpeg,jpeg_start_decompress)
1063 WINE_GET_SONAME(ungif,DGifOpen)
1064 WINE_GET_SONAME(gif,DGifOpen)
1065 WINE_GET_SONAME(capi20,capi20_isinstalled)
1069 dnl **** Check for functions ****
1134 dnl **** Checks for headers that depend on other ones ****
1136 AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
1137 [#include <sys/types.h>
1138 #if HAVE_SYS_PARAM_H
1139 # include <sys/param.h>
1142 AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
1143 [#include <sys/types.h>
1144 #if HAVE_SYS_SOCKET_H
1145 # include <sys/socket.h>
1148 AC_CHECK_HEADERS([resolv.h],,,
1149 [#include <sys/types.h>
1150 #if HAVE_SYS_SOCKET_H
1151 # include <sys/socket.h>
1153 #if HAVE_NETINET_IN_H
1154 # include <netinet/in.h>
1156 #if HAVE_ARPA_NAMESER_H
1157 # include <arpa/nameser.h>
1160 AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])
1162 AC_CHECK_HEADERS([linux/ipx.h linux/videodev.h],,,
1163 [#ifdef HAVE_SYS_TIME_H
1164 #include <sys/time.h>
1166 #include <sys/types.h>
1167 #ifdef HAVE_ASM_TYPES_H
1168 #include <asm/types.h>
1171 dnl **** Check for types ****
1175 AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t])
1176 AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])
1177 AC_CHECK_TYPES([request_sense],,,[#include <linux/cdrom.h>])
1179 AC_CHECK_MEMBERS([struct ff_effect.direction],,,
1180 [#ifdef HAVE_LINUX_INPUT_H
1181 #include <linux/input.h>
1184 AC_CACHE_CHECK([for sigaddset],wine_cv_have_sigaddset,
1185 AC_TRY_LINK([#include <signal.h>],[sigset_t set; sigaddset(&set,SIGTERM);],
1186 wine_cv_have_sigaddset=yes,wine_cv_have_sigaddset=no))
1187 if test "$wine_cv_have_sigaddset" = "yes"
1189 AC_DEFINE(HAVE_SIGADDSET, 1, [Define if sigaddset is supported])
1193 AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
1194 wine_cv_linux_gethostbyname_r_6,
1200 struct hostent *result;
1207 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1208 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1210 wine_cv_linux_gethostbyname_r_6=yes,
1211 wine_cv_linux_gethostbyname_r_6=no
1214 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1216 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1217 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
1220 if test "$ac_cv_header_linux_joystick_h" = "yes"
1222 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
1223 wine_cv_linux_joystick_22_api,
1225 #include <sys/ioctl.h>
1226 #include <linux/joystick.h>
1228 struct js_event blub;
1229 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1230 #error "no 2.2 header"
1233 wine_cv_linux_joystick_22_api=yes,
1234 wine_cv_linux_joystick_22_api=no,
1235 wine_cv_linux_joystick_22_api=no
1238 if test "$wine_cv_linux_joystick_22_api" = "yes"
1240 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1241 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
1245 dnl **** statfs checks ****
1247 if test "$ac_cv_header_sys_vfs_h" = "yes"
1249 AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
1250 wine_cv_sys_vfs_has_statfs,
1252 #include <sys/types.h>
1253 #ifdef HAVE_SYS_PARAM_H
1254 # include <sys/param.h>
1256 #include <sys/vfs.h>
1260 memset(&stfs,0,sizeof(stfs));
1261 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1264 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1266 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1267 [Define if the struct statfs is defined by <sys/vfs.h>])
1271 if test "$ac_cv_header_sys_statfs_h" = "yes"
1273 AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
1274 wine_cv_sys_statfs_has_statfs,
1276 #include <sys/types.h>
1277 #ifdef HAVE_SYS_PARAM_H
1278 # include <sys/param.h>
1280 #include <sys/statfs.h>
1283 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1286 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1288 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1289 [Define if the struct statfs is defined by <sys/statfs.h>])
1293 if test "$ac_cv_header_sys_mount_h" = "yes"
1295 AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
1296 wine_cv_sys_mount_has_statfs,
1298 #include <sys/types.h>
1299 #ifdef HAVE_SYS_PARAM_H
1300 # include <sys/param.h>
1302 #include <sys/mount.h>
1305 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1308 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1310 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1311 [Define if the struct statfs is defined by <sys/mount.h>])
1315 dnl **** FIXME: what about mixed cases, where we need two of them? ***
1317 dnl Check for statfs members
1318 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],,,
1319 [#include <sys/types.h>
1320 #ifdef HAVE_SYS_PARAM_H
1321 # include <sys/param.h>
1323 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1324 # include <sys/mount.h>
1326 # ifdef STATFS_DEFINED_BY_SYS_VFS
1327 # include <sys/vfs.h>
1329 # ifdef STATFS_DEFINED_BY_SYS_STATFS
1330 # include <sys/statfs.h>
1335 AC_CHECK_MEMBERS([struct statvfs.f_blocks],,,
1336 [#ifdef HAVE_SYS_STATVFS_H
1337 #include <sys/statvfs.h>
1340 dnl Check for socket structure members
1341 AC_CHECK_MEMBERS([struct msghdr.msg_accrights, struct sockaddr.sa_len, struct sockaddr_un.sun_len],,,
1342 [#include <sys/types.h>
1343 #ifdef HAVE_SYS_SOCKET_H
1344 # include <sys/socket.h>
1346 #ifdef HAVE_SYS_UN_H
1347 # include <sys/un.h>
1350 dnl Check for scsireq_t and sg_io_hdr_t members
1351 AC_CHECK_MEMBERS([scsireq_t.cmd, sg_io_hdr_t.interface_id],,,
1352 [#include <sys/types.h>
1353 #ifdef HAVE_SCSI_SG_H
1354 #include <scsi/sg.h>
1357 dnl Check for siginfo_t members
1358 AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
1360 dnl Check for struct option
1361 AC_CHECK_MEMBERS([struct option.name],,,
1362 [#ifdef HAVE_GETOPT_H
1366 dnl Check for stat.st_blocks
1367 AC_CHECK_MEMBERS([struct stat.st_blocks])
1369 dnl Check for the external timezone variables timezone and daylight
1370 AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
1371 AC_TRY_LINK([#include <time.h>],[timezone;],
1372 ac_cv_have_timezone="yes", ac_cv_have_timezone="no"))
1373 if test "$ac_cv_have_timezone" = "yes"
1375 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if you have the timezone variable])
1377 AC_CACHE_CHECK([for daylight variable], ac_cv_have_daylight,
1378 AC_TRY_LINK([#include <time.h>],[daylight;],
1379 ac_cv_have_daylight="yes", ac_cv_have_daylight="no"))
1380 if test "$ac_cv_have_daylight" = "yes"
1382 AC_DEFINE(HAVE_DAYLIGHT, 1, [Define if you have the daylight variable])
1385 dnl *** check for the need to define platform-specific symbols
1388 *i[[3456789]]86*) WINE_CHECK_DEFINE([__i386__]) ;;
1389 *alpha*) WINE_CHECK_DEFINE([__ALPHA__]) ;;
1390 *sparc*) WINE_CHECK_DEFINE([__sparc__]) ;;
1391 *powerpc*) WINE_CHECK_DEFINE([__powerpc__]) ;;
1394 case $host_vendor in
1395 *sun*) WINE_CHECK_DEFINE([__sun__]) ;;
1398 dnl **** Generate output files ****
1400 AH_TOP([#define __WINE_CONFIG_H])
1402 WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1403 WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1404 WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
1405 WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
1406 WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
1407 WINE_CONFIG_EXTRA_DIR(include/wine)
1409 MAKE_RULES=Make.rules
1410 AC_SUBST_FILE(MAKE_RULES)
1412 MAKE_DLL_RULES=dlls/Makedll.rules
1413 AC_SUBST_FILE(MAKE_DLL_RULES)
1415 MAKE_TEST_RULES=dlls/Maketest.rules
1416 AC_SUBST_FILE(MAKE_TEST_RULES)
1418 MAKE_LIB_RULES=libs/Makelib.rules
1419 AC_SUBST_FILE(MAKE_LIB_RULES)
1421 MAKE_PROG_RULES=programs/Makeprog.rules
1422 AC_SUBST_FILE(MAKE_PROG_RULES)
1429 programs/Makeprog.rules
1432 dlls/activeds/Makefile
1433 dlls/advapi32/Makefile
1434 dlls/advapi32/tests/Makefile
1435 dlls/advpack/Makefile
1436 dlls/advpack/tests/Makefile
1437 dlls/amstream/Makefile
1439 dlls/avicap32/Makefile
1440 dlls/avifil32/Makefile
1441 dlls/cabinet/Makefile
1442 dlls/capi2032/Makefile
1444 dlls/cfgmgr32/Makefile
1445 dlls/comcat/Makefile
1446 dlls/comctl32/Makefile
1447 dlls/comctl32/tests/Makefile
1448 dlls/commdlg/Makefile
1449 dlls/crtdll/Makefile
1450 dlls/crypt32/Makefile
1451 dlls/crypt32/tests/Makefile
1452 dlls/cryptdll/Makefile
1459 dlls/d3dxof/Makefile
1460 dlls/dbghelp/Makefile
1461 dlls/dciman32/Makefile
1463 dlls/ddraw/tests/Makefile
1464 dlls/devenum/Makefile
1465 dlls/dinput/Makefile
1466 dlls/dinput/tests/Makefile
1467 dlls/dinput8/Makefile
1468 dlls/dmband/Makefile
1469 dlls/dmcompos/Makefile
1471 dlls/dmloader/Makefile
1472 dlls/dmscript/Makefile
1473 dlls/dmstyle/Makefile
1474 dlls/dmsynth/Makefile
1475 dlls/dmusic/Makefile
1476 dlls/dmusic32/Makefile
1478 dlls/dplayx/Makefile
1480 dlls/dpnhpast/Makefile
1481 dlls/dsound/Makefile
1482 dlls/dsound/tests/Makefile
1483 dlls/dswave/Makefile
1484 dlls/dxdiagn/Makefile
1485 dlls/dxerr8/Makefile
1486 dlls/dxerr9/Makefile
1487 dlls/dxguid/Makefile
1489 dlls/gdi/tests/Makefile
1491 dlls/glut32/Makefile
1492 dlls/hhctrl.ocx/Makefile
1493 dlls/iccvid/Makefile
1495 dlls/ifsmgr.vxd/Makefile
1496 dlls/imagehlp/Makefile
1498 dlls/iphlpapi/Makefile
1499 dlls/iphlpapi/tests/Makefile
1501 dlls/kernel/Makefile
1502 dlls/kernel/tests/Makefile
1503 dlls/lzexpand/Makefile
1504 dlls/lzexpand/tests/Makefile
1505 dlls/mapi32/Makefile
1506 dlls/mapi32/tests/Makefile
1507 dlls/midimap/Makefile
1509 dlls/mlang/tests/Makefile
1510 dlls/mmdevldr.vxd/Makefile
1511 dlls/monodebg.vxd/Makefile
1514 dlls/msacm/imaadp32/Makefile
1515 dlls/msacm/msadp32/Makefile
1516 dlls/msacm/msg711/Makefile
1517 dlls/msacm/winemp3/Makefile
1518 dlls/msacm/tests/Makefile
1520 dlls/mscms/tests/Makefile
1522 dlls/mshtml/Makefile
1523 dlls/mshtml/tests/Makefile
1525 dlls/msi/tests/Makefile
1526 dlls/msimg32/Makefile
1527 dlls/msisys/Makefile
1528 dlls/msnet32/Makefile
1529 dlls/msrle32/Makefile
1530 dlls/msvcrt/Makefile
1531 dlls/msvcrt/tests/Makefile
1532 dlls/msvcrt20/Makefile
1533 dlls/msvcrt40/Makefile
1534 dlls/msvcrtd/Makefile
1535 dlls/msvcrtd/tests/Makefile
1536 dlls/msvidc32/Makefile
1537 dlls/msvideo/Makefile
1538 dlls/mswsock/Makefile
1539 dlls/msxml3/Makefile
1540 dlls/netapi32/Makefile
1541 dlls/netapi32/tests/Makefile
1542 dlls/newdev/Makefile
1544 dlls/ntdll/tests/Makefile
1545 dlls/objsel/Makefile
1546 dlls/odbc32/Makefile
1547 dlls/odbccp32/Makefile
1549 dlls/ole32/tests/Makefile
1550 dlls/oleacc/Makefile
1551 dlls/oleaut32/Makefile
1552 dlls/oleaut32/tests/Makefile
1553 dlls/olecli/Makefile
1554 dlls/oledlg/Makefile
1555 dlls/olepro32/Makefile
1556 dlls/olesvr/Makefile
1557 dlls/opengl32/Makefile
1558 dlls/powrprof/Makefile
1560 dlls/psapi/tests/Makefile
1562 dlls/quartz/Makefile
1563 dlls/quartz/tests/Makefile
1564 dlls/rasapi32/Makefile
1565 dlls/riched20/Makefile
1566 dlls/richedit/Makefile
1567 dlls/rpcrt4/Makefile
1568 dlls/rpcrt4/tests/Makefile
1569 dlls/rsabase/Makefile
1570 dlls/rsabase/tests/Makefile
1571 dlls/rsaenh/Makefile
1572 dlls/rsaenh/tests/Makefile
1573 dlls/secur32/Makefile
1574 dlls/secur32/tests/Makefile
1575 dlls/sensapi/Makefile
1576 dlls/serialui/Makefile
1577 dlls/setupapi/Makefile
1578 dlls/shdocvw/Makefile
1579 dlls/shell32/Makefile
1580 dlls/shell32/tests/Makefile
1581 dlls/shfolder/Makefile
1582 dlls/shlwapi/Makefile
1583 dlls/shlwapi/tests/Makefile
1584 dlls/snmpapi/Makefile
1585 dlls/stdole2.tlb/Makefile
1586 dlls/stdole32.tlb/Makefile
1588 dlls/strmiids/Makefile
1589 dlls/tapi32/Makefile
1590 dlls/ttydrv/Makefile
1592 dlls/unicows/Makefile
1594 dlls/urlmon/Makefile
1595 dlls/urlmon/tests/Makefile
1597 dlls/user/tests/Makefile
1600 dlls/uxtheme/Makefile
1601 dlls/vdhcp.vxd/Makefile
1602 dlls/vdmdbg/Makefile
1603 dlls/version/Makefile
1604 dlls/version/tests/Makefile
1605 dlls/vmm.vxd/Makefile
1606 dlls/vnbt.vxd/Makefile
1607 dlls/vnetbios.vxd/Makefile
1608 dlls/vtdapi.vxd/Makefile
1609 dlls/vwin32.vxd/Makefile
1610 dlls/win32s/Makefile
1611 dlls/winaspi/Makefile
1612 dlls/wined3d/Makefile
1613 dlls/winedos/Makefile
1614 dlls/wineps/Makefile
1615 dlls/wininet/Makefile
1616 dlls/wininet/tests/Makefile
1618 dlls/winmm/joystick/Makefile
1619 dlls/winmm/mcianim/Makefile
1620 dlls/winmm/mciavi/Makefile
1621 dlls/mcicda/Makefile
1622 dlls/winmm/mciseq/Makefile
1623 dlls/winmm/mciwave/Makefile
1624 dlls/winmm/tests/Makefile
1625 dlls/winmm/wavemap/Makefile
1626 dlls/winmm/winealsa/Makefile
1627 dlls/winmm/winearts/Makefile
1628 dlls/winmm/wineaudioio/Makefile
1629 dlls/winmm/wineesd/Makefile
1630 dlls/winmm/winejack/Makefile
1631 dlls/winmm/winenas/Makefile
1632 dlls/winmm/wineoss/Makefile
1633 dlls/winnls/Makefile
1634 dlls/winsock/Makefile
1635 dlls/winsock/tests/Makefile
1636 dlls/winspool/Makefile
1637 dlls/winspool/tests/Makefile
1638 dlls/wintab32/Makefile
1639 dlls/wintrust/Makefile
1640 dlls/wldap32/Makefile
1642 dlls/wsock32/Makefile
1643 dlls/wtsapi32/Makefile
1644 dlls/x11drv/Makefile
1645 documentation/Makefile
1650 libs/unicode/Makefile
1655 programs/avitools/Makefile
1656 programs/clock/Makefile
1657 programs/cmdlgtst/Makefile
1658 programs/control/Makefile
1659 programs/expand/Makefile
1660 programs/hh/Makefile
1661 programs/msiexec/Makefile
1662 programs/notepad/Makefile
1663 programs/progman/Makefile
1664 programs/regedit/Makefile
1665 programs/regsvr32/Makefile
1666 programs/rpcss/Makefile
1667 programs/rundll32/Makefile
1668 programs/start/Makefile
1669 programs/taskmgr/Makefile
1670 programs/uninstaller/Makefile
1671 programs/view/Makefile
1672 programs/wcmd/Makefile
1673 programs/wineboot/Makefile
1674 programs/winebrowser/Makefile
1675 programs/winecfg/Makefile
1676 programs/wineconsole/Makefile
1677 programs/winedbg/Makefile
1678 programs/winefile/Makefile
1679 programs/winemenubuilder/Makefile
1680 programs/winemine/Makefile
1681 programs/winepath/Makefile
1682 programs/winetest/Makefile
1683 programs/winevdm/Makefile
1684 programs/winhelp/Makefile
1685 programs/winver/Makefile
1689 tools/winapi/Makefile
1690 tools/winebuild/Makefile
1691 tools/winedump/Makefile
1692 tools/winegcc/Makefile
1694 tools/wrc/Makefile])
1698 if test "$have_x" = "no"
1701 echo "*** Warning: X development files not found. Wine will be built without"
1702 echo "*** X support, which currently does not work, and would probably not be"
1703 echo "*** what you want anyway. You will need to install devel packages of"
1704 echo "*** Xlib/Xfree86 at the very least."
1707 if test "$wine_cv_opengl_version_OK" = "no"
1710 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1711 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1714 if test "$wine_cv_msg_freetype" = "yes"
1717 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
1718 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1719 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1720 echo "*** enable Wine to use TrueType fonts."
1723 if test -z "$ALSALIBS" -a \
1724 -z "$ARTSC_LIBS" -a \
1725 -z "$AUDIOIOLIBS" -a \
1728 -z "$ac_cv_lib_soname_jack" -a \
1729 "$ac_cv_header_sys_soundcard_h" != "yes" -a \
1730 "$ac_cv_header_machine_soundcard_h" != "yes" -a \
1731 "$ac_cv_header_soundcard_h" != "yes"
1733 echo "*** No sound system was found. Windows applications will be silent."
1734 echo "*** The currently supported sound systems are:"
1735 echo "*** ALSA, ARTS, EsounD, AudioIO, Jack, NAS and OSS"
1739 echo "Configure finished. Do '${ac_make} depend && ${ac_make}' to compile Wine."
1742 dnl Local Variables:
1743 dnl comment-start: "dnl "
1745 dnl comment-start-skip: "\\bdnl\\b\\s *"
1746 dnl compile-command: "autoconf"