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