GetDlgItemText should always try to NULL terminate the string.
[wine/wine64.git] / configure.ac
blob175eadd505d525989fbd23772507a710c3a9fd90
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]))
7 AC_PREREQ(2.53)
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>]))
24 AC_SUBST(DLLDEFS,"")
25 if test "x$enable_debug" = "xno"
26 then
27   DLLDEFS="$DLLDEFS -DWINE_NO_DEBUG_MSGS"
29 if test "x$enable_trace" = "xno" -o "x$enable_debug" = "xno"
30 then
31   DLLDEFS="$DLLDEFS -DWINE_NO_TRACE_MSGS"
34 AC_CANONICAL_HOST
35 case $host in
36   x86_64*linux*)
37     if test "x$enable_win64" != "xyes"
38     then
39       test -n "$CC" || CC="gcc -m32"
40       test -n "$LD" || LD="ld -m elf_i386"
41       test -n "$AS" || AS="as --32"
42       host_cpu="i386"
43     fi
44     ;;
45 esac
47 dnl enable_win16 defaults to yes on x86, to no on other CPUs
48 case $host_cpu in
49   *i[[3456789]]86*)
50     if test "x$enable_win16" != "xno" 
51     then
52       enable_win16="yes"
53     fi
54     ;;
55 esac
56    
57 AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)")
58 AC_SUBST(WIN16_INSTALL,"\$(WIN16_INSTALL)")
59 if test "x$enable_win16" != "xyes"
60 then
61   WIN16_FILES=""
62   WIN16_INSTALL=""
65 dnl **** Check for some programs ****
67 AC_PROG_MAKE_SET
68 AC_PROG_CC
69 AC_PROG_CXX
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.])
77      else
78        wine_cv_toolsdir="\$(TOPOBJDIR)"
79      fi
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" ;;
84      esac
85    else
86      AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
87    fi])
88 AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
90 AC_PATH_XTRA
91 AC_PROG_LEX
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"
97 then
98   AC_MSG_ERROR([no suitable lex found. Please install the 'flex' package.])
101 dnl Check for bison
102 AC_CHECK_PROGS(BISON,bison,none)
103 if test "$BISON" = "none"
104 then
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)
111 AC_PROG_RANLIB
112 AC_CHECK_TOOL(STRIP,strip,strip)
113 AC_CHECK_TOOL(WINDRES,windres,false)
114 AC_PROG_LN_S
115 WINE_PROG_LN
116 AC_PROG_EGREP
117 AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
118 AC_PROG_INSTALL
119 dnl Prepend src dir to install path dir if it's a relative path
120 case "$INSTALL" in
121   [[\\/$]]* | ?:[[\\/]]* ) ;;
122   *)  INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;;
123 esac
125 dnl Check for lint
126 AC_CHECK_PROGS(LINT, lclint lint)
127 if test "$LINT" = "lint"
128 then
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'
132 AC_SUBST(LINT)
133 AC_SUBST(LINTFLAGS)
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 -lw for Solaris
145 AC_CHECK_FUNCS(iswalnum,,AC_CHECK_LIB(w,iswalnum))
146 dnl Check for -lnsl for Solaris
147 AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
148 dnl Check for -lsocket for Solaris
149 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
150 dnl Check for -lresolv for Solaris
151 AC_CHECK_FUNCS(inet_aton,,AC_CHECK_LIB(resolv,inet_aton))
152 dnl Check for -lxpg4 for FreeBSD
153 AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
154 dnl Check for -lpoll for Mac OS X/Darwin
155 AC_CHECK_LIB(poll,poll)
156 dnl Check for -lresolv for Mac OS X/Darwin
157 AC_CHECK_LIB(resolv,res_9_init)
158 dnl Check for -lpthread
159 AC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread"))
161 AC_SUBST(XLIB)
162 AC_SUBST(XFILES)
163 XFILES=""
164 AC_SUBST(OPENGLFILES)
165 OPENGLFILES=""
166 AC_SUBST(GLU32FILES)
167 GLU32FILES=""
168 AC_SUBST(OPENGL_LIBS)
169 OPENGL_LIBS=""
171 dnl **** Check for header files ****
173 AC_CHECK_HEADERS(\
174         arpa/inet.h \
175         arpa/nameser.h \
176         asm/types.h \
177         cups/cups.h \
178         direct.h \
179         elf.h \
180         float.h \
181         fontconfig/fontconfig.h \
182         getopt.h \
183         gif_lib.h \
184         ieeefp.h \
185         io.h \
186         jack/jack.h \
187         jpeglib.h \
188         lcms/lcms.h \
189         lcms.h \
190         link.h \
191         linux/cdrom.h \
192         linux/compiler.h \
193         linux/hdreg.h \
194         linux/input.h \
195         linux/ioctl.h \
196         linux/joystick.h \
197         linux/major.h \
198         linux/param.h \
199         linux/serial.h \
200         linux/ucdrom.h \
201         mach/machine.h \
202         machine/cpu.h \
203         machine/limits.h \
204         mntent.h \
205         netdb.h \
206         netinet/in.h \
207         netinet/in_systm.h \
208         netinet/tcp.h \
209         netinet/tcp_fsm.h \
210         openssl/ssl.h \
211         poll.h \
212         process.h \
213         pthread.h \
214         pwd.h \
215         regex.h \
216         sched.h \
217         scsi/sg.h \
218         scsi/scsi.h \
219         scsi/scsi_ioctl.h \
220         stdint.h \
221         strings.h \
222         sys/cdio.h \
223         sys/elf32.h \
224         sys/errno.h \
225         sys/epoll.h \
226         sys/exec_elf.h \
227         sys/filio.h \
228         sys/ioctl.h \
229         sys/ipc.h \
230         sys/link.h \
231         sys/lwp.h \
232         sys/mman.h \
233         sys/modem.h \
234         sys/msg.h \
235         sys/param.h \
236         sys/poll.h \
237         sys/ptrace.h \
238         sys/reg.h \
239         sys/scsiio.h \
240         sys/shm.h \
241         sys/signal.h \
242         sys/socket.h \
243         sys/sockio.h \
244         sys/statfs.h \
245         sys/statvfs.h \
246         sys/strtio.h \
247         sys/syscall.h \
248         sys/sysctl.h \
249         sys/time.h \
250         sys/times.h \
251         sys/uio.h \
252         sys/un.h \
253         sys/vfs.h \
254         sys/vm86.h \
255         sys/wait.h \
256         syscall.h \
257         termios.h \
258         unistd.h \
259         utime.h \
260         valgrind/memcheck.h
262 AC_HEADER_STAT()
264 dnl **** Check for X11 ****
266 if test "$have_x" = "yes"
267 then
268     XLIB="-lXext -lX11"
269     ac_save_CPPFLAGS="$CPPFLAGS"
270     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
272     dnl *** All of the following tests require X11/Xlib.h
273     AC_CHECK_HEADERS(X11/Xlib.h,
274       [
275         AC_CHECK_HEADERS([X11/XKBlib.h \
276                           X11/Xutil.h \
277                           X11/extensions/shape.h \
278                           X11/extensions/XInput.h \
279                           X11/extensions/XShm.h \
280                           X11/extensions/Xrandr.h \
281                           X11/extensions/Xrender.h \
282                           X11/extensions/xf86dga.h \
283                           X11/extensions/xf86vmode.h],,,
284                          [#include <X11/Xlib.h>
285                           #ifdef HAVE_X11_XUTIL_H
286                           # include <X11/Xutil.h>
287                           #endif])
289         dnl *** Check for X keyboard extension
290         if test "$ac_cv_header_X11_XKBlib_h" = "yes"
291         then
292               AC_CHECK_LIB(X11, XkbQueryExtension,
293               AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
294               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
295         fi
297         dnl *** Check for X Shm extension
298         if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
299         then
300               AC_CHECK_LIB(Xext, XShmQueryExtension,
301               AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
302               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
303         fi
305         dnl *** Check for X shape extension
306         if test "$ac_cv_header_X11_extensions_shape_h" = "yes"
307         then
308               AC_CHECK_LIB(Xext,XShapeQueryExtension,
309               AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
310               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
311         fi
313         dnl *** Check for XFree86 DGA / DGA 2.0 extension
314         if test "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
315         then
316               AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
317                 [ AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
318                             [Define if you have the Xxf86dga library version 2])
319                   X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
320                 ],,
321                 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
322         fi
324         dnl *** Check for XFree86 VMODE extension
325         if test "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
326         then
327                 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
328                   [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
329                      X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
330                   ],,
331                   $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
332         fi
334         dnl *** Check for X RandR extension
335         if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
336         then
337                 AC_TRY_COMPILE([#include <X11/Xlib.h>
338 #include <X11/extensions/Xrandr.h>],[static typeof(XRRSetScreenConfigAndRate) * func;],
339                   [AC_DEFINE(HAVE_LIBXRANDR, 1, [Define if you have the Xrandr library])])
340         fi
342         dnl *** Check for Transform functions in Xrender
343         if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
344         then
345               AC_CHECK_LIB(Xrender, XRenderSetPictureTransform,
346                 [AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
347                  [Define if Xrender has the XRenderSetPictureTransform function])],,
348                 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
349         fi
350       ]
351     ) dnl *** End of X11/Xlib.h check
353     dnl Check for the presence of OpenGL
354     if test "x$with_opengl" != "xno"
355     then
356         if test -f /usr/X11R6/lib/libGL.a -a ! -f /usr/X11R6/lib/libGL.so -a ! -f /usr/X11R6/lib/libGL.dylib
357         then 
358             AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
359 This prevents linking to OpenGL. Delete the file and restart configure.])
360         fi
362         AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
363         if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
364         then
365             AC_CHECK_HEADERS(GL/glext.h,,,[#include <GL/glx.h>])
366             dnl Check for some problems due to old Mesa versions
367             AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
368               AC_TRY_COMPILE(
369                 [#include <GL/gl.h>],
370                 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
371                 [wine_cv_opengl_version_OK="yes"],
372                 [wine_cv_opengl_version_OK="no"]
373               )
374             )
376             if test "$wine_cv_opengl_version_OK" = "yes"
377             then
378                 dnl Check for the presence of the library
379                 AC_CHECK_LIB(GL,glXCreateContext,
380                              OPENGL_LIBS="-lGL"
381                              ,,
382                              $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
384                 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
385                 then
386                         OPENGLFILES='$(OPENGLFILES)'
387                         AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
388                 fi
389                 dnl Check for GLU32 library.
390                 AC_CHECK_LIB(GLU,gluLookAt,
391                              [OPENGL_LIBS="$OPENGL_LIBS -lGLU"
392                              GLU32FILES='$(GLU32FILES)']
393                              ,,
394                              $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
395                 )
396              fi
398              dnl Check for glut32 library.
399              AC_CHECK_LIB(glut,glutMainLoop,
400                        [AC_SUBST(GLUT_LIBS,"-lglut -lXmu -lXi")
401                         AC_SUBST(GLUT32FILES,'$(GLUT32FILES)')],,
402                         $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXmu -lXi -lX11 $X_EXTRA_LIBS)
403          fi
404     fi
406     dnl **** Check for NAS ****
407     AC_SUBST(NASLIBS,"")
408     AC_CHECK_HEADERS(audio/audiolib.h,
409          [AC_CHECK_HEADERS(audio/soundlib.h,,,[#include <audio/audiolib.h>])
410           AC_CHECK_LIB(audio,AuCreateFlow,
411                        [AC_DEFINE(HAVE_NAS,1,[Define if you have NAS including devel headers])
412                         NASLIBS="-laudio -lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS"],,
413                        [-lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
415     CPPFLAGS="$ac_save_CPPFLAGS"
416     XFILES='$(XFILES)'
417 else
418     XLIB=""
419     X_CFLAGS=""
420     X_LIBS=""
423 dnl **** Check which curses lib to use ***
424 CURSESLIBS=""
425 if test "x$with_curses" != "xno"
426 then
427     AC_CHECK_HEADERS(ncurses.h,
428         [AC_CHECK_LIB(ncurses,waddch,
429             [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
430              CURSESLIBS="-lncurses"],
431              [AC_CHECK_HEADERS(curses.h,
432                  [AC_CHECK_LIB(curses,waddch,
433                      [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
434                       CURSESLIBS="-lcurses"])])])])
436 AC_SUBST(CURSESLIBS)
438 dnl **** Check for SANE ****
439 AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
440 if test "$sane_devel" = "no"
441 then
442     SANELIBS=""
443     SANEINCL=""
444 else
445     SANELIBS="`$sane_devel --libs`"
446     SANEINCL="`$sane_devel --cflags`"
447     ac_save_CPPFLAGS="$CPPFLAGS"
448     ac_save_LIBS="$LIBS"
449     CPPFLAGS="$CPPFLAGS $SANEINCL"
450     LIBS="$LIBS $SANELIBS"
451     AC_CHECK_HEADER(sane/sane.h,
452                     [AC_CHECK_LIB(sane,sane_open,
453                                   [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
454                                   [SANELIBS=""
455                                   SANEINCL=""])],
456                     [SANELIBS=""
457                     SANEINCL=""])
458     LIBS="$ac_save_LIBS"
459     CPPFLAGS="$ac_save_CPPFLAGS"
461 AC_SUBST(SANELIBS)
462 AC_SUBST(SANEINCL)
464 dnl **** Check for the ICU library ****
465 AC_CHECK_HEADERS(unicode/ubidi.h)
466 if test "$ac_cv_header_unicode_ubidi_h" = "yes"
467 then
468     saved_libs="$LIBS"
469     ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}"
470     ICUUC_LIB="${ICUUC_LIB-$ICU_LIB_DIR/libsicuuc.a}"
471     ICUDATA_LIB="${ICUDATA_LIB-$ICU_LIB_DIR/libsicudata.a}"
472     AC_MSG_CHECKING(whether can link with ICU libraries $ICUUC_LIB and $ICUDATA_LIB)
473     LIBS="$LIBS $ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s"
474     AC_TRY_LINK([#include <unicode/ubidi.h>],[ubidi_open()],
475                 [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed])
476                  AC_SUBST(ICULIBS,"$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s")
477                  AC_MSG_RESULT(yes)],
478                 [AC_MSG_RESULT(no)])
479     LIBS="$saved_libs"
482 dnl **** Check for FreeType 2 ****
483 AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
484 if test "$ft_lib" = "no"
485 then
486     FREETYPELIBS=""
487     FREETYPEINCL=""
488     wine_cv_msg_freetype=no
489 else
490     AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
491     if test "$ft_devel" = "no"
492     then
493         AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
494         if test "$ft_devel2" = "freetype2-config"
495         then
496                 ft_devel=$ft_devel2
497         fi
498     fi
499     if test "$ft_devel" = "no"
500     then
501         FREETYPELIBS=""
502         FREETYPEINCL=""
503         wine_cv_msg_freetype=yes
504     else
505         FREETYPELIBS=`$ft_devel --libs`
506         FREETYPEINCL=`$ft_devel --cflags`
507         ac_save_CPPFLAGS="$CPPFLAGS"
508         CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
509         AC_CHECK_HEADERS(ft2build.h \
510                          freetype/freetype.h \
511                          freetype/ftglyph.h \
512                          freetype/tttables.h \
513                          freetype/ftnames.h \
514                          freetype/ftsnames.h \
515                          freetype/ttnameid.h \
516                          freetype/ftoutln.h \
517                          freetype/ftwinfnt.h \
518                          freetype/internal/sfnt.h,,,
519                          [#if HAVE_FT2BUILD_H
520                           #include <ft2build.h>
521                           #endif])
522         AC_TRY_CPP([#include <ft2build.h>
523                     #include <freetype/fttrigon.h>],
524                     [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
525           [Define if you have the <freetype/fttrigon.h> header file.])
526                     wine_cv_fttrigon=yes],
527                     wine_cv_fttrigon=no)
528         CPPFLAGS="$ac_save_CPPFLAGS"
529         dnl Check that we have at least freetype/freetype.h
530         if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
531         then
532             AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
533             wine_cv_msg_freetype=no
534         else
535             FREETYPELIBS=""
536             FREETYPEINCL=""
537             wine_cv_msg_freetype=yes
538         fi
539     fi
541 AC_SUBST(FREETYPELIBS)
542 AC_SUBST(FREETYPEINCL)
544 dnl Only build the fonts dir if we have both freetype and fontforge
545 if test "$FONTFORGE" != "false" -a -n "$FREETYPELIBS"
546 then
547   AC_SUBST(FONTSSUBDIRS,"fonts")
550 dnl **** Check for parport (currently Linux only) ****
551 AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
552  AC_TRY_COMPILE(
553    [#include <linux/ppdev.h>],
554    [ioctl (1,PPCLAIM,0)],
555    [ac_cv_c_ppdev="yes"],
556    [ac_cv_c_ppdev="no"])
558 if test "$ac_cv_c_ppdev" = "yes"
559 then
560     AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
563 dnl **** Check for va_copy ****
564 AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
565  AC_TRY_LINK(
566    [#include <stdarg.h>],
567    [va_list ap1, ap2;
568     va_copy(ap1,ap2);
569    ],
570    [ac_cv_c_va_copy="yes"],
571    [ac_cv_c_va_copy="no"])
573 if test "$ac_cv_c_va_copy" = "yes"
574 then
575     AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy])
577 AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
578  AC_TRY_LINK(
579    [#include <stdarg.h>],
580    [va_list ap1, ap2;
581     __va_copy(ap1,ap2);
582    ],
583    [ac_cv_c___va_copy="yes"],
584    [ac_cv_c___va_copy="no"])
586 if test "$ac_cv_c___va_copy" = "yes"
587 then
588     AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
591 dnl **** Check for sigsetjmp ****
592 AC_CACHE_CHECK([for sigsetjmp], ac_cv_c_sigsetjmp,
593  AC_TRY_LINK(
594    [#include <setjmp.h>],
595    [sigjmp_buf buf;
596     sigsetjmp( buf, 1 );
597     siglongjmp( buf, 1 );],
598    [ac_cv_c_sigsetjmp="yes"],
599    [ac_cv_c_sigsetjmp="no"])
601 if test "$ac_cv_c_sigsetjmp" = "yes"
602 then
603     AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have the sigsetjmp (and siglongjmp) function])
606 dnl **** Check for pthread_rwlock_t ****
607 AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
608 #include <pthread.h>])
610 dnl **** Check for pthread functions ****
611 ac_save_LIBS="$LIBS"
612 LIBS="$LIBS $LIBPTHREAD"
613 AC_CHECK_FUNCS(\
614         pthread_getattr_np \
615         pthread_get_stackaddr_np \
616         pthread_get_stacksize_np \
618 LIBS="$ac_save_LIBS"
620 dnl **** Check for Open Sound System ****
621 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
623 AC_CACHE_CHECK([for Open Sound System],
624         ac_cv_c_opensoundsystem,
625         AC_TRY_COMPILE([
626         #if defined(HAVE_SYS_SOUNDCARD_H)
627                 #include <sys/soundcard.h>
628         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
629                 #include <machine/soundcard.h>
630         #elif defined(HAVE_SOUNDCARD_H)
631                 #include <soundcard.h>
632         #endif
633         ],[
635 /* check for one of the Open Sound System specific SNDCTL_ defines */
636 #if !defined(SNDCTL_DSP_STEREO)
637 #error No open sound system
638 #endif
639 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
641 if test "$ac_cv_c_opensoundsystem" = "yes"
642 then
643     AC_DEFINE(HAVE_OSS, 1, [Define if you have the Open Sound system])
646 AC_CACHE_CHECK([for Open Sound System/MIDI interface],
647         ac_cv_c_opensoundsystem_midi,
648         AC_TRY_COMPILE([
649         #if defined(HAVE_SYS_SOUNDCARD_H)
650                 #include <sys/soundcard.h>
651         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
652                 #include <machine/soundcard.h>
653         #elif defined(HAVE_SOUNDCARD_H)
654                 #include <soundcard.h>
655         #endif
656         ],[
658 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
659 #if !defined(SNDCTL_SEQ_SYNC)
660 #error No open sound system MIDI interface
661 #endif
662 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
664 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
665 then
666     AC_DEFINE(HAVE_OSS_MIDI, 1, [Define if you have the Open Sound system (MIDI interface)])
669 dnl **** Check for aRts Sound Server ****
670 AC_PATH_PROG(ARTSCCONFIG, artsc-config)
671 if test x$ARTSCCONFIG != x -a x$ARTSCCONFIG != x'"$ARTSCCONFIG"';
672 then
673     ARTSC_CFLAGS=""
674     for i in `$ARTSCCONFIG --cflags`
675     do
676       case "$i" in
677         -I*) ARTSC_CFLAGS="$ARTSC_CFLAGS $i";;
678       esac
679     done
680     ARTSC_LIBS=`$ARTSCCONFIG --libs`
681     save_CFLAGS="$CFLAGS"
682     CFLAGS="$CFLAGS $ARTSC_CFLAGS"
683     AC_CHECK_LIB(artsc,arts_init,
684         [AC_TRY_COMPILE([#include <artsc.h>],[arts_stream_t stream;],
685             [AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
686             AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
687             AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])])],,
688             $ARTSC_LIBS)
689     CFLAGS="$save_CFLAGS"
692 dnl **** Check for ALSA 1.x ****
693 AC_SUBST(ALSALIBS,"")
694 AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h, break)
695 if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
696 then
697     AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access,
698         [AC_TRY_COMPILE([#ifdef HAVE_ALSA_ASOUNDLIB_H
699 #include <alsa/asoundlib.h>
700 #elif defined(HAVE_SYS_ASOUNDLIB_H)
701 #include <sys/asoundlib.h>
702 #endif],
703                         [int ret = snd_pcm_hw_params_get_access(NULL, NULL)],
704                         [AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA 1.x including devel headers])
705                          ALSALIBS="-lasound"])])
708 dnl **** Check for libaudioio (which can be used to get solaris audio support) ****
710 AC_SUBST(AUDIOIOLIBS,"")
711 AC_CHECK_HEADERS(libaudioio.h,
712     [AC_CHECK_LIB(audioio,AudioIOGetVersion,
713                   [AUDIOIOLIBS="-laudioio"
714                    AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])])
716 dnl **** Check for capi4linux ****
718 AC_CHECK_HEADERS(capi20.h,[
719         AC_CHECK_HEADERS(linux/capi.h,[
720                 AC_CHECK_LIB(capi20,capi20_register,[
721                         AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])
722                 ])
723         ])
726 dnl **** Check for broken glibc mmap64 ****
728 AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
729         AC_TRY_RUN([
730                 #define _FILE_OFFSET_BITS 64
731                 #include <stdio.h>
732                 #include <unistd.h>
733                 #include <fcntl.h>
734                 #include <sys/mman.h>
735                 #include <errno.h>
737                 int main(int argc,char **argv) {
738                         int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
739                         if (fd == -1) exit(1);
741                         unlink("conftest.map");
743                         write(fd,"test",4);
745                         if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
746                             (errno == EINVAL)
747                         ) {
748                                 exit(1);
749                         }
750                         close(fd);
751                         fprintf(stderr,"success!\n");
752                         exit(0);
753                 }
755         ],
756     ac_cv_mmap64_works="yes",
757     ac_cv_mmap64_works="no",
758     ac_cv_mmap64_works="no") )
760 if test "$ac_cv_mmap64_works" = "yes"
761 then
762     AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
765 dnl **** Check for gcc specific options ****
767 AC_SUBST(EXTRACFLAGS,"")
768 if test "x${GCC}" = "xyes"
769 then
770   EXTRACFLAGS="-Wall -pipe"
772   dnl Check for strength-reduce bug
773   AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
774                   AC_TRY_RUN([
775 int     L[[4]] = {0,1,2,3};
776 int main(void) {
777   static int Array[[3]];
778   unsigned int B = 3;
779   int i;
780   for(i=0; i<B; i++) Array[[i]] = i - 3;
781   for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
782   L[[i]] = 4;
784   exit( Array[[1]] != -2 || L[[2]] != 3);
786     ac_cv_c_gcc_strength_bug="no",
787     ac_cv_c_gcc_strength_bug="yes",
788     ac_cv_c_gcc_strength_bug="yes") )
789   if test "$ac_cv_c_gcc_strength_bug" = "yes"
790   then
791     EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
792   fi
794   dnl Check for -fshort-wchar
795   AC_CACHE_CHECK([for gcc -fshort-wchar support], ac_cv_c_gcc_fshort_wchar,
796       [WINE_TRY_CFLAGS([-fshort-wchar],
797                       ac_cv_c_gcc_fshort_wchar="yes",ac_cv_c_gcc_fshort_wchar="no")])
798   if test "$ac_cv_c_gcc_fshort_wchar" = "yes"
799   then
800       AC_DEFINE(CC_FLAG_SHORT_WCHAR, "-fshort-wchar", [Specifies the compiler flag that forces a short wchar_t])
801   fi
803   dnl Check for -mpreferred-stack-boundary
804   AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support], ac_cv_c_gcc_stack_boundary,
805       [WINE_TRY_CFLAGS([-mpreferred-stack-boundary=2],
806                       ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
807   if test "$ac_cv_c_gcc_stack_boundary" = "yes"
808   then
809     EXTRACFLAGS="$EXTRACFLAGS -mpreferred-stack-boundary=2"
810   fi
812   dnl Check for -fno-strict-aliasing
813   AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing,
814       [WINE_TRY_CFLAGS([-fno-strict-aliasing],
815                       ac_cv_c_gcc_no_strict_aliasing="yes",ac_cv_c_gcc_no_strict_aliasing="no")])
816   if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes"
817   then
818     EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
819   fi
821   dnl Check for -gstabs+ option
822   AC_CACHE_CHECK([for gcc -gstabs+ support], ac_cv_c_gcc_gstabs,
823       [WINE_TRY_CFLAGS([-gstabs+],ac_cv_c_gcc_gstabs="yes", ac_cv_c_gcc_gstabs="no")])
824   if test "$ac_cv_c_gcc_gstabs" = "yes"
825   then
826     EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
827   fi
829   dnl Check for noisy string.h
830   saved_CFLAGS="$CFLAGS"
831   CFLAGS="$CFLAGS -Wpointer-arith -Werror"
832   AC_CACHE_CHECK([for broken string.h that generates warnings], ac_cv_c_string_h_warnings,
833       AC_TRY_COMPILE([#include <string.h>],[],
834                      [ac_cv_c_string_h_warnings=no],[ac_cv_c_string_h_warnings=yes]))
835   CFLAGS="$saved_CFLAGS"
836   if test "$ac_cv_c_string_h_warnings" = "no"
837   then
838     EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
839   fi
842 dnl **** Check how to define a function in assembly code ****
844 AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
845   WINE_TRY_ASM_LINK(
846       ["\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0"],,,
847       ac_cv_asm_func_def=".def",
848     [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0"],,,
849       ac_cv_asm_func_def=".type @function",
850     [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0"],,,
851       ac_cv_asm_func_def=".type 2",
852       ac_cv_asm_func_def="unknown")])]))
854 AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function directive])
855 case "$ac_cv_asm_func_def" in
856   ".def")
857      AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"]) ;;
858   ".type @function")
859      AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"]) ;;
860   ".type 2")
861      AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"]) ;;
862   *)
863      AC_DEFINE([__ASM_FUNC(name)], [""]) ;;
864 esac
866 dnl **** Check for underscore on external symbols ****
868 AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
869     WINE_TRY_ASM_LINK([".globl _ac_test\n_ac_test:\t.long 0"],
870                       [extern int ac_test;],
871                       [if (ac_test) return 1],
872                       ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
874 AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
875 if test "$ac_cv_c_extern_prefix" = "yes"
876 then
877   AC_DEFINE([__ASM_NAME(name)], ["_" name])
878 else
879   AC_DEFINE([__ASM_NAME(name)], [name])
882 dnl **** Check for working dll ****
884 AC_SUBST(DLLEXT,"")
885 AC_SUBST(DLLFLAGS,"-D_REENTRANT")
886 AC_SUBST(DLLIBS,"")
887 AC_SUBST(LDSHARED,"")
888 AC_SUBST(LDDLLFLAGS,"")
889 AC_SUBST(LIBEXT,"so")
890 AC_SUBST(IMPLIBEXT,"def")
892 case $host_os in
893   cygwin*|mingw32*)
894     AC_CHECK_TOOL(DLLTOOL,dlltool,false)
895     AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
896     if test "$DLLWRAP" = "false"; then
897       LIBEXT="a"
898     else
899       dnl FIXME - check whether dllwrap works correctly...
900       LIBEXT="dll"
901     fi
902     IMPLIBEXT="a"
903     dnl We can't build 16-bit NE dlls
904     WIN16_FILES=""
905     WIN16_INSTALL=""
906     ;;
907   *)
908     AC_CHECK_HEADERS(dlfcn.h,
909         [AC_CHECK_FUNCS(dlopen,,
910             [AC_CHECK_LIB(dl,dlopen,
911                          [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
912                           DLLIBS="-ldl"],
913                          [LIBEXT="a"])])],
914         [LIBEXT="a"])
916     if test "$LIBEXT" = "so"
917     then
918       DLLFLAGS="$DLLFLAGS -fPIC"
919       DLLEXT=".so"
920       AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
921           [WINE_TRY_SHLIB_FLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
922                                 ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
923       if test "$ac_cv_c_dll_gnuelf" = "yes"
924       then
925         LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
926         LDDLLFLAGS="-shared -Wl,-Bsymbolic"
927         AC_CACHE_CHECK([whether the linker accepts -z defs], ac_cv_c_dll_zdefs,
928           [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-z,defs],
929                            ac_cv_c_dll_zdefs="yes",ac_cv_c_dll_zdefs="no")])
930         if test "$ac_cv_c_dll_zdefs" = "yes"
931         then
932           LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
933         fi
935         AC_CACHE_CHECK([whether the linker accepts -init and -fini], ac_cv_c_dll_init_fini,
936           [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini],
937                            ac_cv_c_dll_init_fini="yes",ac_cv_c_dll_init_fini="no")])
938         if test "$ac_cv_c_dll_init_fini" = "yes"
939         then
940           LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
941         fi
943         AC_CACHE_CHECK([whether the linker accepts version scripts], ac_cv_c_ld_version_scripts,
944           [echo '{ global: *; };' >conftest.map
945            WINE_TRY_CFLAGS([-fPIC -shared -Wl,--version-script=conftest.map],
946                            ac_cv_c_ld_version_scripts="yes",ac_cv_c_ld_version_scripts="no")
947            rm -f conftest.map])
948         if test "$ac_cv_c_ld_version_scripts" = "yes"
949         then
950           LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"
951         fi
953         AC_CACHE_CHECK([whether the linker accepts --export-dynamic], ac_cv_c_export_dynamic,
954           [WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
955                            ac_cv_c_export_dynamic="yes",ac_cv_c_export_dynamic="no")])
956         if test "$ac_cv_c_export_dynamic" = "yes"
957         then
958           AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])
959         fi
961         case $host_cpu in
962           *i[[3456789]]86*)
963             AC_CACHE_CHECK([whether we can relocate the executable to 0x7bf00000], ac_cv_ld_reloc_exec,
964               [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
965                                ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")])
966             if test "$ac_cv_ld_reloc_exec" = "yes"
967             then
968               LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
969             fi
970             ;;
971         esac
973       else
974         AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
975             [WINE_TRY_SHLIB_FLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
976                                   ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
977         if test "$ac_cv_c_dll_unixware" = "yes"
978         then
979           LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
980           LDDLLFLAGS="-Wl,-G,-B,symbolic"
982         else
983           AC_CACHE_CHECK(whether we can build a Mach-O (Mac OS X/Darwin) dll, ac_cv_c_dll_macho,
984             [WINE_TRY_SHLIB_FLAGS([-bundle], ac_cv_c_dll_macho="yes", ac_cv_c_dll_macho="no")])
985           if test "$ac_cv_c_dll_macho" = "yes"
986           then
987             LIBEXT="dylib"
988             LDDLLFLAGS="-bundle -flat_namespace -undefined suppress -read_only_relocs warning"
989             LDSHARED="\$(CC) -dynamiclib"
990             CFLAGS="$CFLAGS -ffixed-r13 -no-cpp-precomp"
991             STRIP="$STRIP -u -r"
992             dnl Relocate wine executable
993             AC_SUBST(LDEXECFLAGS,"-seg1addr 0x120000")
994             dnl Relocate libwine.dyld too
995             AC_SUBST(LDLIBWINEFLAGS,"-seg1addr 0x140000")
996             dnl declare needed frameworks
997             AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
998             AC_SUBST(IOKITLIB,"-framework IOKit")
999             dnl using IOKit imply we use CoreFoundation too
1000             IOKITLIB="$IOKITLIB $COREFOUNDATIONLIB"
1001           else
1002             AC_CACHE_CHECK(whether we can build an HP-UX dll, ac_cv_c_dll_hpux,
1003               [WINE_TRY_SHLIB_FLAGS([-shared], ac_cv_c_dll_hpux="yes", ac_cv_c_dll_hpux="no")])
1004             if test "$ac_cv_c_dll_hpux" = "yes"
1005             then
1006               LIBEXT="sl"
1007               DLLEXT=".sl"
1008               LDDLLFLAGS="-shared -fPIC"
1009               LDSHARED="\$(CC) -shared"
1010             fi
1011           fi
1012         fi
1013       fi
1014     fi
1016     dnl Check for cross compiler to build test programs
1017     AC_SUBST(CROSSTEST,"")
1018     if test "$cross_compiling" = "no"
1019     then
1020       AC_CHECK_PROGS(CROSSCC,i586-mingw32msvc-gcc i386-mingw32msvc-gcc i386-mingw32-gcc mingw-gcc,false)
1021       AC_CHECK_PROGS(DLLTOOL,i586-mingw32msvc-dlltool i386-mingw32msvc-dlltool i386-mingw32-dlltool mingw-dlltool,false)
1022       AC_CHECK_PROGS(CROSSWINDRES,i586-mingw32msvc-windres i386-mingw32msvc-windres i386-mingw32-windres mingw-windres,false)
1023       if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
1024     fi
1025     ;;
1026 esac
1028 if test "$LIBEXT" = "a"; then
1029   AC_MSG_ERROR(
1030 [could not find a way to build shared libraries.
1031 It is currently not possible to build Wine without shared library
1032 (.so) support to allow transparent switch between .so and .dll files.
1033 If you are using Linux, you will need a newer binutils.]
1037 case $build_os in
1038   cygwin*|mingw32*)
1039     AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$PATH\"") ;;
1040   darwin*|macosx*)
1041     AC_SUBST(LDPATH,"DYLD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$DYLD_LIBRARY_PATH\"") ;;
1042   *)
1043     AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$LD_LIBRARY_PATH\"") ;;
1044 esac
1046 dnl Mingw needs explicit msvcrt for linking libwine and winsock for wininet
1047 case $host_os in
1048   mingw32*)
1049     AC_SUBST(CRTLIBS,"-lmsvcrt")
1050     AC_SUBST(SOCKETLIBS,"-lws2_32")
1051     ;;
1052 esac
1054 case $host_os in
1055   linux*)
1056     case $host_cpu in
1057       *i[[3456789]]86*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread wine-preloader") ;;
1058       *) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread") ;;
1059     esac
1060     AC_SUBST(MAIN_BINARY,"wine-glibc")
1061     ;;
1062   darwin*)
1063     AC_SUBST(WINE_BINARIES,"wine-pthread")
1064     AC_SUBST(MAIN_BINARY,"wine-pthread")
1065     ;;
1066   *)
1067     AC_SUBST(WINE_BINARIES,"wine-kthread")
1068     AC_SUBST(MAIN_BINARY,"wine-kthread")
1069     ;;
1070 esac
1072 dnl **** Get the soname for libraries that we load dynamically ****
1074 if test "$LIBEXT" = "so" -o "$LIBEXT" = "dylib"
1075 then
1076   WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
1077   WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
1078   WINE_GET_SONAME(Xi,XOpenDevice,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1079   WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1080   WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1081   WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
1082   WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS])
1083   WINE_GET_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
1084   WINE_GET_SONAME(cups,cupsGetDefault)
1085   WINE_GET_SONAME(jack,jack_client_new)
1086   WINE_GET_SONAME(fontconfig,FcInit)
1087   WINE_GET_SONAME(ssl,SSL_library_init)
1088   WINE_GET_SONAME(crypto,BIO_new_socket)
1089   WINE_GET_SONAME(ncurses,waddch)
1090   WINE_GET_SONAME(curses,waddch)
1091   WINE_GET_SONAME(jpeg,jpeg_start_decompress)
1092   WINE_GET_SONAME(ungif,DGifOpen)
1093   WINE_GET_SONAME(gif,DGifOpen)
1094   WINE_GET_SONAME(lcms,cmsOpenProfileFromFile)
1095   WINE_GET_SONAME(capi20,capi20_isinstalled)
1099 dnl **** Check for functions ****
1101 AC_FUNC_ALLOCA()
1102 AC_CHECK_FUNCS(\
1103         _lwp_create \
1104         _lwp_self \
1105         _pclose \
1106         _popen \
1107         _snprintf \
1108         _spawnvp \
1109         _stricmp \
1110         _strnicmp \
1111         _vsnprintf \
1112         chsize \
1113         clone \
1114         epoll_create \
1115         ffs \
1116         finite \
1117         fork \
1118         fpclass \
1119         fstatfs \
1120         fstatvfs \
1121         ftruncate \
1122         futimes \
1123         futimesat \
1124         getnetbyname \
1125         getopt_long \
1126         getpagesize \
1127         getprotobyname \
1128         getprotobynumber \
1129         getpwuid \
1130         getservbyport \
1131         gettid \
1132         gettimeofday \
1133         getuid \
1134         inet_network \
1135         lstat \
1136         memmove \
1137         mmap \
1138         pclose \
1139         popen \
1140         pread \
1141         pwrite \
1142         readlink \
1143         rfork \
1144         sched_yield \
1145         select \
1146         sendmsg \
1147         settimeofday \
1148         sigaltstack \
1149         sigprocmask \
1150         snprintf \
1151         spawnvp \
1152         statfs \
1153         statvfs \
1154         strcasecmp \
1155         strerror \
1156         strncasecmp \
1157         tcgetattr \
1158         timegm \
1159         usleep \
1160         vsnprintf \
1161         wait4 \
1162         waitpid \
1165 dnl **** Checks for headers that depend on other ones ****
1167 AC_CHECK_HEADERS(sys/mount.h sys/user.h,,,
1168     [#include <sys/types.h>
1169      #if HAVE_SYS_PARAM_H
1170      # include <sys/param.h>
1171      #endif])
1173 AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h],,,
1174     [#include <sys/types.h>
1175      #if HAVE_SYS_SOCKET_H
1176      # include <sys/socket.h>
1177      #endif])
1179 AC_CHECK_HEADERS([resolv.h],,,
1180     [#include <sys/types.h>
1181      #if HAVE_SYS_SOCKET_H
1182      # include <sys/socket.h>
1183      #endif
1184      #if HAVE_NETINET_IN_H
1185      # include <netinet/in.h>
1186      #endif
1187      #if HAVE_ARPA_NAMESER_H
1188      # include <arpa/nameser.h>
1189      #endif])
1191 AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])
1193 dnl **** Check for v4l(2) headers ****
1195 AC_CHECK_HEADERS(linux/videodev.h,,,
1196 [#ifdef HAVE_SYS_TIME_H
1197 #include <sys/time.h>
1198 #endif
1199 #include <sys/types.h>
1200 #ifdef HAVE_ASM_TYPES_H
1201 #include <asm/types.h>
1202 #endif])
1204 dnl **** Check for IPX headers (currently Linux only) ****
1206 AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
1207  AC_TRY_COMPILE(
1208    [#include <sys/types.h>
1209     #ifdef HAVE_SYS_SOCKET_H
1210     # include <sys/socket.h>
1211     #endif
1212     #include <netipx/ipx.h>],
1213    [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
1214    [ac_cv_c_ipx_gnu="yes"],
1215    [ac_cv_c_ipx_gnu="no"])
1217 if test "$ac_cv_c_ipx_gnu" = "yes"
1218 then
1219     AC_DEFINE(HAVE_IPX_GNU, 1, [Define if IPX should use netipx/ipx.h from libc])
1222 if test "$ac_cv_c_ipx_gnu" = "no"
1223 then
1224  AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
1225   AC_TRY_COMPILE(
1226     [#include <sys/types.h>
1227      #ifdef HAVE_SYS_SOCKET_H
1228      # include <sys/socket.h>
1229      #endif
1230      #include <asm/types.h>
1231      #include <linux/ipx.h>],
1232     [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
1233     [ac_cv_c_ipx_linux="yes"],
1234     [ac_cv_c_ipx_linux="no"])
1235   )
1236   if test "$ac_cv_c_ipx_linux" = "yes"
1237   then
1238       AC_DEFINE(HAVE_IPX_LINUX, 1, [Define if IPX includes are taken from Linux kernel])
1239   fi
1242 dnl **** Check for types ****
1244 AC_C_CONST
1245 AC_C_INLINE
1246 AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t])
1247 AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])
1249 AC_CACHE_CHECK([whether linux/input.h is for real],
1250         wine_cv_linux_input_h,
1251         AC_TRY_COMPILE([
1252             #include <linux/input.h>
1253         ] , [
1254             int foo = EVIOCGBIT(EV_ABS,42);
1255             int bar = BTN_PINKIE;
1256             int fortytwo = 42;
1257         ],
1258         wine_cv_linux_input_h=yes,
1259         wine_cv_linux_input_h=no,
1260         no
1261         )
1262     )
1263     if test "$wine_cv_linux_input_h" = "yes"
1264     then
1265         AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H, 1,
1266                   [Define if we have linux/input.h AND it contains the INPUT event API])
1267     fi
1269 AC_CACHE_CHECK([for sigaddset],wine_cv_have_sigaddset,
1270                AC_TRY_LINK([#include <signal.h>],[sigset_t set; sigaddset(&set,SIGTERM);],
1271                            wine_cv_have_sigaddset=yes,wine_cv_have_sigaddset=no))
1272 if test "$wine_cv_have_sigaddset" = "yes"
1273 then
1274   AC_DEFINE(HAVE_SIGADDSET, 1, [Define if sigaddset is supported])
1278 AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
1279         wine_cv_linux_gethostbyname_r_6,
1280         AC_TRY_LINK([
1281 #include <netdb.h>
1282         ], [
1283     char *name=NULL;
1284     struct hostent he;
1285     struct hostent *result;
1286     char *buf=NULL;
1287     int bufsize=0;
1288     int res,errnr;
1289     char *addr=NULL;
1290     int addrlen=0;
1291     int addrtype=0;
1292     res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1293     res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1294     ],
1295         wine_cv_linux_gethostbyname_r_6=yes,
1296         wine_cv_linux_gethostbyname_r_6=no
1297         )
1298    )
1299    if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1300    then
1301       AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1302                 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
1303    fi
1305 if test "$ac_cv_header_linux_joystick_h" = "yes"
1306 then
1307    AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
1308         wine_cv_linux_joystick_22_api,
1309         AC_TRY_COMPILE([
1310         #include <sys/ioctl.h>
1311         #include <linux/joystick.h>
1313         struct js_event blub;
1314         #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1315         #error "no 2.2 header"
1316         #endif
1317         ],/*empty*/,
1318         wine_cv_linux_joystick_22_api=yes,
1319         wine_cv_linux_joystick_22_api=no,
1320         wine_cv_linux_joystick_22_api=no
1321         )
1322    )
1323    if test "$wine_cv_linux_joystick_22_api" = "yes"
1324    then
1325       AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1326                 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
1327    fi
1330 dnl **** statfs checks ****
1332 if test "$ac_cv_header_sys_vfs_h" = "yes"
1333 then
1334     AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
1335                     wine_cv_sys_vfs_has_statfs,
1336         AC_TRY_COMPILE([
1337         #include <sys/types.h>
1338         #ifdef HAVE_SYS_PARAM_H
1339         # include <sys/param.h>
1340         #endif
1341         #include <sys/vfs.h>
1342         ],[
1343                 struct statfs stfs;
1345                 memset(&stfs,0,sizeof(stfs));
1346         ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1347         )
1348     )
1349     if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1350     then
1351       AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1352                 [Define if the struct statfs is defined by <sys/vfs.h>])
1353     fi
1356 if test "$ac_cv_header_sys_statfs_h" = "yes"
1357 then
1358     AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
1359                     wine_cv_sys_statfs_has_statfs,
1360         AC_TRY_COMPILE([
1361         #include <sys/types.h>
1362         #ifdef HAVE_SYS_PARAM_H
1363         # include <sys/param.h>
1364         #endif
1365         #include <sys/statfs.h>
1366         ],[
1367                 struct statfs stfs;
1368         ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1369         )
1370     )
1371     if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1372     then
1373       AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1374                 [Define if the struct statfs is defined by <sys/statfs.h>])
1375     fi
1378 if test "$ac_cv_header_sys_mount_h" = "yes"
1379 then
1380     AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
1381                     wine_cv_sys_mount_has_statfs,
1382         AC_TRY_COMPILE([
1383         #include <sys/types.h>
1384         #ifdef HAVE_SYS_PARAM_H
1385         # include <sys/param.h>
1386         #endif
1387         #include <sys/mount.h>
1388         ],[
1389                 struct statfs stfs;
1390         ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1391         )
1392     )
1393     if test "$wine_cv_sys_mount_has_statfs" = "yes"
1394     then
1395       AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1396                 [Define if the struct statfs is defined by <sys/mount.h>])
1397     fi
1400 dnl **** FIXME: what about mixed cases, where we need two of them? ***
1402 dnl Check for statfs members
1403 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],,,
1404 [#include <sys/types.h>
1405 #ifdef HAVE_SYS_PARAM_H
1406 # include <sys/param.h>
1407 #endif
1408 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1409 # include <sys/mount.h>
1410 #else
1411 # ifdef STATFS_DEFINED_BY_SYS_VFS
1412 #  include <sys/vfs.h>
1413 # else
1414 #  ifdef STATFS_DEFINED_BY_SYS_STATFS
1415 #   include <sys/statfs.h>
1416 #  endif
1417 # endif
1418 #endif])
1420 AC_CHECK_MEMBERS([struct statvfs.f_blocks],,,
1421 [#ifdef HAVE_SYS_STATVFS_H
1422 #include <sys/statvfs.h>
1423 #endif])
1425 dnl Check for socket structure members
1426 AC_CHECK_MEMBERS([struct msghdr.msg_accrights, struct sockaddr.sa_len, struct sockaddr_un.sun_len],,,
1427 [#include <sys/types.h>
1428 #ifdef HAVE_SYS_SOCKET_H
1429 # include <sys/socket.h>
1430 #endif
1431 #ifdef HAVE_SYS_UN_H
1432 # include <sys/un.h>
1433 #endif])
1435 dnl Check for scsireq_t and sg_io_hdr_t members
1436 AC_CHECK_MEMBERS([scsireq_t.cmd, sg_io_hdr_t.interface_id],,,
1437 [#include <sys/types.h>
1438 #ifdef HAVE_SCSI_SG_H
1439 #include <scsi/sg.h>
1440 #endif])
1442 dnl Check for siginfo_t members
1443 AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
1445 dnl Check for struct option
1446 AC_CHECK_MEMBERS([struct option.name],,,
1447 [#ifdef HAVE_GETOPT_H
1448 #include <getopt.h>
1449 #endif])
1451 dnl Check for stat.st_blocks
1452 AC_CHECK_MEMBERS([struct stat.st_blocks])
1454 dnl Check for the external timezone variables timezone and daylight
1455 AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
1456                AC_TRY_LINK([#include <time.h>],[timezone;],
1457                            ac_cv_have_timezone="yes", ac_cv_have_timezone="no"))
1458 if test "$ac_cv_have_timezone" = "yes"
1459 then
1460     AC_DEFINE(HAVE_TIMEZONE, 1, [Define if you have the timezone variable])
1462 AC_CACHE_CHECK([for daylight variable], ac_cv_have_daylight,
1463                AC_TRY_LINK([#include <time.h>],[daylight;],
1464                            ac_cv_have_daylight="yes", ac_cv_have_daylight="no"))
1465 if test "$ac_cv_have_daylight" = "yes"
1466 then
1467     AC_DEFINE(HAVE_DAYLIGHT, 1, [Define if you have the daylight variable])
1470 dnl *** check for the need to define platform-specific symbols
1472 case $host_cpu in
1473   *i[[3456789]]86*) WINE_CHECK_DEFINE([__i386__]) ;;
1474   *alpha*)          WINE_CHECK_DEFINE([__ALPHA__]) ;;
1475   *sparc*)          WINE_CHECK_DEFINE([__sparc__]) ;;
1476   *powerpc*)        WINE_CHECK_DEFINE([__powerpc__]) ;;
1477 esac
1479 case $host_vendor in
1480   *sun*) WINE_CHECK_DEFINE([__sun__]) ;;
1481 esac
1483 dnl **** Generate output files ****
1485 AH_TOP([#define __WINE_CONFIG_H])
1487 WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1488 WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1489 WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
1490 WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
1491 WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
1492 WINE_CONFIG_EXTRA_DIR(include/wine)
1493 WINE_CONFIG_EXTRA_DIR(programs/regedit/tests)
1495 MAKE_RULES=Make.rules
1496 AC_SUBST_FILE(MAKE_RULES)
1498 MAKE_DLL_RULES=dlls/Makedll.rules
1499 AC_SUBST_FILE(MAKE_DLL_RULES)
1501 MAKE_TEST_RULES=dlls/Maketest.rules
1502 AC_SUBST_FILE(MAKE_TEST_RULES)
1504 MAKE_LIB_RULES=libs/Makelib.rules
1505 AC_SUBST_FILE(MAKE_LIB_RULES)
1507 MAKE_PROG_RULES=programs/Makeprog.rules
1508 AC_SUBST_FILE(MAKE_PROG_RULES)
1510 AC_CONFIG_FILES([
1511 Make.rules
1512 dlls/Makedll.rules
1513 dlls/Maketest.rules
1514 libs/Makelib.rules
1515 programs/Makeprog.rules
1516 Makefile
1517 dlls/Makefile
1518 dlls/activeds/Makefile
1519 dlls/advapi32/Makefile
1520 dlls/advapi32/tests/Makefile
1521 dlls/advpack/Makefile
1522 dlls/advpack/tests/Makefile
1523 dlls/amstream/Makefile
1524 dlls/atl/Makefile
1525 dlls/avicap32/Makefile
1526 dlls/avifil32/Makefile
1527 dlls/cabinet/Makefile
1528 dlls/capi2032/Makefile
1529 dlls/cards/Makefile
1530 dlls/cfgmgr32/Makefile
1531 dlls/comcat/Makefile
1532 dlls/comctl32/Makefile
1533 dlls/comctl32/tests/Makefile
1534 dlls/commdlg/Makefile
1535 dlls/crtdll/Makefile
1536 dlls/crypt32/Makefile
1537 dlls/crypt32/tests/Makefile
1538 dlls/cryptdll/Makefile
1539 dlls/ctl3d/Makefile
1540 dlls/d3d8/Makefile
1541 dlls/d3d9/Makefile
1542 dlls/d3dim/Makefile
1543 dlls/d3drm/Makefile
1544 dlls/d3dx8/Makefile
1545 dlls/d3dxof/Makefile
1546 dlls/dbghelp/Makefile
1547 dlls/dciman32/Makefile
1548 dlls/ddraw/Makefile
1549 dlls/ddraw/tests/Makefile
1550 dlls/devenum/Makefile
1551 dlls/dinput/Makefile
1552 dlls/dinput/tests/Makefile
1553 dlls/dinput8/Makefile
1554 dlls/dmband/Makefile
1555 dlls/dmcompos/Makefile
1556 dlls/dmime/Makefile
1557 dlls/dmloader/Makefile
1558 dlls/dmscript/Makefile
1559 dlls/dmstyle/Makefile
1560 dlls/dmsynth/Makefile
1561 dlls/dmusic/Makefile
1562 dlls/dmusic32/Makefile
1563 dlls/dplay/Makefile
1564 dlls/dplayx/Makefile
1565 dlls/dpnet/Makefile
1566 dlls/dpnhpast/Makefile
1567 dlls/dsound/Makefile
1568 dlls/dsound/tests/Makefile
1569 dlls/dswave/Makefile
1570 dlls/dxdiagn/Makefile
1571 dlls/dxerr8/Makefile
1572 dlls/dxerr9/Makefile
1573 dlls/dxguid/Makefile
1574 dlls/gdi/Makefile
1575 dlls/gdi/tests/Makefile
1576 dlls/glu32/Makefile
1577 dlls/glut32/Makefile
1578 dlls/hhctrl.ocx/Makefile
1579 dlls/iccvid/Makefile
1580 dlls/icmp/Makefile
1581 dlls/ifsmgr.vxd/Makefile
1582 dlls/imagehlp/Makefile
1583 dlls/imm32/Makefile
1584 dlls/iphlpapi/Makefile
1585 dlls/iphlpapi/tests/Makefile
1586 dlls/itss/Makefile
1587 dlls/kernel/Makefile
1588 dlls/kernel/tests/Makefile
1589 dlls/lzexpand/Makefile
1590 dlls/lzexpand/tests/Makefile
1591 dlls/mapi32/Makefile
1592 dlls/mapi32/tests/Makefile
1593 dlls/mlang/Makefile
1594 dlls/mlang/tests/Makefile
1595 dlls/mmdevldr.vxd/Makefile
1596 dlls/monodebg.vxd/Makefile
1597 dlls/mpr/Makefile
1598 dlls/msacm/Makefile
1599 dlls/msacm/imaadp32/Makefile
1600 dlls/msacm/msadp32/Makefile
1601 dlls/msacm/msg711/Makefile
1602 dlls/msacm/winemp3/Makefile
1603 dlls/msacm/tests/Makefile
1604 dlls/mscms/Makefile
1605 dlls/mscms/tests/Makefile
1606 dlls/msdmo/Makefile
1607 dlls/mshtml/Makefile
1608 dlls/mshtml/tests/Makefile
1609 dlls/msi/Makefile
1610 dlls/msi/tests/Makefile
1611 dlls/msimg32/Makefile
1612 dlls/msisys/Makefile
1613 dlls/msnet32/Makefile
1614 dlls/msrle32/Makefile
1615 dlls/msvcrt/Makefile
1616 dlls/msvcrt/tests/Makefile
1617 dlls/msvcrt20/Makefile
1618 dlls/msvcrt40/Makefile
1619 dlls/msvcrtd/Makefile
1620 dlls/msvcrtd/tests/Makefile
1621 dlls/msvidc32/Makefile
1622 dlls/msvideo/Makefile
1623 dlls/mswsock/Makefile
1624 dlls/netapi32/Makefile
1625 dlls/netapi32/tests/Makefile
1626 dlls/newdev/Makefile
1627 dlls/ntdll/Makefile
1628 dlls/ntdll/tests/Makefile
1629 dlls/odbc32/Makefile
1630 dlls/odbccp32/Makefile
1631 dlls/ole32/Makefile
1632 dlls/ole32/tests/Makefile
1633 dlls/oleacc/Makefile
1634 dlls/oleaut32/Makefile
1635 dlls/oleaut32/tests/Makefile
1636 dlls/olecli/Makefile
1637 dlls/oledlg/Makefile
1638 dlls/olepro32/Makefile
1639 dlls/olesvr/Makefile
1640 dlls/opengl32/Makefile
1641 dlls/powrprof/Makefile
1642 dlls/psapi/Makefile
1643 dlls/psapi/tests/Makefile
1644 dlls/qcap/Makefile
1645 dlls/quartz/Makefile
1646 dlls/quartz/tests/Makefile
1647 dlls/rasapi32/Makefile
1648 dlls/riched20/Makefile
1649 dlls/richedit/Makefile
1650 dlls/rpcrt4/Makefile
1651 dlls/rpcrt4/tests/Makefile
1652 dlls/rsabase/Makefile
1653 dlls/rsabase/tests/Makefile
1654 dlls/rsaenh/Makefile
1655 dlls/rsaenh/tests/Makefile
1656 dlls/secur32/Makefile
1657 dlls/sensapi/Makefile
1658 dlls/serialui/Makefile
1659 dlls/setupapi/Makefile
1660 dlls/shdocvw/Makefile
1661 dlls/shell32/Makefile
1662 dlls/shell32/tests/Makefile
1663 dlls/shfolder/Makefile
1664 dlls/shlwapi/Makefile
1665 dlls/shlwapi/tests/Makefile
1666 dlls/snmpapi/Makefile
1667 dlls/stdole32.tlb/Makefile
1668 dlls/sti/Makefile
1669 dlls/strmiids/Makefile
1670 dlls/tapi32/Makefile
1671 dlls/ttydrv/Makefile
1672 dlls/twain/Makefile
1673 dlls/unicows/Makefile
1674 dlls/url/Makefile
1675 dlls/urlmon/Makefile
1676 dlls/urlmon/tests/Makefile
1677 dlls/user/Makefile
1678 dlls/user/tests/Makefile
1679 dlls/uuid/Makefile
1680 dlls/uxtheme/Makefile
1681 dlls/vdhcp.vxd/Makefile
1682 dlls/vdmdbg/Makefile
1683 dlls/version/Makefile
1684 dlls/version/tests/Makefile
1685 dlls/vmm.vxd/Makefile
1686 dlls/vnbt.vxd/Makefile
1687 dlls/vnetbios.vxd/Makefile
1688 dlls/vtdapi.vxd/Makefile
1689 dlls/vwin32.vxd/Makefile
1690 dlls/win32s/Makefile
1691 dlls/winaspi/Makefile
1692 dlls/wined3d/Makefile
1693 dlls/winedos/Makefile
1694 dlls/wineps/Makefile
1695 dlls/wininet/Makefile
1696 dlls/wininet/tests/Makefile
1697 dlls/winmm/Makefile
1698 dlls/winmm/joystick/Makefile
1699 dlls/winmm/mcianim/Makefile
1700 dlls/winmm/mciavi/Makefile
1701 dlls/winmm/mcicda/Makefile
1702 dlls/winmm/mciseq/Makefile
1703 dlls/winmm/mciwave/Makefile
1704 dlls/winmm/midimap/Makefile
1705 dlls/winmm/tests/Makefile
1706 dlls/winmm/wavemap/Makefile
1707 dlls/winmm/winealsa/Makefile
1708 dlls/winmm/winearts/Makefile
1709 dlls/winmm/wineaudioio/Makefile
1710 dlls/winmm/winejack/Makefile
1711 dlls/winmm/winenas/Makefile
1712 dlls/winmm/wineoss/Makefile
1713 dlls/winnls/Makefile
1714 dlls/winsock/Makefile
1715 dlls/winsock/tests/Makefile
1716 dlls/winspool/Makefile
1717 dlls/winspool/tests/Makefile
1718 dlls/wintab32/Makefile
1719 dlls/wintrust/Makefile
1720 dlls/wow32/Makefile
1721 dlls/wsock32/Makefile
1722 dlls/wtsapi32/Makefile
1723 dlls/x11drv/Makefile
1724 documentation/Makefile
1725 fonts/Makefile
1726 include/Makefile
1727 libs/Makefile
1728 libs/port/Makefile
1729 libs/unicode/Makefile
1730 libs/wine/Makefile
1731 libs/wpp/Makefile
1732 loader/Makefile
1733 programs/Makefile
1734 programs/avitools/Makefile
1735 programs/clock/Makefile
1736 programs/cmdlgtst/Makefile
1737 programs/control/Makefile
1738 programs/expand/Makefile
1739 programs/msiexec/Makefile
1740 programs/notepad/Makefile
1741 programs/progman/Makefile
1742 programs/regedit/Makefile
1743 programs/regsvr32/Makefile
1744 programs/rpcss/Makefile
1745 programs/rundll32/Makefile
1746 programs/start/Makefile
1747 programs/taskmgr/Makefile
1748 programs/uninstaller/Makefile
1749 programs/view/Makefile
1750 programs/wcmd/Makefile
1751 programs/wineboot/Makefile
1752 programs/winebrowser/Makefile
1753 programs/winecfg/Makefile
1754 programs/wineconsole/Makefile
1755 programs/winedbg/Makefile
1756 programs/winefile/Makefile
1757 programs/winemenubuilder/Makefile
1758 programs/winemine/Makefile
1759 programs/winepath/Makefile
1760 programs/winetest/Makefile
1761 programs/winevdm/Makefile
1762 programs/winhelp/Makefile
1763 programs/winver/Makefile
1764 server/Makefile
1765 tools/Makefile
1766 tools/widl/Makefile
1767 tools/winapi/Makefile
1768 tools/winebuild/Makefile
1769 tools/winedump/Makefile
1770 tools/winegcc/Makefile
1771 tools/wmc/Makefile
1772 tools/wrc/Makefile])
1774 AC_OUTPUT
1776 if test "$have_x" = "no"
1777 then
1778   echo
1779   echo "*** Warning: X development files not found. Wine will be built without"
1780   echo "*** X support, which currently does not work, and would probably not be"
1781   echo "*** what you want anyway. You will need to install devel packages of"
1782   echo "*** Xlib/Xfree86 at the very least."
1785 if test "$wine_cv_opengl_version_OK" = "no"
1786 then
1787   echo
1788   echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1789   echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1792 if test "$wine_cv_msg_freetype" = "yes"
1793 then
1794   echo
1795   echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
1796   echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1797   echo "*** freetype-devel package (or its equivalent on your distribution) to"
1798   echo "*** enable Wine to use TrueType fonts."
1801 if test -z "$ALSALIBS" -a -z "$ARTSC_LIBS" -a -z "$AUDIOIOLIBS" -a \
1802         -z "$ac_cv_lib_soname_jack" -a -z "$NASLIBS" -a \
1803         "$ac_cv_c_opensoundsystem" = "no"
1804 then
1805     echo "*** No sound system was found. Windows applications will be silent."
1806     echo "*** The currently supported sound systems are:"
1807     echo "*** ALSA, ARTS, AudioIO, Jack, NAS and OSS"
1810 echo
1811 echo "Configure finished.  Do '${ac_make} depend && ${ac_make}' to compile Wine."
1812 echo
1814 dnl Local Variables:
1815 dnl comment-start: "dnl "
1816 dnl comment-end: ""
1817 dnl comment-start-skip: "\\bdnl\\b\\s *"
1818 dnl compile-command: "autoconf"
1819 dnl End: