Build AFM data for core PostScript fonts into WINEPS.
[wine] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl Author: Michael Patra   <micky@marie.physik.tu-berlin.de>
3 dnl                         <patra@itp1.physik.tu-berlin.de>
4 AC_REVISION([configure.in 1.00])
5 AC_INIT(controls/edit.c)                
6 AC_CONFIG_HEADER(include/config.h)
7 AC_CONFIG_AUX_DIR(tools)
8
9 dnl **** Command-line arguments ****
10
11 dnl Default values
12 LIBEXT=so       # library type .so or .a
13 TRACE_MSGS=yes  # the TRACE() macro
14 DEBUG_MSGS=yes  # the TRACE(), WARN(), and FIXME() macros.
15 CURSES=yes
16 OPENGL=normal
17
18 AC_ARG_ENABLE(debug,
19 [  --disable-debug         compile out all debugging messages],
20 [if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
21
22 AC_ARG_ENABLE(opengl,
23 [  --enable-opengl         force usage of OpenGL even if the latter is thread-safe via pthread],
24 [if test "$enableval" = "no"; then OPENGL="no"; elif test "$enableval" = "yes"; then OPENGL="yes"; fi])
25
26 AC_ARG_ENABLE(trace,
27 [  --disable-trace         compile out TRACE messages],
28 [if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
29
30 AC_ARG_WITH(curses,
31 [  --without-curses        do not use curses],
32 [if test "$withval" = "no"; then CURSES="no"; fi])
33
34 AC_ARG_WITH(reentrant-x,
35 [  --without-reentrant-x   compile for use with non-reentrant X libraries])
36
37 AC_SUBST(OPTIONS)
38
39 if test "$DEBUG_MSGS" = "no"
40 then
41     AC_DEFINE(NO_DEBUG_MSGS)
42     AC_DEFINE(NO_TRACE_MSGS)
43 else
44     if test "$TRACE_MSGS" = "no"
45     then
46         AC_DEFINE(NO_TRACE_MSGS)
47     fi
48 fi
49
50 dnl **** Check for some programs ****
51
52 AC_PROG_MAKE_SET
53 AC_PROG_CC
54 AC_PROG_CPP
55 AC_PATH_XTRA
56 AC_PROG_YACC
57 AC_PROG_LEX
58 AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
59 if test "$XLEX" = "none"
60 then
61         echo "*** Error: No suitable lex found. ***"
62         echo "    Please install the 'flex' package."
63         exit 1
64 fi
65 AC_DECL_YYTEXT
66 AC_PROG_RANLIB
67 AC_PROG_INSTALL
68 AC_PROG_LN_S
69 AC_CHECK_PROG(C2MAN,c2man,c2man,\$(TOPSRCDIR)/tools/c2man.pl)
70 AC_PATH_PROG(LDCONFIG, ldconfig, true, /sbin:/usr/sbin:$PATH)
71 AC_CYGWIN
72 AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false)
73
74 dnl Check for lint
75 AC_CHECK_PROGS(LINT, lclint lint)
76 if test "$LINT" = "lint"
77 then
78   LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
79   dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
80 fi
81 AC_SUBST(LINT)
82 AC_SUBST(LINTFLAGS)
83
84 if test "$CYGWIN" = "yes"
85 then
86     LDCOMBINE="ld -r --enable-stdcall-fixup"
87 else
88     LDCOMBINE="ld -r"
89 fi
90 AC_SUBST(LDCOMBINE)
91
92 dnl **** Check for some libraries ****
93
94 dnl Check for -lm for BeOS
95 AC_CHECK_LIB(m,sqrt)
96 dnl Check for -li386 for NetBSD and OpenBSD
97 AC_CHECK_LIB(i386,i386_set_ldt)
98 dnl Check for -lossaudio for NetBSD
99 AC_CHECK_LIB(ossaudio,_oss_ioctl)
100 dnl Check for -lw for Solaris
101 AC_CHECK_FUNCS(iswalnum,,AC_CHECK_LIB(w,iswalnum))
102 dnl Check for -lnsl for Solaris
103 AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
104 dnl Check for -lsocket for Solaris
105 AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
106 dnl Check for -lxpg4 for FreeBSD
107 AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
108 dnl Check for -lmmap for OS/2
109 AC_CHECK_LIB(mmap,mmap)
110 dnl Check for openpty
111 AC_CHECK_FUNCS(openpty,,
112         AC_CHECK_LIB(util,openpty,
113                 AC_DEFINE(HAVE_OPENPTY)
114                 LIBS="$LIBS -lutil"
115         ))
116
117 AC_CHECK_HEADERS(dlfcn.h,
118         AC_CHECK_FUNCS(dlopen,
119                 AC_DEFINE(HAVE_DL_API),
120                 AC_CHECK_LIB(dl,dlopen,
121                         AC_DEFINE(HAVE_DL_API)
122                         LIBS="$LIBS -ldl",
123                         LIBEXT="a"
124                 )
125         ),
126         LIBEXT="a"
127 )
128 AC_SUBST(XLIB)
129 AC_SUBST(X_DLLS)
130 X_DLLS=""
131 AC_SUBST(XFILES)
132 XFILES=""
133 AC_SUBST(OPENGLFILES)
134 OPENGLFILES=""
135 AC_SUBST(OPENGL32_DLL)
136 OPENGL32_DLL=""
137 if test "$have_x" = "yes"
138 then
139     XLIB="-lXext -lX11"
140     ac_save_CPPFLAGS="$CPPFLAGS"
141     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
142
143     dnl *** Check for -lXpm
144     AC_CHECK_HEADERS(X11/xpm.h,
145       [ dnl *** If X11/xpm.h exists...
146         AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
147           [ AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm"],,
148           $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
149         )
150       ],
151       [ dnl *** If X11/xpm.h does not exist...
152         dnl NOTE: autoconf does not allow commas inside the third 
153         dnl       parameter to AC_CHECK_HEADERS, due to some quoting
154         dnl       magic it does.
155         echo "Redhat            :       xpm xpm-devel"
156         echo "Caldera OpenLinux :       xpm xpm-devel xpm-devel-static"
157         echo "SuSE              :       xpm"
158         echo "Debian/Corel Linux:       xpm4g xpm4g-dev"
159         echo
160         echo "Or get the sources from ftp.x.org and all its mirror sites from "
161         echo "the directory /contrib/libraries."
162         echo
163         exit 1
164       ]
165     )
166
167     dnl *** All three of the following tests require X11/Xlib.h
168     AC_CHECK_HEADERS(X11/Xlib.h,
169       [
170         dnl *** Check for X keyboard extension
171         AC_CHECK_HEADERS(X11/XKBlib.h,
172             [ dnl *** If X11/XKBlib.h exists...
173               AC_CHECK_LIB(X11, XkbQueryExtension,
174               AC_DEFINE(HAVE_XKB),,
175               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
176             ],
177             AC_MSG_WARN([XKB extension not found!!])
178         )
179
180         dnl *** Check for X Shm extension
181         AC_CHECK_HEADERS(X11/extensions/XShm.h,
182             [ dnl *** If X11/extensions/XShm.h exists...
183               AC_CHECK_LIB(Xext, XShmQueryExtension,
184               AC_DEFINE(HAVE_LIBXXSHM),,
185               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
186             ],
187             AC_MSG_WARN([Xshm extension not found!!])
188         )
189
190         dnl *** Check for X shape extension
191         AC_CHECK_HEADERS(X11/extensions/shape.h,
192             [ dnl *** If X11/extensions/shape.h exists...
193               AC_CHECK_LIB(Xext,XShapeQueryExtension,
194               AC_DEFINE(HAVE_LIBXSHAPE),,
195               $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
196             ],
197             AC_MSG_WARN([XShape extension not found!!])
198         )
199         
200         dnl *** Check for XFree86 DGA / DGA 2.0 extension
201         AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
202             [ dnl *** If X11/extensions/xf86dga.h exists, check 
203               dnl *** for XDGAQueryExtension()...
204               AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
205                 [ dnl *** If found...
206                   AC_DEFINE(HAVE_LIBXXF86DGA2)
207                   AC_DEFINE(HAVE_LIBXXF86DGA)
208                   X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
209                ],
210                 [ dnl *** If not found, look for XF86DGAQueryExtension()
211                   dnl *** instead (DGA 2.0 not found)...
212                   AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
213                     [ AC_DEFINE(HAVE_LIBXXF86DGA)
214                       X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
215                     ],,
216                     $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
217                   )
218                 ],
219                 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
220               )
221             ],
222             AC_MSG_WARN([DGA extension not found!!])
223         )
224
225         dnl *** Check for XFree86 VMODE extension
226         AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
227             [ dnl *** If X11/extensions/xf86vmode.h exists...
228                 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
229                   [ AC_DEFINE(HAVE_LIBXXF86VM)
230                      X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
231                   ],,
232                   $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
233                 )
234             ],
235             AC_MSG_WARN([XFree86 VMODE extension not found!!])
236         )
237
238         dnl *** Check for XVideo extension supporting XvImages
239         AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
240             [ dnl *** If X11/extensions/Xvlib.h exists...
241                 AC_CHECK_LIB(Xv, XvShmCreateImage,
242                   [ AC_DEFINE(HAVE_XVIDEO)
243                      X_PRE_LIBS="$X_PRE_LIBS -lXv"
244                   ],,
245                   $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
246                 )
247             ],
248             AC_MSG_WARN([XVideo extension not found !!])
249         )
250
251       ]
252     ) dnl *** End of X11/Xlib.h check
253
254     dnl Check for the presence of OpenGL
255     if test $OPENGL = "yes" -o $OPENGL = "normal"
256     then
257         AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h)
258         if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
259         then
260             dnl Check for some problems due to old Mesa versions
261             AC_CACHE_CHECK("for up-to-date OpenGL version", wine_cv_opengl_version_OK,
262               AC_TRY_COMPILE(
263                 [#include <GL/gl.h>],
264                 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
265                 [wine_cv_opengl_version_OK="yes"],
266                 [wine_cv_opengl_version_OK="no"]
267               )
268             )
269
270             dnl Check for the thread-safety of the OpenGL library
271             AC_CACHE_CHECK("for thread-safe OpenGL version", 
272                            wine_cv_opengl_version_threadsafe,
273               [saved_libs=$LIBS
274                LIBS="$X_LIBS -lGL"
275                AC_TRY_LINK([],[pthread_getspecific();],
276                               [wine_cv_opengl_version_threadsafe="yes"],
277                               [wine_cv_opengl_version_threadsafe="no"])
278                LIBS=$saved_libs]
279             )
280
281             if test "$wine_cv_opengl_version_OK" = "yes" -a \( "$wine_cv_opengl_version_threadsafe" = "no" -o $OPENGL = "yes" \)
282             then
283                 dnl Check for the presence of the library
284                 AC_CHECK_LIB(GL,glXCreateContext,
285                              X_PRE_LIBS="$X_PRE_LIBS -lGL"
286                              ,,
287                              $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
288
289                 if test $ac_cv_lib_GL_glXCreateContext = "yes"
290                 then
291
292                         OPENGLFILES='$(OPENGLFILES)'
293                         AC_DEFINE(HAVE_OPENGL)
294
295                         AC_CHECK_LIB(GL,glXGetProcAddressARB,AC_DEFINE(HAVE_GLX_GETPROCADDRESS),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
296
297                         if test $ac_cv_lib_GL_glXGetProcAddressARB = "yes"
298                         then
299                                AC_CACHE_CHECK("for OpenGL extension functions prototypes", wine_cv_extension_prototypes,
300                                   AC_TRY_COMPILE([#include <GL/gl.h>
301                                                   #ifdef HAVE_GL_GLEXT_H
302                                                   # include <GL/glext.h>
303                                                   #endif
304                                                   ],
305                                                  [PFNGLCOLORTABLEEXTPROC test_proc;],
306                                                  [wine_cv_extension_prototypes="yes"],
307                                                  [wine_cv_extension_prototypes="no"]
308                                   )
309                                 )
310                                 if test $wine_cv_extension_prototypes = "yes"
311                                 then
312                                         AC_DEFINE(HAVE_GLEXT_PROTOTYPES)
313                                 fi
314
315                                 OPENGL32_DLL=opengl32
316                         fi
317
318                         AC_CHECK_HEADERS(GL/osmesa.h,
319                             [ dnl *** If GL/osmesa.h exists...
320                                 AC_CHECK_LIB(GL, OSMesaCreateContext,
321                                   AC_DEFINE(HAVE_OSMESA),
322                                   AC_CHECK_LIB(OSMesa, OSMesaCreateContext,
323                                   [ AC_DEFINE(HAVE_OSMESA)
324                                     X_PRE_LIBS="$X_PRE_LIBS -lOSMesa"
325                                   ],,-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS),
326                                   $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
327                                 )
328                             ]
329                         )
330                 fi
331              fi
332          fi
333     fi
334
335     CPPFLAGS="$ac_save_CPPFLAGS"
336     X_DLLS='$(X_DLLS)'
337     XFILES='$(XFILES)'
338 else
339     XLIB=""
340     X_CFLAGS=""
341     X_LIBS=""
342 fi
343
344 dnl **** Check which curses lib to use ***
345 if test "$CURSES" = "yes"
346 then
347     AC_CHECK_HEADERS(ncurses.h)
348     if test "$ac_cv_header_ncurses_h" = "yes"
349     then 
350         AC_CHECK_LIB(ncurses,waddch)
351     fi
352     if test "$ac_cv_lib_ncurses_waddch" = "yes"
353     then
354         AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
355         AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
356     else
357         AC_CHECK_HEADERS(curses.h)
358         if test "$ac_cv_header_curses_h" = "yes"
359         then    
360             AC_CHECK_LIB(curses,waddch)
361             if test "$ac_cv_lib_curses_waddch" = "yes"
362             then
363                 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
364                 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
365             fi
366         fi
367     fi
368 fi
369
370 CUPSLIBS=""
371 dnl **** Check for CUPS ****
372 wine_cv_warn_cups_h=no
373 AC_CHECK_LIB(cups,cupsGetPPD,
374         AC_CHECK_HEADER(cups/cups.h,
375             AC_DEFINE(HAVE_CUPS)
376             CUPSLIBS="-lcups",
377             wine_cv_warn_cups_h=yes)
378 )
379 AC_SUBST(CUPSLIBS)
380
381 dnl **** Check for FreeType 2 ****
382 AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no)
383 if test "$ft_lib" = "no"
384 then
385     FREETYPELIBS=""
386     FREETYPEINCL=""
387     wine_cv_msg_freetype=no
388 else
389     AC_CHECK_PROG(ft_devel,freetype-config,yes,no)
390     if test "$ft_devel" = "no"
391     then
392         FREETYPELIBS=""
393         FREETYPEINCL=""
394         wine_cv_msg_freetype=yes
395     else
396         AC_DEFINE(HAVE_FREETYPE)
397         FREETYPELIBS=`freetype-config --libs`
398         FREETYPEINCL=`freetype-config --cflags`
399         wine_cv_msg_freetype=no
400     fi
401 fi
402 AC_SUBST(FREETYPELIBS)
403 AC_SUBST(FREETYPEINCL)
404
405 dnl **** Check for IPX (currently Linux only) ****
406 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
407  AC_TRY_COMPILE(
408    [#include <sys/socket.h>
409     #include <netipx/ipx.h>],
410    [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
411    [ac_cv_c_ipx_gnu="yes"],
412    [ac_cv_c_ipx_gnu="no"])
413  )
414 if test "$ac_cv_c_ipx_gnu" = "yes"
415 then
416     AC_DEFINE(HAVE_IPX_GNU)
417 fi
418
419 if test "$ac_cv_c_ipx_gnu" = "no"
420 then
421  AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
422   AC_TRY_COMPILE(
423     [#include <sys/socket.h>
424      #include <asm/types.h>
425      #include <linux/ipx.h>],
426     [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
427     [ac_cv_c_ipx_linux="yes"],
428     [ac_cv_c_ipx_linux="no"])
429   )
430   if test "$ac_cv_c_ipx_linux" = "yes"
431   then
432       AC_DEFINE(HAVE_IPX_LINUX)
433   fi
434 fi
435
436 dnl **** Check for Open Sound System ****
437 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
438
439 AC_CACHE_CHECK("for Open Sound System",
440         ac_cv_c_opensoundsystem,
441         AC_TRY_COMPILE([
442         #if defined(HAVE_SYS_SOUNDCARD_H)
443                 #include <sys/soundcard.h>
444         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
445                 #include <machine/soundcard.h>
446         #elif defined(HAVE_SOUNDCARD_H)
447                 #include <soundcard.h>
448         #endif
449         ],[
450
451 /* check for one of the Open Sound System specific SNDCTL_ defines */
452 #if !defined(SNDCTL_DSP_STEREO)
453 #error No open sound system
454 #endif
455 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
456
457 if test "$ac_cv_c_opensoundsystem" = "yes"
458 then
459     AC_DEFINE(HAVE_OSS)
460 fi
461
462 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
463         ac_cv_c_opensoundsystem_midi,
464         AC_TRY_COMPILE([
465         #if defined(HAVE_SYS_SOUNDCARD_H)
466                 #include <sys/soundcard.h>
467         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
468                 #include <machine/soundcard.h>
469         #elif defined(HAVE_SOUNDCARD_H)
470                 #include <soundcard.h>
471         #endif
472         ],[
473
474 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
475 #if !defined(SNDCTL_SEQ_SYNC)
476 #error No open sound system MIDI interface
477 #endif
478 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
479
480 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
481 then
482     AC_DEFINE(HAVE_OSS_MIDI)
483 fi
484
485 dnl **** If ln -s doesn't work, use cp instead ****
486 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
487
488 dnl **** Check for gcc strength-reduce bug ****
489
490 if test "x${GCC}" = "xyes"
491 then
492   CFLAGS="$CFLAGS -Wall"
493   AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
494                   AC_TRY_RUN([
495 int     L[[4]] = {0,1,2,3};
496 int main(void) {
497   static int Array[[3]];
498   unsigned int B = 3;
499   int i;
500   for(i=0; i<B; i++) Array[[i]] = i - 3;
501   for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
502   L[[i]] = 4;
503   
504   exit( Array[[1]] != -2 || L[[2]] != 3);
505 }],
506     ac_cv_c_gcc_strength_bug="no",
507     ac_cv_c_gcc_strength_bug="yes",
508     ac_cv_c_gcc_strength_bug="yes") )
509   if test "$ac_cv_c_gcc_strength_bug" = "yes"
510   then
511     CFLAGS="$CFLAGS -fno-strength-reduce"
512   fi
513
514   dnl Check for -mpreferred-stack-boundary
515   AC_CACHE_CHECK("for gcc -mpreferred-stack-boundary=2 support",
516                  ac_cv_c_gcc_stack_boundary,
517   [saved_cflags=$CFLAGS
518   CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
519   AC_TRY_COMPILE(,[return 0],ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")
520   CFLAGS=$saved_cflags
521   ])
522   if test "$ac_cv_c_gcc_stack_boundary" = "yes"
523   then
524     CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
525   fi
526 fi
527
528 dnl **** Check if we need to place .type inside a .def directive ****
529
530 AC_CACHE_CHECK("whether .type must sit inside a .def directive",
531                ac_cv_c_type_in_def,
532 [saved_libs=$LIBS
533 LIBS="conftest_asm.s $LIBS"
534 cat > conftest_asm.s <<EOF
535         .globl _ac_test
536         .def _ac_test; .scl 2; .type 32; .endef
537 _ac_test:
538         .long 0
539 EOF
540 AC_TRY_LINK(,,ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no")
541 LIBS=$saved_libs])
542 if test "$ac_cv_c_type_in_def" = "yes"
543 then
544   AC_DEFINE(NEED_TYPE_IN_DEF)
545 fi
546  
547 dnl **** Check for underscore on external symbols ****
548
549 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
550                ac_cv_c_extern_prefix,
551 [saved_libs=$LIBS
552 LIBS="conftest_asm.s $LIBS"
553 cat > conftest_asm.s <<EOF
554         .globl _ac_test
555 _ac_test:
556         .long 0
557 EOF
558 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
559             ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
560 LIBS=$saved_libs])
561 if test "$ac_cv_c_extern_prefix" = "yes"
562 then
563   AC_DEFINE(NEED_UNDERSCORE_PREFIX)
564 fi
565
566 dnl **** Check for .string in assembler ****
567
568 AC_CACHE_CHECK("whether assembler accepts .string",
569                ac_cv_c_asm_string,
570 [saved_libs=$LIBS
571 LIBS="conftest_asm.s $LIBS"
572 cat > conftest_asm.s <<EOF
573         .string "test"
574 EOF
575 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
576 LIBS=$saved_libs])
577 if test "$ac_cv_c_asm_string" = "yes"
578 then
579   AC_DEFINE(HAVE_ASM_STRING)
580 fi
581
582 dnl **** Check for working dll ****
583
584 LDSHARED=""
585 LDDLLFLAGS=""
586 if test "$LIBEXT" = "so"
587 then
588   AC_CACHE_CHECK("whether we can build a Linux dll",
589                  ac_cv_c_dll_linux,
590   [saved_cflags=$CFLAGS
591   CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
592   AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
593   CFLAGS=$saved_cflags
594   ])
595   if test "$ac_cv_c_dll_linux" = "yes"
596   then
597     LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)"
598     LDDLLFLAGS="-Wl,-Bsymbolic"
599   else
600     AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
601                  ac_cv_c_dll_unixware,
602     [saved_cflags=$CFLAGS
603     CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
604     AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
605     CFLAGS=$saved_cflags
606     ])
607     if test "$ac_cv_c_dll_unixware" = "yes"
608     then
609       LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,\$(libdir)/%)"
610       LDDLLFLAGS="-Wl,-B,symbolic"
611     else
612       AC_CACHE_CHECK("whether we can build a NetBSD a.out dll",
613                    ac_cv_c_dll_netbsd,
614       [saved_cflags=$CFLAGS
615       CFLAGS="$CFLAGS -fPIC -Wl,-Bshareable,-Bforcearchive"
616       AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
617       CFLAGS=$saved_cflags
618       ])
619       if test "$ac_cv_c_dll_netbsd" = "yes"
620       then
621         LDSHARED="\$(CC) -Wl,-Bshareable,-Bforcearchive"
622         LDDLLFLAGS="" #FIXME
623       fi
624     fi
625   fi
626   if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
627   then
628     LIBEXT="a"
629     if test "$DLLWRAP" = "dllwrap"; then
630       dnl FIXME - check whether dllwrap works correctly...
631       if test "$CYGWIN" = "yes"; then
632         echo "*** use dllwrap for building shared library."
633         LIBEXT="dll"
634       fi
635     fi
636   fi
637 fi
638
639 if test "$LIBEXT" = "a"; then
640   echo "*** It is currently not possible to build WINE without shared"
641   echo "*** library (.so) support to allow transparent switch between .so"
642   echo "*** and .dll files."
643   echo "*** If you are using Linux, you will need a newer binutils."
644   exit 1
645 fi
646
647 DLLFLAGS=""
648 LDPATH=""
649
650 if test "$LIBEXT" = "so"; then
651     DLLFLAGS="-fPIC"
652     DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
653     LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
654 elif test "$LIBEXT" = "dll"; then
655     #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
656     DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
657     LDPATH="PATH=\"\$(TOPOBJDIR)/unicode:\$\$PATH\""
658 else
659     DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) \$(LIBWINE) \$(LIBUNICODE) \$(X_LIBS) \$(XLIB)"
660     AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
661                    ac_cv_c_whole_archive,
662             [saved_cflags=$CFLAGS
663             CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
664             AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
665             CFLAGS=$saved_cflags
666             ])
667     if test "$ac_cv_c_whole_archive" = "yes"
668     then
669         DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
670     else
671         AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
672                        ac_cv_c_allextract,
673                 [saved_cflags=$CFLAGS
674                 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
675                 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
676                 CFLAGS=$saved_cflags
677                 ])
678         if test "$ac_cv_c_allextract" = "yes"
679         then
680             DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
681         fi
682     fi
683 fi
684
685 AC_SUBST(DLL_LINK)
686 AC_SUBST(DLLFLAGS)
687 AC_SUBST(LDSHARED)
688 AC_SUBST(LDDLLFLAGS)
689 AC_SUBST(LIBEXT)
690 AC_SUBST(LDPATH)
691
692 dnl **** Check for reentrant libc ****
693 dnl
694 dnl For cross-compiling we blindly assume that libc is reentrant. This is
695 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
696
697 AC_DEFUN(WINE_CHECK_ERRNO,
698 [
699   AC_CACHE_CHECK(for reentrant libc: $1, wine_cv_libc_r_$1,
700   [AC_TRY_RUN([int myerrno = 0;
701 char buf[256];
702 int *$1(){return &myerrno;}
703 main(){connect(0,buf,255); exit(!myerrno);}],
704   wine_cv_libc_r_$1=yes, wine_cv_libc_r_$1=no,
705   wine_cv_libc_r_$1=yes )
706 ])
707 if test "$wine_cv_libc_r_$1" = "yes"
708 then
709     wine_cv_libc_reentrant=$1 
710 fi
711 ])
712
713 wine_cv_libc_reentrant=no 
714 dnl Linux style errno location
715 WINE_CHECK_ERRNO(__errno_location)
716 dnl FreeBSD style errno location
717 WINE_CHECK_ERRNO(__error)
718 dnl Solaris style errno location
719 WINE_CHECK_ERRNO(___errno)
720 dnl UnixWare style errno location
721 WINE_CHECK_ERRNO(__thr_errno)
722 dnl NetBSD style errno location
723 WINE_CHECK_ERRNO(__errno)
724
725 if test "$wine_cv_libc_reentrant" != "no" 
726 then
727   AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant)
728 fi
729
730 dnl **** Check for reentrant X libraries ****
731 dnl
732 dnl This may fail to determine whether X libraries are reentrant if
733 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
734 dnl is possible with the --without-reentrant-x option.
735
736 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
737 then
738 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
739   [ if test "x$with_reentrant_x" = "xno" 
740     then
741         wine_cv_x_reentrant=no
742     else
743         libX11_check=none
744         for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
745             if test -r $dir/libX11.so; then
746                 libX11_check="-D $dir/libX11.so"
747                 break 1
748             fi
749             if test -r $dir/libX11.a; then
750                 libX11_check="$dir/libX11.a"
751                 break 1
752             fi
753         done
754         if test "$libX11_check" != "none"; then
755             if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
756             then
757                 wine_cv_x_reentrant=yes
758             else
759                 wine_cv_x_reentrant=no
760             fi
761         else
762             wine_cv_x_reentrant=unknown
763         fi
764     fi ] )
765 else
766     wine_cv_x_reentrant=no
767 fi
768 if test "$wine_cv_x_reentrant" = "no"
769 then
770   AC_DEFINE(NO_REENTRANT_X11)
771 fi
772
773
774 dnl **** Check for functions ****
775
776 AC_FUNC_ALLOCA()
777 AC_CHECK_FUNCS(\
778         __libc_fork \
779         _lwp_create \
780         clone \
781         ecvt \
782         finite \
783         fpclass \
784         ftruncate64 \
785         getnetbyaddr \
786         getnetbyname \
787         getpagesize \
788         getprotobyname \
789         getprotobynumber \
790         getrlimit \
791         getservbyport \
792         getsockopt \
793         inet_network \
794         lseek64 \
795         lstat \
796         memmove \
797         mmap \
798         rfork \
799         select \
800         sendmsg \
801         settimeofday \
802         sigaltstack \
803         statfs \
804         strcasecmp \
805         strerror \
806         strncasecmp \
807         tcgetattr \
808         timegm \
809         usleep \
810         vfscanf \
811         wait4 \
812         waitpid \
813 )
814
815 dnl **** Check for header files ****
816
817 AC_CHECK_HEADERS(\
818         arpa/inet.h \
819         arpa/nameser.h \
820         elf.h \
821         float.h \
822         ieeefp.h \
823         libio.h \
824         libutil.h \
825         link.h \
826         linux/cdrom.h \
827         linux/input.h \
828         linux/joystick.h \
829         linux/ucdrom.h \
830         net/if.h \
831         netdb.h \
832         netinet/in.h \
833         netinet/in_systm.h \
834         netinet/ip.h \
835         netinet/tcp.h \
836         pty.h \
837         resolv.h \
838         sched.h \
839         socket.h \
840         strings.h \
841         sys/cdio.h \
842         sys/errno.h \
843         sys/file.h \
844         sys/filio.h \
845         sys/ipc.h \
846         sys/lwp.h \
847         sys/mman.h \
848         sys/modem.h \
849         sys/mount.h \
850         sys/msg.h \
851         sys/param.h \
852         sys/ptrace.h \
853         sys/reg.h \
854         sys/signal.h \
855         sys/shm.h \
856         sys/socket.h \
857         sys/sockio.h \
858         sys/statfs.h \
859         sys/strtio.h \
860         sys/syscall.h \
861         sys/user.h \
862         sys/wait.h \
863         sys/v86.h \
864         sys/v86intr.h \
865         sys/vfs.h \
866         sys/vm86.h \
867         syscall.h \
868         ucontext.h \
869 )
870 AC_HEADER_STAT()
871
872 dnl **** Check for types ****
873
874 AC_C_CONST()
875 AC_C_INLINE()
876 AC_TYPE_SIZE_T()
877 AC_CHECK_SIZEOF(long long,0)
878
879 AC_CACHE_CHECK("whether linux/input.h is for real",
880         wine_cv_linux_input_h,
881         AC_TRY_COMPILE([
882             #include <linux/input.h>
883         ] , [
884             int foo = EVIOCGBIT(EV_ABS,42);
885             int bar = BTN_PINKIE;
886             int fortytwo = 42;
887         ],
888         wine_cv_linux_input_h=yes,
889         wine_cv_linux_input_h=no,
890         no
891         )
892     )
893     if test "$wine_cv_linux_input_h" = "yes"
894     then
895         AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H)
896     fi
897
898    
899 AC_CACHE_CHECK("whether we can use re-entrant gethostbyname_r Linux style",
900         wine_cv_linux_gethostbyname_r_6,
901         AC_TRY_COMPILE([
902 #include <netdb.h>
903         ], [
904     char *name=NULL;
905     struct hostent he;
906     struct hostent *result;
907     char *buf=NULL;
908     int bufsize=0;
909     int res,errnr;
910     char *addr=NULL;
911     int addrlen=0;
912     int addrtype=0;
913     res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
914     res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
915     ],
916         wine_cv_linux_gethostbyname_r_6=yes,
917         wine_cv_linux_gethostbyname_r_6=no
918         )
919    )
920    if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
921    then
922       AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6)
923    fi
924
925 if test "$ac_cv_header_linux_joystick_h" = "yes"
926 then
927    AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
928         wine_cv_linux_joystick_22_api,
929         AC_TRY_COMPILE([
930         #include <sys/ioctl.h>
931         #include <linux/joystick.h>
932
933         struct js_event blub;
934         #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
935         #error "no 2.2 header"
936         #endif
937         ],/*empty*/,
938         wine_cv_linux_joystick_22_api=yes,
939         wine_cv_linux_joystick_22_api=no,
940         wine_cv_linux_joystick_22_api=no
941         )
942    )
943    if test "$wine_cv_linux_joystick_22_api" = "yes"
944    then
945       AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
946    fi
947 fi
948
949 dnl **** statfs checks ****
950
951 if test "$ac_cv_header_sys_vfs_h" = "yes"
952 then
953     AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
954                     wine_cv_sys_vfs_has_statfs,
955         AC_TRY_COMPILE([
956         #include <sys/types.h>
957         #ifdef HAVE_SYS_PARAM_H
958         # include <sys/param.h>
959         #endif
960         #include <sys/vfs.h>
961         ],[
962                 struct statfs stfs;
963
964                 memset(&stfs,0,sizeof(stfs));
965         ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
966         )
967     )
968     if test "$wine_cv_sys_vfs_has_statfs" = "yes"
969     then
970       AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
971     fi
972 fi
973
974 if test "$ac_cv_header_sys_statfs_h" = "yes"
975 then
976     AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
977                     wine_cv_sys_statfs_has_statfs,
978         AC_TRY_COMPILE([
979         #include <sys/types.h>
980         #ifdef HAVE_SYS_PARAM_H
981         # include <sys/param.h>
982         #endif
983         #include <sys/statfs.h>
984         ],[
985                 struct statfs stfs;
986         ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
987         )
988     )
989     if test "$wine_cv_sys_statfs_has_statfs" = "yes"
990     then
991       AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
992     fi
993 fi
994
995 if test "$ac_cv_header_sys_mount_h" = "yes"
996 then
997     AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
998                     wine_cv_sys_mount_has_statfs,
999         AC_TRY_COMPILE([
1000         #include <sys/types.h>
1001         #ifdef HAVE_SYS_PARAM_H
1002         # include <sys/param.h>
1003         #endif
1004         #include <sys/mount.h>
1005         ],[
1006                 struct statfs stfs;
1007         ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1008         )
1009     )
1010     if test "$wine_cv_sys_mount_has_statfs" = "yes"
1011     then
1012       AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
1013     fi
1014 fi
1015
1016 dnl **** FIXME: what about mixed cases, where we need two of them? ***
1017
1018 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
1019   [ if test "x$statfs_bfree" = "xno"
1020     then
1021         wine_cv_statfs_bfree=no
1022     else
1023         AC_TRY_COMPILE([
1024         #include <sys/types.h>
1025         #ifdef HAVE_SYS_PARAM_H
1026         # include <sys/param.h>
1027         #endif
1028         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1029         # include <sys/mount.h>
1030         #else
1031         # ifdef STATFS_DEFINED_BY_SYS_VFS
1032         #  include <sys/vfs.h>
1033         # else
1034         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
1035         #   include <sys/statfs.h>
1036         #  endif
1037         # endif
1038         #endif
1039         ],[
1040                 struct statfs stfs;
1041
1042                 stfs.f_bfree++;
1043         ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
1044         )
1045     fi ] )
1046 if test "$wine_cv_statfs_bfree" = "yes"
1047 then
1048   AC_DEFINE(STATFS_HAS_BFREE)
1049 fi
1050
1051 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
1052   [ if test "x$statfs_bavail" = "xno"
1053     then
1054         wine_cv_statfs_bavail=no
1055     else
1056         AC_TRY_COMPILE([
1057         #include <sys/types.h>
1058         #ifdef HAVE_SYS_PARAM_H
1059         # include <sys/param.h>
1060         #endif
1061         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1062         # include <sys/mount.h>
1063         #else
1064         # ifdef STATFS_DEFINED_BY_SYS_VFS
1065         #  include <sys/vfs.h>
1066         # else
1067         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
1068         #   include <sys/statfs.h>
1069         #  endif
1070         # endif
1071         #endif
1072         ],[
1073                 struct statfs stfs;
1074
1075                 stfs.f_bavail++;
1076         ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
1077         )
1078     fi ] )
1079 if test "$wine_cv_statfs_bavail" = "yes"
1080 then
1081   AC_DEFINE(STATFS_HAS_BAVAIL)
1082 fi
1083
1084 dnl *** check for file descriptor passing with msg_accrights
1085
1086 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
1087  AC_TRY_COMPILE([#include <sys/types.h>
1088 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
1089                 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
1090 if test "$ac_cv_c_msg_accrights" = "yes"
1091 then
1092     AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
1093 fi
1094
1095 dnl *** Check for the sun_len member in struct sockaddr_un
1096
1097 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
1098  AC_TRY_COMPILE([#include <sys/types.h>
1099 #include <sys/socket.h>
1100 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
1101                 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
1102 if test "$ac_cv_c_sun_len" = "yes"
1103 then
1104     AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
1105 fi
1106
1107 dnl *** check for the need to define __i386__
1108
1109 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
1110  AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
1111 yes
1112 #endif],
1113  ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
1114 if test "$ac_cv_cpp_def_i386" = "yes"
1115 then
1116     CFLAGS="$CFLAGS -D__i386__"
1117     LINTFLAGS="$LINTFLAGS -D__i386__"
1118 fi
1119
1120 dnl $GCC is set by autoconf
1121 GCC_NO_BUILTIN=""
1122 if test "$GCC" = "yes"
1123 then
1124     GCC_NO_BUILTIN="-fno-builtin"
1125 fi
1126 AC_SUBST(GCC_NO_BUILTIN)
1127
1128 dnl **** Generate output files ****
1129
1130 AC_OUTPUT_COMMANDS([
1131 extra_subdirs="\
1132 dlls/ddraw/d3ddevice \
1133 dlls/ddraw/dclipper \
1134 dlls/ddraw/ddraw \
1135 dlls/ddraw/direct3d \
1136 dlls/ddraw/dpalette \
1137 dlls/ddraw/dsurface \
1138 dlls/dinput/joystick \
1139 dlls/dinput/keyboard \
1140 dlls/dinput/mouse \
1141 dlls/kernel/messages \
1142 dlls/user/resources \
1143 dlls/wineps/data \
1144 "
1145 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
1146
1147 MAKE_RULES=Make.rules
1148 AC_SUBST_FILE(MAKE_RULES)
1149
1150 MAKE_DLL_RULES=dlls/Makedll.rules
1151 AC_SUBST_FILE(MAKE_DLL_RULES)
1152
1153 MAKE_PROG_RULES=programs/Makeprog.rules
1154 AC_SUBST_FILE(MAKE_PROG_RULES)
1155
1156 AC_OUTPUT([
1157 Make.rules
1158 dlls/Makedll.rules
1159 programs/Makeprog.rules
1160 Makefile
1161 console/Makefile
1162 controls/Makefile
1163 debugger/Makefile
1164 dlls/Makefile
1165 dlls/advapi32/Makefile
1166 dlls/avifil32/Makefile
1167 dlls/comctl32/Makefile
1168 dlls/commdlg/Makefile
1169 dlls/crtdll/Makefile
1170 dlls/dciman32/Makefile
1171 dlls/ddraw/Makefile
1172 dlls/dinput/Makefile
1173 dlls/dplay/Makefile
1174 dlls/dplayx/Makefile
1175 dlls/dsound/Makefile
1176 dlls/gdi/Makefile
1177 dlls/icmp/Makefile
1178 dlls/imagehlp/Makefile
1179 dlls/imm32/Makefile
1180 dlls/kernel/Makefile
1181 dlls/lzexpand/Makefile
1182 dlls/mpr/Makefile
1183 dlls/msacm/Makefile
1184 dlls/msnet32/Makefile
1185 dlls/msvcrt/Makefile
1186 dlls/msvideo/Makefile
1187 dlls/ntdll/Makefile
1188 dlls/odbc32/Makefile
1189 dlls/ole32/Makefile
1190 dlls/oleaut32/Makefile
1191 dlls/olecli/Makefile
1192 dlls/oledlg/Makefile
1193 dlls/olepro32/Makefile
1194 dlls/olesvr/Makefile
1195 dlls/opengl32/Makefile
1196 dlls/psapi/Makefile
1197 dlls/rasapi32/Makefile
1198 dlls/richedit/Makefile
1199 dlls/rpcrt4/Makefile
1200 dlls/serialui/Makefile
1201 dlls/setupapi/Makefile
1202 dlls/shdocvw/Makefile
1203 dlls/shell32/Makefile
1204 dlls/shfolder/Makefile
1205 dlls/shlwapi/Makefile
1206 dlls/tapi32/Makefile
1207 dlls/ttydrv/Makefile
1208 dlls/urlmon/Makefile
1209 dlls/user/Makefile
1210 dlls/version/Makefile
1211 dlls/win32s/Makefile
1212 dlls/winaspi/Makefile
1213 dlls/winedos/Makefile
1214 dlls/wineps/Makefile
1215 dlls/wininet/Makefile
1216 dlls/winmm/Makefile
1217 dlls/winmm/joystick/Makefile
1218 dlls/winmm/mcianim/Makefile
1219 dlls/winmm/mciavi/Makefile
1220 dlls/winmm/mcicda/Makefile
1221 dlls/winmm/mciseq/Makefile
1222 dlls/winmm/mciwave/Makefile
1223 dlls/winmm/midimap/Makefile
1224 dlls/winmm/wavemap/Makefile
1225 dlls/winmm/wineoss/Makefile
1226 dlls/winnls/Makefile
1227 dlls/winsock/Makefile
1228 dlls/winspool/Makefile
1229 dlls/wintrust/Makefile
1230 dlls/wow32/Makefile
1231 dlls/wsock32/Makefile
1232 dlls/x11drv/Makefile
1233 documentation/Makefile
1234 documentation/wine.conf.man
1235 documentation/wine.man
1236 files/Makefile
1237 graphics/Makefile
1238 graphics/enhmetafiledrv/Makefile
1239 graphics/metafiledrv/Makefile
1240 graphics/win16drv/Makefile
1241 graphics/x11drv/Makefile
1242 if1632/Makefile
1243 include/Makefile
1244 library/Makefile
1245 libtest/Makefile
1246 loader/Makefile
1247 loader/dos/Makefile
1248 loader/ne/Makefile
1249 memory/Makefile
1250 misc/Makefile
1251 miscemu/Makefile
1252 msdos/Makefile
1253 objects/Makefile
1254 ole/Makefile
1255 programs/Makefile
1256 programs/avitools/Makefile
1257 programs/clock/Makefile
1258 programs/cmdlgtst/Makefile
1259 programs/control/Makefile
1260 programs/notepad/Makefile
1261 programs/osversioncheck/Makefile
1262 programs/progman/Makefile
1263 programs/regapi/Makefile
1264 programs/regtest/Makefile
1265 programs/uninstaller/Makefile
1266 programs/view/Makefile
1267 programs/wcmd/Makefile
1268 programs/winemine/Makefile
1269 programs/winetest/Makefile
1270 programs/winhelp/Makefile
1271 programs/winver/Makefile
1272 relay32/Makefile
1273 scheduler/Makefile
1274 server/Makefile
1275 tools/Makefile
1276 tools/cvdump/Makefile
1277 tools/specmaker/Makefile
1278 tools/winebuild/Makefile
1279 tools/winelauncher
1280 tools/wmc/Makefile
1281 tools/wrc/Makefile
1282 tsx11/Makefile
1283 unicode/Makefile
1284 win32/Makefile
1285 windows/Makefile
1286 windows/x11drv/Makefile ])
1287
1288 if test "$have_x" = "no"
1289 then
1290   echo
1291   echo "*** Warning: X development files not found. Wine will be built without"
1292   echo "*** X support, which currently does not work, and would probably not be"
1293   echo "*** what you want anyway. You will need to install devel packages of"
1294   echo "*** Xlib/Xfree86 and Xpm at the very least."
1295 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1296 then
1297   echo
1298   echo "*** Warning: Xpm development files not found. Wine will be built without"
1299   echo "*** Xpm support, which currently does not work. You will need to install"
1300   echo "*** devel packages of Xpm."
1301 fi
1302
1303 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1304 then
1305   echo
1306   echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1307   echo "*** terminal resize support. Consider upgrading ncurses."
1308 fi
1309
1310 if test "$wine_cv_libc_reentrant" = "no" 
1311 then
1312   echo
1313   echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1314   echo "*** thread support. Consider upgrading libc to a more recent"
1315   echo "*** reentrant version of libc."
1316 fi
1317
1318 if test "$wine_cv_opengl_version_OK" = "no"
1319 then
1320   echo
1321   echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1322   echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1323 fi
1324
1325 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "normal"
1326 then
1327   echo
1328   echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1329   echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
1330   echo "*** A fix for glibc 2.1.3 that seems to work is included in this version of Wine,"
1331   echo "*** start configure with '--enable-opengl' to force OpenGL support."
1332 fi
1333
1334 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
1335 then
1336   echo
1337   echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
1338   echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1339   echo "*** support before reporting bugs."
1340 fi
1341
1342 if test "$wine_cv_warn_cups_h" = "yes"
1343 then
1344   echo
1345   echo "*** Note: You have cups runtime libraries, but no development"
1346   echo "*** libraries. Install the cups-devel package or whichever package"
1347   echo "*** contains cups.h to enable CUPS support in WINE."
1348 fi
1349
1350 if test "$wine_cv_msg_freetype" = "yes"
1351 then
1352   echo
1353   echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
1354   echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1355   echo "*** freetype-devel package (or its equivalent on your distribution) to"
1356   echo "*** enable Wine to use TrueType fonts."
1357 fi
1358
1359 echo
1360 echo "Configure finished.  Do 'make depend && make' to compile Wine."
1361 echo
1362
1363 dnl Local Variables:
1364 dnl comment-start: "dnl "
1365 dnl comment-end: ""
1366 dnl comment-start-skip: "\\bdnl\\b\\s *"
1367 dnl compile-command: "autoconf"
1368 dnl End: