blob: 5efcb3306a613ffdeb06f07fe75bac05f303049a [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>
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00004dnl Ported to autoconf 2.5x by bero@redhat.com
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00005AC_REVISION([configure.in 1.00])
6AC_INIT(controls/edit.c)
Alexandre Julliard18f92e71996-07-17 20:02:21 +00007AC_CONFIG_HEADER(include/config.h)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00008AC_CONFIG_AUX_DIR(tools)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00009
Alexandre Julliardff8331e1995-09-18 11:19:54 +000010dnl **** Command-line arguments ****
11
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000012dnl Default values
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000013LIBEXT=so # library type .so or .a
Alexandre Julliardf90efa91998-06-14 15:24:15 +000014TRACE_MSGS=yes # the TRACE() macro
15DEBUG_MSGS=yes # the TRACE(), WARN(), and FIXME() macros.
Patrik Stridvall5e5ad532000-04-23 20:02:46 +000016CURSES=yes
Lionel Ulmerfbc15b12000-04-29 14:23:22 +000017OPENGL=normal
Alexandre Julliard7e56f681996-01-31 19:02:28 +000018
Alexandre Julliardf90efa91998-06-14 15:24:15 +000019AC_ARG_ENABLE(debug,
20[ --disable-debug compile out all debugging messages],
21[if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi])
22
Lionel Ulmerfbc15b12000-04-29 14:23:22 +000023AC_ARG_ENABLE(opengl,
Andreas Mohr18a9d742001-01-17 21:52:42 +000024[ --enable-opengl force usage of OpenGL even if the latter is thread-safe via pthread],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +000025[if test "$enableval" = "no"; then OPENGL="no"; elif test "$enableval" = "yes"; then OPENGL="yes"; fi])
26
Alexandre Julliardf90efa91998-06-14 15:24:15 +000027AC_ARG_ENABLE(trace,
28[ --disable-trace compile out TRACE messages],
29[if test "$enableval" = "no"; then TRACE_MSGS="no"; fi])
30
Patrik Stridvall5e5ad532000-04-23 20:02:46 +000031AC_ARG_WITH(curses,
32[ --without-curses do not use curses],
33[if test "$withval" = "no"; then CURSES="no"; fi])
34
Alexandre Julliarda11d7b11998-03-01 20:05:02 +000035AC_ARG_WITH(reentrant-x,
Joseph Pranevich791cd6a1998-12-02 19:58:08 +000036[ --without-reentrant-x compile for use with non-reentrant X libraries])
Alexandre Julliarda11d7b11998-03-01 20:05:02 +000037
Alexandre Julliard18f92e71996-07-17 20:02:21 +000038AC_SUBST(OPTIONS)
Alexandre Julliardb7258be1995-09-01 15:57:28 +000039
Alexandre Julliardf90efa91998-06-14 15:24:15 +000040if test "$DEBUG_MSGS" = "no"
41then
François Gouget2663b802001-11-06 19:01:05 +000042 OPTIONS="$OPTIONS -DNO_DEBUG_MSGS"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +000043fi
44
45if test "$TRACE_MSGS" = "no" -o "$DEBUG_MSGS" = "no"
46then
François Gouget2663b802001-11-06 19:01:05 +000047 OPTIONS="$OPTIONS -DNO_TRACE_MSGS"
Alexandre Julliardf90efa91998-06-14 15:24:15 +000048fi
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 Meissner5c5a6212002-01-22 18:28:25 +000058
59dnl **** Just additional warning checks, since AC_PROG just sets 'yacc' even
60dnl **** without one present.
61AC_CHECK_PROGS(XYACC,$YACC bison yacc,none)
62if test "$XYACC" = "none"
63then
64 echo "*** Error: No suitable bison/yacc found. ***"
65 echo " Please install the 'bison' package."
66 exit 1
67fi
Marcus Meissnerb53bb412000-07-23 13:41:51 +000068AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
69if test "$XLEX" = "none"
70then
71 echo "*** Error: No suitable lex found. ***"
72 echo " Please install the 'flex' package."
73 exit 1
74fi
Alexandre Julliardff8331e1995-09-18 11:19:54 +000075AC_PROG_RANLIB
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000076AC_PROG_INSTALL
Alexandre Julliard641ee761997-08-04 16:34:36 +000077AC_PROG_LN_S
Mike McCormacke0df32f2000-08-11 21:15:21 +000078AC_CHECK_PROG(C2MAN,c2man,c2man,\$(TOPSRCDIR)/tools/c2man.pl)
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000079AC_PATH_PROG(LDCONFIG, ldconfig, true, /sbin:/usr/sbin:$PATH)
Dimitrie O. Paun79e44ab2000-12-05 04:13:36 +000080AC_CYGWIN
Hidenori Takeshimad48ca942000-12-22 22:28:00 +000081AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false)
Alexandre Julliard02e90081998-01-04 17:49:09 +000082
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000083dnl Check for lint
84AC_CHECK_PROGS(LINT, lclint lint)
85if test "$LINT" = "lint"
86then
87 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
88 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
89fi
90AC_SUBST(LINT)
91AC_SUBST(LINTFLAGS)
92
Dimitrie O. Paun79e44ab2000-12-05 04:13:36 +000093if test "$CYGWIN" = "yes"
94then
95 LDCOMBINE="ld -r --enable-stdcall-fixup"
96else
97 LDCOMBINE="ld -r"
98fi
99AC_SUBST(LDCOMBINE)
100
Alexandre Julliard02e90081998-01-04 17:49:09 +0000101dnl **** Check for some libraries ****
102
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000103dnl Check for -lm
Howard Abrams13277481999-07-10 13:16:29 +0000104AC_CHECK_LIB(m,sqrt)
Alexandre Julliardd37eb361997-07-20 16:23:21 +0000105dnl Check for -li386 for NetBSD and OpenBSD
Alexandre Julliard02e90081998-01-04 17:49:09 +0000106AC_CHECK_LIB(i386,i386_set_ldt)
Todd Vierlingecc76691998-12-15 17:49:02 +0000107dnl Check for -lossaudio for NetBSD
108AC_CHECK_LIB(ossaudio,_oss_ioctl)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000109dnl Check for -lw for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000110AC_CHECK_FUNCS(iswalnum,,AC_CHECK_LIB(w,iswalnum))
Patrik Stridvallea584721998-11-01 16:22:07 +0000111dnl Check for -lnsl for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000112AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000113dnl Check for -lsocket for Solaris
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000114AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000115dnl Check for -lxpg4 for FreeBSD
Satsuki Fujishima66fb6072001-03-19 19:19:59 +0000116AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
Alexandre Julliard0e7bd081999-05-02 11:46:02 +0000117dnl Check for -lmmap for OS/2
118AC_CHECK_LIB(mmap,mmap)
Alexandre Julliard3f510ad2002-01-01 01:13:03 +0000119
Marcus Meissner2d7be871999-12-05 23:06:40 +0000120dnl Check for openpty
Alexandre Julliard3f510ad2002-01-01 01:13:03 +0000121UTILLIBS=""
122AC_SUBST(UTILLIBS)
Marcus Meissner2d7be871999-12-05 23:06:40 +0000123AC_CHECK_FUNCS(openpty,,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000124 [AC_CHECK_LIB(util,openpty,
125 [AC_DEFINE(HAVE_OPENPTY)
Alexandre Julliard3f510ad2002-01-01 01:13:03 +0000126 UTILLIBS="-lutil"]
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000127 )])
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000128
Alexandre Julliard562089b2001-12-31 22:28:35 +0000129DLLIBS=""
130AC_SUBST(DLLIBS)
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000131AC_CHECK_HEADERS(dlfcn.h,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000132 [AC_CHECK_FUNCS(dlopen,,
133 [AC_CHECK_LIB(dl,dlopen,
134 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
Alexandre Julliard562089b2001-12-31 22:28:35 +0000135 DLLIBS="-ldl"],
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000136 LIBEXT="a")]
137 )],
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000138 LIBEXT="a"
139 )
140
Marcus Meissner252b0fe2001-08-06 18:52:14 +0000141JPEGLIB=""
142AC_SUBST(JPEGLIB)
143AC_CHECK_HEADERS(jpeglib.h,
144 AC_CHECK_LIB(jpeg,jpeg_start_decompress,
145 AC_DEFINE(HAVE_LIBJPEG,1,[Define if you have libjpeg including devel headers])
146 JPEGLIB="-ljpeg"
147 )
148)
149
150
Patrik Stridvallea584721998-11-01 16:22:07 +0000151AC_SUBST(XLIB)
Patrik Stridvall2941a212000-04-25 20:34:22 +0000152AC_SUBST(XFILES)
153XFILES=""
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000154AC_SUBST(OPENGLFILES)
155OPENGLFILES=""
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000156AC_SUBST(GLU32FILES)
Alexandre Julliardf33f7f02001-09-17 20:09:08 +0000157GLU32FILES=""
Patrik Stridvallea584721998-11-01 16:22:07 +0000158if test "$have_x" = "yes"
159then
Patrik Stridvall24110281999-02-04 10:09:54 +0000160 XLIB="-lXext -lX11"
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000161 ac_save_CPPFLAGS="$CPPFLAGS"
162 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Patrik Stridvall24110281999-02-04 10:09:54 +0000163
Huw D M Daviesff453fc2001-09-14 01:04:25 +0000164 dnl *** All of the following tests require X11/Xlib.h
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000165 AC_CHECK_HEADERS(X11/Xlib.h,
166 [
Ove Kaavenc90fb252001-01-02 22:39:14 +0000167 dnl *** Check for X keyboard extension
168 AC_CHECK_HEADERS(X11/XKBlib.h,
169 [ dnl *** If X11/XKBlib.h exists...
170 AC_CHECK_LIB(X11, XkbQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000171 AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
Ove Kaavenc90fb252001-01-02 22:39:14 +0000172 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
173 ],
174 AC_MSG_WARN([XKB extension not found!!])
175 )
176
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000177 dnl *** Check for X Shm extension
178 AC_CHECK_HEADERS(X11/extensions/XShm.h,
179 [ dnl *** If X11/extensions/XShm.h exists...
180 AC_CHECK_LIB(Xext, XShmQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000181 AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000182 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
183 ],
184 AC_MSG_WARN([Xshm extension not found!!])
185 )
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000186
Francois Jacques5b6879c2000-07-28 23:04:54 +0000187 dnl *** Check for X shape extension
Ove Kaavenc90fb252001-01-02 22:39:14 +0000188 AC_CHECK_HEADERS(X11/extensions/shape.h,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000189 [ dnl *** If X11/extensions/shape.h exists...
190 AC_CHECK_LIB(Xext,XShapeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000191 AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000192 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
193 ],
Ove Kaavenc90fb252001-01-02 22:39:14 +0000194 AC_MSG_WARN([XShape extension not found!!])
Francois Jacques5b6879c2000-07-28 23:04:54 +0000195 )
196
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000197 dnl *** Check for XFree86 DGA / DGA 2.0 extension
198 AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
199 [ dnl *** If X11/extensions/xf86dga.h exists, check
200 dnl *** for XDGAQueryExtension()...
201 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
202 [ dnl *** If found...
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000203 AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
204 [Define if you have the Xxf86dga library version 2])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000205 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000206 ],
207 [ dnl *** If not found, look for XF86DGAQueryExtension()
208 dnl *** instead (DGA 2.0 not found)...
209 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000210 [ AC_DEFINE(HAVE_LIBXXF86DGA, 1,
211 [Define if you have the Xxf86dga library version 1])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000212 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000213 ],,
214 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
215 )
216 ],
217 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
218 )
219 ],
220 AC_MSG_WARN([DGA extension not found!!])
221 )
Patrik Stridvall24110281999-02-04 10:09:54 +0000222
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000223 dnl *** Check for XFree86 VMODE extension
224 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
225 [ dnl *** If X11/extensions/xf86vmode.h exists...
226 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000227 [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000228 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
229 ],,
230 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
231 )
232 ],
233 AC_MSG_WARN([XFree86 VMODE extension not found!!])
234 )
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000235
236 dnl *** Check for XVideo extension supporting XvImages
237 AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
238 [ dnl *** If X11/extensions/Xvlib.h exists...
239 AC_CHECK_LIB(Xv, XvShmCreateImage,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000240 [ AC_DEFINE(HAVE_XVIDEO, 1, [Define if the X libraries support XVideo])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000241 X_PRE_LIBS="$X_PRE_LIBS -lXv"
242 ],,
243 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
244 )
245 ],
246 AC_MSG_WARN([XVideo extension not found !!])
247 )
248
Huw D M Daviesff453fc2001-09-14 01:04:25 +0000249 dnl *** Check for XRender extension
250 AC_CHECK_HEADERS(X11/extensions/Xrender.h,
251 [ dnl *** If X11/extensions/Xrender.h exists...
252 AC_CHECK_LIB(Xrender, XRenderQueryExtension,
253 [ AC_DEFINE(HAVE_LIBXRENDER, 1, [Define if you have the XRender extension library])
254 X_PRE_LIBS="$X_PRE_LIBS -lXrender"
255 ],,
256 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
257 )
258 ],
259 AC_MSG_WARN([XRender extension not found !!])
260 )
261
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000262 ]
263 ) dnl *** End of X11/Xlib.h check
Lionel Ulmer5c085701999-02-28 19:48:53 +0000264
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000265 dnl Check for the presence of OpenGL
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000266 if test $OPENGL = "yes" -o $OPENGL = "normal"
Patrik Stridvall24110281999-02-04 10:09:54 +0000267 then
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000268 if test -e /usr/X11R6/lib/libGL.a -a ! -e /usr/X11R6/lib/libGL.so
269 then
270 AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
271This prevents linking to OpenGL. Delete the file and restart configure.])
272 fi
273
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000274 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h)
Marcus Meissner22a969b2000-08-08 20:46:50 +0000275 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000276 then
277 dnl Check for some problems due to old Mesa versions
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000278 AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000279 AC_TRY_COMPILE(
Lionel Ulmer48c08162000-01-05 01:51:02 +0000280 [#include <GL/gl.h>],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000281 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000282 [wine_cv_opengl_version_OK="yes"],
283 [wine_cv_opengl_version_OK="no"]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000284 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000285 )
286
287 dnl Check for the thread-safety of the OpenGL library
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000288 AC_CACHE_CHECK([for thread-safe OpenGL version],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000289 wine_cv_opengl_version_threadsafe,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000290 [saved_libs=$LIBS
291 LIBS="$X_LIBS -lGL"
292 AC_TRY_LINK([],[pthread_getspecific();],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000293 [wine_cv_opengl_version_threadsafe="yes"],
294 [wine_cv_opengl_version_threadsafe="no"])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000295 LIBS=$saved_libs]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000296 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000297
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000298 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 +0000299 then
Andreas Mohr4eefb962000-08-01 00:27:35 +0000300 dnl Check for the presence of the library
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000301 AC_CHECK_LIB(GL,glXCreateContext,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000302 X_PRE_LIBS="$X_PRE_LIBS -lGL"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000303 ,,
304 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
305
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000306 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000307 then
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000308 OPENGLFILES='$(OPENGLFILES)'
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000309 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000310
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000311 AC_CHECK_LIB(GL,glXGetProcAddressARB,
312 AC_DEFINE(HAVE_GLX_GETPROCADDRESS, 1,
313 [Define if the OpenGL library supports the glXGetProcAddressARB call]),,
314 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000315
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000316 if test "$ac_cv_lib_GL_glXGetProcAddressARB" = "yes"
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000317 then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000318 AC_CACHE_CHECK([for OpenGL extension functions prototypes], wine_cv_extension_prototypes,
319 [AC_TRY_COMPILE([#include <GL/gl.h>
Marcus Meissner6bb6d4c2000-08-09 22:21:08 +0000320 #ifdef HAVE_GL_GLEXT_H
321 # include <GL/glext.h>
322 #endif
323 ],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000324 [PFNGLCOLORTABLEEXTPROC test_proc;],
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000325 [wine_cv_extension_prototypes="yes"],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000326 [wine_cv_extension_prototypes="no"]
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000327 )]
Lionel Ulmer1434d872000-07-23 14:23:31 +0000328 )
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000329 if test "$wine_cv_extension_prototypes" = "yes"
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000330 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000331 AC_DEFINE(HAVE_GLEXT_PROTOTYPES, 1,
332 [Define if the OpenGL headers define extension typedefs])
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000333 fi
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000334 fi
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000335
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000336 fi
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000337 dnl Check for GLU32 library.
Marcus Meissner6e9ab402001-08-08 23:21:16 +0000338 AC_CHECK_LIB(GLU,gluLookAt,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000339 [X_PRE_LIBS="$X_PRE_LIBS -lGLU"
340 GLU32FILES='$(GLU32FILES)']
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000341 ,,
342 $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
343 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000344 fi
345 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000346 fi
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000347
348 CPPFLAGS="$ac_save_CPPFLAGS"
Patrik Stridvall2941a212000-04-25 20:34:22 +0000349 XFILES='$(XFILES)'
Patrik Stridvallea584721998-11-01 16:22:07 +0000350else
351 XLIB=""
352 X_CFLAGS=""
353 X_LIBS=""
354fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000355
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000356dnl **** Check which curses lib to use ***
Alexandre Julliard48957682001-12-26 23:08:31 +0000357CURSESLIBS=""
Patrik Stridvall5e5ad532000-04-23 20:02:46 +0000358if test "$CURSES" = "yes"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000359then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000360 AC_CHECK_HEADERS(ncurses.h,
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000361 [AC_CHECK_LIB(ncurses,waddch,
Alexandre Julliard48957682001-12-26 23:08:31 +0000362 [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
363 CURSESLIBS="-lncurses"],
364 [AC_CHECK_HEADERS(curses.h,
365 [AC_CHECK_LIB(curses,waddch,
366 [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000367 CURSESLIBS="-lcurses"])])])])
Alexandre Julliard48957682001-12-26 23:08:31 +0000368 saved_libs="$LIBS"
369 LIBS="$CURSESLIBS $LIBS"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000370 AC_CHECK_FUNCS(getbkgd resizeterm)
Alexandre Julliard48957682001-12-26 23:08:31 +0000371 LIBS="$saved_libs"
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000372fi
Alexandre Julliard48957682001-12-26 23:08:31 +0000373AC_SUBST(CURSESLIBS)
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000374
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000375CUPSLIBS=""
376dnl **** Check for CUPS ****
Marcus Meissner3ee02ba2001-04-30 18:18:50 +0000377wine_cv_warn_cups_h=no
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000378AC_CHECK_LIB(cups,cupsGetPPD,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000379 [AC_CHECK_HEADER(cups/cups.h,
380 [AC_DEFINE(HAVE_CUPS, 1, [Define if we have CUPS])
381 CUPSLIBS="-lcups"],
382 wine_cv_warn_cups_h=yes)]
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000383)
384AC_SUBST(CUPSLIBS)
385
Ian Pilcher563598d2001-05-16 20:56:05 +0000386dnl **** Check for FreeType 2 ****
Dmitry Timoshkov8871a112001-11-06 22:26:53 +0000387AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
Ian Pilcher563598d2001-05-16 20:56:05 +0000388if test "$ft_lib" = "no"
389then
390 FREETYPELIBS=""
391 FREETYPEINCL=""
392 wine_cv_msg_freetype=no
393else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000394 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
395 if test "$ft_devel" = "no"
396 then
397 AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
398 if test "$ft_devel2" = "freetype2-config"
399 then
400 ft_devel=$ft_devel2
401 fi
402 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000403 if test "$ft_devel" = "no"
404 then
405 FREETYPELIBS=""
406 FREETYPEINCL=""
407 wine_cv_msg_freetype=yes
408 else
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000409 AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000410 FREETYPELIBS=`$ft_devel --libs`
411 FREETYPEINCL=`$ft_devel --cflags`
Ian Pilcher40432fe2001-06-06 21:05:23 +0000412 ac_save_CPPFLAGS="$CPPFLAGS"
413 CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
414 AC_CHECK_HEADERS(freetype/freetype.h \
415 freetype/ftglyph.h \
416 freetype/tttables.h \
417 freetype/ftnames.h \
418 freetype/ftsnames.h \
Huw D M Davies814654e2001-09-12 20:21:06 +0000419 freetype/ttnameid.h \
Huw D M Davies4e2024e2001-10-23 20:06:32 +0000420 freetype/ftoutln.h \
421 freetype/internal/sfnt.h)
Alexandre Julliard18d75732002-01-29 03:02:50 +0000422 AC_TRY_CPP([#include <ft2build.h>
423 #include <freetype/fttrigon.h>],
424 AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
425 [Define if you have the <freetype/fttrigon.h> header file.]))
Ian Pilcher40432fe2001-06-06 21:05:23 +0000426 CPPFLAGS="$ac_save_CPPFLAGS"
Ian Pilcher563598d2001-05-16 20:56:05 +0000427 wine_cv_msg_freetype=no
428 fi
429fi
430AC_SUBST(FREETYPELIBS)
431AC_SUBST(FREETYPEINCL)
432
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000433dnl **** Check for parport (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000434AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000435 AC_TRY_COMPILE(
436 [#include <linux/ppdev.h>],
437 [ioctl (1,PPCLAIM,0)],
438 [ac_cv_c_ppdev="yes"],
439 [ac_cv_c_ppdev="no"])
440 )
441if test "$ac_cv_c_ppdev" = "yes"
442then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000443 AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000444fi
445
Pavel Roskin94d99641998-12-26 11:52:51 +0000446dnl **** Check for IPX (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000447AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
Pavel Roskin94d99641998-12-26 11:52:51 +0000448 AC_TRY_COMPILE(
449 [#include <sys/socket.h>
450 #include <netipx/ipx.h>],
451 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000452 [ac_cv_c_ipx_gnu="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000453 [ac_cv_c_ipx_gnu="no"])
454 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000455if test "$ac_cv_c_ipx_gnu" = "yes"
456then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000457 AC_DEFINE(HAVE_IPX_GNU, 1, [Define if IPX should use netipx/ipx.h from libc])
Aaron Hopec23872d2000-01-15 23:43:21 +0000458fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000459
460if test "$ac_cv_c_ipx_gnu" = "no"
461then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000462 AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
Pavel Roskin94d99641998-12-26 11:52:51 +0000463 AC_TRY_COMPILE(
464 [#include <sys/socket.h>
465 #include <asm/types.h>
466 #include <linux/ipx.h>],
467 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000468 [ac_cv_c_ipx_linux="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000469 [ac_cv_c_ipx_linux="no"])
470 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000471 if test "$ac_cv_c_ipx_linux" = "yes"
472 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000473 AC_DEFINE(HAVE_IPX_LINUX, 1, [Define if IPX includes are taken from Linux kernel])
Aaron Hopec23872d2000-01-15 23:43:21 +0000474 fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000475fi
476
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000477dnl **** Check for Open Sound System ****
Todd Vierlingecc76691998-12-15 17:49:02 +0000478AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000479
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000480AC_CACHE_CHECK([for Open Sound System],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000481 ac_cv_c_opensoundsystem,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000482 AC_TRY_COMPILE([
Todd Vierlingecc76691998-12-15 17:49:02 +0000483 #if defined(HAVE_SYS_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000484 #include <sys/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000485 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000486 #include <machine/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000487 #elif defined(HAVE_SOUNDCARD_H)
488 #include <soundcard.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000489 #endif
490 ],[
491
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000492/* check for one of the Open Sound System specific SNDCTL_ defines */
493#if !defined(SNDCTL_DSP_STEREO)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000494#error No open sound system
495#endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000496],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
497
498if test "$ac_cv_c_opensoundsystem" = "yes"
499then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000500 AC_DEFINE(HAVE_OSS, 1, [Define if you have the Open Sound system])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000501fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000502
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000503AC_CACHE_CHECK([for Open Sound System/MIDI interface],
Eric Pouech338d3b21999-05-22 18:52:21 +0000504 ac_cv_c_opensoundsystem_midi,
505 AC_TRY_COMPILE([
506 #if defined(HAVE_SYS_SOUNDCARD_H)
507 #include <sys/soundcard.h>
508 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
509 #include <machine/soundcard.h>
510 #elif defined(HAVE_SOUNDCARD_H)
511 #include <soundcard.h>
512 #endif
513 ],[
514
515/* check for one of the Open Sound System specific SNDCTL_SEQ defines */
516#if !defined(SNDCTL_SEQ_SYNC)
517#error No open sound system MIDI interface
518#endif
519],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
520
521if test "$ac_cv_c_opensoundsystem_midi" = "yes"
522then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000523 AC_DEFINE(HAVE_OSS_MIDI, 1, [Define if you have the Open Sound system (MIDI interface)])
Eric Pouech338d3b21999-05-22 18:52:21 +0000524fi
525
Alexandre Julliard641ee761997-08-04 16:34:36 +0000526dnl **** If ln -s doesn't work, use cp instead ****
527if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
528
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000529dnl **** Check for broken glibc mmap64 ****
530
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000531AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000532 AC_TRY_RUN([
533 #define _FILE_OFFSET_BITS 64
534 #include <stdio.h>
535 #include <unistd.h>
536 #include <fcntl.h>
537 #include <sys/mman.h>
538 #include <errno.h>
539
540 int main(int argc,char **argv) {
541 int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
542 if (fd == -1) exit(1);
543
544 unlink("conftest.map");
545
546 write(fd,"test",4);
547
548 if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
549 (errno == EINVAL)
550 ) {
551 exit(1);
552 }
553 close(fd);
554 fprintf(stderr,"success!\n");
555 exit(0);
556 }
557
558 ],
559 ac_cv_mmap64_works="yes",
560 ac_cv_mmap64_works="no",
561 ac_cv_mmap64_works="no") )
562
563if test "$ac_cv_mmap64_works" = "yes"
564then
565 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
566fi
567
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000568dnl **** Check for gcc strength-reduce bug ****
569
570if test "x${GCC}" = "xyes"
571then
572 CFLAGS="$CFLAGS -Wall"
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000573 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000574 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000575int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000576int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000577 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000578 unsigned int B = 3;
579 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000580 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000581 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
582 L[[i]] = 4;
583
584 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000585}],
586 ac_cv_c_gcc_strength_bug="no",
587 ac_cv_c_gcc_strength_bug="yes",
588 ac_cv_c_gcc_strength_bug="yes") )
589 if test "$ac_cv_c_gcc_strength_bug" = "yes"
590 then
591 CFLAGS="$CFLAGS -fno-strength-reduce"
592 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000593
594 dnl Check for -mpreferred-stack-boundary
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000595 AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support],
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000596 ac_cv_c_gcc_stack_boundary,
597 [saved_cflags=$CFLAGS
598 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
599 AC_TRY_COMPILE(,[return 0],ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")
600 CFLAGS=$saved_cflags
601 ])
602 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
603 then
604 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
605 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000606fi
607
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000608dnl **** Check if we need to place .type inside a .def directive ****
609
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000610AC_CACHE_CHECK([whether .type must sit inside a .def directive],
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000611 ac_cv_c_type_in_def,
612[saved_libs=$LIBS
613LIBS="conftest_asm.s $LIBS"
614cat > conftest_asm.s <<EOF
615 .globl _ac_test
616 .def _ac_test; .scl 2; .type 32; .endef
617_ac_test:
618 .long 0
619EOF
620AC_TRY_LINK(,,ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no")
621LIBS=$saved_libs])
622if test "$ac_cv_c_type_in_def" = "yes"
623then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000624 AC_DEFINE(NEED_TYPE_IN_DEF, 1, [Define if .type asm directive must be inside a .def directive])
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000625fi
626
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000627dnl **** Check for underscore on external symbols ****
628
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000629AC_CACHE_CHECK([whether external symbols need an underscore prefix],
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000630 ac_cv_c_extern_prefix,
631[saved_libs=$LIBS
632LIBS="conftest_asm.s $LIBS"
633cat > conftest_asm.s <<EOF
634 .globl _ac_test
635_ac_test:
636 .long 0
637EOF
638AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
639 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
640LIBS=$saved_libs])
641if test "$ac_cv_c_extern_prefix" = "yes"
642then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000643 AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1,
644 [Define if symbols declared in assembly code need an underscore prefix])
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000645fi
646
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000647dnl **** Check for .string in assembler ****
648
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000649AC_CACHE_CHECK([whether assembler accepts .string],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000650 ac_cv_c_asm_string,
651[saved_libs=$LIBS
652LIBS="conftest_asm.s $LIBS"
653cat > conftest_asm.s <<EOF
654 .string "test"
655EOF
656AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
657LIBS=$saved_libs])
658if test "$ac_cv_c_asm_string" = "yes"
659then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000660 AC_DEFINE(HAVE_ASM_STRING, 1, [Define to use .string instead of .ascii])
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000661fi
662
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000663dnl **** Check for working dll ****
664
Todd Vierling4b992b01998-12-15 15:26:27 +0000665LDSHARED=""
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000666LDDLLFLAGS=""
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000667if test "$LIBEXT" = "so"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000668then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000669 AC_CACHE_CHECK([whether we can build a GNU style ELF dll],
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000670 ac_cv_c_dll_gnuelf,
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000671 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000672 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000673 AC_TRY_LINK(,[return 1],ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000674 CFLAGS=$saved_cflags
675 ])
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000676 if test "$ac_cv_c_dll_gnuelf" = "yes"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000677 then
Jeremy Whitec7b4ed72001-07-14 00:49:50 +0000678 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000679 LDDLLFLAGS="-Wl,-Bsymbolic"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000680 else
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000681 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
Ron Recorde977d6c1999-09-05 12:32:05 +0000682 ac_cv_c_dll_unixware,
Todd Vierling4b992b01998-12-15 15:26:27 +0000683 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000684 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
Ron Recorde977d6c1999-09-05 12:32:05 +0000685 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
Todd Vierling4b992b01998-12-15 15:26:27 +0000686 CFLAGS=$saved_cflags
687 ])
Ron Recorde977d6c1999-09-05 12:32:05 +0000688 if test "$ac_cv_c_dll_unixware" = "yes"
Todd Vierling4b992b01998-12-15 15:26:27 +0000689 then
Jeremy Whitec7b4ed72001-07-14 00:49:50 +0000690 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000691 LDDLLFLAGS="-Wl,-B,symbolic"
Todd Vierling4b992b01998-12-15 15:26:27 +0000692 fi
693 fi
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000694 if test "$ac_cv_c_dll_gnuelf" = "no" -a "$ac_cv_c_dll_unixware" = "no"
Todd Vierling4b992b01998-12-15 15:26:27 +0000695 then
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000696 LIBEXT="a"
697 if test "$DLLWRAP" = "dllwrap"; then
698 dnl FIXME - check whether dllwrap works correctly...
699 if test "$CYGWIN" = "yes"; then
700 echo "*** use dllwrap for building shared library."
701 LIBEXT="dll"
702 fi
703 fi
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000704 fi
705fi
Alexandre Julliard0adad952000-01-26 01:45:58 +0000706
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000707if test "$LIBEXT" = "a"; then
708 echo "*** It is currently not possible to build WINE without shared"
709 echo "*** library (.so) support to allow transparent switch between .so"
710 echo "*** and .dll files."
711 echo "*** If you are using Linux, you will need a newer binutils."
712 exit 1
713fi
714
Alexandre Julliard0adad952000-01-26 01:45:58 +0000715DLLFLAGS=""
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000716LDPATH=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000717
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000718if test "$LIBEXT" = "so"; then
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000719 DLLFLAGS="-fPIC"
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000720 LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
721elif test "$LIBEXT" = "dll"; then
722 #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000723 LDPATH="PATH=\"\$(TOPOBJDIR)/unicode:\$\$PATH\""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000724fi
725
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000726AC_SUBST(DLLFLAGS)
Todd Vierling4b992b01998-12-15 15:26:27 +0000727AC_SUBST(LDSHARED)
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000728AC_SUBST(LDDLLFLAGS)
Alexandre Julliard0adad952000-01-26 01:45:58 +0000729AC_SUBST(LIBEXT)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000730AC_SUBST(LDPATH)
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000731
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000732dnl **** Check for reentrant libc ****
733dnl
734dnl For cross-compiling we blindly assume that libc is reentrant. This is
735dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
736
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000737AC_DEFUN([WINE_CHECK_ERRNO],
Alexandre Julliard598412e2001-01-17 20:22:22 +0000738[
739 AC_CACHE_CHECK(for reentrant libc: $1, wine_cv_libc_r_$1,
740 [AC_TRY_RUN([int myerrno = 0;
741char buf[256];
742int *$1(){return &myerrno;}
743main(){connect(0,buf,255); exit(!myerrno);}],
744 wine_cv_libc_r_$1=yes, wine_cv_libc_r_$1=no,
745 wine_cv_libc_r_$1=yes )
746])
747if test "$wine_cv_libc_r_$1" = "yes"
748then
749 wine_cv_libc_reentrant=$1
750fi
751])
752
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000753wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000754dnl Linux style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000755WINE_CHECK_ERRNO(__errno_location)
Marcus Meissnerc2606381999-04-11 15:20:29 +0000756dnl FreeBSD style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000757WINE_CHECK_ERRNO(__error)
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000758dnl Solaris style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000759WINE_CHECK_ERRNO(___errno)
Ron Recorde977d6c1999-09-05 12:32:05 +0000760dnl UnixWare style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000761WINE_CHECK_ERRNO(__thr_errno)
Bang Jun-Young33dff342001-05-07 18:21:10 +0000762dnl NetBSD style errno location
763WINE_CHECK_ERRNO(__errno)
Alexandre Julliard598412e2001-01-17 20:22:22 +0000764
765if test "$wine_cv_libc_reentrant" != "no"
Ron Recorde977d6c1999-09-05 12:32:05 +0000766then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000767 AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant,
768 [Define to the name of the function returning errno for reentrant libc])
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000769fi
770
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000771dnl **** Check for reentrant X libraries ****
772dnl
773dnl This may fail to determine whether X libraries are reentrant if
774dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
775dnl is possible with the --without-reentrant-x option.
776
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000777if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
Patrik Stridvall24110281999-02-04 10:09:54 +0000778then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000779AC_CACHE_CHECK( [for reentrant X libraries], wine_cv_x_reentrant,
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000780 [ if test "x$with_reentrant_x" = "xno"
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000781 then
782 wine_cv_x_reentrant=no
783 else
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000784 libX11_check=none
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000785 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
Alexandre Julliard829fe321998-07-26 14:27:39 +0000786 if test -r $dir/libX11.so; then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000787 libX11_check="-D $dir/libX11.so"
788 break 1
789 fi
Alexandre Julliard829fe321998-07-26 14:27:39 +0000790 if test -r $dir/libX11.a; then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000791 libX11_check="$dir/libX11.a"
792 break 1
793 fi
794 done
795 if test "$libX11_check" != "none"; then
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000796 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
Alexandre Julliard829fe321998-07-26 14:27:39 +0000797 then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000798 wine_cv_x_reentrant=yes
799 else
800 wine_cv_x_reentrant=no
801 fi
802 else
803 wine_cv_x_reentrant=unknown
804 fi
805 fi ] )
Patrik Stridvall24110281999-02-04 10:09:54 +0000806else
807 wine_cv_x_reentrant=no
808fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000809if test "$wine_cv_x_reentrant" = "no"
810then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000811 AC_DEFINE(NO_REENTRANT_X11, 1,
812 [Define if X libraries are not reentrant (compiled without -D_REENTRANT)])
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000813fi
814
Ulrich Weigand97591402000-12-19 03:38:53 +0000815
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000816dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000817
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000818AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000819AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000820 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000821 _lwp_create \
822 clone \
Andreas Mohra7ca2ba2001-01-12 23:07:11 +0000823 ecvt \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000824 finite \
825 fpclass \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000826 ftruncate64 \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000827 getnetbyaddr \
828 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000829 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000830 getprotobyname \
831 getprotobynumber \
Dimitrie O. Paun1ec253d2000-12-01 20:47:11 +0000832 getrlimit \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000833 getservbyport \
834 getsockopt \
835 inet_network \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000836 lseek64 \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000837 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000838 memmove \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000839 mmap \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000840 pread \
841 pwrite \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000842 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000843 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000844 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000845 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000846 sigaltstack \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000847 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000848 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000849 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000850 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000851 tcgetattr \
852 timegm \
853 usleep \
854 vfscanf \
855 wait4 \
856 waitpid \
857)
858
859dnl **** Check for header files ****
860
861AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000862 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000863 arpa/nameser.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000864 elf.h \
865 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000866 ieeefp.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000867 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000868 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000869 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000870 linux/cdrom.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000871 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000872 linux/joystick.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000873 linux/ucdrom.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000874 net/if.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000875 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000876 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000877 netinet/in_systm.h \
878 netinet/ip.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000879 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000880 pty.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000881 resolv.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000882 sched.h \
883 socket.h \
Bang Jun-Youngeda758e2001-12-14 22:47:19 +0000884 stdint.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000885 strings.h \
886 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000887 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000888 sys/file.h \
889 sys/filio.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000890 sys/ipc.h \
Eric Pouech624cbd72001-08-10 22:29:21 +0000891 sys/link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000892 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000893 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000894 sys/modem.h \
895 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000896 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000897 sys/param.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000898 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +0000899 sys/reg.h \
Howard Abrams13277481999-07-10 13:16:29 +0000900 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000901 sys/shm.h \
902 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000903 sys/sockio.h \
904 sys/statfs.h \
905 sys/strtio.h \
906 sys/syscall.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000907 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000908 sys/wait.h \
909 sys/v86.h \
910 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000911 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000912 sys/vm86.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000913 syscall.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000914 ucontext.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000915)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000916AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000917
918dnl **** Check for types ****
919
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000920AC_C_CONST()
Marcus Meissner1a8bbd71999-04-26 14:58:58 +0000921AC_C_INLINE()
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000922AC_TYPE_SIZE_T()
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000923AC_CHECK_SIZEOF(long long,0)
924
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000925AC_CACHE_CHECK([whether linux/input.h is for real],
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000926 wine_cv_linux_input_h,
927 AC_TRY_COMPILE([
928 #include <linux/input.h>
929 ] , [
930 int foo = EVIOCGBIT(EV_ABS,42);
931 int bar = BTN_PINKIE;
932 int fortytwo = 42;
933 ],
934 wine_cv_linux_input_h=yes,
935 wine_cv_linux_input_h=no,
936 no
937 )
938 )
939 if test "$wine_cv_linux_input_h" = "yes"
940 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000941 AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H, 1,
942 [Define if we have linux/input.h AND it contains the INPUT event API])
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000943 fi
944
Rein Klazesff7a61f2000-09-24 19:41:57 +0000945
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000946AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
Rein Klazesff7a61f2000-09-24 19:41:57 +0000947 wine_cv_linux_gethostbyname_r_6,
948 AC_TRY_COMPILE([
949#include <netdb.h>
950 ], [
951 char *name=NULL;
952 struct hostent he;
953 struct hostent *result;
954 char *buf=NULL;
955 int bufsize=0;
956 int res,errnr;
957 char *addr=NULL;
958 int addrlen=0;
959 int addrtype=0;
960 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
961 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
962 ],
963 wine_cv_linux_gethostbyname_r_6=yes,
964 wine_cv_linux_gethostbyname_r_6=no
965 )
966 )
967 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
968 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000969 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
970 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
Rein Klazesff7a61f2000-09-24 19:41:57 +0000971 fi
972
Marcus Meissner028e9a11999-08-04 15:07:56 +0000973if test "$ac_cv_header_linux_joystick_h" = "yes"
974then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000975 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
Marcus Meissner028e9a11999-08-04 15:07:56 +0000976 wine_cv_linux_joystick_22_api,
977 AC_TRY_COMPILE([
978 #include <sys/ioctl.h>
979 #include <linux/joystick.h>
980
981 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +0000982 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
983 #error "no 2.2 header"
984 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +0000985 ],/*empty*/,
986 wine_cv_linux_joystick_22_api=yes,
987 wine_cv_linux_joystick_22_api=no,
988 wine_cv_linux_joystick_22_api=no
989 )
990 )
Rein Klazes87d224a2000-04-24 17:33:49 +0000991 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +0000992 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000993 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
994 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
Marcus Meissner028e9a11999-08-04 15:07:56 +0000995 fi
996fi
997
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000998dnl **** statfs checks ****
999
1000if test "$ac_cv_header_sys_vfs_h" = "yes"
1001then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001002 AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001003 wine_cv_sys_vfs_has_statfs,
1004 AC_TRY_COMPILE([
1005 #include <sys/types.h>
1006 #ifdef HAVE_SYS_PARAM_H
1007 # include <sys/param.h>
1008 #endif
1009 #include <sys/vfs.h>
1010 ],[
1011 struct statfs stfs;
1012
1013 memset(&stfs,0,sizeof(stfs));
1014 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1015 )
1016 )
1017 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1018 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001019 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1020 [Define if the struct statfs is defined by <sys/vfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001021 fi
1022fi
1023
1024if test "$ac_cv_header_sys_statfs_h" = "yes"
1025then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001026 AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001027 wine_cv_sys_statfs_has_statfs,
1028 AC_TRY_COMPILE([
1029 #include <sys/types.h>
1030 #ifdef HAVE_SYS_PARAM_H
1031 # include <sys/param.h>
1032 #endif
1033 #include <sys/statfs.h>
1034 ],[
1035 struct statfs stfs;
1036 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1037 )
1038 )
1039 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1040 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001041 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1042 [Define if the struct statfs is defined by <sys/statfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001043 fi
1044fi
1045
1046if test "$ac_cv_header_sys_mount_h" = "yes"
1047then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001048 AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001049 wine_cv_sys_mount_has_statfs,
1050 AC_TRY_COMPILE([
1051 #include <sys/types.h>
1052 #ifdef HAVE_SYS_PARAM_H
1053 # include <sys/param.h>
1054 #endif
1055 #include <sys/mount.h>
1056 ],[
1057 struct statfs stfs;
1058 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1059 )
1060 )
1061 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1062 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001063 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1064 [Define if the struct statfs is defined by <sys/mount.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001065 fi
1066fi
1067
1068dnl **** FIXME: what about mixed cases, where we need two of them? ***
1069
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001070AC_CACHE_CHECK( [for statfs.f_bfree], wine_cv_statfs_bfree,
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001071 [ if test "x$statfs_bfree" = "xno"
1072 then
1073 wine_cv_statfs_bfree=no
1074 else
1075 AC_TRY_COMPILE([
1076 #include <sys/types.h>
1077 #ifdef HAVE_SYS_PARAM_H
1078 # include <sys/param.h>
1079 #endif
1080 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
1081 # include <sys/mount.h>
1082 #else
1083 # ifdef STATFS_DEFINED_BY_SYS_VFS
1084 # include <sys/vfs.h>
1085 # else
1086 # ifdef STATFS_DEFINED_BY_SYS_STATFS
1087 # include <sys/statfs.h>
1088 # endif
1089 # endif
1090 #endif
1091 ],[
1092 struct statfs stfs;
1093
1094 stfs.f_bfree++;
1095 ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no
1096 )
1097 fi ] )
1098if test "$wine_cv_statfs_bfree" = "yes"
1099then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001100 AC_DEFINE(STATFS_HAS_BFREE, 1, [Define if the struct statfs has the member bfree])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001101fi
1102
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001103AC_CACHE_CHECK( [for statfs.f_bavail], wine_cv_statfs_bavail,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001104 [ if test "x$statfs_bavail" = "xno"
1105 then
1106 wine_cv_statfs_bavail=no
1107 else
1108 AC_TRY_COMPILE([
Alexandre Julliard46ea8b31998-05-03 19:01:20 +00001109 #include <sys/types.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001110 #ifdef HAVE_SYS_PARAM_H
1111 # include <sys/param.h>
1112 #endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001113 #ifdef STATFS_DEFINED_BY_SYS_MOUNT
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001114 # include <sys/mount.h>
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001115 #else
1116 # ifdef STATFS_DEFINED_BY_SYS_VFS
1117 # include <sys/vfs.h>
1118 # else
1119 # ifdef STATFS_DEFINED_BY_SYS_STATFS
1120 # include <sys/statfs.h>
1121 # endif
1122 # endif
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001123 #endif
1124 ],[
1125 struct statfs stfs;
1126
1127 stfs.f_bavail++;
1128 ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no
1129 )
1130 fi ] )
1131if test "$wine_cv_statfs_bavail" = "yes"
1132then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001133 AC_DEFINE(STATFS_HAS_BAVAIL, 1, [Define if the struct statfs has the member bavail])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001134fi
1135
Alexandre Julliard829fe321998-07-26 14:27:39 +00001136dnl *** check for file descriptor passing with msg_accrights
1137
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001138AC_CACHE_CHECK([for msg_accrights in struct msghdr], ac_cv_c_msg_accrights,
Alexandre Julliard829fe321998-07-26 14:27:39 +00001139 AC_TRY_COMPILE([#include <sys/types.h>
1140#include <sys/socket.h>],[struct msghdr hdr; hdr.msg_accrights=0],
1141 ac_cv_c_msg_accrights="yes", ac_cv_c_msg_accrights="no"))
1142if test "$ac_cv_c_msg_accrights" = "yes"
1143then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001144 AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])
Alexandre Julliard829fe321998-07-26 14:27:39 +00001145fi
1146
Patrik Stridvall09da9662001-07-08 22:30:50 +00001147dnl *** Check for the sa_len member in struct sockaddr
1148
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001149AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_c_sockaddr_sa_len,
Patrik Stridvall09da9662001-07-08 22:30:50 +00001150 AC_TRY_COMPILE([#include <sys/types.h>
1151#include <sys/socket.h>
1152], [static struct sockaddr addr; addr.sa_len = 1],
1153 ac_cv_c_sockaddr_sa_len="yes", ac_cv_c_sockaddr_sa_len="no"))
1154if test "$ac_cv_c_sockaddr_sa_len" = "yes"
1155then
1156 AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])
1157fi
1158
Juergen Lock2d33ab92000-02-13 16:03:29 +00001159dnl *** Check for the sun_len member in struct sockaddr_un
1160
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001161AC_CACHE_CHECK([for sun_len in struct sockaddr_un], ac_cv_c_sockaddr_sun_len,
Juergen Lock2d33ab92000-02-13 16:03:29 +00001162 AC_TRY_COMPILE([#include <sys/types.h>
1163#include <sys/socket.h>
1164#include <sys/un.h>], [static struct sockaddr_un addr; addr.sun_len = 1],
Patrik Stridvall09da9662001-07-08 22:30:50 +00001165 ac_cv_c_sockaddr_sun_len="yes", ac_cv_c_sockaddr_sun_len="no"))
1166if test "$ac_cv_c_sockaddr_sun_len" = "yes"
Juergen Lock2d33ab92000-02-13 16:03:29 +00001167then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001168 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])
Juergen Lock2d33ab92000-02-13 16:03:29 +00001169fi
1170
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001171dnl *** check for the need to define __i386__
1172
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001173AC_CACHE_CHECK([whether we need to define __i386__],ac_cv_cpp_def_i386,
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001174 AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
1175yes
1176#endif],
1177 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
1178if test "$ac_cv_cpp_def_i386" = "yes"
1179then
1180 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001181 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001182fi
1183
Marcus Meissnera7f5cb51999-04-16 08:47:41 +00001184dnl $GCC is set by autoconf
1185GCC_NO_BUILTIN=""
1186if test "$GCC" = "yes"
1187then
1188 GCC_NO_BUILTIN="-fno-builtin"
1189fi
1190AC_SUBST(GCC_NO_BUILTIN)
1191
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001192dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001193
François Gouget14259412001-11-06 20:57:11 +00001194AC_DEFINE(__WINE_CONFIG_H, 1,
1195 [This must always be defined to allow checking for config.h inclusion])
1196
Alexandre Julliard87a2f8d2000-04-09 18:20:25 +00001197AC_OUTPUT_COMMANDS([
1198extra_subdirs="\
1199dlls/ddraw/d3ddevice \
1200dlls/ddraw/dclipper \
1201dlls/ddraw/ddraw \
1202dlls/ddraw/direct3d \
1203dlls/ddraw/dpalette \
1204dlls/ddraw/dsurface \
Lionel Ulmer6301e942000-11-05 20:25:02 +00001205dlls/dinput/joystick \
1206dlls/dinput/keyboard \
1207dlls/dinput/mouse \
Alexandre Julliardd1d09052000-07-30 13:39:52 +00001208dlls/kernel/messages \
Dmitry Timoshkov3b725f62001-06-29 19:20:18 +00001209dlls/user/dde \
Alexandre Julliard2affae52000-10-23 21:32:05 +00001210dlls/user/resources \
Ian Pilcher55d2e572001-05-29 22:06:10 +00001211dlls/wineps/data \
Alexandre Julliard87a2f8d2000-04-09 18:20:25 +00001212"
1213for i in $extra_subdirs; do [ -d $i ] || (echo "creating $i" && mkdir $i); done ])
1214
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001215MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001216AC_SUBST_FILE(MAKE_RULES)
1217
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001218MAKE_DLL_RULES=dlls/Makedll.rules
1219AC_SUBST_FILE(MAKE_DLL_RULES)
1220
Alexandre Julliard626f4252000-11-10 23:35:20 +00001221MAKE_PROG_RULES=programs/Makeprog.rules
1222AC_SUBST_FILE(MAKE_PROG_RULES)
1223
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001224AC_OUTPUT([
1225Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001226dlls/Makedll.rules
1227programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001228Makefile
Joseph Pranevich791cd6a1998-12-02 19:58:08 +00001229console/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001230controls/Makefile
1231debugger/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001232dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001233dlls/advapi32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001234dlls/avicap32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001235dlls/avifil32/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001236dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001237dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001238dlls/crtdll/Makefile
Travis Michielsen0f21ee82002-01-10 19:41:11 +00001239dlls/crypt32/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001240dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001241dlls/ddraw/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001242dlls/devenum/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001243dlls/dinput/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001244dlls/dplay/Makefile
Peter Hunnisett22b861c1999-09-28 16:35:32 +00001245dlls/dplayx/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001246dlls/dsound/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001247dlls/gdi/Makefile
Marcus Meissnerb63ab442001-06-08 19:02:57 +00001248dlls/glu32/Makefile
Francois Gougetedf3e431999-11-07 21:22:17 +00001249dlls/icmp/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001250dlls/imagehlp/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001251dlls/imm32/Makefile
Dimitrie O. Paun36b5b6b2000-06-03 00:07:44 +00001252dlls/kernel/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001253dlls/lzexpand/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001254dlls/mapi32/Makefile
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001255dlls/mpr/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001256dlls/msacm/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001257dlls/msdmo/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001258dlls/msimg32/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001259dlls/msnet32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001260dlls/msrle32/Makefile
Jon Griffiths1db20bf2001-01-10 23:59:25 +00001261dlls/msvcrt/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001262dlls/msvideo/Makefile
Mike McCormack2e40b962001-11-06 17:52:36 +00001263dlls/netapi32/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001264dlls/ntdll/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001265dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001266dlls/ole32/Makefile
1267dlls/oleaut32/Makefile
1268dlls/olecli/Makefile
1269dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001270dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001271dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001272dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001273dlls/psapi/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001274dlls/qcap/Makefile
Hidenori Takeshimab7d4b4e2001-07-02 18:57:22 +00001275dlls/quartz/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001276dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001277dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001278dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001279dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001280dlls/setupapi/Makefile
John R. Sheetsbc80a3b2001-01-11 22:32:44 +00001281dlls/shdocvw/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001282dlls/shell32/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001283dlls/shfolder/Makefile
1284dlls/shlwapi/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001285dlls/sti/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001286dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001287dlls/ttydrv/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001288dlls/url/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001289dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001290dlls/user/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001291dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001292dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001293dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001294dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001295dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001296dlls/wininet/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001297dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001298dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001299dlls/winmm/mcianim/Makefile
1300dlls/winmm/mciavi/Makefile
1301dlls/winmm/mcicda/Makefile
1302dlls/winmm/mciseq/Makefile
1303dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001304dlls/winmm/midimap/Makefile
1305dlls/winmm/wavemap/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001306dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001307dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001308dlls/winsock/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001309dlls/winspool/Makefile
Rein Klazes2a4c68b2001-04-16 19:36:12 +00001310dlls/wintrust/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001311dlls/wow32/Makefile
1312dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001313dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001314documentation/Makefile
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +00001315documentation/wine.conf.man
Marcus Meissner5a70c971999-06-05 09:00:21 +00001316documentation/wine.man
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +00001317files/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001318graphics/Makefile
Huw D M Davies3a24f3f1999-05-02 10:15:16 +00001319graphics/enhmetafiledrv/Makefile
Alexandre Julliardbf9130a1996-10-13 17:45:47 +00001320graphics/metafiledrv/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001321graphics/win16drv/Makefile
1322graphics/x11drv/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001323if1632/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001324include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001325library/Makefile
1326libtest/Makefile
1327loader/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001328loader/ne/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001329memory/Makefile
1330misc/Makefile
1331miscemu/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001332msdos/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001333objects/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001334ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001335programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001336programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001337programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001338programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001339programs/control/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001340programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001341programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001342programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001343programs/regapi/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001344programs/regtest/Makefile
1345programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001346programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001347programs/wcmd/Makefile
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001348programs/wineconsole/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001349programs/winemine/Makefile
Alexandre Julliardfc684342001-03-21 21:41:27 +00001350programs/winetest/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001351programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001352programs/winver/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001353relay32/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001354scheduler/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001355server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001356tools/Makefile
Patrik Stridvall647ac512001-07-30 20:21:34 +00001357tools/winapi/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001358tools/winebuild/Makefile
Eric Pouechd786a122001-09-07 16:04:38 +00001359tools/winedump/Makefile
Jeremy Whitef9f030b2000-11-05 20:06:56 +00001360tools/winelauncher
Bertho Stultiens30855912000-06-13 04:34:41 +00001361tools/wmc/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001362tools/wrc/Makefile
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001363tsx11/Makefile
Alexandre Julliardfb270dd2000-06-09 05:27:21 +00001364unicode/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001365win32/Makefile
Patrik Stridvallea584721998-11-01 16:22:07 +00001366windows/Makefile
1367windows/x11drv/Makefile ])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001368
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001369if test "$have_x" = "no"
1370then
1371 echo
1372 echo "*** Warning: X development files not found. Wine will be built without"
1373 echo "*** X support, which currently does not work, and would probably not be"
1374 echo "*** what you want anyway. You will need to install devel packages of"
Alexandre Julliard18e4b5e2002-01-04 18:52:40 +00001375 echo "*** Xlib/Xfree86 at the very least."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001376fi
1377
Alexandre Julliard638f1691999-01-17 16:32:32 +00001378if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1379then
1380 echo
1381 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1382 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001383fi
1384
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001385if test "$wine_cv_libc_reentrant" = "no"
1386then
1387 echo
1388 echo "*** Warning: non-reentrant libc detected. Wine will be build without"
1389 echo "*** thread support. Consider upgrading libc to a more recent"
1390 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001391fi
1392
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001393if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001394then
1395 echo
1396 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001397 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1398fi
1399
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001400if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "normal"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001401then
1402 echo
1403 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001404 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
Andreas Mohr18a9d742001-01-17 21:52:42 +00001405 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 +00001406 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001407fi
1408
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001409if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001410then
1411 echo
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +00001412 echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001413 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1414 echo "*** support before reporting bugs."
1415fi
1416
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001417if test "$wine_cv_warn_cups_h" = "yes"
1418then
1419 echo
1420 echo "*** Note: You have cups runtime libraries, but no development"
1421 echo "*** libraries. Install the cups-devel package or whichever package"
1422 echo "*** contains cups.h to enable CUPS support in WINE."
1423fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001424
Ian Pilcher563598d2001-05-16 20:56:05 +00001425if test "$wine_cv_msg_freetype" = "yes"
1426then
1427 echo
1428 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
1429 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1430 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1431 echo "*** enable Wine to use TrueType fonts."
1432fi
1433
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001434echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001435echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001436echo
1437
1438dnl Local Variables:
1439dnl comment-start: "dnl "
1440dnl comment-end: ""
1441dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001442dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001443dnl End: