blob: d7e4fe4e9476ca1f657d520a4c02d808294e7ad2 [file] [log] [blame]
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001dnl Process this file with autoconf to produce a configure script.
2dnl Author: Michael Patra <micky@marie.physik.tu-berlin.de>
3dnl <patra@itp1.physik.tu-berlin.de>
4AC_REVISION([configure.in 1.00])
5AC_INIT(controls/edit.c)
Alexandre Julliard18f92e71996-07-17 20:02:21 +00006AC_CONFIG_HEADER(include/config.h)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00007AC_CONFIG_AUX_DIR(tools)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00008
Alexandre Julliardff8331e1995-09-18 11:19:54 +00009dnl **** Command-line arguments ****
10
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000011dnl Default values
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000012LIBEXT=so # library type .so or .a
Alexandre Julliardf90efa91998-06-14 15:24:15 +000013TRACE_MSGS=yes # the TRACE() macro
14DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
Patrik Stridvall5e5ad532000-04-23 20:02:46 +000015CURSES=yes
Lionel Ulmerfbc15b12000-04-29 14:23:22 +000016OPENGL=normal
Alexandre Julliard7e56f681996-01-31 19:02:28 +000017
Alexandre Julliardf90efa91998-06-14 15:24:15 +000018AC_ARG_ENABLE(debug,
19[ --disable-debug compile out all debugging messages],
20[if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
21
Lionel Ulmerfbc15b12000-04-29 14:23:22 +000022AC_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
Alexandre Julliardf90efa91998-06-14 15:24:15 +000026AC_ARG_ENABLE(trace,
27[ --disable-trace compile out TRACE messages],
28[if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
29
Patrik Stridvall5e5ad532000-04-23 20:02:46 +000030AC_ARG_WITH(curses,
31[ --without-curses do not use curses],
32[if test "$withval" = "no"; then CURSES="no"; fi])
33
Alexandre Julliarda11d7b11998-03-01 20:05:02 +000034AC_ARG_WITH(reentrant-x,
Joseph Pranevich791cd6a1998-12-02 19:58:08 +000035[ --without-reentrant-x compile for use with non-reentrant X libraries])
Alexandre Julliarda11d7b11998-03-01 20:05:02 +000036
Alexandre Julliard18f92e71996-07-17 20:02:21 +000037AC_SUBST(OPTIONS)
Alexandre Julliardb7258be1995-09-01 15:57:28 +000038
Alexandre Julliardf90efa91998-06-14 15:24:15 +000039if test "$DEBUG_MSGS" = "no"
40then
41 AC_DEFINE(NO_DEBUG_MSGS)
42 AC_DEFINE(NO_TRACE_MSGS)
43else
44 if test "$TRACE_MSGS" = "no"
45 then
46 AC_DEFINE(NO_TRACE_MSGS)
47 fi
48fi
49
Alexandre Julliard02e90081998-01-04 17:49:09 +000050dnl **** Check for some programs ****
Alexandre Julliardff8331e1995-09-18 11:19:54 +000051
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000052AC_PROG_MAKE_SET
53AC_PROG_CC
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000054AC_PROG_CPP
Alexandre Julliardff8331e1995-09-18 11:19:54 +000055AC_PATH_XTRA
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000056AC_PROG_YACC
57AC_PROG_LEX
Marcus Meissnerb53bb412000-07-23 13:41:51 +000058AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
59if test "$XLEX" = "none"
60then
61 echo "*** Error: No suitable lex found. ***"
62 echo " Please install the 'flex' package."
63 exit 1
64fi
65AC_DECL_YYTEXT
Alexandre Julliardff8331e1995-09-18 11:19:54 +000066AC_PROG_RANLIB
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000067AC_PROG_INSTALL
Alexandre Julliard641ee761997-08-04 16:34:36 +000068AC_PROG_LN_S
Mike McCormacke0df32f2000-08-11 21:15:21 +000069AC_CHECK_PROG(C2MAN,c2man,c2man,\$(TOPSRCDIR)/tools/c2man.pl)
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000070AC_PATH_PROG(LDCONFIG, ldconfig, true, /sbin:/usr/sbin:$PATH)
Dimitrie O. Paun79e44ab2000-12-05 04:13:36 +000071AC_CYGWIN
Hidenori Takeshimad48ca942000-12-22 22:28:00 +000072AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false)
Alexandre Julliard02e90081998-01-04 17:49:09 +000073
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000074dnl Check for lint
75AC_CHECK_PROGS(LINT, lclint lint)
76if test "$LINT" = "lint"
77then
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'
80fi
81AC_SUBST(LINT)
82AC_SUBST(LINTFLAGS)
83
Dimitrie O. Paun79e44ab2000-12-05 04:13:36 +000084if test "$CYGWIN" = "yes"
85then
86 LDCOMBINE="ld -r --enable-stdcall-fixup"
87else
88 LDCOMBINE="ld -r"
89fi
90AC_SUBST(LDCOMBINE)
91
Alexandre Julliard02e90081998-01-04 17:49:09 +000092dnl **** Check for some libraries ****
93
Howard Abrams13277481999-07-10 13:16:29 +000094dnl Check for -lm for BeOS
95AC_CHECK_LIB(m,sqrt)
Alexandre Julliardd37eb361997-07-20 16:23:21 +000096dnl Check for -li386 for NetBSD and OpenBSD
Alexandre Julliard02e90081998-01-04 17:49:09 +000097AC_CHECK_LIB(i386,i386_set_ldt)
Todd Vierlingecc76691998-12-15 17:49:02 +000098dnl Check for -lossaudio for NetBSD
99AC_CHECK_LIB(ossaudio,_oss_ioctl)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000100dnl Check for -lw for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000101AC_CHECK_FUNCS(iswalnum,,AC_CHECK_LIB(w,iswalnum))
Patrik Stridvallea584721998-11-01 16:22:07 +0000102dnl Check for -lnsl for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000103AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000104dnl Check for -lsocket for Solaris
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000105AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000106dnl Check for -lxpg4 for FreeBSD
107AC_CHECK_LIB(xpg4,setrunelocale)
Alexandre Julliard0e7bd081999-05-02 11:46:02 +0000108dnl Check for -lmmap for OS/2
109AC_CHECK_LIB(mmap,mmap)
Marcus Meissner2d7be871999-12-05 23:06:40 +0000110dnl Check for openpty
111AC_CHECK_FUNCS(openpty,,
112 AC_CHECK_LIB(util,openpty,
113 AC_DEFINE(HAVE_OPENPTY)
114 LIBS="$LIBS -lutil"
115 ))
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000116
117AC_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)
Alexandre Julliarde1e75372000-04-24 17:17:49 +0000122 LIBS="$LIBS -ldl",
123 LIBEXT="a"
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000124 )
Alexandre Julliarde1e75372000-04-24 17:17:49 +0000125 ),
126 LIBEXT="a"
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000127)
Patrik Stridvallea584721998-11-01 16:22:07 +0000128AC_SUBST(XLIB)
Patrik Stridvall2941a212000-04-25 20:34:22 +0000129AC_SUBST(X_DLLS)
130X_DLLS=""
131AC_SUBST(XFILES)
132XFILES=""
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000133AC_SUBST(OPENGLFILES)
134OPENGLFILES=""
Hidenori Takeshima4615e292000-05-23 23:36:41 +0000135AC_SUBST(OPENGL32_DLL)
136OPENGL32_DLL=""
Marcus Meissner10ad97c2000-04-09 14:30:50 +0000137AC_SUBST(DGA_SRCS)
138DGA_SRCS=""
Lionel Ulmer51177f92000-05-01 14:25:49 +0000139AC_SUBST(DGA2_SRCS)
140DGA2_SRCS=""
Marcus Meissner10ad97c2000-04-09 14:30:50 +0000141AC_SUBST(MESA_SRCS)
142MESA_SRCS=""
Patrik Stridvallea584721998-11-01 16:22:07 +0000143if test "$have_x" = "yes"
144then
Patrik Stridvall24110281999-02-04 10:09:54 +0000145 XLIB="-lXext -lX11"
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000146 ac_save_CPPFLAGS="$CPPFLAGS"
147 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Patrik Stridvall24110281999-02-04 10:09:54 +0000148
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000149 dnl *** Check for -lXpm
150 AC_CHECK_HEADERS(X11/xpm.h,
151 [ dnl *** If X11/xpm.h exists...
152 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
153 [ AC_DEFINE(HAVE_LIBXXPM) X_PRE_LIBS="$X_PRE_LIBS -lXpm"],,
154 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
155 )
156 ],
157 [ dnl *** If X11/xpm.h does not exist...
158 dnl NOTE: autoconf does not allow commas inside the third
159 dnl parameter to AC_CHECK_HEADERS, due to some quoting
160 dnl magic it does.
161 echo "Redhat : xpm xpm-devel"
162 echo "Caldera OpenLinux : xpm xpm-devel xpm-devel-static"
Marcus Meissner284995e2000-03-04 19:21:49 +0000163 echo "SuSE : xpm"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000164 echo "Debian/Corel Linux: xpm4g xpm4g-dev"
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000165 echo
166 echo "Or get the sources from ftp.x.org and all its mirror sites from "
167 echo "the directory /contrib/libraries."
168 echo
169 exit 1
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000170 ]
171 )
Patrik Stridvall24110281999-02-04 10:09:54 +0000172
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000173 dnl *** All three of the following tests require X11/Xlib.h
174 AC_CHECK_HEADERS(X11/Xlib.h,
175 [
Ove Kaavenc90fb252001-01-02 22:39:14 +0000176 dnl *** Check for X keyboard extension
177 AC_CHECK_HEADERS(X11/XKBlib.h,
178 [ dnl *** If X11/XKBlib.h exists...
179 AC_CHECK_LIB(X11, XkbQueryExtension,
180 AC_DEFINE(HAVE_XKB),,
181 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
182 ],
183 AC_MSG_WARN([XKB extension not found!!])
184 )
185
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000186 dnl *** Check for X Shm extension
187 AC_CHECK_HEADERS(X11/extensions/XShm.h,
188 [ dnl *** If X11/extensions/XShm.h exists...
189 AC_CHECK_LIB(Xext, XShmQueryExtension,
190 AC_DEFINE(HAVE_LIBXXSHM),,
191 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
192 ],
193 AC_MSG_WARN([Xshm extension not found!!])
194 )
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000195
Francois Jacques5b6879c2000-07-28 23:04:54 +0000196 dnl *** Check for X shape extension
Ove Kaavenc90fb252001-01-02 22:39:14 +0000197 AC_CHECK_HEADERS(X11/extensions/shape.h,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000198 [ dnl *** If X11/extensions/shape.h exists...
199 AC_CHECK_LIB(Xext,XShapeQueryExtension,
200 AC_DEFINE(HAVE_LIBXSHAPE),,
201 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
202 ],
Ove Kaavenc90fb252001-01-02 22:39:14 +0000203 AC_MSG_WARN([XShape extension not found!!])
Francois Jacques5b6879c2000-07-28 23:04:54 +0000204 )
205
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000206 dnl *** Check for XFree86 DGA / DGA 2.0 extension
207 AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
208 [ dnl *** If X11/extensions/xf86dga.h exists, check
209 dnl *** for XDGAQueryExtension()...
210 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
211 [ dnl *** If found...
212 AC_DEFINE(HAVE_LIBXXF86DGA2)
213 AC_DEFINE(HAVE_LIBXXF86DGA)
214 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
215 DGA_SRCS='$(DGA_SRCS)'
216 DGA2_SRCS='$(DGA2_SRCS)'
217 ],
218 [ dnl *** If not found, look for XF86DGAQueryExtension()
219 dnl *** instead (DGA 2.0 not found)...
220 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
221 [ AC_DEFINE(HAVE_LIBXXF86DGA)
222 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
223 DGA_SRCS='$(DGA_SRCS)'
224 ],,
225 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
226 )
227 ],
228 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
229 )
230 ],
231 AC_MSG_WARN([DGA extension not found!!])
232 )
Patrik Stridvall24110281999-02-04 10:09:54 +0000233
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000234 dnl *** Check for XFree86 VMODE extension
235 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
236 [ dnl *** If X11/extensions/xf86vmode.h exists...
237 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
238 [ AC_DEFINE(HAVE_LIBXXF86VM)
239 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
240 ],,
241 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
242 )
243 ],
244 AC_MSG_WARN([XFree86 VMODE extension not found!!])
245 )
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000246
247 dnl *** Check for XVideo extension supporting XvImages
248 AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
249 [ dnl *** If X11/extensions/Xvlib.h exists...
250 AC_CHECK_LIB(Xv, XvShmCreateImage,
251 [ AC_DEFINE(HAVE_XVIDEO)
252 X_PRE_LIBS="$X_PRE_LIBS -lXv"
253 ],,
254 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
255 )
256 ],
257 AC_MSG_WARN([XVideo extension not found !!])
258 )
259
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000260 ]
261 ) dnl *** End of X11/Xlib.h check
Lionel Ulmer5c085701999-02-28 19:48:53 +0000262
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000263 dnl Check for the presence of OpenGL
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000264 if test $OPENGL = "yes" -o $OPENGL = "normal"
Patrik Stridvall24110281999-02-04 10:09:54 +0000265 then
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000266 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h)
Marcus Meissner22a969b2000-08-08 20:46:50 +0000267 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000268 then
269 dnl Check for some problems due to old Mesa versions
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000270 AC_CACHE_CHECK("for up-to-date OpenGL version", wine_cv_opengl_version_OK,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000271 AC_TRY_COMPILE(
Lionel Ulmer48c08162000-01-05 01:51:02 +0000272 [#include <GL/gl.h>],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000273 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000274 [wine_cv_opengl_version_OK="yes"],
275 [wine_cv_opengl_version_OK="no"]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000276 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000277 )
278
279 dnl Check for the thread-safety of the OpenGL library
280 AC_CACHE_CHECK("for thread-safe OpenGL version",
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000281 wine_cv_opengl_version_threadsafe,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000282 [saved_libs=$LIBS
283 LIBS="$X_LIBS -lGL"
284 AC_TRY_LINK([],[pthread_getspecific();],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000285 [wine_cv_opengl_version_threadsafe="yes"],
286 [wine_cv_opengl_version_threadsafe="no"])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000287 LIBS=$saved_libs]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000288 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000289
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000290 if test "$wine_cv_opengl_version_OK" = "yes" -a \( "$wine_cv_opengl_version_threadsafe" = "no" -o $OPENGL = "yes" \)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000291 then
Andreas Mohr4eefb962000-08-01 00:27:35 +0000292 dnl Check for the presence of the library
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000293 AC_CHECK_LIB(GL,glXCreateContext,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000294 X_PRE_LIBS="$X_PRE_LIBS -lGL"
295 MESA_SRCS='$(MESA_SRCS)'
296 ,,
297 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
298
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000299 if test $ac_cv_lib_GL_glXCreateContext = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000300 then
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000301
302 OPENGLFILES='$(OPENGLFILES)'
303 AC_DEFINE(HAVE_OPENGL)
304
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000305 AC_CHECK_LIB(GL,glXGetProcAddressARB,AC_DEFINE(HAVE_GLX_GETPROCADDRESS),,$X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000306
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000307 if test $ac_cv_lib_GL_glXGetProcAddressARB = "yes"
308 then
Lionel Ulmer1434d872000-07-23 14:23:31 +0000309 AC_CACHE_CHECK("for OpenGL extension functions prototypes", wine_cv_extension_prototypes,
310 AC_TRY_COMPILE([#include <GL/gl.h>
Marcus Meissner6bb6d4c2000-08-09 22:21:08 +0000311 #ifdef HAVE_GL_GLEXT_H
312 # include <GL/glext.h>
313 #endif
314 ],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000315 [PFNGLCOLORTABLEEXTPROC test_proc;],
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000316 [wine_cv_extension_prototypes="yes"],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000317 [wine_cv_extension_prototypes="no"]
318 )
319 )
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000320 if test $wine_cv_extension_prototypes = "yes"
321 then
322 AC_DEFINE(HAVE_GLEXT_PROTOTYPES)
323 fi
Lionel Ulmer1434d872000-07-23 14:23:31 +0000324
Hidenori Takeshima4615e292000-05-23 23:36:41 +0000325 OPENGL32_DLL=opengl32
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000326 fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000327 fi
328 fi
329 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000330 fi
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000331
332 CPPFLAGS="$ac_save_CPPFLAGS"
Patrik Stridvall2941a212000-04-25 20:34:22 +0000333 X_DLLS='$(X_DLLS)'
334 XFILES='$(XFILES)'
Patrik Stridvallea584721998-11-01 16:22:07 +0000335else
336 XLIB=""
337 X_CFLAGS=""
338 X_LIBS=""
339fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000340
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000341dnl **** Check which curses lib to use ***
Patrik Stridvall5e5ad532000-04-23 20:02:46 +0000342if test "$CURSES" = "yes"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000343then
Patrik Stridvall5e5ad532000-04-23 20:02:46 +0000344 AC_CHECK_HEADERS(ncurses.h)
345 if test "$ac_cv_header_ncurses_h" = "yes"
346 then
347 AC_CHECK_LIB(ncurses,waddch)
348 fi
349 if test "$ac_cv_lib_ncurses_waddch" = "yes"
350 then
351 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
352 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
353 else
354 AC_CHECK_HEADERS(curses.h)
355 if test "$ac_cv_header_curses_h" = "yes"
356 then
357 AC_CHECK_LIB(curses,waddch)
358 if test "$ac_cv_lib_curses_waddch" = "yes"
359 then
360 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
361 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
362 fi
363 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000364 fi
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000365fi
366
Pavel Roskin94d99641998-12-26 11:52:51 +0000367dnl **** Check for IPX (currently Linux only) ****
368AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
369 AC_TRY_COMPILE(
370 [#include <sys/socket.h>
371 #include <netipx/ipx.h>],
372 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000373 [ac_cv_c_ipx_gnu="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000374 [ac_cv_c_ipx_gnu="no"])
375 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000376if test "$ac_cv_c_ipx_gnu" = "yes"
377then
378 AC_DEFINE(HAVE_IPX_GNU)
379fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000380
381if test "$ac_cv_c_ipx_gnu" = "no"
382then
383 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
384 AC_TRY_COMPILE(
385 [#include <sys/socket.h>
386 #include <asm/types.h>
387 #include <linux/ipx.h>],
388 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000389 [ac_cv_c_ipx_linux="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000390 [ac_cv_c_ipx_linux="no"])
391 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000392 if test "$ac_cv_c_ipx_linux" = "yes"
393 then
394 AC_DEFINE(HAVE_IPX_LINUX)
395 fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000396fi
397
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000398dnl **** Check for Open Sound System ****
Todd Vierlingecc76691998-12-15 17:49:02 +0000399AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000400
401AC_CACHE_CHECK("for Open Sound System",
402 ac_cv_c_opensoundsystem,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000403 AC_TRY_COMPILE([
Todd Vierlingecc76691998-12-15 17:49:02 +0000404 #if defined(HAVE_SYS_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000405 #include <sys/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000406 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000407 #include <machine/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000408 #elif defined(HAVE_SOUNDCARD_H)
409 #include <soundcard.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000410 #endif
411 ],[
412
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000413/* check for one of the Open Sound System specific SNDCTL_ defines */
414#if !defined(SNDCTL_DSP_STEREO)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000415#error No open sound system
416#endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000417],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
418
419if test "$ac_cv_c_opensoundsystem" = "yes"
420then
421 AC_DEFINE(HAVE_OSS)
422fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000423
Eric Pouech338d3b21999-05-22 18:52:21 +0000424AC_CACHE_CHECK("for Open Sound System/MIDI interface",
425 ac_cv_c_opensoundsystem_midi,
426 AC_TRY_COMPILE([
427 #if defined(HAVE_SYS_SOUNDCARD_H)
428 #include <sys/soundcard.h>
429 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
430 #include <machine/soundcard.h>
431 #elif defined(HAVE_SOUNDCARD_H)
432 #include <soundcard.h>
433 #endif
434 ],[
435
436/* check for one of the Open Sound System specific SNDCTL_SEQ defines */
437#if !defined(SNDCTL_SEQ_SYNC)
438#error No open sound system MIDI interface
439#endif
440],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
441
442if test "$ac_cv_c_opensoundsystem_midi" = "yes"
443then
444 AC_DEFINE(HAVE_OSS_MIDI)
445fi
446
Alexandre Julliard641ee761997-08-04 16:34:36 +0000447dnl **** If ln -s doesn't work, use cp instead ****
448if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
449
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000450dnl **** Check for gcc strength-reduce bug ****
451
452if test "x${GCC}" = "xyes"
453then
454 CFLAGS="$CFLAGS -Wall"
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000455 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
456 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000457int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000458int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000459 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000460 unsigned int B = 3;
461 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000462 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000463 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
464 L[[i]] = 4;
465
466 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000467}],
468 ac_cv_c_gcc_strength_bug="no",
469 ac_cv_c_gcc_strength_bug="yes",
470 ac_cv_c_gcc_strength_bug="yes") )
471 if test "$ac_cv_c_gcc_strength_bug" = "yes"
472 then
473 CFLAGS="$CFLAGS -fno-strength-reduce"
474 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000475
476 dnl Check for -mpreferred-stack-boundary
477 AC_CACHE_CHECK("for gcc -mpreferred-stack-boundary=2 support",
478 ac_cv_c_gcc_stack_boundary,
479 [saved_cflags=$CFLAGS
480 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
481 AC_TRY_COMPILE(,[return 0],ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")
482 CFLAGS=$saved_cflags
483 ])
484 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
485 then
486 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
487 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000488fi
489
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000490dnl **** Check if we need to place .type inside a .def directive ****
491
492AC_CACHE_CHECK("whether .type must sit inside a .def directive",
493 ac_cv_c_type_in_def,
494[saved_libs=$LIBS
495LIBS="conftest_asm.s $LIBS"
496cat > conftest_asm.s <<EOF
497 .globl _ac_test
498 .def _ac_test; .scl 2; .type 32; .endef
499_ac_test:
500 .long 0
501EOF
502AC_TRY_LINK(,,ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no")
503LIBS=$saved_libs])
504if test "$ac_cv_c_type_in_def" = "yes"
505then
506 AC_DEFINE(NEED_TYPE_IN_DEF)
507fi
508
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000509dnl **** Check for underscore on external symbols ****
510
511AC_CACHE_CHECK("whether external symbols need an underscore prefix",
512 ac_cv_c_extern_prefix,
513[saved_libs=$LIBS
514LIBS="conftest_asm.s $LIBS"
515cat > conftest_asm.s <<EOF
516 .globl _ac_test
517_ac_test:
518 .long 0
519EOF
520AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
521 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
522LIBS=$saved_libs])
523if test "$ac_cv_c_extern_prefix" = "yes"
524then
525 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
526fi
527
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000528dnl **** Check for .string in assembler ****
529
530AC_CACHE_CHECK("whether assembler accepts .string",
531 ac_cv_c_asm_string,
532[saved_libs=$LIBS
533LIBS="conftest_asm.s $LIBS"
534cat > conftest_asm.s <<EOF
535 .string "test"
536EOF
537AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
538LIBS=$saved_libs])
539if test "$ac_cv_c_asm_string" = "yes"
540then
541 AC_DEFINE(HAVE_ASM_STRING)
542fi
543
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000544dnl **** Check for working dll ****
545
Todd Vierling4b992b01998-12-15 15:26:27 +0000546LDSHARED=""
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000547LDDLLFLAGS=""
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000548if test "$LIBEXT" = "so"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000549then
Todd Vierling4b992b01998-12-15 15:26:27 +0000550 AC_CACHE_CHECK("whether we can build a Linux dll",
551 ac_cv_c_dll_linux,
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000552 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000553 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
Todd Vierling4b992b01998-12-15 15:26:27 +0000554 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000555 CFLAGS=$saved_cflags
556 ])
Todd Vierling4b992b01998-12-15 15:26:27 +0000557 if test "$ac_cv_c_dll_linux" = "yes"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000558 then
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000559 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)"
560 LDDLLFLAGS="-Wl,-Bsymbolic"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000561 else
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000562 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
Ron Recorde977d6c1999-09-05 12:32:05 +0000563 ac_cv_c_dll_unixware,
Todd Vierling4b992b01998-12-15 15:26:27 +0000564 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000565 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
Ron Recorde977d6c1999-09-05 12:32:05 +0000566 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
Todd Vierling4b992b01998-12-15 15:26:27 +0000567 CFLAGS=$saved_cflags
568 ])
Ron Recorde977d6c1999-09-05 12:32:05 +0000569 if test "$ac_cv_c_dll_unixware" = "yes"
Todd Vierling4b992b01998-12-15 15:26:27 +0000570 then
Patrik Stridvall35d288b2000-12-18 03:13:52 +0000571 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,\$(libdir)/%)"
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000572 LDDLLFLAGS="-Wl,-B,symbolic"
Ron Recorde977d6c1999-09-05 12:32:05 +0000573 else
574 AC_CACHE_CHECK("whether we can build a NetBSD dll",
575 ac_cv_c_dll_netbsd,
576 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000577 CFLAGS="$CFLAGS -fPIC -Wl,-Bshareable,-Bforcearchive"
Ron Recorde977d6c1999-09-05 12:32:05 +0000578 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
579 CFLAGS=$saved_cflags
580 ])
581 if test "$ac_cv_c_dll_netbsd" = "yes"
582 then
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000583 LDSHARED="\$(CC) -Wl,-Bshareable,-Bforcearchive"
584 LDDLLFLAGS="" #FIXME
Ron Recorde977d6c1999-09-05 12:32:05 +0000585 fi
Todd Vierling4b992b01998-12-15 15:26:27 +0000586 fi
587 fi
Ron Recorde977d6c1999-09-05 12:32:05 +0000588 if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no"
Todd Vierling4b992b01998-12-15 15:26:27 +0000589 then
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000590 LIBEXT="a"
591 if test "$DLLWRAP" = "dllwrap"; then
592 dnl FIXME - check whether dllwrap works correctly...
593 if test "$CYGWIN" = "yes"; then
594 echo "*** use dllwrap for building shared library."
595 LIBEXT="dll"
596 fi
597 fi
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000598 fi
599fi
Alexandre Julliard0adad952000-01-26 01:45:58 +0000600
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000601if test "$LIBEXT" = "a"; then
602 echo "*** It is currently not possible to build WINE without shared"
603 echo "*** library (.so) support to allow transparent switch between .so"
604 echo "*** and .dll files."
605 echo "*** If you are using Linux, you will need a newer binutils."
606 exit 1
607fi
608
Alexandre Julliard0adad952000-01-26 01:45:58 +0000609DLLFLAGS=""
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000610LDPATH=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000611
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000612if test "$LIBEXT" = "so"; then
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000613 DLLFLAGS="-fPIC"
Alexandre Julliardb0182392000-12-06 00:04:10 +0000614 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000615 LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
616elif test "$LIBEXT" = "dll"; then
617 #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
618 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
619 LDPATH="PATH=\"\$(TOPOBJDIR)/unicode:\$\$PATH\""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000620else
Alexandre Julliardb0182392000-12-06 00:04:10 +0000621 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) \$(LIBWINE) \$(LIBUNICODE) \$(X_LIBS) \$(XLIB)"
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000622 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
623 ac_cv_c_whole_archive,
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000624 [saved_cflags=$CFLAGS
625 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
626 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
627 CFLAGS=$saved_cflags
628 ])
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000629 if test "$ac_cv_c_whole_archive" = "yes"
630 then
631 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
632 else
633 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
634 ac_cv_c_allextract,
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000635 [saved_cflags=$CFLAGS
636 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
637 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
638 CFLAGS=$saved_cflags
639 ])
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000640 if test "$ac_cv_c_allextract" = "yes"
641 then
642 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000643 fi
Alexandre Julliard0adad952000-01-26 01:45:58 +0000644 fi
645fi
646
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000647AC_SUBST(DLL_LINK)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000648AC_SUBST(DLLFLAGS)
Todd Vierling4b992b01998-12-15 15:26:27 +0000649AC_SUBST(LDSHARED)
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000650AC_SUBST(LDDLLFLAGS)
Alexandre Julliard0adad952000-01-26 01:45:58 +0000651AC_SUBST(LIBEXT)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000652AC_SUBST(LDPATH)
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000653
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000654dnl **** Check for reentrant libc ****
655dnl
656dnl For cross-compiling we blindly assume that libc is reentrant. This is
657dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
658
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000659wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000660dnl
661dnl Linux style errno location
662dnl
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000663AC_CACHE_CHECK("for reentrant libc: __errno_location", wine_cv_libc_r__errno_location,
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000664 [AC_TRY_RUN([int myerrno = 0;
665char buf[256];
666int *__errno_location(){return &myerrno;}
667main(){connect(0,buf,255); exit(!myerrno);}],
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000668 wine_cv_libc_r__errno_location=yes, wine_cv_libc_r__errno_location=no,
669 wine_cv_libc_r__errno_location=yes )
670])
671if test "$wine_cv_libc_r__errno_location" = "yes"
672then
673 AC_DEFINE(HAVE__ERRNO_LOCATION)
674 wine_cv_libc_reentrant=__errno_location
675fi
Marcus Meissnerc2606381999-04-11 15:20:29 +0000676dnl
677dnl FreeBSD style errno location
678dnl
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000679AC_CACHE_CHECK("for reentrant libc: __error", wine_cv_libc_r__error,
680 [AC_TRY_RUN([int myerrno = 0;
Marcus Meissnerc2606381999-04-11 15:20:29 +0000681char buf[256];
682int *__error(){return &myerrno;}
683main(){connect(0,buf,255); exit(!myerrno);}],
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000684 wine_cv_libc_r__error=yes, wine_cv_libc_r__error=no,
685 wine_cv_libc_r__error=yes )
Marcus Meissnerc2606381999-04-11 15:20:29 +0000686])
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000687if test "$wine_cv_libc_r__error" = "yes"
688then
689 AC_DEFINE(HAVE__ERROR)
690 wine_cv_libc_reentrant=__error
691fi
692dnl
693dnl Solaris style errno location
694dnl
695AC_CACHE_CHECK("for reentrant libc: ___errno", wine_cv_libc_r___errno,
696 [AC_TRY_RUN([int myerrno = 0;
697char buf[256];
698int *___errno(){return &myerrno;}
699main(){connect(0,buf,255); exit(!myerrno);}],
700 wine_cv_libc_r___errno=yes, wine_cv_libc_r___errno=no,
701 wine_cv_libc_r___errno=yes )
702])
703if test "$wine_cv_libc_r___errno" = "yes"
704then
705 AC_DEFINE(HAVE___ERRNO)
706 wine_cv_libc_reentrant=___errno
707fi
Ron Recorde977d6c1999-09-05 12:32:05 +0000708dnl
709dnl UnixWare style errno location
710dnl
711AC_CACHE_CHECK("for reentrant libc: __thr_errno", wine_cv_libc_r__thr_errno,
712 [AC_TRY_RUN([int myerrno = 0;
713char buf[256];
714int *__thr_errno(){return &myerrno;}
715main(){connect(0,buf,255); exit(!myerrno);}],
716 wine_cv_libc_r__thr_errno=yes, wine_cv_libc_r__thr_errno=no,
717 wine_cv_libc_r__thr_errno=yes )
718])
719if test "$wine_cv_libc_r__thr_errno" = "yes"
720then
721 AC_DEFINE(HAVE__THR_ERRNO)
722 wine_cv_libc_reentrant=__thr_errno
723fi
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000724if test "$wine_cv_libc_reentrant" = "no"
725then
726 AC_DEFINE(NO_REENTRANT_LIBC)
727fi
728
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000729dnl **** Check for reentrant X libraries ****
730dnl
731dnl This may fail to determine whether X libraries are reentrant if
732dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
733dnl is possible with the --without-reentrant-x option.
734
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000735if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
Patrik Stridvall24110281999-02-04 10:09:54 +0000736then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000737AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000738 [ if test "x$with_reentrant_x" = "xno"
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000739 then
740 wine_cv_x_reentrant=no
741 else
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000742 libX11_check=none
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000743 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
Alexandre Julliard829fe321998-07-26 14:27:39 +0000744 if test -r $dir/libX11.so; then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000745 libX11_check="-D $dir/libX11.so"
746 break 1
747 fi
Alexandre Julliard829fe321998-07-26 14:27:39 +0000748 if test -r $dir/libX11.a; then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000749 libX11_check="$dir/libX11.a"
750 break 1
751 fi
752 done
753 if test "$libX11_check" != "none"; then
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000754 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
Alexandre Julliard829fe321998-07-26 14:27:39 +0000755 then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000756 wine_cv_x_reentrant=yes
757 else
758 wine_cv_x_reentrant=no
759 fi
760 else
761 wine_cv_x_reentrant=unknown
762 fi
763 fi ] )
Patrik Stridvall24110281999-02-04 10:09:54 +0000764else
765 wine_cv_x_reentrant=no
766fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000767if test "$wine_cv_x_reentrant" = "no"
768then
769 AC_DEFINE(NO_REENTRANT_X11)
770fi
771
Francois Gougetae5e93e1999-11-13 23:02:06 +0000772dnl **** Check for endianness ****
773
774AC_C_BIGENDIAN
775
Ulrich Weigand97591402000-12-19 03:38:53 +0000776AC_CACHE_CHECK( "whether bitfields are bigendian", wine_cv_bitfields_bigendian,
777 [AC_TRY_RUN([
778union
779{
780 int word;
781 struct
782 {
783 int bit0 : 1;
784 int rest : sizeof(int)*8 - 1;
785 } bitfield;
786} u;
787main() { u.word = 0; u.bitfield.bit0 = 1; exit( u.word == 1 ); } ],
788 wine_cv_bitfields_bigendian=yes, wine_cv_bitfields_bigendian=no,
789 wine_cv_bitfields_bigendian=no ) ])
790if test "$wine_cv_bitfields_bigendian" = "yes"
791then
792 AC_DEFINE(BITFIELDS_BIGENDIAN)
793fi
794
Ulrich Weigandcc195922000-12-27 04:18:26 +0000795AC_CACHE_CHECK( "whether unaligned memory access is allowed", wine_cv_allow_unaligned_access,
796 [AC_TRY_RUN([
797long volatile test[2];
798main()
799{
800 long volatile *ua = (long volatile *)((char *)test + 1);
801 *ua = 0;
802 exit(0);
803} ], wine_cv_allow_unaligned_access=yes, wine_cv_allow_unaligned_access=no,
804 wine_cv_allow_unaligned_access=no ) ])
Eric Pouech4a990582000-12-29 17:41:42 +0000805if test "$wine_cv_allow_unaligned_access" = "yes"
Ulrich Weigandcc195922000-12-27 04:18:26 +0000806then
807 AC_DEFINE(ALLOW_UNALIGNED_ACCESS)
808fi
809
Ulrich Weigand97591402000-12-19 03:38:53 +0000810
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000811dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000812
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000813AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000814AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000815 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000816 _lwp_create \
817 clone \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000818 finite \
819 fpclass \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000820 getnetbyaddr \
821 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000822 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000823 getprotobyname \
824 getprotobynumber \
Dimitrie O. Paun1ec253d2000-12-01 20:47:11 +0000825 getrlimit \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000826 getservbyport \
827 getsockopt \
828 inet_network \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000829 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000830 memmove \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000831 mmap \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000832 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000833 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000834 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000835 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000836 sigaltstack \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000837 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000838 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000839 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000840 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000841 tcgetattr \
842 timegm \
843 usleep \
844 vfscanf \
845 wait4 \
846 waitpid \
847)
848
849dnl **** Check for header files ****
850
851AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000852 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000853 arpa/nameser.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000854 elf.h \
855 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000856 ieeefp.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000857 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000858 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000859 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000860 linux/cdrom.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000861 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000862 linux/joystick.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000863 linux/ucdrom.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000864 net/if.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000865 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000866 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000867 netinet/in_systm.h \
868 netinet/ip.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000869 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000870 pty.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000871 resolv.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000872 sched.h \
873 socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000874 strings.h \
875 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000876 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000877 sys/file.h \
878 sys/filio.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000879 sys/ipc.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000880 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000881 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000882 sys/modem.h \
883 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000884 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000885 sys/param.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000886 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +0000887 sys/reg.h \
Howard Abrams13277481999-07-10 13:16:29 +0000888 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000889 sys/shm.h \
890 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000891 sys/sockio.h \
892 sys/statfs.h \
893 sys/strtio.h \
894 sys/syscall.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000895 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000896 sys/wait.h \
897 sys/v86.h \
898 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000899 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000900 sys/vm86.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000901 syscall.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000902 ucontext.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000903)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000904AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000905
906dnl **** Check for types ****
907
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000908AC_C_CONST()
Marcus Meissner1a8bbd71999-04-26 14:58:58 +0000909AC_C_INLINE()
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000910AC_TYPE_SIZE_T()
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000911AC_CHECK_SIZEOF(long long,0)
912
Rein Klazesff7a61f2000-09-24 19:41:57 +0000913
914AC_CACHE_CHECK("whether we can use re-entrant gethostbyname_r Linux style",
915 wine_cv_linux_gethostbyname_r_6,
916 AC_TRY_COMPILE([
917#include <netdb.h>
918 ], [
919 char *name=NULL;
920 struct hostent he;
921 struct hostent *result;
922 char *buf=NULL;
923 int bufsize=0;
924 int res,errnr;
925 char *addr=NULL;
926 int addrlen=0;
927 int addrtype=0;
928 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
929 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
930 ],
931 wine_cv_linux_gethostbyname_r_6=yes,
932 wine_cv_linux_gethostbyname_r_6=no
933 )
934 )
935 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
936 then
937 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6)
938 fi
939
Marcus Meissner028e9a11999-08-04 15:07:56 +0000940if test "$ac_cv_header_linux_joystick_h" = "yes"
941then
942 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
943 wine_cv_linux_joystick_22_api,
944 AC_TRY_COMPILE([
945 #include <sys/ioctl.h>
946 #include <linux/joystick.h>
947
948 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +0000949 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
950 #error "no 2.2 header"
951 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +0000952 ],/*empty*/,
953 wine_cv_linux_joystick_22_api=yes,
954 wine_cv_linux_joystick_22_api=no,
955 wine_cv_linux_joystick_22_api=no
956 )
957 )
Rein Klazes87d224a2000-04-24 17:33:49 +0000958 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +0000959 then
960 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
961 fi
962fi
963
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000964dnl **** statfs checks ****
965
966if test "$ac_cv_header_sys_vfs_h" = "yes"
967then
968 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
969 wine_cv_sys_vfs_has_statfs,
970 AC_TRY_COMPILE([
971 #include <sys/types.h>
972 #ifdef HAVE_SYS_PARAM_H
973 # include <sys/param.h>
974 #endif
975 #include <sys/vfs.h>
976 ],[
977 struct statfs stfs;
978
979 memset(&stfs,0,sizeof(stfs));
980 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
981 )
982 )
983 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
984 then
985 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
986 fi
987fi
988
989if test "$ac_cv_header_sys_statfs_h" = "yes"
990then
991 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
992 wine_cv_sys_statfs_has_statfs,
993 AC_TRY_COMPILE([
994 #include <sys/types.h>
995 #ifdef HAVE_SYS_PARAM_H
996 # include <sys/param.h>
997 #endif
998 #include <sys/statfs.h>
999 ],[
1000 struct statfs stfs;
1001 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1002 )
1003 )
1004 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1005 then
1006 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
1007 fi
1008fi
1009
1010if test "$ac_cv_header_sys_mount_h" = "yes"
1011then
1012 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
1013 wine_cv_sys_mount_has_statfs,
1014 AC_TRY_COMPILE([
1015 #include <sys/types.h>
1016 #ifdef HAVE_SYS_PARAM_H
1017 # include <sys/param.h>
1018 #endif
1019 #include <sys/mount.h>
1020 ],[
1021 struct statfs stfs;
1022 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1023 )
1024 )
1025 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1026 then
1027 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
1028 fi
1029fi
1030
1031dnl **** FIXME: what about mixed cases, where we need two of them? ***
1032
1033AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
1034 [ if test "x$statfs_bfree" = "xno"
1035 then
1036 wine_cv_statfs_bfree=no
1037 else
1038 AC_TRY_COMPILE([
1039 #include <sys/types.h>
1040 #ifdef HAVE_SYS_PARAM_H
1041 # include <sys/param.h>
1042 #endif
1043 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1044 # include <sys/mount.h>
1045 #else
1046 # ifdef STATFS_DEFINED_BY_SYS_VFS
1047 # include <sys/vfs.h>
1048 # else
1049 # ifdef STATFS_DEFINED_BY_SYS_STATFS
1050 # include <sys/statfs.h>
1051 # endif
1052 # endif
1053 #endif
1054 ],[
1055 struct statfs stfs;
1056
1057 stfs.f_bfree++;
1058 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
1059 )
1060 fi ] )
1061if test "$wine_cv_statfs_bfree" = "yes"
1062then
1063 AC_DEFINE(STATFS_HAS_BFREE)
1064fi
1065
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001066AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
1067 [ if test "x$statfs_bavail" = "xno"
1068 then
1069 wine_cv_statfs_bavail=no
1070 else
1071 AC_TRY_COMPILE([
Alexandre Julliard46ea8b31998-05-03 19:01:20 +00001072 #include <sys/types.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001073 #ifdef HAVE_SYS_PARAM_H
1074 # include <sys/param.h>
1075 #endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001076 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001077 # include <sys/mount.h>
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001078 #else
1079 # ifdef STATFS_DEFINED_BY_SYS_VFS
1080 # include <sys/vfs.h>
1081 # else
1082 # ifdef STATFS_DEFINED_BY_SYS_STATFS
1083 # include <sys/statfs.h>
1084 # endif
1085 # endif
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001086 #endif
1087 ],[
1088 struct statfs stfs;
1089
1090 stfs.f_bavail++;
1091 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
1092 )
1093 fi ] )
1094if test "$wine_cv_statfs_bavail" = "yes"
1095then
1096 AC_DEFINE(STATFS_HAS_BAVAIL)
1097fi
1098
Alexandre Julliard829fe321998-07-26 14:27:39 +00001099dnl *** check for file descriptor passing with msg_accrights
1100
1101AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
1102 AC_TRY_COMPILE([#include <sys/types.h>
1103#include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
1104 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
1105if test "$ac_cv_c_msg_accrights" = "yes"
1106then
1107 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
1108fi
1109
Juergen Lock2d33ab92000-02-13 16:03:29 +00001110dnl *** Check for the sun_len member in struct sockaddr_un
1111
1112AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
1113 AC_TRY_COMPILE([#include <sys/types.h>
1114#include <sys/socket.h>
1115#include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
1116 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
1117if test "$ac_cv_c_sun_len" = "yes"
1118then
1119 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
1120fi
1121
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001122dnl *** check for the need to define __i386__
1123
1124AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
1125 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
1126yes
1127#endif],
1128 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
1129if test "$ac_cv_cpp_def_i386" = "yes"
1130then
1131 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001132 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001133fi
1134
Marcus Meissnera7f5cb51999-04-16 08:47:41 +00001135dnl $GCC is set by autoconf
1136GCC_NO_BUILTIN=""
1137if test "$GCC" = "yes"
1138then
1139 GCC_NO_BUILTIN="-fno-builtin"
1140fi
1141AC_SUBST(GCC_NO_BUILTIN)
1142
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001143dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001144
Alexandre Julliard87a2f8d2000-04-09 18:20:25 +00001145AC_OUTPUT_COMMANDS([
1146extra_subdirs="\
1147dlls/ddraw/d3ddevice \
1148dlls/ddraw/dclipper \
1149dlls/ddraw/ddraw \
1150dlls/ddraw/direct3d \
1151dlls/ddraw/dpalette \
1152dlls/ddraw/dsurface \
Lionel Ulmer6301e942000-11-05 20:25:02 +00001153dlls/dinput/joystick \
1154dlls/dinput/keyboard \
1155dlls/dinput/mouse \
Alexandre Julliardd1d09052000-07-30 13:39:52 +00001156dlls/kernel/messages \
Alexandre Julliard2affae52000-10-23 21:32:05 +00001157dlls/user/resources \
Alexandre Julliard87a2f8d2000-04-09 18:20:25 +00001158"
1159for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
1160
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001161MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001162AC_SUBST_FILE(MAKE_RULES)
1163
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001164MAKE_DLL_RULES=dlls/Makedll.rules
1165AC_SUBST_FILE(MAKE_DLL_RULES)
1166
Alexandre Julliard626f4252000-11-10 23:35:20 +00001167MAKE_PROG_RULES=programs/Makeprog.rules
1168AC_SUBST_FILE(MAKE_PROG_RULES)
1169
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001170AC_OUTPUT([
1171Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001172dlls/Makedll.rules
1173programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001174Makefile
Joseph Pranevich791cd6a1998-12-02 19:58:08 +00001175console/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001176controls/Makefile
1177debugger/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001178dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001179dlls/advapi32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001180dlls/avifil32/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001181dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001182dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001183dlls/crtdll/Makefile
1184dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001185dlls/ddraw/Makefile
1186dlls/dinput/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001187dlls/dplay/Makefile
Peter Hunnisett22b861c1999-09-28 16:35:32 +00001188dlls/dplayx/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001189dlls/dsound/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001190dlls/gdi/Makefile
Francois Gougetedf3e431999-11-07 21:22:17 +00001191dlls/icmp/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001192dlls/imagehlp/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001193dlls/imm32/Makefile
Dimitrie O. Paun36b5b6b2000-06-03 00:07:44 +00001194dlls/kernel/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001195dlls/lzexpand/Makefile
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001196dlls/mpr/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001197dlls/msacm/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001198dlls/msnet32/Makefile
1199dlls/msvideo/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001200dlls/ntdll/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001201dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001202dlls/ole32/Makefile
1203dlls/oleaut32/Makefile
1204dlls/olecli/Makefile
1205dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001206dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001207dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001208dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001209dlls/psapi/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001210dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001211dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001212dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001213dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001214dlls/setupapi/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001215dlls/shell32/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001216dlls/shfolder/Makefile
1217dlls/shlwapi/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001218dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001219dlls/ttydrv/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001220dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001221dlls/user/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001222dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001223dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001224dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001225dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001226dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001227dlls/wininet/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001228dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001229dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001230dlls/winmm/mcianim/Makefile
1231dlls/winmm/mciavi/Makefile
1232dlls/winmm/mcicda/Makefile
1233dlls/winmm/mciseq/Makefile
1234dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001235dlls/winmm/midimap/Makefile
1236dlls/winmm/wavemap/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001237dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001238dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001239dlls/winsock/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001240dlls/winspool/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001241dlls/wow32/Makefile
1242dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001243dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001244documentation/Makefile
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +00001245documentation/wine.conf.man
Marcus Meissner5a70c971999-06-05 09:00:21 +00001246documentation/wine.man
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +00001247files/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001248graphics/Makefile
Huw D M Davies3a24f3f1999-05-02 10:15:16 +00001249graphics/enhmetafiledrv/Makefile
Alexandre Julliardbf9130a1996-10-13 17:45:47 +00001250graphics/metafiledrv/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001251graphics/win16drv/Makefile
1252graphics/x11drv/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001253if1632/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001254include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001255library/Makefile
1256libtest/Makefile
1257loader/Makefile
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001258loader/dos/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001259loader/ne/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001260memory/Makefile
1261misc/Makefile
1262miscemu/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001263msdos/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001264objects/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001265ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001266programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001267programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001268programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001269programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001270programs/control/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001271programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001272programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001273programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001274programs/regapi/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001275programs/regtest/Makefile
1276programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001277programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001278programs/wcmd/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001279programs/winemine/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001280programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001281programs/winver/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001282relay32/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001283scheduler/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001284server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001285tools/Makefile
John R. Sheetse61d33b2000-03-26 20:25:23 +00001286tools/cvdump/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001287tools/winebuild/Makefile
Jeremy Whitef9f030b2000-11-05 20:06:56 +00001288tools/winelauncher
Bertho Stultiens30855912000-06-13 04:34:41 +00001289tools/wmc/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001290tools/wrc/Makefile
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001291tsx11/Makefile
Alexandre Julliardfb270dd2000-06-09 05:27:21 +00001292unicode/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001293win32/Makefile
Patrik Stridvallea584721998-11-01 16:22:07 +00001294windows/Makefile
1295windows/x11drv/Makefile ])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001296
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001297if test "$have_x" = "no"
1298then
1299 echo
1300 echo "*** Warning: X development files not found. Wine will be built without"
1301 echo "*** X support, which currently does not work, and would probably not be"
1302 echo "*** what you want anyway. You will need to install devel packages of"
1303 echo "*** Xlib/Xfree86 and Xpm at the very least."
Ove Kaaven1eb593c1999-02-14 09:34:46 +00001304elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1305then
1306 echo
1307 echo "*** Warning: Xpm development files not found. Wine will be built without"
1308 echo "*** Xpm support, which currently does not work. You will need to install"
1309 echo "*** devel packages of Xpm."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001310fi
1311
Alexandre Julliard638f1691999-01-17 16:32:32 +00001312if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1313then
1314 echo
1315 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1316 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001317fi
1318
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001319if test "$wine_cv_libc_reentrant" = "no"
1320then
1321 echo
1322 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1323 echo "*** thread support. Consider upgrading libc to a more recent"
1324 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001325fi
1326
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001327if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001328then
1329 echo
1330 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001331 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1332fi
1333
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001334if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "normal"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001335then
1336 echo
1337 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001338 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
1339 echo "*** A fix for glibc 2.1.3 that seem to work is included in this version of Wine,"
1340 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001341fi
1342
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001343if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001344then
1345 echo
1346 echo "*** Warning: you explicitely linked in a thread-safe OpenGL version. If you"
1347 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1348 echo "*** support before reporting bugs."
1349fi
1350
1351
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001352echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001353echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001354echo
1355
1356dnl Local Variables:
1357dnl comment-start: "dnl "
1358dnl comment-end: ""
1359dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001360dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001361dnl End: