Fixed some problems with scrolling in the edit control.
[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],
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,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                                   ]),
326                                   $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
327                                 )
328                             ],
329                             AC_MSG_WARN([OSMesa not found!!])
330                         )
331                 fi
332              fi
333          fi
334     fi
335
336     CPPFLAGS="$ac_save_CPPFLAGS"
337     X_DLLS='$(X_DLLS)'
338     XFILES='$(XFILES)'
339 else
340     XLIB=""
341     X_CFLAGS=""
342     X_LIBS=""
343 fi
344
345 dnl **** Check which curses lib to use ***
346 if test "$CURSES" = "yes"
347 then
348     AC_CHECK_HEADERS(ncurses.h)
349     if test "$ac_cv_header_ncurses_h" = "yes"
350     then 
351         AC_CHECK_LIB(ncurses,waddch)
352     fi
353     if test "$ac_cv_lib_ncurses_waddch" = "yes"
354     then
355         AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
356         AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
357     else
358         AC_CHECK_HEADERS(curses.h)
359         if test "$ac_cv_header_curses_h" = "yes"
360         then    
361             AC_CHECK_LIB(curses,waddch)
362             if test "$ac_cv_lib_curses_waddch" = "yes"
363             then
364                 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
365                 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
366             fi
367         fi
368     fi
369 fi
370
371 dnl **** Check for IPX (currently Linux only) ****
372 AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
373  AC_TRY_COMPILE(
374    [#include <sys/socket.h>
375     #include <netipx/ipx.h>],
376    [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
377    [ac_cv_c_ipx_gnu="yes"],
378    [ac_cv_c_ipx_gnu="no"])
379  )
380 if test "$ac_cv_c_ipx_gnu" = "yes"
381 then
382     AC_DEFINE(HAVE_IPX_GNU)
383 fi
384
385 if test "$ac_cv_c_ipx_gnu" = "no"
386 then
387  AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
388   AC_TRY_COMPILE(
389     [#include <sys/socket.h>
390      #include <asm/types.h>
391      #include <linux/ipx.h>],
392     [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
393     [ac_cv_c_ipx_linux="yes"],
394     [ac_cv_c_ipx_linux="no"])
395   )
396   if test "$ac_cv_c_ipx_linux" = "yes"
397   then
398       AC_DEFINE(HAVE_IPX_LINUX)
399   fi
400 fi
401
402 dnl **** Check for Open Sound System ****
403 AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
404
405 AC_CACHE_CHECK("for Open Sound System",
406         ac_cv_c_opensoundsystem,
407         AC_TRY_COMPILE([
408         #if defined(HAVE_SYS_SOUNDCARD_H)
409                 #include <sys/soundcard.h>
410         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
411                 #include <machine/soundcard.h>
412         #elif defined(HAVE_SOUNDCARD_H)
413                 #include <soundcard.h>
414         #endif
415         ],[
416
417 /* check for one of the Open Sound System specific SNDCTL_ defines */
418 #if !defined(SNDCTL_DSP_STEREO)
419 #error No open sound system
420 #endif
421 ],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
422
423 if test "$ac_cv_c_opensoundsystem" = "yes"
424 then
425     AC_DEFINE(HAVE_OSS)
426 fi
427
428 AC_CACHE_CHECK("for Open Sound System/MIDI interface",
429         ac_cv_c_opensoundsystem_midi,
430         AC_TRY_COMPILE([
431         #if defined(HAVE_SYS_SOUNDCARD_H)
432                 #include <sys/soundcard.h>
433         #elif defined(HAVE_MACHINE_SOUNDCARD_H)
434                 #include <machine/soundcard.h>
435         #elif defined(HAVE_SOUNDCARD_H)
436                 #include <soundcard.h>
437         #endif
438         ],[
439
440 /* check for one of the Open Sound System specific SNDCTL_SEQ defines */
441 #if !defined(SNDCTL_SEQ_SYNC)
442 #error No open sound system MIDI interface
443 #endif
444 ],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
445
446 if test "$ac_cv_c_opensoundsystem_midi" = "yes"
447 then
448     AC_DEFINE(HAVE_OSS_MIDI)
449 fi
450
451 dnl **** If ln -s doesn't work, use cp instead ****
452 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
453
454 dnl **** Check for gcc strength-reduce bug ****
455
456 if test "x${GCC}" = "xyes"
457 then
458   CFLAGS="$CFLAGS -Wall"
459   AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
460                   AC_TRY_RUN([
461 int     L[[4]] = {0,1,2,3};
462 int main(void) {
463   static int Array[[3]];
464   unsigned int B = 3;
465   int i;
466   for(i=0; i<B; i++) Array[[i]] = i - 3;
467   for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
468   L[[i]] = 4;
469   
470   exit( Array[[1]] != -2 || L[[2]] != 3);
471 }],
472     ac_cv_c_gcc_strength_bug="no",
473     ac_cv_c_gcc_strength_bug="yes",
474     ac_cv_c_gcc_strength_bug="yes") )
475   if test "$ac_cv_c_gcc_strength_bug" = "yes"
476   then
477     CFLAGS="$CFLAGS -fno-strength-reduce"
478   fi
479
480   dnl Check for -mpreferred-stack-boundary
481   AC_CACHE_CHECK("for gcc -mpreferred-stack-boundary=2 support",
482                  ac_cv_c_gcc_stack_boundary,
483   [saved_cflags=$CFLAGS
484   CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
485   AC_TRY_COMPILE(,[return 0],ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")
486   CFLAGS=$saved_cflags
487   ])
488   if test "$ac_cv_c_gcc_stack_boundary" = "yes"
489   then
490     CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
491   fi
492 fi
493
494 dnl **** Check if we need to place .type inside a .def directive ****
495
496 AC_CACHE_CHECK("whether .type must sit inside a .def directive",
497                ac_cv_c_type_in_def,
498 [saved_libs=$LIBS
499 LIBS="conftest_asm.s $LIBS"
500 cat > conftest_asm.s <<EOF
501         .globl _ac_test
502         .def _ac_test; .scl 2; .type 32; .endef
503 _ac_test:
504         .long 0
505 EOF
506 AC_TRY_LINK(,,ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no")
507 LIBS=$saved_libs])
508 if test "$ac_cv_c_type_in_def" = "yes"
509 then
510   AC_DEFINE(NEED_TYPE_IN_DEF)
511 fi
512  
513 dnl **** Check for underscore on external symbols ****
514
515 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
516                ac_cv_c_extern_prefix,
517 [saved_libs=$LIBS
518 LIBS="conftest_asm.s $LIBS"
519 cat > conftest_asm.s <<EOF
520         .globl _ac_test
521 _ac_test:
522         .long 0
523 EOF
524 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
525             ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
526 LIBS=$saved_libs])
527 if test "$ac_cv_c_extern_prefix" = "yes"
528 then
529   AC_DEFINE(NEED_UNDERSCORE_PREFIX)
530 fi
531
532 dnl **** Check for .string in assembler ****
533
534 AC_CACHE_CHECK("whether assembler accepts .string",
535                ac_cv_c_asm_string,
536 [saved_libs=$LIBS
537 LIBS="conftest_asm.s $LIBS"
538 cat > conftest_asm.s <<EOF
539         .string "test"
540 EOF
541 AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
542 LIBS=$saved_libs])
543 if test "$ac_cv_c_asm_string" = "yes"
544 then
545   AC_DEFINE(HAVE_ASM_STRING)
546 fi
547
548 dnl **** Check for working dll ****
549
550 LDSHARED=""
551 LDDLLFLAGS=""
552 if test "$LIBEXT" = "so"
553 then
554   AC_CACHE_CHECK("whether we can build a Linux dll",
555                  ac_cv_c_dll_linux,
556   [saved_cflags=$CFLAGS
557   CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
558   AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
559   CFLAGS=$saved_cflags
560   ])
561   if test "$ac_cv_c_dll_linux" = "yes"
562   then
563     LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)"
564     LDDLLFLAGS="-Wl,-Bsymbolic"
565   else
566     AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
567                  ac_cv_c_dll_unixware,
568     [saved_cflags=$CFLAGS
569     CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
570     AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
571     CFLAGS=$saved_cflags
572     ])
573     if test "$ac_cv_c_dll_unixware" = "yes"
574     then
575       LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,\$(libdir)/%)"
576       LDDLLFLAGS="-Wl,-B,symbolic"
577     else
578       AC_CACHE_CHECK("whether we can build a NetBSD dll",
579                    ac_cv_c_dll_netbsd,
580       [saved_cflags=$CFLAGS
581       CFLAGS="$CFLAGS -fPIC -Wl,-Bshareable,-Bforcearchive"
582       AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
583       CFLAGS=$saved_cflags
584       ])
585       if test "$ac_cv_c_dll_netbsd" = "yes"
586       then
587         LDSHARED="\$(CC) -Wl,-Bshareable,-Bforcearchive"
588         LDDLLFLAGS="" #FIXME
589       fi
590     fi
591   fi
592   if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
593   then
594     LIBEXT="a"
595     if test "$DLLWRAP" = "dllwrap"; then
596       dnl FIXME - check whether dllwrap works correctly...
597       if test "$CYGWIN" = "yes"; then
598         echo "*** use dllwrap for building shared library."
599         LIBEXT="dll"
600       fi
601     fi
602   fi
603 fi
604
605 if test "$LIBEXT" = "a"; then
606   echo "*** It is currently not possible to build WINE without shared"
607   echo "*** library (.so) support to allow transparent switch between .so"
608   echo "*** and .dll files."
609   echo "*** If you are using Linux, you will need a newer binutils."
610   exit 1
611 fi
612
613 DLLFLAGS=""
614 LDPATH=""
615
616 if test "$LIBEXT" = "so"; then
617     DLLFLAGS="-fPIC"
618     DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
619     LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
620 elif test "$LIBEXT" = "dll"; then
621     #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
622     DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
623     LDPATH="PATH=\"\$(TOPOBJDIR)/unicode:\$\$PATH\""
624 else
625     DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) \$(LIBWINE) \$(LIBUNICODE) \$(X_LIBS) \$(XLIB)"
626     AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
627                    ac_cv_c_whole_archive,
628             [saved_cflags=$CFLAGS
629             CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
630             AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
631             CFLAGS=$saved_cflags
632             ])
633     if test "$ac_cv_c_whole_archive" = "yes"
634     then
635         DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
636     else
637         AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
638                        ac_cv_c_allextract,
639                 [saved_cflags=$CFLAGS
640                 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
641                 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
642                 CFLAGS=$saved_cflags
643                 ])
644         if test "$ac_cv_c_allextract" = "yes"
645         then
646             DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
647         fi
648     fi
649 fi
650
651 AC_SUBST(DLL_LINK)
652 AC_SUBST(DLLFLAGS)
653 AC_SUBST(LDSHARED)
654 AC_SUBST(LDDLLFLAGS)
655 AC_SUBST(LIBEXT)
656 AC_SUBST(LDPATH)
657
658 dnl **** Check for reentrant libc ****
659 dnl
660 dnl For cross-compiling we blindly assume that libc is reentrant. This is
661 dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
662
663 wine_cv_libc_reentrant=no 
664 dnl 
665 dnl Linux style errno location
666 dnl 
667 AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
668   [AC_TRY_RUN([int myerrno = 0;
669 char buf[256];
670 int *__errno_location(){return &myerrno;}
671 main(){connect(0,buf,255); exit(!myerrno);}],
672   wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
673   wine_cv_libc_r__errno_location=yes )
674 ])
675 if test "$wine_cv_libc_r__errno_location" = "yes"
676 then
677     AC_DEFINE(HAVE__ERRNO_LOCATION)
678     wine_cv_libc_reentrant=__errno_location 
679 fi
680 dnl
681 dnl FreeBSD style errno location
682 dnl 
683 AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
684   [AC_TRY_RUN([int myerrno = 0;
685 char buf[256];
686 int *__error(){return &myerrno;}
687 main(){connect(0,buf,255); exit(!myerrno);}],
688     wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
689     wine_cv_libc_r__error=yes )
690 ])
691 if test "$wine_cv_libc_r__error" = "yes"
692 then
693     AC_DEFINE(HAVE__ERROR)
694     wine_cv_libc_reentrant=__error 
695 fi
696 dnl
697 dnl Solaris style errno location
698 dnl 
699 AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
700   [AC_TRY_RUN([int myerrno = 0;
701 char buf[256];
702 int *___errno(){return &myerrno;}
703 main(){connect(0,buf,255); exit(!myerrno);}],
704     wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
705     wine_cv_libc_r___errno=yes )
706 ])
707 if test "$wine_cv_libc_r___errno" = "yes"
708 then
709     AC_DEFINE(HAVE___ERRNO)
710     wine_cv_libc_reentrant=___errno 
711 fi
712 dnl
713 dnl UnixWare style errno location
714 dnl 
715 AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
716   [AC_TRY_RUN([int myerrno = 0;
717 char buf[256];
718 int *__thr_errno(){return &myerrno;}
719 main(){connect(0,buf,255); exit(!myerrno);}],
720     wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
721     wine_cv_libc_r__thr_errno=yes )
722 ])
723 if test "$wine_cv_libc_r__thr_errno" = "yes"
724 then
725     AC_DEFINE(HAVE__THR_ERRNO)
726     wine_cv_libc_reentrant=__thr_errno 
727 fi
728 if test "$wine_cv_libc_reentrant" = "no" 
729 then
730   AC_DEFINE(NO_REENTRANT_LIBC)
731 fi
732
733 dnl **** Check for reentrant X libraries ****
734 dnl
735 dnl This may fail to determine whether X libraries are reentrant if
736 dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
737 dnl is possible with the --without-reentrant-x option.
738
739 if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
740 then
741 AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
742   [ if test "x$with_reentrant_x" = "xno" 
743     then
744         wine_cv_x_reentrant=no
745     else
746         libX11_check=none
747         for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
748             if test -r $dir/libX11.so; then
749                 libX11_check="-D $dir/libX11.so"
750                 break 1
751             fi
752             if test -r $dir/libX11.a; then
753                 libX11_check="$dir/libX11.a"
754                 break 1
755             fi
756         done
757         if test "$libX11_check" != "none"; then
758             if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
759             then
760                 wine_cv_x_reentrant=yes
761             else
762                 wine_cv_x_reentrant=no
763             fi
764         else
765             wine_cv_x_reentrant=unknown
766         fi
767     fi ] )
768 else
769     wine_cv_x_reentrant=no
770 fi
771 if test "$wine_cv_x_reentrant" = "no"
772 then
773   AC_DEFINE(NO_REENTRANT_X11)
774 fi
775
776 dnl **** Check for endianness ****
777
778 AC_C_BIGENDIAN
779
780 AC_CACHE_CHECK( "whether bitfields are bigendian", wine_cv_bitfields_bigendian,
781   [AC_TRY_RUN([
782 union
783 {
784   int word;
785   struct
786   {
787       int bit0 : 1;
788       int rest : sizeof(int)*8 - 1;
789   } bitfield;
790 } u;
791 main() { u.word = 0; u.bitfield.bit0 = 1; exit( u.word == 1 ); } ], 
792     wine_cv_bitfields_bigendian=yes, wine_cv_bitfields_bigendian=no,
793     wine_cv_bitfields_bigendian=no ) ])
794 if test "$wine_cv_bitfields_bigendian" = "yes"
795 then
796   AC_DEFINE(BITFIELDS_BIGENDIAN)
797 fi
798
799 AC_CACHE_CHECK( "whether unaligned memory access is allowed", wine_cv_allow_unaligned_access,
800   [AC_TRY_RUN([
801 long volatile test[2];
802 main()
803 {
804     long volatile *ua = (long volatile *)((char *)test + 1);
805     *ua = 0;
806     exit(0);
807 } ], wine_cv_allow_unaligned_access=yes, wine_cv_allow_unaligned_access=no,
808      wine_cv_allow_unaligned_access=no ) ])
809 if test "$wine_cv_allow_unaligned_access" = "yes"
810 then
811   AC_DEFINE(ALLOW_UNALIGNED_ACCESS)
812 fi
813
814
815 dnl **** Check for functions ****
816
817 AC_FUNC_ALLOCA()
818 AC_CHECK_FUNCS(\
819         __libc_fork \
820         _lwp_create \
821         clone \
822         finite \
823         fpclass \
824         getnetbyaddr \
825         getnetbyname \
826         getpagesize \
827         getprotobyname \
828         getprotobynumber \
829         getrlimit \
830         getservbyport \
831         getsockopt \
832         inet_network \
833         lstat \
834         memmove \
835         mmap \
836         rfork \
837         select \
838         sendmsg \
839         settimeofday \
840         sigaltstack \
841         statfs \
842         strcasecmp \
843         strerror \
844         strncasecmp \
845         tcgetattr \
846         timegm \
847         usleep \
848         vfscanf \
849         wait4 \
850         waitpid \
851 )
852
853 dnl **** Check for header files ****
854
855 AC_CHECK_HEADERS(\
856         arpa/inet.h \
857         arpa/nameser.h \
858         elf.h \
859         float.h \
860         ieeefp.h \
861         libio.h \
862         libutil.h \
863         link.h \
864         linux/cdrom.h \
865         linux/input.h \
866         linux/joystick.h \
867         linux/ucdrom.h \
868         net/if.h \
869         netdb.h \
870         netinet/in.h \
871         netinet/in_systm.h \
872         netinet/ip.h \
873         netinet/tcp.h \
874         pty.h \
875         resolv.h \
876         sched.h \
877         socket.h \
878         strings.h \
879         sys/cdio.h \
880         sys/errno.h \
881         sys/file.h \
882         sys/filio.h \
883         sys/ipc.h \
884         sys/lwp.h \
885         sys/mman.h \
886         sys/modem.h \
887         sys/mount.h \
888         sys/msg.h \
889         sys/param.h \
890         sys/ptrace.h \
891         sys/reg.h \
892         sys/signal.h \
893         sys/shm.h \
894         sys/socket.h \
895         sys/sockio.h \
896         sys/statfs.h \
897         sys/strtio.h \
898         sys/syscall.h \
899         sys/user.h \
900         sys/wait.h \
901         sys/v86.h \
902         sys/v86intr.h \
903         sys/vfs.h \
904         sys/vm86.h \
905         syscall.h \
906         ucontext.h \
907 )
908 AC_HEADER_STAT()
909
910 dnl **** Check for types ****
911
912 AC_C_CONST()
913 AC_C_INLINE()
914 AC_TYPE_SIZE_T()
915 AC_CHECK_SIZEOF(long long,0)
916
917    
918 AC_CACHE_CHECK("whether we can use re-entrant gethostbyname_r Linux style",
919         wine_cv_linux_gethostbyname_r_6,
920         AC_TRY_COMPILE([
921 #include <netdb.h>
922         ], [
923     char *name=NULL;
924     struct hostent he;
925     struct hostent *result;
926     char *buf=NULL;
927     int bufsize=0;
928     int res,errnr;
929     char *addr=NULL;
930     int addrlen=0;
931     int addrtype=0;
932     res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
933     res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
934     ],
935         wine_cv_linux_gethostbyname_r_6=yes,
936         wine_cv_linux_gethostbyname_r_6=no
937         )
938    )
939    if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
940    then
941       AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6)
942    fi
943
944 if test "$ac_cv_header_linux_joystick_h" = "yes"
945 then
946    AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
947         wine_cv_linux_joystick_22_api,
948         AC_TRY_COMPILE([
949         #include <sys/ioctl.h>
950         #include <linux/joystick.h>
951
952         struct js_event blub;
953         #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
954         #error "no 2.2 header"
955         #endif
956         ],/*empty*/,
957         wine_cv_linux_joystick_22_api=yes,
958         wine_cv_linux_joystick_22_api=no,
959         wine_cv_linux_joystick_22_api=no
960         )
961    )
962    if test "$wine_cv_linux_joystick_22_api" = "yes"
963    then
964       AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
965    fi
966 fi
967
968 dnl **** statfs checks ****
969
970 if test "$ac_cv_header_sys_vfs_h" = "yes"
971 then
972     AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
973                     wine_cv_sys_vfs_has_statfs,
974         AC_TRY_COMPILE([
975         #include <sys/types.h>
976         #ifdef HAVE_SYS_PARAM_H
977         # include <sys/param.h>
978         #endif
979         #include <sys/vfs.h>
980         ],[
981                 struct statfs stfs;
982
983                 memset(&stfs,0,sizeof(stfs));
984         ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
985         )
986     )
987     if test "$wine_cv_sys_vfs_has_statfs" = "yes"
988     then
989       AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
990     fi
991 fi
992
993 if test "$ac_cv_header_sys_statfs_h" = "yes"
994 then
995     AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
996                     wine_cv_sys_statfs_has_statfs,
997         AC_TRY_COMPILE([
998         #include <sys/types.h>
999         #ifdef HAVE_SYS_PARAM_H
1000         # include <sys/param.h>
1001         #endif
1002         #include <sys/statfs.h>
1003         ],[
1004                 struct statfs stfs;
1005         ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1006         )
1007     )
1008     if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1009     then
1010       AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
1011     fi
1012 fi
1013
1014 if test "$ac_cv_header_sys_mount_h" = "yes"
1015 then
1016     AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
1017                     wine_cv_sys_mount_has_statfs,
1018         AC_TRY_COMPILE([
1019         #include <sys/types.h>
1020         #ifdef HAVE_SYS_PARAM_H
1021         # include <sys/param.h>
1022         #endif
1023         #include <sys/mount.h>
1024         ],[
1025                 struct statfs stfs;
1026         ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1027         )
1028     )
1029     if test "$wine_cv_sys_mount_has_statfs" = "yes"
1030     then
1031       AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
1032     fi
1033 fi
1034
1035 dnl **** FIXME: what about mixed cases, where we need two of them? ***
1036
1037 AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
1038   [ if test "x$statfs_bfree" = "xno"
1039     then
1040         wine_cv_statfs_bfree=no
1041     else
1042         AC_TRY_COMPILE([
1043         #include <sys/types.h>
1044         #ifdef HAVE_SYS_PARAM_H
1045         # include <sys/param.h>
1046         #endif
1047         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1048         # include <sys/mount.h>
1049         #else
1050         # ifdef STATFS_DEFINED_BY_SYS_VFS
1051         #  include <sys/vfs.h>
1052         # else
1053         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
1054         #   include <sys/statfs.h>
1055         #  endif
1056         # endif
1057         #endif
1058         ],[
1059                 struct statfs stfs;
1060
1061                 stfs.f_bfree++;
1062         ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
1063         )
1064     fi ] )
1065 if test "$wine_cv_statfs_bfree" = "yes"
1066 then
1067   AC_DEFINE(STATFS_HAS_BFREE)
1068 fi
1069
1070 AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
1071   [ if test "x$statfs_bavail" = "xno"
1072     then
1073         wine_cv_statfs_bavail=no
1074     else
1075         AC_TRY_COMPILE([
1076         #include <sys/types.h>
1077         #ifdef HAVE_SYS_PARAM_H
1078         # include <sys/param.h>
1079         #endif
1080         #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1081         # include <sys/mount.h>
1082         #else
1083         # ifdef STATFS_DEFINED_BY_SYS_VFS
1084         #  include <sys/vfs.h>
1085         # else
1086         #  ifdef STATFS_DEFINED_BY_SYS_STATFS
1087         #   include <sys/statfs.h>
1088         #  endif
1089         # endif
1090         #endif
1091         ],[
1092                 struct statfs stfs;
1093
1094                 stfs.f_bavail++;
1095         ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
1096         )
1097     fi ] )
1098 if test "$wine_cv_statfs_bavail" = "yes"
1099 then
1100   AC_DEFINE(STATFS_HAS_BAVAIL)
1101 fi
1102
1103 dnl *** check for file descriptor passing with msg_accrights
1104
1105 AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
1106  AC_TRY_COMPILE([#include <sys/types.h>
1107 #include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
1108                 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
1109 if test "$ac_cv_c_msg_accrights" = "yes"
1110 then
1111     AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
1112 fi
1113
1114 dnl *** Check for the sun_len member in struct sockaddr_un
1115
1116 AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
1117  AC_TRY_COMPILE([#include <sys/types.h>
1118 #include <sys/socket.h>
1119 #include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
1120                 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
1121 if test "$ac_cv_c_sun_len" = "yes"
1122 then
1123     AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
1124 fi
1125
1126 dnl *** check for the need to define __i386__
1127
1128 AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
1129  AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
1130 yes
1131 #endif],
1132  ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
1133 if test "$ac_cv_cpp_def_i386" = "yes"
1134 then
1135     CFLAGS="$CFLAGS -D__i386__"
1136     LINTFLAGS="$LINTFLAGS -D__i386__"
1137 fi
1138
1139 dnl $GCC is set by autoconf
1140 GCC_NO_BUILTIN=""
1141 if test "$GCC" = "yes"
1142 then
1143     GCC_NO_BUILTIN="-fno-builtin"
1144 fi
1145 AC_SUBST(GCC_NO_BUILTIN)
1146
1147 dnl **** Generate output files ****
1148
1149 AC_OUTPUT_COMMANDS([
1150 extra_subdirs="\
1151 dlls/ddraw/d3ddevice \
1152 dlls/ddraw/dclipper \
1153 dlls/ddraw/ddraw \
1154 dlls/ddraw/direct3d \
1155 dlls/ddraw/dpalette \
1156 dlls/ddraw/dsurface \
1157 dlls/dinput/joystick \
1158 dlls/dinput/keyboard \
1159 dlls/dinput/mouse \
1160 dlls/kernel/messages \
1161 dlls/user/resources \
1162 "
1163 for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
1164
1165 MAKE_RULES=Make.rules
1166 AC_SUBST_FILE(MAKE_RULES)
1167
1168 MAKE_DLL_RULES=dlls/Makedll.rules
1169 AC_SUBST_FILE(MAKE_DLL_RULES)
1170
1171 MAKE_PROG_RULES=programs/Makeprog.rules
1172 AC_SUBST_FILE(MAKE_PROG_RULES)
1173
1174 AC_OUTPUT([
1175 Make.rules
1176 dlls/Makedll.rules
1177 programs/Makeprog.rules
1178 Makefile
1179 console/Makefile
1180 controls/Makefile
1181 debugger/Makefile
1182 dlls/Makefile
1183 dlls/advapi32/Makefile
1184 dlls/avifil32/Makefile
1185 dlls/comctl32/Makefile
1186 dlls/commdlg/Makefile
1187 dlls/crtdll/Makefile
1188 dlls/dciman32/Makefile
1189 dlls/ddraw/Makefile
1190 dlls/dinput/Makefile
1191 dlls/dplay/Makefile
1192 dlls/dplayx/Makefile
1193 dlls/dsound/Makefile
1194 dlls/gdi/Makefile
1195 dlls/icmp/Makefile
1196 dlls/imagehlp/Makefile
1197 dlls/imm32/Makefile
1198 dlls/kernel/Makefile
1199 dlls/lzexpand/Makefile
1200 dlls/mpr/Makefile
1201 dlls/msacm/Makefile
1202 dlls/msnet32/Makefile
1203 dlls/msvideo/Makefile
1204 dlls/ntdll/Makefile
1205 dlls/odbc32/Makefile
1206 dlls/ole32/Makefile
1207 dlls/oleaut32/Makefile
1208 dlls/olecli/Makefile
1209 dlls/oledlg/Makefile
1210 dlls/olepro32/Makefile
1211 dlls/olesvr/Makefile
1212 dlls/opengl32/Makefile
1213 dlls/psapi/Makefile
1214 dlls/rasapi32/Makefile
1215 dlls/richedit/Makefile
1216 dlls/rpcrt4/Makefile
1217 dlls/serialui/Makefile
1218 dlls/setupapi/Makefile
1219 dlls/shell32/Makefile
1220 dlls/shfolder/Makefile
1221 dlls/shlwapi/Makefile
1222 dlls/tapi32/Makefile
1223 dlls/ttydrv/Makefile
1224 dlls/urlmon/Makefile
1225 dlls/user/Makefile
1226 dlls/version/Makefile
1227 dlls/win32s/Makefile
1228 dlls/winaspi/Makefile
1229 dlls/winedos/Makefile
1230 dlls/wineps/Makefile
1231 dlls/wininet/Makefile
1232 dlls/winmm/Makefile
1233 dlls/winmm/joystick/Makefile
1234 dlls/winmm/mcianim/Makefile
1235 dlls/winmm/mciavi/Makefile
1236 dlls/winmm/mcicda/Makefile
1237 dlls/winmm/mciseq/Makefile
1238 dlls/winmm/mciwave/Makefile
1239 dlls/winmm/midimap/Makefile
1240 dlls/winmm/wavemap/Makefile
1241 dlls/winmm/wineoss/Makefile
1242 dlls/winnls/Makefile
1243 dlls/winsock/Makefile
1244 dlls/winspool/Makefile
1245 dlls/wow32/Makefile
1246 dlls/wsock32/Makefile
1247 dlls/x11drv/Makefile
1248 documentation/Makefile
1249 documentation/wine.conf.man
1250 documentation/wine.man
1251 files/Makefile
1252 graphics/Makefile
1253 graphics/enhmetafiledrv/Makefile
1254 graphics/metafiledrv/Makefile
1255 graphics/win16drv/Makefile
1256 graphics/x11drv/Makefile
1257 if1632/Makefile
1258 include/Makefile
1259 library/Makefile
1260 libtest/Makefile
1261 loader/Makefile
1262 loader/dos/Makefile
1263 loader/ne/Makefile
1264 memory/Makefile
1265 misc/Makefile
1266 miscemu/Makefile
1267 msdos/Makefile
1268 objects/Makefile
1269 ole/Makefile
1270 programs/Makefile
1271 programs/avitools/Makefile
1272 programs/clock/Makefile
1273 programs/cmdlgtst/Makefile
1274 programs/control/Makefile
1275 programs/notepad/Makefile
1276 programs/osversioncheck/Makefile
1277 programs/progman/Makefile
1278 programs/regapi/Makefile
1279 programs/regtest/Makefile
1280 programs/uninstaller/Makefile
1281 programs/view/Makefile
1282 programs/wcmd/Makefile
1283 programs/winemine/Makefile
1284 programs/winhelp/Makefile
1285 programs/winver/Makefile
1286 relay32/Makefile
1287 scheduler/Makefile
1288 server/Makefile
1289 tools/Makefile
1290 tools/cvdump/Makefile
1291 tools/specmaker/Makefile
1292 tools/winebuild/Makefile
1293 tools/winelauncher
1294 tools/wmc/Makefile
1295 tools/wrc/Makefile
1296 tsx11/Makefile
1297 unicode/Makefile
1298 win32/Makefile
1299 windows/Makefile
1300 windows/x11drv/Makefile ])
1301
1302 if test "$have_x" = "no"
1303 then
1304   echo
1305   echo "*** Warning: X development files not found. Wine will be built without"
1306   echo "*** X support, which currently does not work, and would probably not be"
1307   echo "*** what you want anyway. You will need to install devel packages of"
1308   echo "*** Xlib/Xfree86 and Xpm at the very least."
1309 elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1310 then
1311   echo
1312   echo "*** Warning: Xpm development files not found. Wine will be built without"
1313   echo "*** Xpm support, which currently does not work. You will need to install"
1314   echo "*** devel packages of Xpm."
1315 fi
1316
1317 if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1318 then
1319   echo
1320   echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1321   echo "*** terminal resize support. Consider upgrading ncurses."
1322 fi
1323
1324 if test "$wine_cv_libc_reentrant" = "no" 
1325 then
1326   echo
1327   echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1328   echo "*** thread support. Consider upgrading libc to a more recent"
1329   echo "*** reentrant version of libc."
1330 fi
1331
1332 if test "$wine_cv_opengl_version_OK" = "no"
1333 then
1334   echo
1335   echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1336   echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1337 fi
1338
1339 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "normal"
1340 then
1341   echo
1342   echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
1343   echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
1344   echo "*** A fix for glibc 2.1.3 that seem to work is included in this version of Wine,"
1345   echo "*** start configure with '--enable-opengl' to force OpenGL support."
1346 fi
1347
1348 if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
1349 then
1350   echo
1351   echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
1352   echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1353   echo "*** support before reporting bugs."
1354 fi
1355
1356
1357 echo
1358 echo "Configure finished.  Do 'make depend && make' to compile Wine."
1359 echo
1360
1361 dnl Local Variables:
1362 dnl comment-start: "dnl "
1363 dnl comment-end: ""
1364 dnl comment-start-skip: "\\bdnl\\b\\s *"
1365 dnl compile-command: "autoconf"
1366 dnl End: