shlwapi: Make StrFormatByteSize format numbers using locale settings.
[wine/wine64.git] / configure.ac
blob4e9fc0b2817320eea573edb232de2f9cb83f3b82
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.53b)
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(win64, AC_HELP_STRING([--enable-win64], [build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
18 AC_ARG_WITH(opengl,    AC_HELP_STRING([--without-opengl],[do not use OpenGL]))
19 AC_ARG_WITH(curses,    AC_HELP_STRING([--without-curses],[do not use curses]))
20 AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=<dir>],[use Wine tools from directory <dir>]))
22 AC_CANONICAL_HOST
23 case $host in
24   x86_64*linux*)
25     if test "x$enable_win64" != "xyes"
26     then
27       test -n "$CC" || CC="gcc -m32"
28       test -n "$LD" || LD="ld -m elf_i386"
29       test -n "$AS" || AS="as --32"
30       host_cpu="i386"
31     fi
32     ;;
33 esac
35 dnl enable_win16 defaults to yes on x86, to no on other CPUs
36 case $host_cpu in
37   *i[[3456789]]86*)
38     if test "x$enable_win16" != "xno" 
39     then
40       enable_win16="yes"
41     fi
42     ;;
43 esac
44    
45 AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)")
46 AC_SUBST(WIN16_INSTALL,"\$(WIN16_INSTALL)")
47 if test "x$enable_win16" != "xyes"
48 then
49   WIN16_FILES=""
50   WIN16_INSTALL=""
53 dnl **** Check for some programs ****
55 AC_PROG_MAKE_SET
56 AC_PROG_CC
57 AC_PROG_CXX
58 dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
59 AC_CHECK_TOOL(CPPBIN,cpp,cpp)
61 AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
62   [if test -z "$with_wine_tools"; then
63      if test "$cross_compiling" = "yes"; then
64        AC_MSG_ERROR([you must use the --with-wine-tools option when cross-compiling.])
65      else
66        wine_cv_toolsdir="\$(TOPOBJDIR)"
67      fi
68    elif test -d "$with_wine_tools/tools/winebuild"; then
69      case $with_wine_tools in
70        /*) wine_cv_toolsdir="$with_wine_tools" ;;
71        *)  wine_cv_toolsdir="\$(TOPOBJDIR)/$with_wine_tools" ;;
72      esac
73    else
74      AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
75    fi])
76 AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
78 AC_PATH_XTRA
79 AC_PROG_LEX
81 dnl **** Just additional warning checks, since AC_PROG just sets 'lex' even
82 dnl **** without one present.
83 AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
84 if test "$XLEX" = "none"
85 then
86   AC_MSG_ERROR([no suitable lex found. Please install the 'flex' package.])
89 dnl Check for bison
90 AC_CHECK_PROGS(BISON,bison,none)
91 if test "$BISON" = "none"
92 then
93   AC_MSG_ERROR([no suitable bison found. Please install the 'bison' package.])
96 AC_CHECK_TOOLS(AS,[gas as],as)
97 AC_CHECK_TOOL(LD,ld,ld)
98 AC_CHECK_TOOL(AR,ar,ar)
99 AC_PROG_RANLIB
100 AC_CHECK_TOOL(STRIP,strip,strip)
101 AC_CHECK_TOOL(WINDRES,windres,false)
102 AC_PROG_LN_S
103 WINE_PROG_LN
104 AC_PROG_EGREP
105 AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
106 AC_PROG_INSTALL
107 dnl Prepend src dir to install path dir if it's a relative path
108 case "$INSTALL" in
109   [[\\/$]]* | ?:[[\\/]]* ) ;;
110   *)  INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;;
111 esac
113 dnl Check for lint
114 AC_CHECK_PROGS(LINT, lclint lint)
115 if test "$LINT" = "lint"
116 then
117   LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
118   dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
120 AC_SUBST(LINT)
121 AC_SUBST(LINTFLAGS)
123 dnl Check for various programs
124 AC_CHECK_PROGS(FONTFORGE, fontforge, false)
125 AC_CHECK_PROGS(PKG_CONFIG, pkg-config, false)
127 case $host_cpu in
128   *i[[3456789]]86*)
129     AC_PATH_PROG(PRELINK, prelink, false, [/sbin /usr/sbin $PATH])
130     ;;
131 esac
133 dnl **** Check for some libraries ****
135 dnl Check for -li386 for NetBSD and OpenBSD
136 AC_CHECK_LIB(i386,i386_set_ldt)
137 dnl Check for -lossaudio for NetBSD
138 AC_CHECK_LIB(ossaudio,_oss_ioctl)
139 dnl Check for -lxpg4 for FreeBSD
140 AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
141 dnl Check for -lpthread
142 AC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread"))
144 AC_SUBST(XLIB,"")
145 AC_SUBST(XFILES,"")
146 AC_SUBST(OPENGLFILES,"")
147 AC_SUBST(GLU32FILES,"")
148 AC_SUBST(OPENGL_LIBS,"")
150 dnl **** Check for header files ****
152 AC_CHECK_HEADERS(\
153         AudioUnit/AudioUnit.h \
154         CoreAudio/CoreAudio.h \
155         IOKit/IOKitLib.h \
156         alsa/asoundlib.h \
157         arpa/inet.h \
158         arpa/nameser.h \
159         asm/types.h \
160         capi20.h \
161         cups/cups.h \
162         curses.h \
163         direct.h \
164         dlfcn.h \
165         elf.h \
166         float.h \
167         fontconfig/fontconfig.h \
168         getopt.h \
169         gif_lib.h \
170         ieeefp.h \
171         io.h \
172         jack/jack.h \
173         jpeglib.h \
174         lber.h \
175         lcms.h \
176         lcms/lcms.h \
177         ldap.h \
178         libaudioio.h \
179         link.h \
180         linux/cdrom.h \
181         linux/compiler.h \
182         linux/hdreg.h \
183         linux/input.h \
184         linux/ioctl.h \
185         linux/joystick.h \
186         linux/major.h \
187         linux/param.h \
188         linux/serial.h \
189         linux/ucdrom.h \
190         mach/machine.h \
191         machine/cpu.h \
192         machine/limits.h \
193         machine/soundcard.h \
194         mntent.h \
195         ncurses.h \
196         netdb.h \
197         netinet/in.h \
198         netinet/in_systm.h \
199         netinet/tcp.h \
200         netinet/tcp_fsm.h \
201         openssl/err.h \
202         openssl/ssl.h \
203         poll.h \
204         process.h \
205         pthread.h \
206         pwd.h \
207         regex.h \
208         sched.h \
209         scsi/scsi.h \
210         scsi/scsi_ioctl.h \
211         scsi/sg.h \
212         soundcard.h \
213         stdint.h \
214         strings.h \
215         sys/asoundlib.h \
216         sys/cdio.h \
217         sys/elf32.h \
218         sys/epoll.h \
219         sys/errno.h \
220         sys/event.h \
221         sys/exec_elf.h \
222         sys/filio.h \
223         sys/ioctl.h \
224         sys/ipc.h \
225         sys/limits.h \
226         sys/link.h \
227         sys/lwp.h \
228         sys/mman.h \
229         sys/modem.h \
230         sys/msg.h \
231         sys/mtio.h \
232         sys/param.h \
233         sys/poll.h \
234         sys/prctl.h \
235         sys/ptrace.h \
236         sys/reg.h \
237         sys/resource.h \
238         sys/scsiio.h \
239         sys/shm.h \
240         sys/signal.h \
241         sys/socket.h \
242         sys/sockio.h \
243         sys/soundcard.h \
244         sys/statvfs.h \
245         sys/strtio.h \
246         sys/syscall.h \
247         sys/sysctl.h \
248         sys/time.h \
249         sys/times.h \
250         sys/uio.h \
251         sys/un.h \
252         sys/vm86.h \
253         sys/wait.h \
254         syscall.h \
255         termios.h \
256         unicode/ubidi.h \
257         unistd.h \
258         utime.h \
259         valgrind/memcheck.h
261 AC_HEADER_STAT()
263 dnl **** Checks for headers that depend on other ones ****
265 AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
266     [#include <sys/types.h>
267      #if HAVE_SYS_PARAM_H
268      # include <sys/param.h>
269      #endif])
271 AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
272     [#include <sys/types.h>
273      #if HAVE_SYS_SOCKET_H
274      # include <sys/socket.h>
275      #endif])
277 AC_CHECK_HEADERS([linux/ipx.h],,,
278     [#include <sys/types.h>
279      #ifdef HAVE_ASM_TYPES_H
280      # include <asm/types.h>
281      #endif
282      #if HAVE_SYS_SOCKET_H
283      # include <sys/socket.h>
284      #endif])
286 AC_CHECK_HEADERS([resolv.h],,,
287     [#include <sys/types.h>
288      #if HAVE_SYS_SOCKET_H
289      # include <sys/socket.h>
290      #endif
291      #if HAVE_NETINET_IN_H
292      # include <netinet/in.h>
293      #endif
294      #if HAVE_ARPA_NAMESER_H
295      # include <arpa/nameser.h>
296      #endif])
298 AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])
300 AC_CHECK_HEADERS([pthread_np.h],,,
301 [#ifdef HAVE_PTHREAD_H
302 #include <pthread.h>
303 #endif])
305 AC_CHECK_HEADERS([linux/videodev.h],,,
306 [#ifdef HAVE_SYS_TIME_H
307 #include <sys/time.h>
308 #endif
309 #include <sys/types.h>
310 #ifdef HAVE_ASM_TYPES_H
311 #include <asm/types.h>
312 #endif])
314 dnl Check for broken kernel header that doesn't define __user
315 AC_CHECK_HEADERS([linux/capi.h],,,[#define __user])
317 dnl **** Check for X11 ****
319 if test "$have_x" = "yes"
320 then
321     XLIB="-lXext -lX11"
322     ac_save_CPPFLAGS="$CPPFLAGS"
323     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
325     dnl *** All of the following tests require X11/Xlib.h
326     AC_CHECK_HEADERS([X11/Xlib.h \
327                       X11/XKBlib.h \
328                       X11/Xutil.h \
329                       X11/extensions/shape.h \
330                       X11/extensions/XInput.h \
331                       X11/extensions/XShm.h \
332                       X11/extensions/Xrandr.h \
333                       X11/extensions/Xrender.h \
334                       X11/extensions/xf86vmode.h],,,
335 [#ifdef HAVE_X11_XLIB_H
336 # include <X11/Xlib.h>
337 #endif
338 #ifdef HAVE_X11_XUTIL_H
339 # include <X11/Xutil.h>
340 #endif])
342         dnl *** Check for X keyboard extension
343         if test "$ac_cv_header_X11_XKBlib_h" = "yes"
344         then
345               AC_CHECK_LIB(X11, XkbQueryExtension,
346               AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
347               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
348         fi
350         dnl *** Check for X Shm extension
351         if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
352         then
353               AC_CHECK_LIB(Xext, XShmQueryExtension,
354               AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
355               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
356         fi
358         dnl *** Check for X shape extension
359         if test "$ac_cv_header_X11_extensions_shape_h" = "yes"
360         then
361               AC_CHECK_LIB(Xext,XShapeQueryExtension,
362               AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
363               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
364         fi
366         dnl *** Check for XFree86 VMODE extension
367         if test "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
368         then
369                 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
370                   [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
371                      X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
372                   ],,
373                   $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
374         fi
376         dnl *** Check for X RandR extension
377         if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
378         then
379                 AC_TRY_COMPILE([#include <X11/Xlib.h>
380 #include <X11/extensions/Xrandr.h>],[static typeof(XRRSetScreenConfigAndRate) * func;],
381                   [AC_DEFINE(HAVE_LIBXRANDR, 1, [Define if you have the Xrandr library])])
382         fi
384         dnl *** Check for Transform functions in Xrender
385         if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
386         then
387               AC_CHECK_LIB(Xrender, XRenderSetPictureTransform,
388                 [AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
389                  [Define if Xrender has the XRenderSetPictureTransform function])],,
390                 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
391         fi
392     dnl *** End of X11/Xlib.h check
394     dnl Check for the presence of OpenGL
395     if test "x$with_opengl" != "xno"
396     then
397         AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h GL/glu.h,,,
398 [#ifdef HAVE_GL_GLX_H
399 # include <GL/glx.h>
400 #endif])
401         if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
402         then
403             dnl Check for some problems due to old Mesa versions
404             AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
405               AC_TRY_COMPILE(
406                 [#include <GL/gl.h>],
407                 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
408                 [wine_cv_opengl_version_OK="yes"],
409                 [wine_cv_opengl_version_OK="no"]
410               )
411             )
413             if test "$wine_cv_opengl_version_OK" = "yes"
414             then
415                 dnl Check for the presence of the library
416                 AC_CHECK_LIB(GL,glXCreateContext,
417                              OPENGL_LIBS="-lGL"
418                              ,,
419                              $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
421                 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
422                 then
423                         OPENGLFILES='$(OPENGLFILES)'
424                         AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
425                 else
426                     if test -f /usr/X11R6/lib/libGL.a
427                     then 
428                        AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
429 This prevents linking to OpenGL. Delete the file and restart configure.])
430                     fi
431                 fi
433                 dnl Check for GLU32 library.
434                 AC_CHECK_LIB(GLU,gluLookAt,
435                              [OPENGL_LIBS="$OPENGL_LIBS -lGLU"
436                              GLU32FILES='$(GLU32FILES)']
437                              ,,
438                              $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
439                 )
440              fi
442              dnl Check for glut32 library.
443              AC_CHECK_LIB(glut,glutMainLoop,
444                        [AC_SUBST(GLUT_LIBS,"-lglut -lXmu -lXi")
445                         AC_SUBST(GLUT32FILES,'$(GLUT32FILES)')],,
446                         $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXmu -lXi -lX11 $X_EXTRA_LIBS)
447          fi
448     fi
450     dnl **** Check for NAS ****
451     AC_SUBST(NASLIBS,"")
452     AC_CHECK_HEADERS(audio/audiolib.h,
453          [AC_CHECK_HEADERS(audio/soundlib.h,,,[#include <audio/audiolib.h>])
454           AC_CHECK_LIB(audio,AuCreateFlow,
455                        [AC_DEFINE(HAVE_NAS,1,[Define if you have NAS including devel headers])
456                         NASLIBS="-laudio -lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS"],,
457                        [-lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
459     CPPFLAGS="$ac_save_CPPFLAGS"
460     XFILES='$(XFILES)'
461 else
462     XLIB=""
463     X_CFLAGS=""
464     X_LIBS=""
467 dnl **** Check for libxml2 ****
469 AC_SUBST(XML2LIBS,"")
470 AC_SUBST(XML2INCL,"")
471 AC_SUBST(XSLTLIBS,"")
472 AC_SUBST(XSLTINCL,"")
473 if test "$PKG_CONFIG" != "false"
474 then
475     ac_save_CPPFLAGS="$CPPFLAGS"
476     ac_xml_libs="`$PKG_CONFIG --libs libxml-2.0 2>/dev/null`"
477     ac_xml_cflags="`$PKG_CONFIG --cflags libxml-2.0 2>/dev/null`"
478     CPPFLAGS="$CPPFLAGS $ac_xml_cflags"
479     AC_CHECK_HEADERS(libxml/parser.h,
480         [AC_CHECK_LIB(xml2, xmlParseMemory,
481             [AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])
482              XML2LIBS="$ac_xml_libs"
483              XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)
484          AC_CHECK_LIB(xml2, xmlReadMemory,
485             [AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory function])],,$ac_xml_libs)
486         ])
487     CPPFLAGS="$ac_save_CPPFLAGS"
488     ac_xslt_libs="`$PKG_CONFIG --libs libxslt 2>/dev/null`"
489     ac_xslt_cflags="`$PKG_CONFIG --cflags libxslt 2>/dev/null`"
490     CPPFLAGS="$CPPFLAGS $ac_xslt_cflags"
491     AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],
492         [AC_CHECK_LIB(xslt, xsltCompilePattern,
493             [AC_DEFINE(HAVE_LIBXSLT, 1, [Define if you have the libxslt library])
494              XSLTLIBS="$ac_xslt_libs"
495              XSLTINCL="$ac_xslt_cflags"],,$ac_xslt_libs)
496         ],,
497 [#ifdef HAVE_LIBXSLT_PATTERN_H
498 # include <libxslt/pattern.h>
499 #endif])
500     CPPFLAGS="$ac_save_CPPFLAGS"
503 dnl **** Check for libhal ****
504 AC_SUBST(HALINCL,"")
505 if test "$PKG_CONFIG" != "false"
506 then
507     ac_save_CPPFLAGS="$CPPFLAGS"
508     ac_hal_libs="`$PKG_CONFIG --libs hal 2>/dev/null`"
509     ac_hal_cflags="`$PKG_CONFIG --cflags hal 2>/dev/null`"
510     CPPFLAGS="$CPPFLAGS $ac_hal_cflags"
511     AC_CHECK_HEADERS([dbus/dbus.h hal/libhal.h])
512     if test "$ac_cv_header_dbus_dbus_h" = "yes" -a "$ac_cv_header_hal_libhal_h" = "yes"
513     then
514         AC_CHECK_LIB(hal, libhal_ctx_new,
515           [AC_CHECK_LIB(dbus-1, dbus_connection_close,
516             [AC_DEFINE(HAVE_LIBHAL, 1, [Define if you have the hal library])
517              HALINCL="$ac_hal_cflags"],,$ac_hal_libs)])
518     fi
519     CPPFLAGS="$ac_save_CPPFLAGS"
522 dnl **** Check which curses lib to use ***
523 CURSESLIBS=""
524 if test "x$with_curses" != "xno"
525 then
526     if test "$ac_cv_header_ncurses_h" = "yes"
527     then
528         AC_CHECK_LIB(ncurses,waddch,
529             [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
530              CURSESLIBS="-lncurses"])
531     elif test "$ac_cv_header_curses_h" = "yes"
532     then
533         AC_CHECK_LIB(curses,waddch,
534             [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
535              CURSESLIBS="-lcurses"])
536     fi
537     ac_save_LIBS="$LIBS"
538     LIBS="$LIBS $CURSESLIBS"
539     AC_CHECK_FUNCS(mousemask)
540     LIBS="$ac_save_LIBS"
542 AC_SUBST(CURSESLIBS)
544 dnl **** Check for SANE ****
545 AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
546 AC_SUBST(SANELIBS,"")
547 AC_SUBST(SANEINCL,"")
548 if test "$sane_devel" != "no"
549 then
550     SANELIBS="`$sane_devel --libs`"
551     SANEINCL="`$sane_devel --cflags`"
552     ac_save_CPPFLAGS="$CPPFLAGS"
553     ac_save_LIBS="$LIBS"
554     CPPFLAGS="$CPPFLAGS $SANEINCL"
555     LIBS="$LIBS $SANELIBS"
556     AC_CHECK_HEADER(sane/sane.h,
557                     [AC_CHECK_LIB(sane,sane_open,
558                                   [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
559                                   [SANELIBS=""
560                                   SANEINCL=""])],
561                     [SANELIBS=""
562                     SANEINCL=""])
563     LIBS="$ac_save_LIBS"
564     CPPFLAGS="$ac_save_CPPFLAGS"
567 dnl **** Check for libgphoto2 ****
568 AC_CHECK_PROG(gphoto2_devel,gphoto2-config,gphoto2-config,no)
569 AC_CHECK_PROG(gphoto2port_devel,gphoto2-port-config,gphoto2-port-config,no)
570 AC_SUBST(GPHOTO2LIBS,"")
571 AC_SUBST(GPHOTO2INCL,"")
572 if test "$gphoto2_devel" != "no" -a "$gphoto2port_devel" != "no"
573 then
574     GPHOTO2INCL="`$gphoto2_devel --cflags` `$gphoto2port_devel --cflags`"
575     GPHOTO2LIBS=""
576     for i in `$gphoto2_devel --libs` `$gphoto2port_devel --libs`
577     do
578       case "$i" in
579         -L/usr/lib|-L/usr/lib64) ;;
580         -L*|-l*) GPHOTO2LIBS="$GPHOTO2LIBS $i";;
581       esac
582     done
583     ac_save_CPPFLAGS="$CPPFLAGS"
584     ac_save_LIBS="$LIBS"
585     CPPFLAGS="$CPPFLAGS $GPHOTO2INCL"
586     LIBS="$LIBS $GPHOTO2LIBS"
587     AC_CHECK_HEADER(gphoto2-camera.h,
588                     [AC_CHECK_LIB(gphoto2,gp_camera_new,
589                                   [AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have libgphoto2 development environment])],
590                                   [GPHOTO2LIBS=""
591                                   GPHOTO2INCL=""])],
592                     [GPHOTO2LIBS=""
593                     GPHOTO2INCL=""])
594     LIBS="$ac_save_LIBS"
595     CPPFLAGS="$ac_save_CPPFLAGS"
598 dnl **** Check for the ICU library ****
599 if test "$ac_cv_header_unicode_ubidi_h" = "yes"
600 then
601     saved_libs="$LIBS"
602     for i in ${ICU_LIB_DIR-/usr/lib}/libsicu ${ICU_LIB_DIR-/usr/lib}/libicu
603     do
604         TEST_ICUUC_LIB="${ICUUC_LIB-${i}uc.a}"
605         TEST_ICUDATA_LIB="${ICUDATA_LIB-${i}data.a}"
606         AC_MSG_CHECKING(whether can link with ICU libraries $TEST_ICUUC_LIB and $TEST_ICUDATA_LIB)
607         LIBS="$saved_libs $TEST_ICUUC_LIB $TEST_ICUDATA_LIB -lstdc++ -lgcc_s"
608         AC_TRY_LINK([#include <unicode/ubidi.h>],[ubidi_open()],
609                     [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed])
610                      AC_SUBST(ICULIBS,"$TEST_ICUUC_LIB $TEST_ICUDATA_LIB -lstdc++ -lgcc_s")
611                      AC_MSG_RESULT(yes)],
612                     [AC_MSG_RESULT(no)])
613     done
614     LIBS="$saved_libs"
617 dnl **** Check for resolver library ***
618 AC_SUBST(RESOLVLIBS,"")
619 if test "$ac_cv_header_resolv_h" = "yes"
620 then
621     AC_CHECK_LIB(resolv, res_query,
622         [AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header])
623          RESOLVLIBS="-lresolv"])
626 dnl **** Check for LittleCMS ***
627 AC_SUBST(LCMSLIBS,"")
628 if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes"
629 then
630     AC_CHECK_LIB(lcms, cmsOpenProfileFromFile,
631         [AC_DEFINE(HAVE_LCMS, 1, [Define if you have the LittleCMS development environment])
632          LCMSLIBS="-llcms"])
635 dnl **** Check for OpenLDAP ***
636 AC_SUBST(LDAPLIBS,"")
637 if test "$ac_cv_header_ldap_h" = "yes" -a "$ac_cv_header_lber_h" = "yes"
638 then
639     AC_CHECK_LIB(ldap_r, ldap_initialize,
640         [AC_CHECK_LIB(lber, ber_init,
641             [AC_DEFINE(HAVE_LDAP, 1, [Define if you have the OpenLDAP development environment])
642              LDAPLIBS="-lldap_r -llber"],,
643              [$LIBPTHREAD])],,
644              [$LIBPTHREAD])
645     WINE_CHECK_LIB_FUNCS(\
646         ldap_count_references \
647         ldap_first_reference \
648         ldap_next_reference \
649         ldap_parse_reference,
650         [$LDAPLIBS $LIBPTHREAD])
653 dnl **** Check for FreeType 2 ****
654 AC_SUBST(FREETYPELIBS,"")
655 AC_SUBST(FREETYPEINCL,"")
656 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
657 if test "$ft_devel" = "no"
658 then
659     AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
660     if test "$ft_devel2" = "freetype2-config"
661     then
662         ft_devel=$ft_devel2
663     fi
666 if test "$ft_devel" = "no"
667 then
668     wine_cv_msg_freetype=yes
669 else
670     FREETYPELIBS=`$ft_devel --libs`
671     FREETYPEINCL=`$ft_devel --cflags`
672     AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$FREETYPELIBS)
673     if test "$ft_lib" = "no"
674     then
675         wine_cv_msg_freetype=yes
676         FREETYPELIBS=""
677         FREETYPEINCL=""
678     else
679         ac_save_CPPFLAGS="$CPPFLAGS"
680         CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
681         AC_CHECK_HEADERS(ft2build.h \
682                          freetype/freetype.h \
683                          freetype/ftglyph.h \
684                          freetype/tttables.h \
685                          freetype/ftnames.h \
686                          freetype/ftsnames.h \
687                          freetype/ttnameid.h \
688                          freetype/ftoutln.h \
689                          freetype/ftwinfnt.h \
690                          freetype/ftmodapi.h \
691                          freetype/internal/sfnt.h,,,
692                          [#if HAVE_FT2BUILD_H
693                           #include <ft2build.h>
694                           #endif])
695         AC_TRY_CPP([#include <ft2build.h>
696                     #include <freetype/fttrigon.h>],
697                     [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
698           [Define if you have the <freetype/fttrigon.h> header file.])
699                     wine_cv_fttrigon=yes],
700                     wine_cv_fttrigon=no)
701         AC_CHECK_TYPES(FT_TrueTypeEngineType,,,[#include <freetype/ftmodapi.h>])
702         ac_save_CFLAGS="$CFLAGS"
703         CFLAGS="$CFLAGS $FREETYPELIBS"
704         AC_CHECK_FUNCS(FT_Load_Sfnt_Table)
705         CFLAGS="$ac_save_CFLAGS"
706         CPPFLAGS="$ac_save_CPPFLAGS"
707         dnl Check that we have at least freetype/freetype.h
708         if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
709         then
710             AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
711             wine_cv_msg_freetype=no
712         else
713             FREETYPELIBS=""
714             FREETYPEINCL=""
715             wine_cv_msg_freetype=yes
716         fi
717     fi
720 dnl Only build the fonts dir if we have both freetype and fontforge
721 if test "$FONTFORGE" != "false" -a -n "$FREETYPELIBS"
722 then
723   AC_SUBST(FONTSSUBDIRS,"fonts")
726 dnl **** Check for parport (currently Linux only) ****
727 AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
728  AC_TRY_COMPILE(
729    [#include <linux/ppdev.h>],
730    [ioctl (1,PPCLAIM,0)],
731    [ac_cv_c_ppdev="yes"],
732    [ac_cv_c_ppdev="no"])
734 if test "$ac_cv_c_ppdev" = "yes"
735 then
736     AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
739 dnl **** Check for va_copy ****
740 AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
741  AC_TRY_LINK(
742    [#include <stdarg.h>],
743    [va_list ap1, ap2;
744     va_copy(ap1,ap2);
745    ],
746    [ac_cv_c_va_copy="yes"],
747    [ac_cv_c_va_copy="no"])
749 if test "$ac_cv_c_va_copy" = "yes"
750 then
751     AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy])
753 AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
754  AC_TRY_LINK(
755    [#include <stdarg.h>],
756    [va_list ap1, ap2;
757     __va_copy(ap1,ap2);
758    ],
759    [ac_cv_c___va_copy="yes"],
760    [ac_cv_c___va_copy="no"])
762 if test "$ac_cv_c___va_copy" = "yes"
763 then
764     AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
767 dnl **** Check for sigsetjmp ****
768 AC_CACHE_CHECK([for sigsetjmp], ac_cv_c_sigsetjmp,
769  AC_TRY_LINK(
770    [#include <setjmp.h>],
771    [sigjmp_buf buf;
772     sigsetjmp( buf, 1 );
773     siglongjmp( buf, 1 );],
774    [ac_cv_c_sigsetjmp="yes"],
775    [ac_cv_c_sigsetjmp="no"])
777 if test "$ac_cv_c_sigsetjmp" = "yes"
778 then
779     AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have the sigsetjmp (and siglongjmp) function])
782 dnl **** Check for pthread_rwlock_t ****
783 AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
784 #include <pthread.h>])
786 dnl **** Check for pthread functions ****
787 WINE_CHECK_LIB_FUNCS(\
788         pthread_attr_get_np \
789         pthread_getattr_np \
790         pthread_get_stackaddr_np \
791         pthread_get_stacksize_np,
792         [$LIBPTHREAD])
794 dnl **** Check for aRts Sound Server ****
795 AC_PATH_PROG(ARTSCCONFIG, artsc-config)
796 if test x$ARTSCCONFIG != x -a x$ARTSCCONFIG != x'"$ARTSCCONFIG"';
797 then
798     ARTSC_CFLAGS=""
799     for i in `$ARTSCCONFIG --cflags`
800     do
801       case "$i" in
802         -I*) ARTSC_CFLAGS="$ARTSC_CFLAGS $i";;
803       esac
804     done
805     ARTSC_LIBS=""
806     for i in `$ARTSCCONFIG --libs`
807     do
808       case "$i" in
809         -L/usr/lib|-L/usr/lib64) ;;
810         -L*|-l*) ARTSC_LIBS="$ARTSC_LIBS $i";;
811       esac
812     done
813     save_CFLAGS="$CFLAGS"
814     CFLAGS="$CFLAGS $ARTSC_CFLAGS"
815     AC_CHECK_LIB(artsc,arts_init,
816         [AC_TRY_COMPILE([#include <artsc.h>],[arts_stream_t stream;],
817             [AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
818             AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
819             AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])])],,
820             $ARTSC_LIBS)
821     CFLAGS="$save_CFLAGS"
824 dnl **** Check for EsounD ****
825 AC_PATH_PROG(ESDCONFIG, esd-config)
826 if test x$ESDCONFIG != x -a x$ESDCONFIG != x'"$ESDCONFIG"';
827 then
828     ESD_CFLAGS=""
829     for i in `$ESDCONFIG --cflags`
830     do
831       case "$i" in
832         -I*) ESD_CFLAGS="$ESD_CFLAGS $i";;
833       esac
834     done
835     ESD_LIBS=`$ESDCONFIG --libs`
836     save_CFLAGS="$CFLAGS"
837     CFLAGS="$CFLAGS $ESD_CFLAGS"
838     AC_CHECK_LIB(esd,esd_open_sound,
839         [AC_SUBST(ESDLIBS, $ESD_LIBS)
840          AC_SUBST(ESDINCL, $ESD_CFLAGS)
841          AC_DEFINE(HAVE_ESD, 1, [Define if you have EsounD sound server])])
842     CFLAGS="$save_CFLAGS"
845 dnl **** Check for ALSA 1.x ****
846 AC_SUBST(ALSALIBS,"")
847 if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
848 then
849     AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access,
850         [AC_TRY_COMPILE([#ifdef HAVE_ALSA_ASOUNDLIB_H
851 #include <alsa/asoundlib.h>
852 #elif defined(HAVE_SYS_ASOUNDLIB_H)
853 #include <sys/asoundlib.h>
854 #endif],
855                         [int ret = snd_pcm_hw_params_get_access(NULL, NULL)],
856                         [AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA 1.x including devel headers])
857                          ALSALIBS="-lasound"])])
860 dnl **** Check for libaudioio (which can be used to get solaris audio support) ****
862 AC_SUBST(AUDIOIOLIBS,"")
863 if test "$ac_cv_header_libaudioio_h" = "yes"
864 then
865     AC_CHECK_LIB(audioio,AudioIOGetVersion,
866                   [AUDIOIOLIBS="-laudioio"
867                    AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])
870 dnl **** Check for capi4linux ****
872 if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
873 then
874     AC_CHECK_LIB(capi20,capi20_register,[AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])])
877 dnl **** Check for gif header usability ****
879 if test "$ac_cv_header_gif_lib_h" = "yes"
880 then
881     AC_TRY_COMPILE([#include <gif_lib.h>],[static typeof(DGifOpen) * func;],
882         AC_DEFINE(HAVE_GIF, 1, [Define if you have usable GIF headers]))
885 dnl **** Check for gcc specific options ****
887 AC_SUBST(EXTRACFLAGS,"")
888 if test "x${GCC}" = "xyes"
889 then
890   EXTRACFLAGS="-Wall -pipe"
892   dnl Check for strength-reduce bug
893   AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
894                   AC_TRY_RUN([
895 int     L[[4]] = {0,1,2,3};
896 int main(void) {
897   static int Array[[3]];
898   unsigned int B = 3;
899   int i;
900   for(i=0; i<B; i++) Array[[i]] = i - 3;
901   for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
902   L[[i]] = 4;
904   exit( Array[[1]] != -2 || L[[2]] != 3);
906     ac_cv_c_gcc_strength_bug="no",
907     ac_cv_c_gcc_strength_bug="yes",
908     ac_cv_c_gcc_strength_bug="yes") )
909   if test "$ac_cv_c_gcc_strength_bug" = "yes"
910   then
911     EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
912   fi
914   dnl Check for -fshort-wchar
915   AC_CACHE_CHECK([for gcc -fshort-wchar support], ac_cv_c_gcc_fshort_wchar,
916       [WINE_TRY_CFLAGS([-fshort-wchar],
917                       ac_cv_c_gcc_fshort_wchar="yes",ac_cv_c_gcc_fshort_wchar="no")])
918   if test "$ac_cv_c_gcc_fshort_wchar" = "yes"
919   then
920       AC_DEFINE(CC_FLAG_SHORT_WCHAR, "-fshort-wchar", [Specifies the compiler flag that forces a short wchar_t])
921   fi
923   dnl Check for -fno-strict-aliasing
924   AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing,
925       [WINE_TRY_CFLAGS([-fno-strict-aliasing],
926                       ac_cv_c_gcc_no_strict_aliasing="yes",ac_cv_c_gcc_no_strict_aliasing="no")])
927   if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes"
928   then
929     EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
930   fi
932   dnl Check for -gstabs+ option
933   AC_CACHE_CHECK([for gcc -gstabs+ support], ac_cv_c_gcc_gstabs,
934       [WINE_TRY_CFLAGS([-gstabs+],ac_cv_c_gcc_gstabs="yes", ac_cv_c_gcc_gstabs="no")])
935   if test "$ac_cv_c_gcc_gstabs" = "yes"
936   then
937     EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
938   fi
940   dnl Check for -Wdeclaration-after-statement option
941   AC_CACHE_CHECK([for gcc -Wdeclaration-after-statement support], ac_cv_c_gcc_decl_after_statement,
942       [WINE_TRY_CFLAGS([-Wdeclaration-after-statement],ac_cv_c_gcc_decl_after_statement="yes", ac_cv_c_gcc_decl_after_statement="no")])
943   if test "$ac_cv_c_gcc_decl_after_statement" = "yes"
944   then
945     EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
946   fi
948   dnl Check for noisy string.h
949   saved_CFLAGS="$CFLAGS"
950   CFLAGS="$CFLAGS -Wpointer-arith -Werror"
951   AC_CACHE_CHECK([for broken string.h that generates warnings], ac_cv_c_string_h_warnings,
952       AC_TRY_COMPILE([#include <string.h>],[],
953                      [ac_cv_c_string_h_warnings=no],[ac_cv_c_string_h_warnings=yes]))
954   CFLAGS="$saved_CFLAGS"
955   if test "$ac_cv_c_string_h_warnings" = "no"
956   then
957     EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
958   fi
960   AC_SUBST(BUILTINFLAG,"")
961   saved_CFLAGS="$CFLAGS"
962   CFLAGS="$CFLAGS -Werror"
963   AC_CACHE_CHECK([for builtin wchar inlines], ac_cv_c_builtin_wchar_ctype,
964       AC_TRY_COMPILE([],
965                      [int iswlower(unsigned short);],
966                      [ac_cv_c_builtin_wchar_ctype=no],[ac_cv_c_builtin_wchar_ctype=yes]))
967   CFLAGS="$saved_CFLAGS"
968   if test "$ac_cv_c_builtin_wchar_ctype" = "yes"
969   then
970     BUILTINFLAG="-fno-builtin"
971   fi
974 dnl **** Check how to define a function in assembly code ****
976 AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
977   WINE_TRY_ASM_LINK(
978       ["\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0"],,,
979       ac_cv_asm_func_def=".def",
980     [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0"],,,
981       ac_cv_asm_func_def=".type @function",
982     [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0"],,,
983       ac_cv_asm_func_def=".type 2",
984       ac_cv_asm_func_def="unknown")])]))
986 AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function directive])
987 case "$ac_cv_asm_func_def" in
988   ".def")
989      AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"]) ;;
990   ".type @function")
991      AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"]) ;;
992   ".type 2")
993      AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"]) ;;
994   *)
995      AC_DEFINE([__ASM_FUNC(name)], [""]) ;;
996 esac
998 dnl **** Check for underscore on external symbols ****
1000 AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
1001     WINE_TRY_ASM_LINK([".globl _ac_test\n_ac_test:\t.long 0"],
1002                       [extern int ac_test;],
1003                       [if (ac_test) return 1],
1004                       ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
1006 AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
1007 if test "$ac_cv_c_extern_prefix" = "yes"
1008 then
1009   AC_DEFINE([__ASM_NAME(name)], ["_" name])
1010 else
1011   AC_DEFINE([__ASM_NAME(name)], [name])
1014 dnl **** Check for working dll ****
1016 AC_SUBST(DLLEXT,"")
1017 AC_SUBST(DLLFLAGS,"-D_REENTRANT")
1018 AC_SUBST(LDSHARED,"")
1019 AC_SUBST(LDDLLFLAGS,"")
1020 AC_SUBST(LIBEXT,"so")
1021 AC_SUBST(IMPLIBEXT,"def")
1023 case $host_os in
1024   cygwin*|mingw32*)
1025     AC_CHECK_TOOL(DLLTOOL,dlltool,false)
1026     AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
1027     if test "$DLLWRAP" = "false"; then
1028       LIBEXT="a"
1029     else
1030       dnl FIXME - check whether dllwrap works correctly...
1031       LIBEXT="dll"
1032     fi
1033     IMPLIBEXT="a"
1034     dnl We can't build 16-bit NE dlls
1035     WIN16_FILES=""
1036     WIN16_INSTALL=""
1037     ;;
1038   darwin*|macosx*)
1039     DLLEXT=".so"
1040     LIBEXT="dylib"
1041     DLLFLAGS="$DLLFLAGS -fPIC"
1042     LDDLLFLAGS="-bundle -multiply_defined suppress"
1043     LDSHARED="\$(CC) -dynamiclib -install_name @executable_path/\`\$(RELPATH) \$(bindir) \$(libdir)\`/\$(DYNAME)"
1044     STRIP="$STRIP -u -r"
1045     dnl declare needed frameworks
1046     AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
1047     AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation")
1048     AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00000000,-segaddr,WINE_SHARED_HEAP,0x7f000000"])
1049     if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" -a "$ac_cv_header_AudioUnit_AudioUnit_h" = "yes"
1050     then
1051         dnl CoreServices needed by AudioUnit
1052         AC_SUBST(COREAUDIO,"-framework CoreAudio -framework AudioUnit -framework CoreServices")
1053     fi
1054     case $host_cpu in
1055       *powerpc*)
1056         LDDLLFLAGS="$LDDLLFLAGS -read_only_relocs warning"  dnl FIXME
1057         ;;
1058     esac
1059     dnl Disable optimizations because of force_align_arg_pointer bug
1060     dnl FIXME: should be removed when gcc is fixed
1061     CFLAGS=`echo "$CFLAGS" | sed -e s/-O2/-O1/`
1062     ;;
1063   *)
1064     DLLFLAGS="$DLLFLAGS -fPIC"
1065     DLLEXT=".so"
1066     AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
1067         [WINE_TRY_SHLIB_FLAGS([-fPIC -shared -Wl,-Bsymbolic],
1068                               ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
1069     if test "$ac_cv_c_dll_gnuelf" = "yes"
1070     then
1071       LDSHARED="\$(CC) -shared"
1072       LDDLLFLAGS="-shared -Wl,-Bsymbolic"
1073       AC_CACHE_CHECK([whether the linker accepts soname], ac_cv_c_sonames,
1074         [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,confest.so.1],
1075                          ac_cv_c_sonames="yes",ac_cv_c_sonames="no")])
1076       if test "$ac_cv_c_sonames" = "yes"
1077       then
1078         LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
1079       else
1080         AC_CACHE_CHECK([check to see if -h soname is an alternate], ac_cv_c_h_sonames,
1081           [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-h,confest.so.1],
1082                            ac_cv_c_h_sonames="yes",ac_cv_c_h_sonames="no")])
1083         if test "$ac_cv_c_h_sonames" = "yes"
1084         then
1085           LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-h,%)"
1086         fi
1087       fi
1089       AC_CACHE_CHECK([whether the linker accepts -z defs], ac_cv_c_dll_zdefs,
1090         [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-z,defs],
1091                          ac_cv_c_dll_zdefs="yes",ac_cv_c_dll_zdefs="no")])
1092       if test "$ac_cv_c_dll_zdefs" = "yes"
1093       then
1094         LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
1095       fi
1097       AC_CACHE_CHECK([whether the linker accepts -init and -fini], ac_cv_c_dll_init_fini,
1098         [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini],
1099                          ac_cv_c_dll_init_fini="yes",ac_cv_c_dll_init_fini="no")])
1100       if test "$ac_cv_c_dll_init_fini" = "yes"
1101       then
1102         LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
1103       fi
1105       AC_CACHE_CHECK([whether the linker accepts version scripts], ac_cv_c_ld_version_scripts,
1106         [echo '{ global: *; };' >conftest.map
1107          WINE_TRY_CFLAGS([-fPIC -shared -Wl,--version-script=conftest.map],
1108                          ac_cv_c_ld_version_scripts="yes",ac_cv_c_ld_version_scripts="no")
1109          rm -f conftest.map])
1110       if test "$ac_cv_c_ld_version_scripts" = "yes"
1111       then
1112         LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"
1113       fi
1115       AC_CACHE_CHECK([whether the linker accepts --export-dynamic], ac_cv_c_export_dynamic,
1116         [WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
1117                          ac_cv_c_export_dynamic="yes",ac_cv_c_export_dynamic="no")])
1118       if test "$ac_cv_c_export_dynamic" = "yes"
1119       then
1120         AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])
1121       fi
1123       AC_CACHE_CHECK([whether the linker accepts --rpath], ac_cv_ld_rpath,
1124         [WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
1125                          ac_cv_ld_rpath="yes",ac_cv_ld_rpath="no")])
1126       if test "$ac_cv_ld_rpath" = "yes"
1127       then
1128         AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])
1129       fi
1131       case $host_cpu in
1132         *i[[3456789]]86* | x86_64)
1133           AC_CACHE_CHECK([whether we can relocate the executable to 0x7bf00000], ac_cv_ld_reloc_exec,
1134             [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
1135                              ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")])
1136           if test "$ac_cv_ld_reloc_exec" = "yes"
1137           then
1138             LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
1139           fi
1140           ;;
1141       esac
1143     else
1144       AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
1145           [WINE_TRY_SHLIB_FLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
1146                                 ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
1147       if test "$ac_cv_c_dll_unixware" = "yes"
1148       then
1149         LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
1150         LDDLLFLAGS="-Wl,-G,-B,symbolic"
1152       else
1153         AC_CACHE_CHECK(whether we can build an HP-UX dll, ac_cv_c_dll_hpux,
1154           [WINE_TRY_SHLIB_FLAGS([-shared], ac_cv_c_dll_hpux="yes", ac_cv_c_dll_hpux="no")])
1155         if test "$ac_cv_c_dll_hpux" = "yes"
1156         then
1157           LIBEXT="sl"
1158           DLLEXT=".sl"
1159           LDDLLFLAGS="-shared -fPIC"
1160           LDSHARED="\$(CC) -shared"
1161         fi
1162       fi
1163     fi
1165     dnl Check for cross compiler to build test programs
1166     AC_SUBST(CROSSTEST,"")
1167     if test "$cross_compiling" = "no"
1168     then
1169       AC_CHECK_PROGS(CROSSCC,i586-mingw32msvc-gcc i386-mingw32msvc-gcc i386-mingw32-gcc mingw-gcc,false)
1170       AC_CHECK_PROGS(DLLTOOL,i586-mingw32msvc-dlltool i386-mingw32msvc-dlltool i386-mingw32-dlltool mingw-dlltool,false)
1171       AC_CHECK_PROGS(CROSSWINDRES,i586-mingw32msvc-windres i386-mingw32msvc-windres i386-mingw32-windres mingw-windres,false)
1172       if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
1173     fi
1174     ;;
1175 esac
1177 if test "$LIBEXT" = "a"; then
1178   AC_MSG_ERROR(
1179 [could not find a way to build shared libraries.
1180 It is currently not possible to build Wine without shared library
1181 (.so) support to allow transparent switch between .so and .dll files.
1182 If you are using Linux, you will need a newer binutils.]
1186 case $build_os in
1187   cygwin*|mingw32*)
1188     AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/libs/wine:\$\$PATH\"") ;;
1189   darwin*|macosx*)
1190     AC_SUBST(LDPATH,"DYLD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/wine:\$\$DYLD_LIBRARY_PATH\"") ;;
1191   *)
1192     AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/wine:\$\$LD_LIBRARY_PATH\"") ;;
1193 esac
1195 dnl Mingw needs explicit msvcrt for linking libwine and winsock for wininet
1196 case $host_os in
1197   mingw32*)
1198     AC_SUBST(CRTLIBS,"-lmsvcrt")
1199     AC_SUBST(SOCKETLIBS,"-lws2_32")
1200     ;;
1201 esac
1203 AC_SUBST(MAIN_BINARY,"wine-pthread")  dnl Default value
1204 case $host_cpu in
1205   *i[[3456789]]86*)
1206     case $host_os in
1207       linux* | k*bsd*-gnu)
1208         AC_SUBST(MAIN_BINARY,"wine-glibc")
1209         AC_SUBST(EXTRA_BINARIES,"wine-kthread wine-pthread wine-preloader") ;;
1210     esac
1211     ;;
1212 esac
1214 dnl **** Get the soname for libraries that we load dynamically ****
1216 if test "$LIBEXT" = "so" -o "$LIBEXT" = "dylib"
1217 then
1218   WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
1219   WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
1220   WINE_GET_SONAME(Xi,XOpenDevice,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1221   WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1222   WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1223   WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
1224   WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS])
1225   WINE_GET_SONAME(dbus-1,dbus_error_init)
1226   WINE_GET_SONAME(hal,libhal_ctx_new)
1227   WINE_GET_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
1228   WINE_GET_SONAME(cups,cupsGetDefault)
1229   WINE_GET_SONAME(jack,jack_client_new)
1230   WINE_GET_SONAME(fontconfig,FcInit)
1231   WINE_GET_SONAME(ssl,SSL_library_init)
1232   WINE_GET_SONAME(crypto,BIO_new_socket)
1233   WINE_GET_SONAME(ncurses,waddch)
1234   WINE_GET_SONAME(curses,waddch)
1235   WINE_GET_SONAME(jpeg,jpeg_start_decompress)
1236   WINE_GET_SONAME(ungif,DGifOpen)
1237   WINE_GET_SONAME(gif,DGifOpen)
1238   WINE_GET_SONAME(capi20,capi20_isinstalled)
1242 dnl **** Check for functions ****
1244 AC_CHECK_FUNCS(\
1245         _pclose \
1246         _popen \
1247         _snprintf \
1248         _spawnvp \
1249         _stricmp \
1250         _strnicmp \
1251         _vsnprintf \
1252         asctime_r \
1253         chsize \
1254         clone \
1255         connect \
1256         dlopen \
1257         epoll_create \
1258         ffs \
1259         finite \
1260         fork \
1261         fpclass \
1262         fstatfs \
1263         fstatvfs \
1264         ftruncate \
1265         futimes \
1266         futimesat \
1267         getaddrinfo \
1268         gethostbyname \
1269         getnameinfo \
1270         getnetbyname \
1271         getopt_long \
1272         getpagesize \
1273         getprotobyname \
1274         getprotobynumber \
1275         getpwuid \
1276         getservbyport \
1277         gettid \
1278         gettimeofday \
1279         getuid \
1280         inet_aton \
1281         inet_network \
1282         kqueue \
1283         lstat \
1284         memmove \
1285         mmap \
1286         pclose \
1287         poll \
1288         popen \
1289         prctl \
1290         pread \
1291         pwrite \
1292         readlink \
1293         rfork \
1294         sched_yield \
1295         select \
1296         sendmsg \
1297         setrlimit \
1298         settimeofday \
1299         sigaltstack \
1300         sigprocmask \
1301         snprintf \
1302         spawnvp \
1303         statfs \
1304         statvfs \
1305         strcasecmp \
1306         strerror \
1307         strncasecmp \
1308         tcgetattr \
1309         timegm \
1310         usleep \
1311         vsnprintf \
1312         wait4 \
1313         waitpid \
1316 dnl Check for -ldl
1317 if test "$ac_cv_func_dlopen" = no
1318 then
1319     AC_CHECK_LIB(dl,dlopen,[AC_DEFINE(HAVE_DLOPEN,1) AC_SUBST(LIBDL,"-ldl")])
1321 WINE_CHECK_LIB_FUNCS(dladdr,[$LIBDL])
1323 dnl Check for -lpoll for Mac OS X/Darwin
1324 if test "$ac_cv_func_poll" = no
1325 then
1326     AC_CHECK_LIB(poll,poll,[AC_DEFINE(HAVE_POLL,1) AC_SUBST(LIBPOLL,"-lpoll")])
1329 dnl Check for -lnsl for Solaris
1330 if test "$ac_cv_func_gethostbyname" = no
1331 then
1332     AC_CHECK_LIB(nsl,gethostbyname)
1335 dnl Check for -lsocket for Solaris
1336 if test "$ac_cv_func_connect" = no
1337 then
1338     AC_CHECK_LIB(socket,connect)
1341 dnl Check for -lresolv for Solaris
1342 if test "$ac_cv_func_inet_aton" = no
1343 then
1344     AC_CHECK_LIB(resolv,inet_aton)
1347 dnl **** Check for types ****
1349 AC_C_CONST
1350 AC_C_INLINE
1351 AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t])
1352 AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])
1353 AC_CHECK_TYPES([request_sense],,,[#include <linux/cdrom.h>])
1355 AC_CHECK_MEMBERS([struct ff_effect.direction],,,
1356 [#ifdef HAVE_LINUX_INPUT_H
1357 #include <linux/input.h>
1358 #endif])
1360 AC_CACHE_CHECK([for sigaddset],wine_cv_have_sigaddset,
1361                AC_TRY_LINK([#include <signal.h>],[sigset_t set; sigaddset(&set,SIGTERM);],
1362                            wine_cv_have_sigaddset=yes,wine_cv_have_sigaddset=no))
1363 if test "$wine_cv_have_sigaddset" = "yes"
1364 then
1365   AC_DEFINE(HAVE_SIGADDSET, 1, [Define if sigaddset is supported])
1369 AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
1370         wine_cv_linux_gethostbyname_r_6,
1371         AC_TRY_LINK([
1372 #include <netdb.h>
1373         ], [
1374     char *name=NULL;
1375     struct hostent he;
1376     struct hostent *result;
1377     char *buf=NULL;
1378     int bufsize=0;
1379     int res,errnr;
1380     char *addr=NULL;
1381     int addrlen=0;
1382     int addrtype=0;
1383     res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1384     res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1385     ],
1386         wine_cv_linux_gethostbyname_r_6=yes,
1387         wine_cv_linux_gethostbyname_r_6=no
1388         )
1389    )
1390    if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1391    then
1392       AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1393                 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
1394    fi
1396 if test "$ac_cv_header_linux_joystick_h" = "yes"
1397 then
1398    AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
1399         wine_cv_linux_joystick_22_api,
1400         AC_TRY_COMPILE([
1401         #include <sys/ioctl.h>
1402         #include <linux/joystick.h>
1404         struct js_event blub;
1405         #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1406         #error "no 2.2 header"
1407         #endif
1408         ],/*empty*/,
1409         wine_cv_linux_joystick_22_api=yes,
1410         wine_cv_linux_joystick_22_api=no,
1411         wine_cv_linux_joystick_22_api=no
1412         )
1413    )
1414    if test "$wine_cv_linux_joystick_22_api" = "yes"
1415    then
1416       AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1417                 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
1418    fi
1421 dnl **** FIXME: what about mixed cases, where we need two of them? ***
1423 dnl Check for statfs members
1424 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],,,
1425 [#include <sys/types.h>
1426 #ifdef HAVE_SYS_PARAM_H
1427 # include <sys/param.h>
1428 #endif
1429 #ifdef HAVE_SYS_MOUNT_H
1430 # include <sys/mount.h>
1431 #endif
1432 #ifdef HAVE_SYS_VFS_H
1433 # include <sys/vfs.h>
1434 #endif
1435 #ifdef HAVE_SYS_STATFS_H
1436 # include <sys/statfs.h>
1437 #endif])
1439 AC_CHECK_MEMBERS([struct statvfs.f_blocks],,,
1440 [#ifdef HAVE_SYS_STATVFS_H
1441 #include <sys/statvfs.h>
1442 #endif])
1444 dnl Check for socket structure members
1445 AC_CHECK_MEMBERS([struct msghdr.msg_accrights, struct sockaddr.sa_len, struct sockaddr_un.sun_len],,,
1446 [#include <sys/types.h>
1447 #ifdef HAVE_SYS_SOCKET_H
1448 # include <sys/socket.h>
1449 #endif
1450 #ifdef HAVE_SYS_UN_H
1451 # include <sys/un.h>
1452 #endif])
1454 dnl Check for scsireq_t and sg_io_hdr_t members
1455 AC_CHECK_MEMBERS([scsireq_t.cmd, sg_io_hdr_t.interface_id],,,
1456 [#include <sys/types.h>
1457 #ifdef HAVE_SCSI_SG_H
1458 #include <scsi/sg.h>
1459 #endif])
1461 dnl Check for siginfo_t members
1462 AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
1464 dnl Check for struct mtget members
1465 AC_CHECK_MEMBERS([struct mtget.mt_blksiz, struct mtget.mt_gstat, struct mtget.mt_blkno],,,
1466 [#include <sys/types.h>
1467 #ifdef HAVE_SYS_MTIO_H
1468 #include <sys/mtio.h>
1469 #endif])
1471 dnl Check for struct option
1472 AC_CHECK_MEMBERS([struct option.name],,,
1473 [#ifdef HAVE_GETOPT_H
1474 #include <getopt.h>
1475 #endif])
1477 dnl Check for stat.st_blocks
1478 AC_CHECK_MEMBERS([struct stat.st_blocks])
1480 dnl Check for sin6_scope_id
1481 AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
1482 [#ifdef HAVE_SYS_TYPES_H
1483 #include <sys/types.h>
1484 #endif
1485 #ifdef HAVE_NETINET_IN_H
1486 #include <netinet/in.h>
1487 #endif])
1489 dnl Check for ns_msg ptr member
1490 AC_CHECK_MEMBERS([ns_msg._msg_ptr],,,
1491 [#ifdef HAVE_SYS_TYPES_H
1492 #include <sys/types.h>
1493 #endif
1494 #ifdef HAVE_NETINET_IN_H
1495 # include <netinet/in.h>
1496 #endif
1497 #ifdef HAVE_ARPA_NAMESER_H
1498 # include <arpa/nameser.h>
1499 #endif])
1501 dnl Check for the external timezone variables timezone and daylight
1502 AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
1503                AC_TRY_LINK([#include <time.h>],[timezone;],
1504                            ac_cv_have_timezone="yes", ac_cv_have_timezone="no"))
1505 if test "$ac_cv_have_timezone" = "yes"
1506 then
1507     AC_DEFINE(HAVE_TIMEZONE, 1, [Define if you have the timezone variable])
1509 AC_CACHE_CHECK([for daylight variable], ac_cv_have_daylight,
1510                AC_TRY_LINK([#include <time.h>],[daylight;],
1511                            ac_cv_have_daylight="yes", ac_cv_have_daylight="no"))
1512 if test "$ac_cv_have_daylight" = "yes"
1513 then
1514     AC_DEFINE(HAVE_DAYLIGHT, 1, [Define if you have the daylight variable])
1517 dnl *** check for the need to define platform-specific symbols
1519 case $host_cpu in
1520   *i[[3456789]]86*) WINE_CHECK_DEFINE([__i386__]) ;;
1521   *x86_64*)         WINE_CHECK_DEFINE([__x86_64__])
1522                     WINE_CHECK_DEFINE([_WIN64]) ;;
1523   *alpha*)          WINE_CHECK_DEFINE([__ALPHA__]) ;;
1524   *sparc*)          WINE_CHECK_DEFINE([__sparc__]) ;;
1525   *powerpc*)        WINE_CHECK_DEFINE([__powerpc__]) ;;
1526 esac
1528 case $host_vendor in
1529   *sun*) WINE_CHECK_DEFINE([__sun__]) ;;
1530 esac
1532 dnl **** Generate output files ****
1534 AH_TOP([#define __WINE_CONFIG_H])
1536 WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1537 WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1538 WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
1539 WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
1540 WINE_CONFIG_EXTRA_DIR(dlls/wineps.drv/data)
1541 WINE_CONFIG_EXTRA_DIR(include/wine)
1543 MAKE_RULES=Make.rules
1544 AC_SUBST_FILE(MAKE_RULES)
1546 MAKE_DLL_RULES=dlls/Makedll.rules
1547 AC_SUBST_FILE(MAKE_DLL_RULES)
1549 MAKE_IMPLIB_RULES=dlls/Makeimplib.rules
1550 AC_SUBST_FILE(MAKE_IMPLIB_RULES)
1552 MAKE_TEST_RULES=dlls/Maketest.rules
1553 AC_SUBST_FILE(MAKE_TEST_RULES)
1555 MAKE_PROG_RULES=programs/Makeprog.rules
1556 AC_SUBST_FILE(MAKE_PROG_RULES)
1558 AC_CONFIG_FILES([
1559 Make.rules
1560 dlls/Makedll.rules
1561 dlls/Makeimplib.rules
1562 dlls/Maketest.rules
1563 programs/Makeprog.rules
1564 Makefile
1565 dlls/Makefile
1566 dlls/activeds/Makefile
1567 dlls/advapi32/Makefile
1568 dlls/advapi32/tests/Makefile
1569 dlls/advpack/Makefile
1570 dlls/advpack/tests/Makefile
1571 dlls/amstream/Makefile
1572 dlls/atl/Makefile
1573 dlls/avicap32/Makefile
1574 dlls/avifil32/Makefile
1575 dlls/cabinet/Makefile
1576 dlls/cabinet/tests/Makefile
1577 dlls/capi2032/Makefile
1578 dlls/cards/Makefile
1579 dlls/cfgmgr32/Makefile
1580 dlls/comcat/Makefile
1581 dlls/comcat/tests/Makefile
1582 dlls/comctl32/Makefile
1583 dlls/comctl32/tests/Makefile
1584 dlls/comdlg32/Makefile
1585 dlls/comdlg32/tests/Makefile
1586 dlls/compstui/Makefile
1587 dlls/crtdll/Makefile
1588 dlls/crypt32/Makefile
1589 dlls/crypt32/tests/Makefile
1590 dlls/cryptdll/Makefile
1591 dlls/cryptnet/Makefile
1592 dlls/ctl3d32/Makefile
1593 dlls/d3d8/Makefile
1594 dlls/d3d8/tests/Makefile
1595 dlls/d3d9/Makefile
1596 dlls/d3d9/tests/Makefile
1597 dlls/d3dim/Makefile
1598 dlls/d3drm/Makefile
1599 dlls/d3dx8/Makefile
1600 dlls/d3dxof/Makefile
1601 dlls/dbghelp/Makefile
1602 dlls/dciman32/Makefile
1603 dlls/ddraw/Makefile
1604 dlls/ddraw/tests/Makefile
1605 dlls/devenum/Makefile
1606 dlls/dinput/Makefile
1607 dlls/dinput/tests/Makefile
1608 dlls/dinput8/Makefile
1609 dlls/dmband/Makefile
1610 dlls/dmcompos/Makefile
1611 dlls/dmime/Makefile
1612 dlls/dmloader/Makefile
1613 dlls/dmscript/Makefile
1614 dlls/dmstyle/Makefile
1615 dlls/dmsynth/Makefile
1616 dlls/dmusic/Makefile
1617 dlls/dmusic32/Makefile
1618 dlls/dnsapi/Makefile
1619 dlls/dnsapi/tests/Makefile
1620 dlls/dplay/Makefile
1621 dlls/dplayx/Makefile
1622 dlls/dpnet/Makefile
1623 dlls/dpnhpast/Makefile
1624 dlls/dsound/Makefile
1625 dlls/dsound/tests/Makefile
1626 dlls/dswave/Makefile
1627 dlls/dxdiagn/Makefile
1628 dlls/dxerr8/Makefile
1629 dlls/dxerr9/Makefile
1630 dlls/dxguid/Makefile
1631 dlls/gdi/Makefile
1632 dlls/gdi/tests/Makefile
1633 dlls/glu32/Makefile
1634 dlls/glut32/Makefile
1635 dlls/gphoto2.ds/Makefile
1636 dlls/hhctrl.ocx/Makefile
1637 dlls/hid/Makefile
1638 dlls/hlink/Makefile
1639 dlls/hlink/tests/Makefile
1640 dlls/iccvid/Makefile
1641 dlls/icmp/Makefile
1642 dlls/ifsmgr.vxd/Makefile
1643 dlls/imaadp32.acm/Makefile
1644 dlls/imagehlp/Makefile
1645 dlls/imm32/Makefile
1646 dlls/infosoft/Makefile
1647 dlls/infosoft/tests/Makefile
1648 dlls/inseng/Makefile
1649 dlls/iphlpapi/Makefile
1650 dlls/iphlpapi/tests/Makefile
1651 dlls/itss/Makefile
1652 dlls/kernel/Makefile
1653 dlls/kernel/tests/Makefile
1654 dlls/lz32/Makefile
1655 dlls/lz32/tests/Makefile
1656 dlls/mapi32/Makefile
1657 dlls/mapi32/tests/Makefile
1658 dlls/mciavi32/Makefile
1659 dlls/mcicda/Makefile
1660 dlls/mciseq/Makefile
1661 dlls/mciwave/Makefile
1662 dlls/midimap/Makefile
1663 dlls/mlang/Makefile
1664 dlls/mlang/tests/Makefile
1665 dlls/mmdevldr.vxd/Makefile
1666 dlls/monodebg.vxd/Makefile
1667 dlls/mpr/Makefile
1668 dlls/mprapi/Makefile
1669 dlls/msacm32.drv/Makefile
1670 dlls/msacm32/Makefile
1671 dlls/msacm32/tests/Makefile
1672 dlls/msadp32.acm/Makefile
1673 dlls/mscms/Makefile
1674 dlls/mscms/tests/Makefile
1675 dlls/msdmo/Makefile
1676 dlls/msftedit/Makefile
1677 dlls/msg711.acm/Makefile
1678 dlls/mshtml/Makefile
1679 dlls/mshtml/tests/Makefile
1680 dlls/msi/Makefile
1681 dlls/msi/tests/Makefile
1682 dlls/msimg32/Makefile
1683 dlls/msisys.ocx/Makefile
1684 dlls/msnet32/Makefile
1685 dlls/msrle32/Makefile
1686 dlls/msvcrt/Makefile
1687 dlls/msvcrt/tests/Makefile
1688 dlls/msvcrt20/Makefile
1689 dlls/msvcrt40/Makefile
1690 dlls/msvcrtd/Makefile
1691 dlls/msvcrtd/tests/Makefile
1692 dlls/msvfw32/Makefile
1693 dlls/msvidc32/Makefile
1694 dlls/mswsock/Makefile
1695 dlls/msxml3/Makefile
1696 dlls/msxml3/tests/Makefile
1697 dlls/netapi32/Makefile
1698 dlls/netapi32/tests/Makefile
1699 dlls/newdev/Makefile
1700 dlls/ntdll/Makefile
1701 dlls/ntdll/tests/Makefile
1702 dlls/ntdsapi/Makefile
1703 dlls/objsel/Makefile
1704 dlls/odbc32/Makefile
1705 dlls/odbccp32/Makefile
1706 dlls/ole32/Makefile
1707 dlls/ole32/tests/Makefile
1708 dlls/oleacc/Makefile
1709 dlls/oleaut32/Makefile
1710 dlls/oleaut32/tests/Makefile
1711 dlls/olecli32/Makefile
1712 dlls/oledlg/Makefile
1713 dlls/olepro32/Makefile
1714 dlls/olesvr32/Makefile
1715 dlls/opengl32/Makefile
1716 dlls/powrprof/Makefile
1717 dlls/psapi/Makefile
1718 dlls/psapi/tests/Makefile
1719 dlls/pstorec/Makefile
1720 dlls/qcap/Makefile
1721 dlls/quartz/Makefile
1722 dlls/quartz/tests/Makefile
1723 dlls/query/Makefile
1724 dlls/rasapi32/Makefile
1725 dlls/riched20/Makefile
1726 dlls/riched20/tests/Makefile
1727 dlls/riched32/Makefile
1728 dlls/rpcrt4/Makefile
1729 dlls/rpcrt4/tests/Makefile
1730 dlls/rsabase/Makefile
1731 dlls/rsabase/tests/Makefile
1732 dlls/rsaenh/Makefile
1733 dlls/rsaenh/tests/Makefile
1734 dlls/sane.ds/Makefile
1735 dlls/secur32/Makefile
1736 dlls/secur32/tests/Makefile
1737 dlls/security/Makefile
1738 dlls/sensapi/Makefile
1739 dlls/serialui/Makefile
1740 dlls/setupapi/Makefile
1741 dlls/setupapi/tests/Makefile
1742 dlls/sfc/Makefile
1743 dlls/shdocvw/Makefile
1744 dlls/shdocvw/tests/Makefile
1745 dlls/shell32/Makefile
1746 dlls/shell32/tests/Makefile
1747 dlls/shfolder/Makefile
1748 dlls/shlwapi/Makefile
1749 dlls/shlwapi/tests/Makefile
1750 dlls/snmpapi/Makefile
1751 dlls/spoolss/Makefile
1752 dlls/stdole2.tlb/Makefile
1753 dlls/stdole32.tlb/Makefile
1754 dlls/sti/Makefile
1755 dlls/strmiids/Makefile
1756 dlls/tapi32/Makefile
1757 dlls/twain_32/Makefile
1758 dlls/unicows/Makefile
1759 dlls/url/Makefile
1760 dlls/urlmon/Makefile
1761 dlls/urlmon/tests/Makefile
1762 dlls/user/Makefile
1763 dlls/user/tests/Makefile
1764 dlls/userenv/Makefile
1765 dlls/usp10/Makefile
1766 dlls/usp10/tests/Makefile
1767 dlls/uuid/Makefile
1768 dlls/uxtheme/Makefile
1769 dlls/uxtheme/tests/Makefile
1770 dlls/vdhcp.vxd/Makefile
1771 dlls/vdmdbg/Makefile
1772 dlls/version/Makefile
1773 dlls/version/tests/Makefile
1774 dlls/vmm.vxd/Makefile
1775 dlls/vnbt.vxd/Makefile
1776 dlls/vnetbios.vxd/Makefile
1777 dlls/vtdapi.vxd/Makefile
1778 dlls/vwin32.vxd/Makefile
1779 dlls/w32skrnl/Makefile
1780 dlls/winecrt0/Makefile
1781 dlls/wined3d/Makefile
1782 dlls/winedos/Makefile
1783 dlls/winemp3.acm/Makefile
1784 dlls/wineps.drv/Makefile
1785 dlls/winex11.drv/Makefile
1786 dlls/wininet/Makefile
1787 dlls/wininet/tests/Makefile
1788 dlls/winmm/Makefile
1789 dlls/winmm/joystick/Makefile
1790 dlls/winmm/tests/Makefile
1791 dlls/winmm/winealsa/Makefile
1792 dlls/winmm/winearts/Makefile
1793 dlls/winmm/wineaudioio/Makefile
1794 dlls/winmm/winecoreaudio/Makefile
1795 dlls/winmm/wineesd/Makefile
1796 dlls/winmm/winejack/Makefile
1797 dlls/winmm/winenas/Makefile
1798 dlls/winmm/wineoss/Makefile
1799 dlls/winnls32/Makefile
1800 dlls/winspool.drv/Makefile
1801 dlls/winspool.drv/tests/Makefile
1802 dlls/wintab32/Makefile
1803 dlls/wintrust/Makefile
1804 dlls/wldap32/Makefile
1805 dlls/wnaspi32/Makefile
1806 dlls/wow32/Makefile
1807 dlls/ws2_32/Makefile
1808 dlls/ws2_32/tests/Makefile
1809 dlls/wsock32/Makefile
1810 dlls/wtsapi32/Makefile
1811 documentation/Makefile
1812 fonts/Makefile
1813 include/Makefile
1814 libs/Makefile
1815 libs/port/Makefile
1816 libs/wine/Makefile
1817 libs/wpp/Makefile
1818 loader/Makefile
1819 programs/Makefile
1820 programs/clock/Makefile
1821 programs/cmdlgtst/Makefile
1822 programs/control/Makefile
1823 programs/eject/Makefile
1824 programs/expand/Makefile
1825 programs/explorer/Makefile
1826 programs/hh/Makefile
1827 programs/icinfo/Makefile
1828 programs/iexplore/Makefile
1829 programs/msiexec/Makefile
1830 programs/notepad/Makefile
1831 programs/oleview/Makefile
1832 programs/progman/Makefile
1833 programs/regedit/Makefile
1834 programs/regsvr32/Makefile
1835 programs/rpcss/Makefile
1836 programs/rundll32/Makefile
1837 programs/start/Makefile
1838 programs/taskmgr/Makefile
1839 programs/uninstaller/Makefile
1840 programs/view/Makefile
1841 programs/wcmd/Makefile
1842 programs/wineboot/Makefile
1843 programs/winebrowser/Makefile
1844 programs/winecfg/Makefile
1845 programs/wineconsole/Makefile
1846 programs/winedbg/Makefile
1847 programs/winefile/Makefile
1848 programs/winemenubuilder/Makefile
1849 programs/winemine/Makefile
1850 programs/winepath/Makefile
1851 programs/winetest/Makefile
1852 programs/winevdm/Makefile
1853 programs/winhelp/Makefile
1854 programs/winver/Makefile
1855 programs/wordpad/Makefile
1856 server/Makefile
1857 tools/Makefile
1858 tools/widl/Makefile
1859 tools/winapi/Makefile
1860 tools/winebuild/Makefile
1861 tools/winedump/Makefile
1862 tools/winegcc/Makefile
1863 tools/wmc/Makefile
1864 tools/wrc/Makefile])
1866 AC_OUTPUT
1868 if test "$have_x" = "no"
1869 then
1870   echo >&2
1871   AC_MSG_WARN([X development files not found. Wine will be built without])
1872   AC_MSG_WARN([X support, which currently does not work, and probably])
1873   AC_MSG_WARN([isn't what you want anyway. You will need to install devel])
1874   AC_MSG_WARN([ packages of Xlib/Xfree86 at the very least.])
1877 if test "$wine_cv_opengl_version_OK" = "no"
1878 then
1879   echo >&2
1880   AC_MSG_WARN([Old Mesa headers detected. Wine will be built without Direct3D])
1881   AC_MSG_WARN([support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/).])
1884 if test "$wine_cv_msg_freetype" = "yes"
1885 then
1886   echo >&2
1887   AC_MSG_WARN([Your system appears to have the FreeType 2 runtime libraries])
1888   AC_MSG_WARN([installed, but 'freetype-config' is not in your PATH. Install])
1889   AC_MSG_WARN([the freetype-devel package (or its equivalent on your distribution)])
1890   AC_MSG_WARN([to enable Wine to use TrueType fonts.])
1893 if test -z "$FONTSSUBDIRS"
1894 then
1895   echo >&2
1896   if test "$FONTFORGE" = "false"
1897   then
1898     AC_MSG_WARN([FontForge is missing.])
1899   else
1900     AC_MSG_WARN([FreeType is missing.])
1901   fi
1902   AC_MSG_WARN([Fonts will not be built. Dialog text may be invisible or unaligned.])
1905 if test -z "$ALSALIBS" -a \
1906         -z "$ARTSC_LIBS" -a \
1907         -z "$AUDIOIOLIBS" -a \
1908         -z "$NASLIBS" -a \
1909         -z "$ESD_LIBS" -a \
1910         -z "$ac_cv_lib_soname_jack" -a \
1911         "$ac_cv_header_sys_soundcard_h" != "yes" -a \
1912         "$ac_cv_header_machine_soundcard_h" != "yes" -a \
1913         "$ac_cv_header_soundcard_h" != "yes"
1914 then
1915   echo >&2
1916   AC_MSG_WARN([No sound system was found. Windows applications will be silent.])
1917   AC_MSG_WARN([The currently supported sound systems are:])
1918   AC_MSG_WARN([ALSA, ARTS, EsounD, AudioIO, Jack, NAS and OSS])
1921 echo
1922 echo "Configure finished.  Do '${ac_make} depend && ${ac_make}' to compile Wine."
1923 echo
1925 dnl Local Variables:
1926 dnl comment-start: "dnl "
1927 dnl comment-end: ""
1928 dnl comment-start-skip: "\\bdnl\\b\\s *"
1929 dnl compile-command: "autoconf && autoheader"
1930 dnl End: