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