blob: f78ff4a122ff35409e1a91a18146441c652e65ce [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,
Andreas Mohr18a9d742001-01-17 21:52:42 +000023[ --enable-opengl force usage of OpenGL even if the latter is thread-safe via pthread],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +000024[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
Satsuki Fujishima66fb6072001-03-19 19:19:59 +0000107AC_CHECK_LIB(xpg4,_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=""
Patrik Stridvallea584721998-11-01 16:22:07 +0000137if test "$have_x" = "yes"
138then
Patrik Stridvall24110281999-02-04 10:09:54 +0000139 XLIB="-lXext -lX11"
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000140 ac_save_CPPFLAGS="$CPPFLAGS"
141 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Patrik Stridvall24110281999-02-04 10:09:54 +0000142
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000143 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"
Marcus Meissner284995e2000-03-04 19:21:49 +0000157 echo "SuSE : xpm"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000158 echo "Debian/Corel Linux: xpm4g xpm4g-dev"
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000159 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
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000164 ]
165 )
Patrik Stridvall24110281999-02-04 10:09:54 +0000166
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000167 dnl *** All three of the following tests require X11/Xlib.h
168 AC_CHECK_HEADERS(X11/Xlib.h,
169 [
Ove Kaavenc90fb252001-01-02 22:39:14 +0000170 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
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000180 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 )
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000189
Francois Jacques5b6879c2000-07-28 23:04:54 +0000190 dnl *** Check for X shape extension
Ove Kaavenc90fb252001-01-02 22:39:14 +0000191 AC_CHECK_HEADERS(X11/extensions/shape.h,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000192 [ 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 ],
Ove Kaavenc90fb252001-01-02 22:39:14 +0000197 AC_MSG_WARN([XShape extension not found!!])
Francois Jacques5b6879c2000-07-28 23:04:54 +0000198 )
199
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000200 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"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000209 ],
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"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000215 ],,
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 )
Patrik Stridvall24110281999-02-04 10:09:54 +0000224
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000225 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 )
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000237
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
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000251 ]
252 ) dnl *** End of X11/Xlib.h check
Lionel Ulmer5c085701999-02-28 19:48:53 +0000253
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000254 dnl Check for the presence of OpenGL
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000255 if test $OPENGL = "yes" -o $OPENGL = "normal"
Patrik Stridvall24110281999-02-04 10:09:54 +0000256 then
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000257 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h)
Marcus Meissner22a969b2000-08-08 20:46:50 +0000258 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000259 then
260 dnl Check for some problems due to old Mesa versions
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000261 AC_CACHE_CHECK("for up-to-date OpenGL version", wine_cv_opengl_version_OK,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000262 AC_TRY_COMPILE(
Lionel Ulmer48c08162000-01-05 01:51:02 +0000263 [#include <GL/gl.h>],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000264 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000265 [wine_cv_opengl_version_OK="yes"],
266 [wine_cv_opengl_version_OK="no"]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000267 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000268 )
269
270 dnl Check for the thread-safety of the OpenGL library
271 AC_CACHE_CHECK("for thread-safe OpenGL version",
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000272 wine_cv_opengl_version_threadsafe,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000273 [saved_libs=$LIBS
274 LIBS="$X_LIBS -lGL"
275 AC_TRY_LINK([],[pthread_getspecific();],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000276 [wine_cv_opengl_version_threadsafe="yes"],
277 [wine_cv_opengl_version_threadsafe="no"])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000278 LIBS=$saved_libs]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000279 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000280
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000281 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 +0000282 then
Andreas Mohr4eefb962000-08-01 00:27:35 +0000283 dnl Check for the presence of the library
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000284 AC_CHECK_LIB(GL,glXCreateContext,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000285 X_PRE_LIBS="$X_PRE_LIBS -lGL"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000286 ,,
287 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
288
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000289 if test $ac_cv_lib_GL_glXCreateContext = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000290 then
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000291
292 OPENGLFILES='$(OPENGLFILES)'
293 AC_DEFINE(HAVE_OPENGL)
294
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000295 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 +0000296
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000297 if test $ac_cv_lib_GL_glXGetProcAddressARB = "yes"
298 then
Lionel Ulmer1434d872000-07-23 14:23:31 +0000299 AC_CACHE_CHECK("for OpenGL extension functions prototypes", wine_cv_extension_prototypes,
300 AC_TRY_COMPILE([#include <GL/gl.h>
Marcus Meissner6bb6d4c2000-08-09 22:21:08 +0000301 #ifdef HAVE_GL_GLEXT_H
302 # include <GL/glext.h>
303 #endif
304 ],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000305 [PFNGLCOLORTABLEEXTPROC test_proc;],
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000306 [wine_cv_extension_prototypes="yes"],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000307 [wine_cv_extension_prototypes="no"]
308 )
309 )
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000310 if test $wine_cv_extension_prototypes = "yes"
311 then
312 AC_DEFINE(HAVE_GLEXT_PROTOTYPES)
313 fi
Lionel Ulmer1434d872000-07-23 14:23:31 +0000314
Hidenori Takeshima4615e292000-05-23 23:36:41 +0000315 OPENGL32_DLL=opengl32
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000316 fi
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000317
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"
Ove Kaavena6278732001-05-02 01:11:10 +0000325 ],,-lGL $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS),
326 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000327 )
Ove Kaavena6278732001-05-02 01:11:10 +0000328 ]
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000329 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000330 fi
331 fi
332 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000333 fi
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000334
335 CPPFLAGS="$ac_save_CPPFLAGS"
Patrik Stridvall2941a212000-04-25 20:34:22 +0000336 X_DLLS='$(X_DLLS)'
337 XFILES='$(XFILES)'
Patrik Stridvallea584721998-11-01 16:22:07 +0000338else
339 XLIB=""
340 X_CFLAGS=""
341 X_LIBS=""
342fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000343
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000344dnl **** Check which curses lib to use ***
Patrik Stridvall5e5ad532000-04-23 20:02:46 +0000345if test "$CURSES" = "yes"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000346then
Patrik Stridvall5e5ad532000-04-23 20:02:46 +0000347 AC_CHECK_HEADERS(ncurses.h)
348 if test "$ac_cv_header_ncurses_h" = "yes"
349 then
350 AC_CHECK_LIB(ncurses,waddch)
351 fi
352 if test "$ac_cv_lib_ncurses_waddch" = "yes"
353 then
354 AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
355 AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
356 else
357 AC_CHECK_HEADERS(curses.h)
358 if test "$ac_cv_header_curses_h" = "yes"
359 then
360 AC_CHECK_LIB(curses,waddch)
361 if test "$ac_cv_lib_curses_waddch" = "yes"
362 then
363 AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
364 AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
365 fi
366 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000367 fi
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000368fi
369
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000370CUPSLIBS=""
371dnl **** Check for CUPS ****
Marcus Meissner3ee02ba2001-04-30 18:18:50 +0000372wine_cv_warn_cups_h=no
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000373AC_CHECK_LIB(cups,cupsGetPPD,
Marcus Meissner3ee02ba2001-04-30 18:18:50 +0000374 AC_CHECK_HEADER(cups/cups.h,
375 AC_DEFINE(HAVE_CUPS)
376 CUPSLIBS="-lcups",
377 wine_cv_warn_cups_h=yes)
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000378)
379AC_SUBST(CUPSLIBS)
380
Ian Pilcher563598d2001-05-16 20:56:05 +0000381dnl **** Check for FreeType 2 ****
382AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no)
383if test "$ft_lib" = "no"
384then
385 FREETYPELIBS=""
386 FREETYPEINCL=""
387 wine_cv_msg_freetype=no
388else
389 AC_CHECK_PROG(ft_devel,freetype-config,yes,no)
390 if test "$ft_devel" = "no"
391 then
392 FREETYPELIBS=""
393 FREETYPEINCL=""
394 wine_cv_msg_freetype=yes
395 else
396 AC_DEFINE(HAVE_FREETYPE)
397 FREETYPELIBS=`freetype-config --libs`
398 FREETYPEINCL=`freetype-config --cflags`
399 wine_cv_msg_freetype=no
400 fi
401fi
402AC_SUBST(FREETYPELIBS)
403AC_SUBST(FREETYPEINCL)
404
Pavel Roskin94d99641998-12-26 11:52:51 +0000405dnl **** Check for IPX (currently Linux only) ****
406AC_CACHE_CHECK("for GNU style IPX support", ac_cv_c_ipx_gnu,
407 AC_TRY_COMPILE(
408 [#include <sys/socket.h>
409 #include <netipx/ipx.h>],
410 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000411 [ac_cv_c_ipx_gnu="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000412 [ac_cv_c_ipx_gnu="no"])
413 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000414if test "$ac_cv_c_ipx_gnu" = "yes"
415then
416 AC_DEFINE(HAVE_IPX_GNU)
417fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000418
419if test "$ac_cv_c_ipx_gnu" = "no"
420then
421 AC_CACHE_CHECK("for linux style IPX support", ac_cv_c_ipx_linux,
422 AC_TRY_COMPILE(
423 [#include <sys/socket.h>
424 #include <asm/types.h>
425 #include <linux/ipx.h>],
426 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000427 [ac_cv_c_ipx_linux="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000428 [ac_cv_c_ipx_linux="no"])
429 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000430 if test "$ac_cv_c_ipx_linux" = "yes"
431 then
432 AC_DEFINE(HAVE_IPX_LINUX)
433 fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000434fi
435
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000436dnl **** Check for Open Sound System ****
Todd Vierlingecc76691998-12-15 17:49:02 +0000437AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000438
439AC_CACHE_CHECK("for Open Sound System",
440 ac_cv_c_opensoundsystem,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000441 AC_TRY_COMPILE([
Todd Vierlingecc76691998-12-15 17:49:02 +0000442 #if defined(HAVE_SYS_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000443 #include <sys/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000444 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000445 #include <machine/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000446 #elif defined(HAVE_SOUNDCARD_H)
447 #include <soundcard.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000448 #endif
449 ],[
450
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000451/* check for one of the Open Sound System specific SNDCTL_ defines */
452#if !defined(SNDCTL_DSP_STEREO)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000453#error No open sound system
454#endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000455],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
456
457if test "$ac_cv_c_opensoundsystem" = "yes"
458then
459 AC_DEFINE(HAVE_OSS)
460fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000461
Eric Pouech338d3b21999-05-22 18:52:21 +0000462AC_CACHE_CHECK("for Open Sound System/MIDI interface",
463 ac_cv_c_opensoundsystem_midi,
464 AC_TRY_COMPILE([
465 #if defined(HAVE_SYS_SOUNDCARD_H)
466 #include <sys/soundcard.h>
467 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
468 #include <machine/soundcard.h>
469 #elif defined(HAVE_SOUNDCARD_H)
470 #include <soundcard.h>
471 #endif
472 ],[
473
474/* check for one of the Open Sound System specific SNDCTL_SEQ defines */
475#if !defined(SNDCTL_SEQ_SYNC)
476#error No open sound system MIDI interface
477#endif
478],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
479
480if test "$ac_cv_c_opensoundsystem_midi" = "yes"
481then
482 AC_DEFINE(HAVE_OSS_MIDI)
483fi
484
Alexandre Julliard641ee761997-08-04 16:34:36 +0000485dnl **** If ln -s doesn't work, use cp instead ****
486if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
487
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000488dnl **** Check for gcc strength-reduce bug ****
489
490if test "x${GCC}" = "xyes"
491then
492 CFLAGS="$CFLAGS -Wall"
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000493 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
494 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000495int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000496int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000497 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000498 unsigned int B = 3;
499 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000500 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000501 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
502 L[[i]] = 4;
503
504 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000505}],
506 ac_cv_c_gcc_strength_bug="no",
507 ac_cv_c_gcc_strength_bug="yes",
508 ac_cv_c_gcc_strength_bug="yes") )
509 if test "$ac_cv_c_gcc_strength_bug" = "yes"
510 then
511 CFLAGS="$CFLAGS -fno-strength-reduce"
512 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000513
514 dnl Check for -mpreferred-stack-boundary
515 AC_CACHE_CHECK("for gcc -mpreferred-stack-boundary=2 support",
516 ac_cv_c_gcc_stack_boundary,
517 [saved_cflags=$CFLAGS
518 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
519 AC_TRY_COMPILE(,[return 0],ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")
520 CFLAGS=$saved_cflags
521 ])
522 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
523 then
524 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
525 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000526fi
527
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000528dnl **** Check if we need to place .type inside a .def directive ****
529
530AC_CACHE_CHECK("whether .type must sit inside a .def directive",
531 ac_cv_c_type_in_def,
532[saved_libs=$LIBS
533LIBS="conftest_asm.s $LIBS"
534cat > conftest_asm.s <<EOF
535 .globl _ac_test
536 .def _ac_test; .scl 2; .type 32; .endef
537_ac_test:
538 .long 0
539EOF
540AC_TRY_LINK(,,ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no")
541LIBS=$saved_libs])
542if test "$ac_cv_c_type_in_def" = "yes"
543then
544 AC_DEFINE(NEED_TYPE_IN_DEF)
545fi
546
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000547dnl **** Check for underscore on external symbols ****
548
549AC_CACHE_CHECK("whether external symbols need an underscore prefix",
550 ac_cv_c_extern_prefix,
551[saved_libs=$LIBS
552LIBS="conftest_asm.s $LIBS"
553cat > conftest_asm.s <<EOF
554 .globl _ac_test
555_ac_test:
556 .long 0
557EOF
558AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
559 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
560LIBS=$saved_libs])
561if test "$ac_cv_c_extern_prefix" = "yes"
562then
563 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
564fi
565
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000566dnl **** Check for .string in assembler ****
567
568AC_CACHE_CHECK("whether assembler accepts .string",
569 ac_cv_c_asm_string,
570[saved_libs=$LIBS
571LIBS="conftest_asm.s $LIBS"
572cat > conftest_asm.s <<EOF
573 .string "test"
574EOF
575AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
576LIBS=$saved_libs])
577if test "$ac_cv_c_asm_string" = "yes"
578then
579 AC_DEFINE(HAVE_ASM_STRING)
580fi
581
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000582dnl **** Check for working dll ****
583
Todd Vierling4b992b01998-12-15 15:26:27 +0000584LDSHARED=""
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000585LDDLLFLAGS=""
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000586if test "$LIBEXT" = "so"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000587then
Todd Vierling4b992b01998-12-15 15:26:27 +0000588 AC_CACHE_CHECK("whether we can build a Linux dll",
589 ac_cv_c_dll_linux,
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000590 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000591 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
Todd Vierling4b992b01998-12-15 15:26:27 +0000592 AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000593 CFLAGS=$saved_cflags
594 ])
Todd Vierling4b992b01998-12-15 15:26:27 +0000595 if test "$ac_cv_c_dll_linux" = "yes"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000596 then
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000597 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%) -Wl,-rpath,\$(libdir)"
598 LDDLLFLAGS="-Wl,-Bsymbolic"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000599 else
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000600 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
Ron Recorde977d6c1999-09-05 12:32:05 +0000601 ac_cv_c_dll_unixware,
Todd Vierling4b992b01998-12-15 15:26:27 +0000602 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000603 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
Ron Recorde977d6c1999-09-05 12:32:05 +0000604 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
Todd Vierling4b992b01998-12-15 15:26:27 +0000605 CFLAGS=$saved_cflags
606 ])
Ron Recorde977d6c1999-09-05 12:32:05 +0000607 if test "$ac_cv_c_dll_unixware" = "yes"
Todd Vierling4b992b01998-12-15 15:26:27 +0000608 then
Patrik Stridvall35d288b2000-12-18 03:13:52 +0000609 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,\$(libdir)/%)"
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000610 LDDLLFLAGS="-Wl,-B,symbolic"
Ron Recorde977d6c1999-09-05 12:32:05 +0000611 else
Bang Jun-Young33dff342001-05-07 18:21:10 +0000612 AC_CACHE_CHECK("whether we can build a NetBSD a.out dll",
Ron Recorde977d6c1999-09-05 12:32:05 +0000613 ac_cv_c_dll_netbsd,
614 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000615 CFLAGS="$CFLAGS -fPIC -Wl,-Bshareable,-Bforcearchive"
Ron Recorde977d6c1999-09-05 12:32:05 +0000616 AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
617 CFLAGS=$saved_cflags
618 ])
619 if test "$ac_cv_c_dll_netbsd" = "yes"
620 then
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000621 LDSHARED="\$(CC) -Wl,-Bshareable,-Bforcearchive"
622 LDDLLFLAGS="" #FIXME
Ron Recorde977d6c1999-09-05 12:32:05 +0000623 fi
Todd Vierling4b992b01998-12-15 15:26:27 +0000624 fi
625 fi
Ron Recorde977d6c1999-09-05 12:32:05 +0000626 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 +0000627 then
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000628 LIBEXT="a"
629 if test "$DLLWRAP" = "dllwrap"; then
630 dnl FIXME - check whether dllwrap works correctly...
631 if test "$CYGWIN" = "yes"; then
632 echo "*** use dllwrap for building shared library."
633 LIBEXT="dll"
634 fi
635 fi
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000636 fi
637fi
Alexandre Julliard0adad952000-01-26 01:45:58 +0000638
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000639if test "$LIBEXT" = "a"; then
640 echo "*** It is currently not possible to build WINE without shared"
641 echo "*** library (.so) support to allow transparent switch between .so"
642 echo "*** and .dll files."
643 echo "*** If you are using Linux, you will need a newer binutils."
644 exit 1
645fi
646
Alexandre Julliard0adad952000-01-26 01:45:58 +0000647DLLFLAGS=""
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000648LDPATH=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000649
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000650if test "$LIBEXT" = "so"; then
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000651 DLLFLAGS="-fPIC"
Alexandre Julliardb0182392000-12-06 00:04:10 +0000652 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000653 LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
654elif test "$LIBEXT" = "dll"; then
655 #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
656 DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)"
657 LDPATH="PATH=\"\$(TOPOBJDIR)/unicode:\$\$PATH\""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000658else
Alexandre Julliardb0182392000-12-06 00:04:10 +0000659 DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) \$(LIBWINE) \$(LIBUNICODE) \$(X_LIBS) \$(XLIB)"
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000660 AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)],
661 ac_cv_c_whole_archive,
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000662 [saved_cflags=$CFLAGS
663 CFLAGS="$CFLAGS -Wl,--whole-archive -Wl,--no-whole-archive"
664 AC_TRY_LINK(,[return 1],ac_cv_c_whole_archive="yes",ac_cv_c_whole_archive="no")
665 CFLAGS=$saved_cflags
666 ])
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000667 if test "$ac_cv_c_whole_archive" = "yes"
668 then
669 DLL_LINK="-Wl,--whole-archive $DLL_LINK -Wl,--no-whole-archive"
670 else
671 AC_CACHE_CHECK([whether the linker supports -z {all,default}extract (Linux)],
672 ac_cv_c_allextract,
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000673 [saved_cflags=$CFLAGS
674 CFLAGS="$CFLAGS -Wl,-z,allextract -Wl,-z,defaultextract"
675 AC_TRY_LINK(,[return 1],ac_cv_c_allextract="yes",ac_cv_c_allextract="no")
676 CFLAGS=$saved_cflags
677 ])
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000678 if test "$ac_cv_c_allextract" = "yes"
679 then
680 DLL_LINK="-Wl,-z,allextract $DLL_LINK -Wl,-z,defaultextract"
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000681 fi
Alexandre Julliard0adad952000-01-26 01:45:58 +0000682 fi
683fi
684
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000685AC_SUBST(DLL_LINK)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000686AC_SUBST(DLLFLAGS)
Todd Vierling4b992b01998-12-15 15:26:27 +0000687AC_SUBST(LDSHARED)
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000688AC_SUBST(LDDLLFLAGS)
Alexandre Julliard0adad952000-01-26 01:45:58 +0000689AC_SUBST(LIBEXT)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000690AC_SUBST(LDPATH)
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000691
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000692dnl **** Check for reentrant libc ****
693dnl
694dnl For cross-compiling we blindly assume that libc is reentrant. This is
695dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
696
Alexandre Julliard598412e2001-01-17 20:22:22 +0000697AC_DEFUN(WINE_CHECK_ERRNO,
698[
699 AC_CACHE_CHECK(for reentrant libc: $1, wine_cv_libc_r_$1,
700 [AC_TRY_RUN([int myerrno = 0;
701char buf[256];
702int *$1(){return &myerrno;}
703main(){connect(0,buf,255); exit(!myerrno);}],
704 wine_cv_libc_r_$1=yes, wine_cv_libc_r_$1=no,
705 wine_cv_libc_r_$1=yes )
706])
707if test "$wine_cv_libc_r_$1" = "yes"
708then
709 wine_cv_libc_reentrant=$1
710fi
711])
712
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000713wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000714dnl Linux style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000715WINE_CHECK_ERRNO(__errno_location)
Marcus Meissnerc2606381999-04-11 15:20:29 +0000716dnl FreeBSD style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000717WINE_CHECK_ERRNO(__error)
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000718dnl Solaris style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000719WINE_CHECK_ERRNO(___errno)
Ron Recorde977d6c1999-09-05 12:32:05 +0000720dnl UnixWare style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000721WINE_CHECK_ERRNO(__thr_errno)
Bang Jun-Young33dff342001-05-07 18:21:10 +0000722dnl NetBSD style errno location
723WINE_CHECK_ERRNO(__errno)
Alexandre Julliard598412e2001-01-17 20:22:22 +0000724
725if test "$wine_cv_libc_reentrant" != "no"
Ron Recorde977d6c1999-09-05 12:32:05 +0000726then
Alexandre Julliard598412e2001-01-17 20:22:22 +0000727 AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant)
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000728fi
729
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000730dnl **** Check for reentrant X libraries ****
731dnl
732dnl This may fail to determine whether X libraries are reentrant if
733dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
734dnl is possible with the --without-reentrant-x option.
735
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000736if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
Patrik Stridvall24110281999-02-04 10:09:54 +0000737then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000738AC_CACHE_CHECK( "for reentrant X libraries", wine_cv_x_reentrant,
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000739 [ if test "x$with_reentrant_x" = "xno"
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000740 then
741 wine_cv_x_reentrant=no
742 else
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000743 libX11_check=none
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000744 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
Alexandre Julliard829fe321998-07-26 14:27:39 +0000745 if test -r $dir/libX11.so; then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000746 libX11_check="-D $dir/libX11.so"
747 break 1
748 fi
Alexandre Julliard829fe321998-07-26 14:27:39 +0000749 if test -r $dir/libX11.a; then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000750 libX11_check="$dir/libX11.a"
751 break 1
752 fi
753 done
754 if test "$libX11_check" != "none"; then
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000755 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
Alexandre Julliard829fe321998-07-26 14:27:39 +0000756 then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000757 wine_cv_x_reentrant=yes
758 else
759 wine_cv_x_reentrant=no
760 fi
761 else
762 wine_cv_x_reentrant=unknown
763 fi
764 fi ] )
Patrik Stridvall24110281999-02-04 10:09:54 +0000765else
766 wine_cv_x_reentrant=no
767fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000768if test "$wine_cv_x_reentrant" = "no"
769then
770 AC_DEFINE(NO_REENTRANT_X11)
771fi
772
Ulrich Weigand97591402000-12-19 03:38:53 +0000773
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000774dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000775
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000776AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000777AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000778 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000779 _lwp_create \
780 clone \
Andreas Mohra7ca2ba2001-01-12 23:07:11 +0000781 ecvt \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000782 finite \
783 fpclass \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000784 ftruncate64 \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000785 getnetbyaddr \
786 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000787 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000788 getprotobyname \
789 getprotobynumber \
Dimitrie O. Paun1ec253d2000-12-01 20:47:11 +0000790 getrlimit \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000791 getservbyport \
792 getsockopt \
793 inet_network \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000794 lseek64 \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000795 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000796 memmove \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000797 mmap \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000798 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000799 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000800 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000801 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000802 sigaltstack \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000803 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000804 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000805 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000806 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000807 tcgetattr \
808 timegm \
809 usleep \
810 vfscanf \
811 wait4 \
812 waitpid \
813)
814
815dnl **** Check for header files ****
816
817AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000818 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000819 arpa/nameser.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000820 elf.h \
821 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000822 ieeefp.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000823 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000824 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000825 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000826 linux/cdrom.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000827 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000828 linux/joystick.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000829 linux/ucdrom.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000830 net/if.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000831 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000832 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000833 netinet/in_systm.h \
834 netinet/ip.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000835 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000836 pty.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000837 resolv.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000838 sched.h \
839 socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000840 strings.h \
841 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000842 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000843 sys/file.h \
844 sys/filio.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000845 sys/ipc.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000846 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000847 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000848 sys/modem.h \
849 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000850 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000851 sys/param.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000852 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +0000853 sys/reg.h \
Howard Abrams13277481999-07-10 13:16:29 +0000854 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000855 sys/shm.h \
856 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000857 sys/sockio.h \
858 sys/statfs.h \
859 sys/strtio.h \
860 sys/syscall.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000861 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000862 sys/wait.h \
863 sys/v86.h \
864 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000865 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000866 sys/vm86.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000867 syscall.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000868 ucontext.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000869)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000870AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000871
872dnl **** Check for types ****
873
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000874AC_C_CONST()
Marcus Meissner1a8bbd71999-04-26 14:58:58 +0000875AC_C_INLINE()
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000876AC_TYPE_SIZE_T()
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000877AC_CHECK_SIZEOF(long long,0)
878
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000879AC_CACHE_CHECK("whether linux/input.h is for real",
880 wine_cv_linux_input_h,
881 AC_TRY_COMPILE([
882 #include <linux/input.h>
883 ] , [
884 int foo = EVIOCGBIT(EV_ABS,42);
885 int bar = BTN_PINKIE;
886 int fortytwo = 42;
887 ],
888 wine_cv_linux_input_h=yes,
889 wine_cv_linux_input_h=no,
890 no
891 )
892 )
893 if test "$wine_cv_linux_input_h" = "yes"
894 then
895 AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H)
896 fi
897
Rein Klazesff7a61f2000-09-24 19:41:57 +0000898
899AC_CACHE_CHECK("whether we can use re-entrant gethostbyname_r Linux style",
900 wine_cv_linux_gethostbyname_r_6,
901 AC_TRY_COMPILE([
902#include <netdb.h>
903 ], [
904 char *name=NULL;
905 struct hostent he;
906 struct hostent *result;
907 char *buf=NULL;
908 int bufsize=0;
909 int res,errnr;
910 char *addr=NULL;
911 int addrlen=0;
912 int addrtype=0;
913 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
914 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
915 ],
916 wine_cv_linux_gethostbyname_r_6=yes,
917 wine_cv_linux_gethostbyname_r_6=no
918 )
919 )
920 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
921 then
922 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6)
923 fi
924
Marcus Meissner028e9a11999-08-04 15:07:56 +0000925if test "$ac_cv_header_linux_joystick_h" = "yes"
926then
927 AC_CACHE_CHECK("whether linux/joystick.h uses the Linux 2.2+ API",
928 wine_cv_linux_joystick_22_api,
929 AC_TRY_COMPILE([
930 #include <sys/ioctl.h>
931 #include <linux/joystick.h>
932
933 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +0000934 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
935 #error "no 2.2 header"
936 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +0000937 ],/*empty*/,
938 wine_cv_linux_joystick_22_api=yes,
939 wine_cv_linux_joystick_22_api=no,
940 wine_cv_linux_joystick_22_api=no
941 )
942 )
Rein Klazes87d224a2000-04-24 17:33:49 +0000943 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +0000944 then
945 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API)
946 fi
947fi
948
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000949dnl **** statfs checks ****
950
951if test "$ac_cv_header_sys_vfs_h" = "yes"
952then
953 AC_CACHE_CHECK( "whether sys/vfs.h defines statfs",
954 wine_cv_sys_vfs_has_statfs,
955 AC_TRY_COMPILE([
956 #include <sys/types.h>
957 #ifdef HAVE_SYS_PARAM_H
958 # include <sys/param.h>
959 #endif
960 #include <sys/vfs.h>
961 ],[
962 struct statfs stfs;
963
964 memset(&stfs,0,sizeof(stfs));
965 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
966 )
967 )
968 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
969 then
970 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS)
971 fi
972fi
973
974if test "$ac_cv_header_sys_statfs_h" = "yes"
975then
976 AC_CACHE_CHECK( "whether sys/statfs.h defines statfs",
977 wine_cv_sys_statfs_has_statfs,
978 AC_TRY_COMPILE([
979 #include <sys/types.h>
980 #ifdef HAVE_SYS_PARAM_H
981 # include <sys/param.h>
982 #endif
983 #include <sys/statfs.h>
984 ],[
985 struct statfs stfs;
986 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
987 )
988 )
989 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
990 then
991 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS)
992 fi
993fi
994
995if test "$ac_cv_header_sys_mount_h" = "yes"
996then
997 AC_CACHE_CHECK( "whether sys/mount.h defines statfs",
998 wine_cv_sys_mount_has_statfs,
999 AC_TRY_COMPILE([
1000 #include <sys/types.h>
1001 #ifdef HAVE_SYS_PARAM_H
1002 # include <sys/param.h>
1003 #endif
1004 #include <sys/mount.h>
1005 ],[
1006 struct statfs stfs;
1007 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1008 )
1009 )
1010 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1011 then
1012 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT)
1013 fi
1014fi
1015
1016dnl **** FIXME: what about mixed cases, where we need two of them? ***
1017
1018AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree,
1019 [ if test "x$statfs_bfree" = "xno"
1020 then
1021 wine_cv_statfs_bfree=no
1022 else
1023 AC_TRY_COMPILE([
1024 #include <sys/types.h>
1025 #ifdef HAVE_SYS_PARAM_H
1026 # include <sys/param.h>
1027 #endif
1028 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1029 # include <sys/mount.h>
1030 #else
1031 # ifdef STATFS_DEFINED_BY_SYS_VFS
1032 # include <sys/vfs.h>
1033 # else
1034 # ifdef STATFS_DEFINED_BY_SYS_STATFS
1035 # include <sys/statfs.h>
1036 # endif
1037 # endif
1038 #endif
1039 ],[
1040 struct statfs stfs;
1041
1042 stfs.f_bfree++;
1043 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
1044 )
1045 fi ] )
1046if test "$wine_cv_statfs_bfree" = "yes"
1047then
1048 AC_DEFINE(STATFS_HAS_BFREE)
1049fi
1050
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001051AC_CACHE_CHECK( "for statfs.f_bavail", wine_cv_statfs_bavail,
1052 [ if test "x$statfs_bavail" = "xno"
1053 then
1054 wine_cv_statfs_bavail=no
1055 else
1056 AC_TRY_COMPILE([
Alexandre Julliard46ea8b31998-05-03 19:01:20 +00001057 #include <sys/types.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001058 #ifdef HAVE_SYS_PARAM_H
1059 # include <sys/param.h>
1060 #endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001061 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001062 # include <sys/mount.h>
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001063 #else
1064 # ifdef STATFS_DEFINED_BY_SYS_VFS
1065 # include <sys/vfs.h>
1066 # else
1067 # ifdef STATFS_DEFINED_BY_SYS_STATFS
1068 # include <sys/statfs.h>
1069 # endif
1070 # endif
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001071 #endif
1072 ],[
1073 struct statfs stfs;
1074
1075 stfs.f_bavail++;
1076 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
1077 )
1078 fi ] )
1079if test "$wine_cv_statfs_bavail" = "yes"
1080then
1081 AC_DEFINE(STATFS_HAS_BAVAIL)
1082fi
1083
Alexandre Julliard829fe321998-07-26 14:27:39 +00001084dnl *** check for file descriptor passing with msg_accrights
1085
1086AC_CACHE_CHECK("for msg_accrights in struct msghdr", ac_cv_c_msg_accrights,
1087 AC_TRY_COMPILE([#include <sys/types.h>
1088#include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
1089 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
1090if test "$ac_cv_c_msg_accrights" = "yes"
1091then
1092 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
1093fi
1094
Juergen Lock2d33ab92000-02-13 16:03:29 +00001095dnl *** Check for the sun_len member in struct sockaddr_un
1096
1097AC_CACHE_CHECK("for sun_len in struct sockaddr_un", ac_cv_c_sun_len,
1098 AC_TRY_COMPILE([#include <sys/types.h>
1099#include <sys/socket.h>
1100#include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
1101 ac_cv_c_sun_len="yes", ac_cv_c_sun_len="no"))
1102if test "$ac_cv_c_sun_len" = "yes"
1103then
1104 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)
1105fi
1106
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001107dnl *** check for the need to define __i386__
1108
1109AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
1110 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
1111yes
1112#endif],
1113 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
1114if test "$ac_cv_cpp_def_i386" = "yes"
1115then
1116 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001117 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001118fi
1119
Marcus Meissnera7f5cb51999-04-16 08:47:41 +00001120dnl $GCC is set by autoconf
1121GCC_NO_BUILTIN=""
1122if test "$GCC" = "yes"
1123then
1124 GCC_NO_BUILTIN="-fno-builtin"
1125fi
1126AC_SUBST(GCC_NO_BUILTIN)
1127
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001128dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001129
Alexandre Julliard87a2f8d2000-04-09 18:20:25 +00001130AC_OUTPUT_COMMANDS([
1131extra_subdirs="\
1132dlls/ddraw/d3ddevice \
1133dlls/ddraw/dclipper \
1134dlls/ddraw/ddraw \
1135dlls/ddraw/direct3d \
1136dlls/ddraw/dpalette \
1137dlls/ddraw/dsurface \
Lionel Ulmer6301e942000-11-05 20:25:02 +00001138dlls/dinput/joystick \
1139dlls/dinput/keyboard \
1140dlls/dinput/mouse \
Alexandre Julliardd1d09052000-07-30 13:39:52 +00001141dlls/kernel/messages \
Alexandre Julliard2affae52000-10-23 21:32:05 +00001142dlls/user/resources \
Ian Pilcher55d2e572001-05-29 22:06:10 +00001143dlls/wineps/data \
Alexandre Julliard87a2f8d2000-04-09 18:20:25 +00001144"
1145for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
1146
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001147MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001148AC_SUBST_FILE(MAKE_RULES)
1149
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001150MAKE_DLL_RULES=dlls/Makedll.rules
1151AC_SUBST_FILE(MAKE_DLL_RULES)
1152
Alexandre Julliard626f4252000-11-10 23:35:20 +00001153MAKE_PROG_RULES=programs/Makeprog.rules
1154AC_SUBST_FILE(MAKE_PROG_RULES)
1155
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001156AC_OUTPUT([
1157Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001158dlls/Makedll.rules
1159programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001160Makefile
Joseph Pranevich791cd6a1998-12-02 19:58:08 +00001161console/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001162controls/Makefile
1163debugger/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001164dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001165dlls/advapi32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001166dlls/avifil32/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001167dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001168dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001169dlls/crtdll/Makefile
1170dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001171dlls/ddraw/Makefile
1172dlls/dinput/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001173dlls/dplay/Makefile
Peter Hunnisett22b861c1999-09-28 16:35:32 +00001174dlls/dplayx/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001175dlls/dsound/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001176dlls/gdi/Makefile
Francois Gougetedf3e431999-11-07 21:22:17 +00001177dlls/icmp/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001178dlls/imagehlp/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001179dlls/imm32/Makefile
Dimitrie O. Paun36b5b6b2000-06-03 00:07:44 +00001180dlls/kernel/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001181dlls/lzexpand/Makefile
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001182dlls/mpr/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001183dlls/msacm/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001184dlls/msnet32/Makefile
Jon Griffiths1db20bf2001-01-10 23:59:25 +00001185dlls/msvcrt/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001186dlls/msvideo/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001187dlls/ntdll/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001188dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001189dlls/ole32/Makefile
1190dlls/oleaut32/Makefile
1191dlls/olecli/Makefile
1192dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001193dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001194dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001195dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001196dlls/psapi/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001197dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001198dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001199dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001200dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001201dlls/setupapi/Makefile
John R. Sheetsbc80a3b2001-01-11 22:32:44 +00001202dlls/shdocvw/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001203dlls/shell32/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001204dlls/shfolder/Makefile
1205dlls/shlwapi/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001206dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001207dlls/ttydrv/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001208dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001209dlls/user/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001210dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001211dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001212dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001213dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001214dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001215dlls/wininet/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001216dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001217dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001218dlls/winmm/mcianim/Makefile
1219dlls/winmm/mciavi/Makefile
1220dlls/winmm/mcicda/Makefile
1221dlls/winmm/mciseq/Makefile
1222dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001223dlls/winmm/midimap/Makefile
1224dlls/winmm/wavemap/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001225dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001226dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001227dlls/winsock/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001228dlls/winspool/Makefile
Rein Klazes2a4c68b2001-04-16 19:36:12 +00001229dlls/wintrust/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001230dlls/wow32/Makefile
1231dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001232dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001233documentation/Makefile
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +00001234documentation/wine.conf.man
Marcus Meissner5a70c971999-06-05 09:00:21 +00001235documentation/wine.man
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +00001236files/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001237graphics/Makefile
Huw D M Davies3a24f3f1999-05-02 10:15:16 +00001238graphics/enhmetafiledrv/Makefile
Alexandre Julliardbf9130a1996-10-13 17:45:47 +00001239graphics/metafiledrv/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001240graphics/win16drv/Makefile
1241graphics/x11drv/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001242if1632/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001243include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001244library/Makefile
1245libtest/Makefile
1246loader/Makefile
Alexandre Julliard767e6f61998-08-09 12:47:43 +00001247loader/dos/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001248loader/ne/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001249memory/Makefile
1250misc/Makefile
1251miscemu/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001252msdos/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001253objects/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001254ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001255programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001256programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001257programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001258programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001259programs/control/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001260programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001261programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001262programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001263programs/regapi/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001264programs/regtest/Makefile
1265programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001266programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001267programs/wcmd/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001268programs/winemine/Makefile
Alexandre Julliardfc684342001-03-21 21:41:27 +00001269programs/winetest/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001270programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001271programs/winver/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001272relay32/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001273scheduler/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001274server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001275tools/Makefile
John R. Sheetse61d33b2000-03-26 20:25:23 +00001276tools/cvdump/Makefile
Jon Griffithsc7a3fec2001-01-04 19:45:49 +00001277tools/specmaker/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001278tools/winebuild/Makefile
Jeremy Whitef9f030b2000-11-05 20:06:56 +00001279tools/winelauncher
Bertho Stultiens30855912000-06-13 04:34:41 +00001280tools/wmc/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001281tools/wrc/Makefile
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001282tsx11/Makefile
Alexandre Julliardfb270dd2000-06-09 05:27:21 +00001283unicode/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001284win32/Makefile
Patrik Stridvallea584721998-11-01 16:22:07 +00001285windows/Makefile
1286windows/x11drv/Makefile ])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001287
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001288if test "$have_x" = "no"
1289then
1290 echo
1291 echo "*** Warning: X development files not found. Wine will be built without"
1292 echo "*** X support, which currently does not work, and would probably not be"
1293 echo "*** what you want anyway. You will need to install devel packages of"
1294 echo "*** Xlib/Xfree86 and Xpm at the very least."
Ove Kaaven1eb593c1999-02-14 09:34:46 +00001295elif test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = "no"
1296then
1297 echo
1298 echo "*** Warning: Xpm development files not found. Wine will be built without"
1299 echo "*** Xpm support, which currently does not work. You will need to install"
1300 echo "*** devel packages of Xpm."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001301fi
1302
Alexandre Julliard638f1691999-01-17 16:32:32 +00001303if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1304then
1305 echo
1306 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1307 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001308fi
1309
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001310if test "$wine_cv_libc_reentrant" = "no"
1311then
1312 echo
1313 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1314 echo "*** thread support. Consider upgrading libc to a more recent"
1315 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001316fi
1317
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001318if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001319then
1320 echo
1321 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001322 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1323fi
1324
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001325if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "normal"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001326then
1327 echo
1328 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001329 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
Andreas Mohr18a9d742001-01-17 21:52:42 +00001330 echo "*** A fix for glibc 2.1.3 that seems to work is included in this version of Wine,"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001331 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001332fi
1333
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001334if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001335then
1336 echo
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +00001337 echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001338 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1339 echo "*** support before reporting bugs."
1340fi
1341
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001342if test "$wine_cv_warn_cups_h" = "yes"
1343then
1344 echo
1345 echo "*** Note: You have cups runtime libraries, but no development"
1346 echo "*** libraries. Install the cups-devel package or whichever package"
1347 echo "*** contains cups.h to enable CUPS support in WINE."
1348fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001349
Ian Pilcher563598d2001-05-16 20:56:05 +00001350if test "$wine_cv_msg_freetype" = "yes"
1351then
1352 echo
1353 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
1354 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1355 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1356 echo "*** enable Wine to use TrueType fonts."
1357fi
1358
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001359echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001360echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001361echo
1362
1363dnl Local Variables:
1364dnl comment-start: "dnl "
1365dnl comment-end: ""
1366dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001367dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001368dnl End: