blob: 3c247be8db0a12d096c5e7321052de58578481d4 [file] [log] [blame]
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001dnl Process this file with autoconf to produce a configure script.
Alexandre Julliardf5818d22002-02-14 19:47:29 +00002dnl Original author: Michael Patra
3dnl See ChangeLog file for detailed change history.
4
5m4_define(WINE_VERSION,regexp(m4_include(VERSION),[version \([-.0-9A-Za-z]+\)],[\1]))
6
7AC_PREREQ(2.50)
8AC_INIT([Wine],WINE_VERSION)
9AC_CONFIG_SRCDIR(server/atom.c)
10AC_CONFIG_HEADERS(include/config.h)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000011AC_CONFIG_AUX_DIR(tools)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000012
Alexandre Julliardff8331e1995-09-18 11:19:54 +000013dnl **** Command-line arguments ****
14
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000015dnl Default values
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000016LIBEXT=so # library type .so or .a
Alexandre Julliard7e56f681996-01-31 19:02:28 +000017
Alexandre Julliardf5818d22002-02-14 19:47:29 +000018AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile out all debugging messages]))
19AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE messages]))
20AC_ARG_ENABLE(opengl,AC_HELP_STRING([--enable-opengl],[force usage of OpenGL even if the latter is thread-safe via pthread]))
21AC_ARG_WITH(curses, AC_HELP_STRING([--without-curses],[do not use curses]))
22AC_ARG_WITH(reentrant-x,AC_HELP_STRING([--without-reentrant-x],[compile for use with non-reentrant X libraries]))
Alexandre Julliarda11d7b11998-03-01 20:05:02 +000023
Alexandre Julliard18f92e71996-07-17 20:02:21 +000024AC_SUBST(OPTIONS)
Alexandre Julliardf5818d22002-02-14 19:47:29 +000025if test "x$enable_debug" = "xno"
Alexandre Julliardf90efa91998-06-14 15:24:15 +000026then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000027 AC_DEFINE(NO_DEBUG_MSGS,1,[Define to disable all debug messages.])
Alexandre Julliarded2f19a2001-06-27 21:42:00 +000028fi
Alexandre Julliardf5818d22002-02-14 19:47:29 +000029if test "x$enable_trace" = "xno" -o "x$enable_debug" = "xno"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +000030then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000031 AC_DEFINE(NO_TRACE_MSGS,1,[Define to disable trace messages.])
Alexandre Julliardf90efa91998-06-14 15:24:15 +000032fi
33
Alexandre Julliard02e90081998-01-04 17:49:09 +000034dnl **** Check for some programs ****
Alexandre Julliardff8331e1995-09-18 11:19:54 +000035
Alexandre Julliardf5818d22002-02-14 19:47:29 +000036AC_CANONICAL_TARGET
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000037AC_PROG_MAKE_SET
38AC_PROG_CC
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000039AC_PROG_CPP
Alexandre Julliardff8331e1995-09-18 11:19:54 +000040AC_PATH_XTRA
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000041AC_PROG_YACC
42AC_PROG_LEX
Marcus Meissner5c5a6212002-01-22 18:28:25 +000043
44dnl **** Just additional warning checks, since AC_PROG just sets 'yacc' even
45dnl **** without one present.
46AC_CHECK_PROGS(XYACC,$YACC bison yacc,none)
47if test "$XYACC" = "none"
48then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000049 AC_MSG_ERROR([no suitable bison/yacc found. Please install the 'bison' package.])
Marcus Meissner5c5a6212002-01-22 18:28:25 +000050fi
Marcus Meissnerb53bb412000-07-23 13:41:51 +000051AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
52if test "$XLEX" = "none"
53then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000054 AC_MSG_ERROR([no suitable lex found. Please install the 'flex' package.])
Marcus Meissnerb53bb412000-07-23 13:41:51 +000055fi
Alexandre Julliardff8331e1995-09-18 11:19:54 +000056AC_PROG_RANLIB
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000057AC_PROG_INSTALL
Alexandre Julliard641ee761997-08-04 16:34:36 +000058AC_PROG_LN_S
Mike McCormacke0df32f2000-08-11 21:15:21 +000059AC_CHECK_PROG(C2MAN,c2man,c2man,\$(TOPSRCDIR)/tools/c2man.pl)
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000060AC_PATH_PROG(LDCONFIG, ldconfig, true, /sbin:/usr/sbin:$PATH)
Alexandre Julliard02e90081998-01-04 17:49:09 +000061
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000062dnl Check for lint
63AC_CHECK_PROGS(LINT, lclint lint)
64if test "$LINT" = "lint"
65then
66 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
67 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
68fi
69AC_SUBST(LINT)
70AC_SUBST(LINTFLAGS)
71
Alexandre Julliardf5818d22002-02-14 19:47:29 +000072case $host_os in
73 *cygwin*) LDCOMBINE="ld -r --enable-stdcall-fixup" ;;
74 *) LDCOMBINE="ld -r" ;;
75esac
Dimitrie O. Paun79e44ab2000-12-05 04:13:36 +000076AC_SUBST(LDCOMBINE)
77
Alexandre Julliard02e90081998-01-04 17:49:09 +000078dnl **** Check for some libraries ****
79
Marcus Meissnerb63ab442001-06-08 19:02:57 +000080dnl Check for -lm
Howard Abrams13277481999-07-10 13:16:29 +000081AC_CHECK_LIB(m,sqrt)
Alexandre Julliardd37eb361997-07-20 16:23:21 +000082dnl Check for -li386 for NetBSD and OpenBSD
Alexandre Julliard02e90081998-01-04 17:49:09 +000083AC_CHECK_LIB(i386,i386_set_ldt)
Todd Vierlingecc76691998-12-15 17:49:02 +000084dnl Check for -lossaudio for NetBSD
85AC_CHECK_LIB(ossaudio,_oss_ioctl)
Alexandre Julliard02e90081998-01-04 17:49:09 +000086dnl Check for -lw for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +000087AC_CHECK_FUNCS(iswalnum,,AC_CHECK_LIB(w,iswalnum))
Patrik Stridvallea584721998-11-01 16:22:07 +000088dnl Check for -lnsl for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +000089AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
Ulrich Weigand715a55e1999-04-18 13:19:56 +000090dnl Check for -lsocket for Solaris
Marcus Meissnerf070fda1999-04-24 12:02:14 +000091AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000092dnl Check for -lxpg4 for FreeBSD
Satsuki Fujishima66fb6072001-03-19 19:19:59 +000093AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
Alexandre Julliard0e7bd081999-05-02 11:46:02 +000094dnl Check for -lmmap for OS/2
95AC_CHECK_LIB(mmap,mmap)
Alexandre Julliard3f510ad2002-01-01 01:13:03 +000096
Marcus Meissner2d7be871999-12-05 23:06:40 +000097dnl Check for openpty
Alexandre Julliard3f510ad2002-01-01 01:13:03 +000098UTILLIBS=""
99AC_SUBST(UTILLIBS)
Marcus Meissner2d7be871999-12-05 23:06:40 +0000100AC_CHECK_FUNCS(openpty,,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000101 [AC_CHECK_LIB(util,openpty,
102 [AC_DEFINE(HAVE_OPENPTY)
Alexandre Julliard3f510ad2002-01-01 01:13:03 +0000103 UTILLIBS="-lutil"]
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000104 )])
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000105
Alexandre Julliard562089b2001-12-31 22:28:35 +0000106DLLIBS=""
107AC_SUBST(DLLIBS)
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000108AC_CHECK_HEADERS(dlfcn.h,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000109 [AC_CHECK_FUNCS(dlopen,,
110 [AC_CHECK_LIB(dl,dlopen,
111 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
Alexandre Julliard562089b2001-12-31 22:28:35 +0000112 DLLIBS="-ldl"],
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000113 LIBEXT="a")]
114 )],
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000115 LIBEXT="a"
116 )
117
Marcus Meissner252b0fe2001-08-06 18:52:14 +0000118JPEGLIB=""
119AC_SUBST(JPEGLIB)
120AC_CHECK_HEADERS(jpeglib.h,
121 AC_CHECK_LIB(jpeg,jpeg_start_decompress,
122 AC_DEFINE(HAVE_LIBJPEG,1,[Define if you have libjpeg including devel headers])
123 JPEGLIB="-ljpeg"
124 )
125)
126
127
Patrik Stridvallea584721998-11-01 16:22:07 +0000128AC_SUBST(XLIB)
Patrik Stridvall2941a212000-04-25 20:34:22 +0000129AC_SUBST(XFILES)
130XFILES=""
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000131AC_SUBST(OPENGLFILES)
132OPENGLFILES=""
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000133AC_SUBST(GLU32FILES)
Alexandre Julliardf33f7f02001-09-17 20:09:08 +0000134GLU32FILES=""
Patrik Stridvallea584721998-11-01 16:22:07 +0000135if test "$have_x" = "yes"
136then
Patrik Stridvall24110281999-02-04 10:09:54 +0000137 XLIB="-lXext -lX11"
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000138 ac_save_CPPFLAGS="$CPPFLAGS"
139 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Patrik Stridvall24110281999-02-04 10:09:54 +0000140
Huw D M Daviesff453fc2001-09-14 01:04:25 +0000141 dnl *** All of the following tests require X11/Xlib.h
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000142 AC_CHECK_HEADERS(X11/Xlib.h,
143 [
Ove Kaavenc90fb252001-01-02 22:39:14 +0000144 dnl *** Check for X keyboard extension
145 AC_CHECK_HEADERS(X11/XKBlib.h,
146 [ dnl *** If X11/XKBlib.h exists...
147 AC_CHECK_LIB(X11, XkbQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000148 AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
Ove Kaavenc90fb252001-01-02 22:39:14 +0000149 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
150 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000151 AC_MSG_WARN([[Xkb extension not found, Wine will be built without it]])
Ove Kaavenc90fb252001-01-02 22:39:14 +0000152 )
153
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000154 dnl *** Check for X Shm extension
155 AC_CHECK_HEADERS(X11/extensions/XShm.h,
156 [ dnl *** If X11/extensions/XShm.h exists...
157 AC_CHECK_LIB(Xext, XShmQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000158 AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000159 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
160 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000161 AC_MSG_WARN([[XShm extension not found, Wine will be built without it]])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000162 )
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000163
Francois Jacques5b6879c2000-07-28 23:04:54 +0000164 dnl *** Check for X shape extension
Ove Kaavenc90fb252001-01-02 22:39:14 +0000165 AC_CHECK_HEADERS(X11/extensions/shape.h,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000166 [ dnl *** If X11/extensions/shape.h exists...
167 AC_CHECK_LIB(Xext,XShapeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000168 AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000169 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
170 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000171 AC_MSG_WARN([[XShape extension not found, Wine will be built without it]])
Francois Jacques5b6879c2000-07-28 23:04:54 +0000172 )
173
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000174 dnl *** Check for XFree86 DGA / DGA 2.0 extension
175 AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
176 [ dnl *** If X11/extensions/xf86dga.h exists, check
177 dnl *** for XDGAQueryExtension()...
178 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
179 [ dnl *** If found...
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000180 AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
181 [Define if you have the Xxf86dga library version 2])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000182 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000183 ],
184 [ dnl *** If not found, look for XF86DGAQueryExtension()
185 dnl *** instead (DGA 2.0 not found)...
186 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000187 [ AC_DEFINE(HAVE_LIBXXF86DGA, 1,
188 [Define if you have the Xxf86dga library version 1])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000189 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000190 ],,
191 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
192 )
193 ],
194 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
195 )
196 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000197 AC_MSG_WARN([[DGA extension not found, Wine will be built without it]])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000198 )
Patrik Stridvall24110281999-02-04 10:09:54 +0000199
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000200 dnl *** Check for XFree86 VMODE extension
201 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
202 [ dnl *** If X11/extensions/xf86vmode.h exists...
203 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000204 [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000205 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
206 ],,
207 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
208 )
209 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000210 AC_MSG_WARN([[XFree86 VMODE extension not found, Wine will be built without it]])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000211 )
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000212
213 dnl *** Check for XVideo extension supporting XvImages
214 AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
215 [ dnl *** If X11/extensions/Xvlib.h exists...
216 AC_CHECK_LIB(Xv, XvShmCreateImage,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000217 [ AC_DEFINE(HAVE_XVIDEO, 1, [Define if the X libraries support XVideo])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000218 X_PRE_LIBS="$X_PRE_LIBS -lXv"
219 ],,
220 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
221 )
222 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000223 AC_MSG_WARN([[XVideo extension not found, Wine will be built without it]])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000224 )
225
Huw D M Daviesff453fc2001-09-14 01:04:25 +0000226 dnl *** Check for XRender extension
227 AC_CHECK_HEADERS(X11/extensions/Xrender.h,
228 [ dnl *** If X11/extensions/Xrender.h exists...
229 AC_CHECK_LIB(Xrender, XRenderQueryExtension,
230 [ AC_DEFINE(HAVE_LIBXRENDER, 1, [Define if you have the XRender extension library])
231 X_PRE_LIBS="$X_PRE_LIBS -lXrender"
232 ],,
233 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
234 )
235 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000236 AC_MSG_WARN([[XRender extension not found, Wine will be built without it]])
Huw D M Daviesff453fc2001-09-14 01:04:25 +0000237 )
238
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000239 ]
240 ) dnl *** End of X11/Xlib.h check
Lionel Ulmer5c085701999-02-28 19:48:53 +0000241
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000242 dnl Check for the presence of OpenGL
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000243 if test "x$enable_opengl" != "xno"
Patrik Stridvall24110281999-02-04 10:09:54 +0000244 then
Francois Gouget42dcd972002-01-29 17:52:28 +0000245 if test -f /usr/X11R6/lib/libGL.a -a ! -f /usr/X11R6/lib/libGL.so
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000246 then
247 AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
248This prevents linking to OpenGL. Delete the file and restart configure.])
249 fi
250
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000251 AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h)
Marcus Meissner22a969b2000-08-08 20:46:50 +0000252 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000253 then
254 dnl Check for some problems due to old Mesa versions
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000255 AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000256 AC_TRY_COMPILE(
Lionel Ulmer48c08162000-01-05 01:51:02 +0000257 [#include <GL/gl.h>],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000258 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000259 [wine_cv_opengl_version_OK="yes"],
260 [wine_cv_opengl_version_OK="no"]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000261 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000262 )
263
264 dnl Check for the thread-safety of the OpenGL library
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000265 AC_CACHE_CHECK([for thread-safe OpenGL version],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000266 wine_cv_opengl_version_threadsafe,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000267 [saved_libs=$LIBS
268 LIBS="$X_LIBS -lGL"
269 AC_TRY_LINK([],[pthread_getspecific();],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000270 [wine_cv_opengl_version_threadsafe="yes"],
271 [wine_cv_opengl_version_threadsafe="no"])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000272 LIBS=$saved_libs]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000273 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000274
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000275 if test "$wine_cv_opengl_version_OK" = "yes" -a \( "$wine_cv_opengl_version_threadsafe" = "no" -o "x$enable_opengl" = "xyes" \)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000276 then
Andreas Mohr4eefb962000-08-01 00:27:35 +0000277 dnl Check for the presence of the library
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000278 AC_CHECK_LIB(GL,glXCreateContext,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000279 X_PRE_LIBS="$X_PRE_LIBS -lGL"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000280 ,,
281 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
282
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000283 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000284 then
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000285 OPENGLFILES='$(OPENGLFILES)'
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000286 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000287
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000288 AC_CHECK_LIB(GL,glXGetProcAddressARB,
289 AC_DEFINE(HAVE_GLX_GETPROCADDRESS, 1,
290 [Define if the OpenGL library supports the glXGetProcAddressARB call]),,
291 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000292
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000293 if test "$ac_cv_lib_GL_glXGetProcAddressARB" = "yes"
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000294 then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000295 AC_CACHE_CHECK([for OpenGL extension functions prototypes], wine_cv_extension_prototypes,
296 [AC_TRY_COMPILE([#include <GL/gl.h>
Marcus Meissner6bb6d4c2000-08-09 22:21:08 +0000297 #ifdef HAVE_GL_GLEXT_H
298 # include <GL/glext.h>
299 #endif
300 ],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000301 [PFNGLCOLORTABLEEXTPROC test_proc;],
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000302 [wine_cv_extension_prototypes="yes"],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000303 [wine_cv_extension_prototypes="no"]
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000304 )]
Lionel Ulmer1434d872000-07-23 14:23:31 +0000305 )
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000306 if test "$wine_cv_extension_prototypes" = "yes"
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000307 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000308 AC_DEFINE(HAVE_GLEXT_PROTOTYPES, 1,
309 [Define if the OpenGL headers define extension typedefs])
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000310 fi
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000311 fi
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000312
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000313 fi
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000314 dnl Check for GLU32 library.
Marcus Meissner6e9ab402001-08-08 23:21:16 +0000315 AC_CHECK_LIB(GLU,gluLookAt,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000316 [X_PRE_LIBS="$X_PRE_LIBS -lGLU"
317 GLU32FILES='$(GLU32FILES)']
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000318 ,,
319 $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
320 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000321 fi
322 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000323 fi
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000324
325 CPPFLAGS="$ac_save_CPPFLAGS"
Patrik Stridvall2941a212000-04-25 20:34:22 +0000326 XFILES='$(XFILES)'
Patrik Stridvallea584721998-11-01 16:22:07 +0000327else
328 XLIB=""
329 X_CFLAGS=""
330 X_LIBS=""
331fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000332
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000333dnl **** Check which curses lib to use ***
Alexandre Julliard48957682001-12-26 23:08:31 +0000334CURSESLIBS=""
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000335if test "x$with_curses" != "xno"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000336then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000337 AC_CHECK_HEADERS(ncurses.h,
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000338 [AC_CHECK_LIB(ncurses,waddch,
Alexandre Julliard48957682001-12-26 23:08:31 +0000339 [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
340 CURSESLIBS="-lncurses"],
341 [AC_CHECK_HEADERS(curses.h,
342 [AC_CHECK_LIB(curses,waddch,
343 [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000344 CURSESLIBS="-lcurses"])])])])
Alexandre Julliard48957682001-12-26 23:08:31 +0000345 saved_libs="$LIBS"
346 LIBS="$CURSESLIBS $LIBS"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000347 AC_CHECK_FUNCS(getbkgd resizeterm)
Alexandre Julliard48957682001-12-26 23:08:31 +0000348 LIBS="$saved_libs"
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000349fi
Alexandre Julliard48957682001-12-26 23:08:31 +0000350AC_SUBST(CURSESLIBS)
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000351
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000352CUPSLIBS=""
353dnl **** Check for CUPS ****
Marcus Meissner3ee02ba2001-04-30 18:18:50 +0000354wine_cv_warn_cups_h=no
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000355AC_CHECK_LIB(cups,cupsGetPPD,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000356 [AC_CHECK_HEADER(cups/cups.h,
357 [AC_DEFINE(HAVE_CUPS, 1, [Define if we have CUPS])
358 CUPSLIBS="-lcups"],
359 wine_cv_warn_cups_h=yes)]
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000360)
361AC_SUBST(CUPSLIBS)
362
Ian Pilcher563598d2001-05-16 20:56:05 +0000363dnl **** Check for FreeType 2 ****
Dmitry Timoshkov8871a112001-11-06 22:26:53 +0000364AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
Ian Pilcher563598d2001-05-16 20:56:05 +0000365if test "$ft_lib" = "no"
366then
367 FREETYPELIBS=""
368 FREETYPEINCL=""
369 wine_cv_msg_freetype=no
370else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000371 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
372 if test "$ft_devel" = "no"
373 then
374 AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
375 if test "$ft_devel2" = "freetype2-config"
376 then
377 ft_devel=$ft_devel2
378 fi
379 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000380 if test "$ft_devel" = "no"
381 then
382 FREETYPELIBS=""
383 FREETYPEINCL=""
384 wine_cv_msg_freetype=yes
385 else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000386 FREETYPELIBS=`$ft_devel --libs`
387 FREETYPEINCL=`$ft_devel --cflags`
Ian Pilcher40432fe2001-06-06 21:05:23 +0000388 ac_save_CPPFLAGS="$CPPFLAGS"
389 CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
390 AC_CHECK_HEADERS(freetype/freetype.h \
391 freetype/ftglyph.h \
392 freetype/tttables.h \
393 freetype/ftnames.h \
394 freetype/ftsnames.h \
Huw D M Davies814654e2001-09-12 20:21:06 +0000395 freetype/ttnameid.h \
Huw D M Davies4e2024e2001-10-23 20:06:32 +0000396 freetype/ftoutln.h \
397 freetype/internal/sfnt.h)
Alexandre Julliard18d75732002-01-29 03:02:50 +0000398 AC_TRY_CPP([#include <ft2build.h>
399 #include <freetype/fttrigon.h>],
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000400 [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
401 [Define if you have the <freetype/fttrigon.h> header file.])
402 wine_cv_fttrigon=yes],
403 wine_cv_fttrigon=no)
Ian Pilcher40432fe2001-06-06 21:05:23 +0000404 CPPFLAGS="$ac_save_CPPFLAGS"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000405 dnl Check that we have at least freetype/freetype.h
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000406 if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000407 then
408 AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
409 wine_cv_msg_freetype=no
410 else
411 FREETYPELIBS=""
412 FREETYPEINCL=""
413 wine_cv_msg_freetype=yes
414 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000415 fi
416fi
417AC_SUBST(FREETYPELIBS)
418AC_SUBST(FREETYPEINCL)
419
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000420dnl **** Check for parport (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000421AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000422 AC_TRY_COMPILE(
423 [#include <linux/ppdev.h>],
424 [ioctl (1,PPCLAIM,0)],
425 [ac_cv_c_ppdev="yes"],
426 [ac_cv_c_ppdev="no"])
427 )
428if test "$ac_cv_c_ppdev" = "yes"
429then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000430 AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000431fi
432
Pavel Roskin94d99641998-12-26 11:52:51 +0000433dnl **** Check for IPX (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000434AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
Pavel Roskin94d99641998-12-26 11:52:51 +0000435 AC_TRY_COMPILE(
436 [#include <sys/socket.h>
437 #include <netipx/ipx.h>],
438 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000439 [ac_cv_c_ipx_gnu="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000440 [ac_cv_c_ipx_gnu="no"])
441 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000442if test "$ac_cv_c_ipx_gnu" = "yes"
443then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000444 AC_DEFINE(HAVE_IPX_GNU, 1, [Define if IPX should use netipx/ipx.h from libc])
Aaron Hopec23872d2000-01-15 23:43:21 +0000445fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000446
447if test "$ac_cv_c_ipx_gnu" = "no"
448then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000449 AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
Pavel Roskin94d99641998-12-26 11:52:51 +0000450 AC_TRY_COMPILE(
451 [#include <sys/socket.h>
452 #include <asm/types.h>
453 #include <linux/ipx.h>],
454 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000455 [ac_cv_c_ipx_linux="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000456 [ac_cv_c_ipx_linux="no"])
457 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000458 if test "$ac_cv_c_ipx_linux" = "yes"
459 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000460 AC_DEFINE(HAVE_IPX_LINUX, 1, [Define if IPX includes are taken from Linux kernel])
Aaron Hopec23872d2000-01-15 23:43:21 +0000461 fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000462fi
463
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000464dnl **** Check for Open Sound System ****
Todd Vierlingecc76691998-12-15 17:49:02 +0000465AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000466
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000467AC_CACHE_CHECK([for Open Sound System],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000468 ac_cv_c_opensoundsystem,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000469 AC_TRY_COMPILE([
Todd Vierlingecc76691998-12-15 17:49:02 +0000470 #if defined(HAVE_SYS_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000471 #include <sys/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000472 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000473 #include <machine/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000474 #elif defined(HAVE_SOUNDCARD_H)
475 #include <soundcard.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000476 #endif
477 ],[
478
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000479/* check for one of the Open Sound System specific SNDCTL_ defines */
480#if !defined(SNDCTL_DSP_STEREO)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000481#error No open sound system
482#endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000483],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
484
485if test "$ac_cv_c_opensoundsystem" = "yes"
486then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000487 AC_DEFINE(HAVE_OSS, 1, [Define if you have the Open Sound system])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000488fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000489
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000490AC_CACHE_CHECK([for Open Sound System/MIDI interface],
Eric Pouech338d3b21999-05-22 18:52:21 +0000491 ac_cv_c_opensoundsystem_midi,
492 AC_TRY_COMPILE([
493 #if defined(HAVE_SYS_SOUNDCARD_H)
494 #include <sys/soundcard.h>
495 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
496 #include <machine/soundcard.h>
497 #elif defined(HAVE_SOUNDCARD_H)
498 #include <soundcard.h>
499 #endif
500 ],[
501
502/* check for one of the Open Sound System specific SNDCTL_SEQ defines */
503#if !defined(SNDCTL_SEQ_SYNC)
504#error No open sound system MIDI interface
505#endif
506],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
507
508if test "$ac_cv_c_opensoundsystem_midi" = "yes"
509then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000510 AC_DEFINE(HAVE_OSS_MIDI, 1, [Define if you have the Open Sound system (MIDI interface)])
Eric Pouech338d3b21999-05-22 18:52:21 +0000511fi
512
Chris Morgan9b0ba7c2002-03-21 01:38:19 +0000513dnl **** Check for aRts Sound Server ****
514AC_PATH_PROG(ARTSCCONFIG, artsc-config)
515AC_CACHE_CHECK([for aRts Sound server],
516 ac_cv_c_artsserver,
517 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"';
518 then
519 ac_cv_c_artsserver=no
520 else
521 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
522 ARTSC_LIBS=`$ARTSCCONFIG --libs`
523 ac_cv_c_artsserver=no
524 save_CFLAGS="$CFLAGS"
525 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
526 AC_TRY_COMPILE([
527 #include <artsc.h>
528 ],[
529 arts_stream_t stream;
530 ],[
531 ac_cv_c_artsserver=yes
532 ])
533 CFLAGS="$save_CFLAGS"
534 fi)
535
536if test "$ac_cv_c_artsserver" = "yes"
537then
538 AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
539 AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
540
541 AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])
542fi
543
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000544dnl **** Check for broken glibc mmap64 ****
545
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000546AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000547 AC_TRY_RUN([
548 #define _FILE_OFFSET_BITS 64
549 #include <stdio.h>
550 #include <unistd.h>
551 #include <fcntl.h>
552 #include <sys/mman.h>
553 #include <errno.h>
554
555 int main(int argc,char **argv) {
556 int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
557 if (fd == -1) exit(1);
558
559 unlink("conftest.map");
560
561 write(fd,"test",4);
562
563 if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
564 (errno == EINVAL)
565 ) {
566 exit(1);
567 }
568 close(fd);
569 fprintf(stderr,"success!\n");
570 exit(0);
571 }
572
573 ],
574 ac_cv_mmap64_works="yes",
575 ac_cv_mmap64_works="no",
576 ac_cv_mmap64_works="no") )
577
578if test "$ac_cv_mmap64_works" = "yes"
579then
580 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
581fi
582
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000583dnl **** Check for gcc strength-reduce bug ****
584
585if test "x${GCC}" = "xyes"
586then
587 CFLAGS="$CFLAGS -Wall"
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000588 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000589 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000590int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000591int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000592 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000593 unsigned int B = 3;
594 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000595 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000596 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
597 L[[i]] = 4;
598
599 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000600}],
601 ac_cv_c_gcc_strength_bug="no",
602 ac_cv_c_gcc_strength_bug="yes",
603 ac_cv_c_gcc_strength_bug="yes") )
604 if test "$ac_cv_c_gcc_strength_bug" = "yes"
605 then
606 CFLAGS="$CFLAGS -fno-strength-reduce"
607 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000608
609 dnl Check for -mpreferred-stack-boundary
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000610 AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support],
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000611 ac_cv_c_gcc_stack_boundary,
612 [saved_cflags=$CFLAGS
613 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
614 AC_TRY_COMPILE(,[return 0],ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")
615 CFLAGS=$saved_cflags
616 ])
617 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
618 then
619 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
620 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000621fi
622
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000623dnl **** Check if we need to place .type inside a .def directive ****
624
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000625AC_CACHE_CHECK([whether .type must sit inside a .def directive],
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000626 ac_cv_c_type_in_def,
627[saved_libs=$LIBS
628LIBS="conftest_asm.s $LIBS"
629cat > conftest_asm.s <<EOF
630 .globl _ac_test
631 .def _ac_test; .scl 2; .type 32; .endef
632_ac_test:
633 .long 0
634EOF
635AC_TRY_LINK(,,ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no")
636LIBS=$saved_libs])
637if test "$ac_cv_c_type_in_def" = "yes"
638then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000639 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 +0000640fi
641
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000642dnl **** Check for underscore on external symbols ****
643
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000644AC_CACHE_CHECK([whether external symbols need an underscore prefix],
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000645 ac_cv_c_extern_prefix,
646[saved_libs=$LIBS
647LIBS="conftest_asm.s $LIBS"
648cat > conftest_asm.s <<EOF
649 .globl _ac_test
650_ac_test:
651 .long 0
652EOF
653AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
654 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
655LIBS=$saved_libs])
656if test "$ac_cv_c_extern_prefix" = "yes"
657then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000658 AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1,
659 [Define if symbols declared in assembly code need an underscore prefix])
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000660fi
661
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000662dnl **** Check whether stdcall symbols need to be decorated ****
663
664AC_CACHE_CHECK([whether stdcall symbols need to be decorated],
665 ac_cv_c_stdcall_decoration,
666[saved_libs=$LIBS
667LIBS="conftest_asm.s $LIBS"
668if test "$ac_cv_c_extern_prefix" = "yes"
669then
670cat > conftest_asm.s <<EOF
671 .globl _ac_test@0
672_ac_test@0:
673EOF
674else
675cat > conftest_asm.s <<EOF
676 .globl ac_test@0
677ac_test@0:
678EOF
679fi
680AC_TRY_LINK([extern void __attribute__((__stdcall__)) ac_test(void);],
681 [ac_test(); return 0],
682 ac_cv_c_stdcall_decoration="yes",ac_cv_c_stdcall_decoration="no")
683LIBS=$saved_libs])
684if test "$ac_cv_c_stdcall_decoration" = "yes"
685then
686 AC_DEFINE(NEED_STDCALL_DECORATION, 1,
687 [Define if stdcall symbols need to be decorated])
688fi
689
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000690dnl **** Check for .string in assembler ****
691
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000692AC_CACHE_CHECK([whether assembler accepts .string],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000693 ac_cv_c_asm_string,
694[saved_libs=$LIBS
695LIBS="conftest_asm.s $LIBS"
696cat > conftest_asm.s <<EOF
697 .string "test"
698EOF
699AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
700LIBS=$saved_libs])
701if test "$ac_cv_c_asm_string" = "yes"
702then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000703 AC_DEFINE(HAVE_ASM_STRING, 1, [Define to use .string instead of .ascii])
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000704fi
705
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000706dnl **** Check for working dll ****
707
Todd Vierling4b992b01998-12-15 15:26:27 +0000708LDSHARED=""
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000709LDDLLFLAGS=""
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000710if test "$LIBEXT" = "so"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000711then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000712 AC_CACHE_CHECK([whether we can build a GNU style ELF dll],
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000713 ac_cv_c_dll_gnuelf,
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000714 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000715 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000716 AC_TRY_LINK(,[return 1],ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000717 CFLAGS=$saved_cflags
718 ])
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000719 if test "$ac_cv_c_dll_gnuelf" = "yes"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000720 then
Jeremy Whitec7b4ed72001-07-14 00:49:50 +0000721 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000722 LDDLLFLAGS="-Wl,-Bsymbolic"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000723 else
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000724 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
Ron Recorde977d6c1999-09-05 12:32:05 +0000725 ac_cv_c_dll_unixware,
Todd Vierling4b992b01998-12-15 15:26:27 +0000726 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000727 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
Ron Recorde977d6c1999-09-05 12:32:05 +0000728 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
Todd Vierling4b992b01998-12-15 15:26:27 +0000729 CFLAGS=$saved_cflags
730 ])
Ron Recorde977d6c1999-09-05 12:32:05 +0000731 if test "$ac_cv_c_dll_unixware" = "yes"
Todd Vierling4b992b01998-12-15 15:26:27 +0000732 then
Jeremy Whitec7b4ed72001-07-14 00:49:50 +0000733 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000734 LDDLLFLAGS="-Wl,-B,symbolic"
Todd Vierling4b992b01998-12-15 15:26:27 +0000735 fi
736 fi
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000737 if test "$ac_cv_c_dll_gnuelf" = "no" -a "$ac_cv_c_dll_unixware" = "no"
Todd Vierling4b992b01998-12-15 15:26:27 +0000738 then
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000739 LIBEXT="a"
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000740 AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000741 if test "$DLLWRAP" = "dllwrap"; then
742 dnl FIXME - check whether dllwrap works correctly...
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000743 case $host_os in
744 *cygwin*)
745 LIBEXT="dll"
746 ;;
747 esac
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000748 fi
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000749 fi
750fi
Alexandre Julliard0adad952000-01-26 01:45:58 +0000751
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000752if test "$LIBEXT" = "a"; then
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000753 AC_MSG_ERROR(
754[could not find a way to build shared libraries.
755It is currently not possible to build Wine without shared library
756(.so) support to allow transparent switch between .so and .dll files.
757If you are using Linux, you will need a newer binutils.]
758)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000759fi
760
Alexandre Julliard0adad952000-01-26 01:45:58 +0000761DLLFLAGS=""
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000762LDPATH=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000763
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000764if test "$LIBEXT" = "so"; then
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000765 DLLFLAGS="-fPIC"
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000766 DLLEXT=".so"
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000767 LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
768elif test "$LIBEXT" = "dll"; then
769 #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000770 DLLEXT=""
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000771 LDPATH="PATH=\"\$(TOPOBJDIR)/unicode:\$\$PATH\""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000772fi
773
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000774AC_SUBST(DLLFLAGS)
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000775AC_SUBST(DLLEXT)
Todd Vierling4b992b01998-12-15 15:26:27 +0000776AC_SUBST(LDSHARED)
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000777AC_SUBST(LDDLLFLAGS)
Alexandre Julliard0adad952000-01-26 01:45:58 +0000778AC_SUBST(LIBEXT)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000779AC_SUBST(LDPATH)
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000780
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000781dnl **** Check for reentrant libc ****
782dnl
783dnl For cross-compiling we blindly assume that libc is reentrant. This is
784dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
785
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000786AC_DEFUN([WINE_CHECK_ERRNO],
Alexandre Julliard598412e2001-01-17 20:22:22 +0000787[
788 AC_CACHE_CHECK(for reentrant libc: $1, wine_cv_libc_r_$1,
789 [AC_TRY_RUN([int myerrno = 0;
790char buf[256];
791int *$1(){return &myerrno;}
792main(){connect(0,buf,255); exit(!myerrno);}],
793 wine_cv_libc_r_$1=yes, wine_cv_libc_r_$1=no,
794 wine_cv_libc_r_$1=yes )
795])
796if test "$wine_cv_libc_r_$1" = "yes"
797then
798 wine_cv_libc_reentrant=$1
799fi
800])
801
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000802wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000803dnl Linux style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000804WINE_CHECK_ERRNO(__errno_location)
Marcus Meissnerc2606381999-04-11 15:20:29 +0000805dnl FreeBSD style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000806WINE_CHECK_ERRNO(__error)
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000807dnl Solaris style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000808WINE_CHECK_ERRNO(___errno)
Ron Recorde977d6c1999-09-05 12:32:05 +0000809dnl UnixWare style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000810WINE_CHECK_ERRNO(__thr_errno)
Bang Jun-Young33dff342001-05-07 18:21:10 +0000811dnl NetBSD style errno location
812WINE_CHECK_ERRNO(__errno)
Alexandre Julliard598412e2001-01-17 20:22:22 +0000813
814if test "$wine_cv_libc_reentrant" != "no"
Ron Recorde977d6c1999-09-05 12:32:05 +0000815then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000816 AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant,
817 [Define to the name of the function returning errno for reentrant libc])
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000818fi
819
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000820dnl **** Check for reentrant X libraries ****
821dnl
822dnl This may fail to determine whether X libraries are reentrant if
823dnl AC_PATH_XTRA does not set x_libraries. In this case manual configuration
824dnl is possible with the --without-reentrant-x option.
825
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000826if test "$have_x" = "yes" -a "$wine_cv_libc_reentrant" != "no"
Patrik Stridvall24110281999-02-04 10:09:54 +0000827then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000828AC_CACHE_CHECK( [for reentrant X libraries], wine_cv_x_reentrant,
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000829 [ if test "x$with_reentrant_x" = "xno"
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000830 then
831 wine_cv_x_reentrant=no
832 else
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000833 libX11_check=none
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000834 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
Alexandre Julliard829fe321998-07-26 14:27:39 +0000835 if test -r $dir/libX11.so; then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000836 libX11_check="-D $dir/libX11.so"
837 break 1
838 fi
Alexandre Julliard829fe321998-07-26 14:27:39 +0000839 if test -r $dir/libX11.a; then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000840 libX11_check="$dir/libX11.a"
841 break 1
842 fi
843 done
844 if test "$libX11_check" != "none"; then
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000845 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
Alexandre Julliard829fe321998-07-26 14:27:39 +0000846 then
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000847 wine_cv_x_reentrant=yes
848 else
849 wine_cv_x_reentrant=no
850 fi
851 else
852 wine_cv_x_reentrant=unknown
853 fi
854 fi ] )
Patrik Stridvall24110281999-02-04 10:09:54 +0000855else
856 wine_cv_x_reentrant=no
857fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000858if test "$wine_cv_x_reentrant" = "no"
859then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000860 AC_DEFINE(NO_REENTRANT_X11, 1,
861 [Define if X libraries are not reentrant (compiled without -D_REENTRANT)])
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000862fi
863
Ulrich Weigand97591402000-12-19 03:38:53 +0000864
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000865dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000866
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000867AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000868AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000869 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000870 _lwp_create \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000871 _pclose \
872 _popen \
873 _stricmp \
874 _strnicmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000875 clone \
Andreas Mohra7ca2ba2001-01-12 23:07:11 +0000876 ecvt \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000877 finite \
878 fpclass \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000879 ftruncate64 \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000880 getnetbyaddr \
881 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000882 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000883 getprotobyname \
884 getprotobynumber \
Dimitrie O. Paun1ec253d2000-12-01 20:47:11 +0000885 getrlimit \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000886 getservbyport \
887 getsockopt \
888 inet_network \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000889 lseek64 \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000890 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000891 memmove \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000892 mmap \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000893 pclose \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000894 pread \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000895 popen \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000896 pwrite \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000897 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000898 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000899 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000900 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000901 sigaltstack \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000902 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000903 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000904 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000905 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000906 tcgetattr \
907 timegm \
908 usleep \
909 vfscanf \
910 wait4 \
911 waitpid \
912)
913
914dnl **** Check for header files ****
915
916AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000917 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000918 arpa/nameser.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000919 direct.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000920 elf.h \
921 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000922 ieeefp.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000923 io.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000924 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000925 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000926 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000927 linux/cdrom.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000928 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000929 linux/joystick.h \
Lawson Whitney533e7ee2002-02-19 18:41:56 +0000930 linux/serial.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000931 linux/ucdrom.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000932 net/if.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000933 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000934 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000935 netinet/in_systm.h \
936 netinet/ip.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000937 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000938 pty.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000939 resolv.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000940 sched.h \
941 socket.h \
Bang Jun-Youngeda758e2001-12-14 22:47:19 +0000942 stdint.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000943 strings.h \
944 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000945 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000946 sys/file.h \
947 sys/filio.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000948 sys/ipc.h \
Eric Pouech624cbd72001-08-10 22:29:21 +0000949 sys/link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000950 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000951 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000952 sys/modem.h \
953 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000954 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000955 sys/param.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000956 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +0000957 sys/reg.h \
Howard Abrams13277481999-07-10 13:16:29 +0000958 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000959 sys/shm.h \
960 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000961 sys/sockio.h \
962 sys/statfs.h \
963 sys/strtio.h \
964 sys/syscall.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000965 sys/time.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000966 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000967 sys/wait.h \
968 sys/v86.h \
969 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000970 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000971 sys/vm86.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000972 syscall.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000973 ucontext.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000974 unistd.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000975)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000976AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000977
978dnl **** Check for types ****
979
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000980AC_C_CONST
981AC_C_INLINE
982AC_TYPE_MODE_T
983AC_TYPE_OFF_T
984AC_TYPE_PID_T
985AC_TYPE_SIZE_T
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000986AC_CHECK_SIZEOF(long long,0)
987
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000988AC_CACHE_CHECK([whether linux/input.h is for real],
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000989 wine_cv_linux_input_h,
990 AC_TRY_COMPILE([
991 #include <linux/input.h>
992 ] , [
993 int foo = EVIOCGBIT(EV_ABS,42);
994 int bar = BTN_PINKIE;
995 int fortytwo = 42;
996 ],
997 wine_cv_linux_input_h=yes,
998 wine_cv_linux_input_h=no,
999 no
1000 )
1001 )
1002 if test "$wine_cv_linux_input_h" = "yes"
1003 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001004 AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H, 1,
1005 [Define if we have linux/input.h AND it contains the INPUT event API])
Marcus Meissner74f2b4b2001-01-19 21:09:07 +00001006 fi
1007
Rein Klazesff7a61f2000-09-24 19:41:57 +00001008
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001009AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
Rein Klazesff7a61f2000-09-24 19:41:57 +00001010 wine_cv_linux_gethostbyname_r_6,
1011 AC_TRY_COMPILE([
1012#include <netdb.h>
1013 ], [
1014 char *name=NULL;
1015 struct hostent he;
1016 struct hostent *result;
1017 char *buf=NULL;
1018 int bufsize=0;
1019 int res,errnr;
1020 char *addr=NULL;
1021 int addrlen=0;
1022 int addrtype=0;
1023 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1024 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1025 ],
1026 wine_cv_linux_gethostbyname_r_6=yes,
1027 wine_cv_linux_gethostbyname_r_6=no
1028 )
1029 )
1030 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1031 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001032 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1033 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
Rein Klazesff7a61f2000-09-24 19:41:57 +00001034 fi
1035
Marcus Meissner028e9a11999-08-04 15:07:56 +00001036if test "$ac_cv_header_linux_joystick_h" = "yes"
1037then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001038 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
Marcus Meissner028e9a11999-08-04 15:07:56 +00001039 wine_cv_linux_joystick_22_api,
1040 AC_TRY_COMPILE([
1041 #include <sys/ioctl.h>
1042 #include <linux/joystick.h>
1043
1044 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +00001045 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1046 #error "no 2.2 header"
1047 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +00001048 ],/*empty*/,
1049 wine_cv_linux_joystick_22_api=yes,
1050 wine_cv_linux_joystick_22_api=no,
1051 wine_cv_linux_joystick_22_api=no
1052 )
1053 )
Rein Klazes87d224a2000-04-24 17:33:49 +00001054 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +00001055 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001056 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1057 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
Marcus Meissner028e9a11999-08-04 15:07:56 +00001058 fi
1059fi
1060
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001061dnl **** statfs checks ****
1062
1063if test "$ac_cv_header_sys_vfs_h" = "yes"
1064then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001065 AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001066 wine_cv_sys_vfs_has_statfs,
1067 AC_TRY_COMPILE([
1068 #include <sys/types.h>
1069 #ifdef HAVE_SYS_PARAM_H
1070 # include <sys/param.h>
1071 #endif
1072 #include <sys/vfs.h>
1073 ],[
1074 struct statfs stfs;
1075
1076 memset(&stfs,0,sizeof(stfs));
1077 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1078 )
1079 )
1080 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1081 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001082 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1083 [Define if the struct statfs is defined by <sys/vfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001084 fi
1085fi
1086
1087if test "$ac_cv_header_sys_statfs_h" = "yes"
1088then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001089 AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001090 wine_cv_sys_statfs_has_statfs,
1091 AC_TRY_COMPILE([
1092 #include <sys/types.h>
1093 #ifdef HAVE_SYS_PARAM_H
1094 # include <sys/param.h>
1095 #endif
1096 #include <sys/statfs.h>
1097 ],[
1098 struct statfs stfs;
1099 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1100 )
1101 )
1102 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1103 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001104 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1105 [Define if the struct statfs is defined by <sys/statfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001106 fi
1107fi
1108
1109if test "$ac_cv_header_sys_mount_h" = "yes"
1110then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001111 AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001112 wine_cv_sys_mount_has_statfs,
1113 AC_TRY_COMPILE([
1114 #include <sys/types.h>
1115 #ifdef HAVE_SYS_PARAM_H
1116 # include <sys/param.h>
1117 #endif
1118 #include <sys/mount.h>
1119 ],[
1120 struct statfs stfs;
1121 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1122 )
1123 )
1124 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1125 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001126 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1127 [Define if the struct statfs is defined by <sys/mount.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001128 fi
1129fi
1130
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001131dnl *** Check for some structure members
1132
1133dnl Macro to check if a structure contains a specified member
1134dnl Usage: WINE_CHECK_STRUCT_MEMBER(struct,member,[includes,[action-if-found,[action-if-not-found]]])
1135
1136AC_DEFUN([WINE_CHECK_STRUCT_MEMBER],
1137[AC_CACHE_CHECK([for $2 in struct $1], ac_cv_c_$1_$2,
1138 AC_TRY_COMPILE([$3],[struct $1 s; s.$2 = 0],ac_cv_c_$1_$2="yes",ac_cv_c_$1_$2="no"))
1139AS_IF([ test "x$ac_cv_c_$1_$2" = "xyes"],[$4],[$5])
1140])
1141
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001142dnl **** FIXME: what about mixed cases, where we need two of them? ***
1143
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001144WINE_CHECK_STRUCT_MEMBER(statfs,f_bfree,
1145[#include <sys/types.h>
1146#ifdef HAVE_SYS_PARAM_H
1147# include <sys/param.h>
1148#endif
1149#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1150# include <sys/mount.h>
1151#else
1152# ifdef STATFS_DEFINED_BY_SYS_VFS
1153# include <sys/vfs.h>
1154# else
1155# ifdef STATFS_DEFINED_BY_SYS_STATFS
1156# include <sys/statfs.h>
1157# endif
1158# endif
1159#endif],
1160 [AC_DEFINE(STATFS_HAS_BFREE, 1, [Define if the struct statfs has the member bfree])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001161
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001162WINE_CHECK_STRUCT_MEMBER(statfs,f_bavail,
1163[#include <sys/types.h>
1164#ifdef HAVE_SYS_PARAM_H
1165# include <sys/param.h>
1166#endif
1167#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1168# include <sys/mount.h>
1169#else
1170# ifdef STATFS_DEFINED_BY_SYS_VFS
1171# include <sys/vfs.h>
1172# else
1173# ifdef STATFS_DEFINED_BY_SYS_STATFS
1174# include <sys/statfs.h>
1175# endif
1176# endif
1177#endif],
1178 [AC_DEFINE(STATFS_HAS_BAVAIL, 1, [Define if the struct statfs has the member bavail])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001179
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001180dnl Check for file descriptor passing with msg_accrights
1181WINE_CHECK_STRUCT_MEMBER(msghdr,msg_accrights,
1182[#include <sys/types.h>
1183#include <sys/socket.h>],
1184 [AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001185
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001186dnl Check for the sa_len member in struct sockaddr
1187WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len,
1188[#include <sys/types.h>
1189#include <sys/socket.h>],
1190 [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001191
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001192dnl Check for the sun_len member in struct sockaddr_un
1193WINE_CHECK_STRUCT_MEMBER(sockaddr_un,sun_len,
1194[#include <sys/types.h>
Patrik Stridvall09da9662001-07-08 22:30:50 +00001195#include <sys/socket.h>
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001196#include <sys/un.h>],
1197 [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])])
Juergen Lock2d33ab92000-02-13 16:03:29 +00001198
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001199dnl *** check for the need to define __i386__
1200
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001201case $target_cpu in
1202 *i[3456789]86* )
1203 AC_CACHE_CHECK([whether we need to define __i386__],ac_cv_cpp_def_i386,
1204 AC_EGREP_CPP(yes,[#ifndef __i386__
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001205yes
1206#endif],
1207 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001208 ;;
1209esac
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001210if test "$ac_cv_cpp_def_i386" = "yes"
1211then
1212 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001213 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001214fi
1215
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001216dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001217
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001218dnl Macro to create non-existent directories from config.status
1219dnl Usage: WINE_CONFIG_EXTRA_DIR(dirname)
1220AC_DEFUN([WINE_CONFIG_EXTRA_DIR],
1221[AC_CONFIG_COMMANDS([$1],[test -d "$1" || (AC_MSG_NOTICE([creating $1]) && mkdir "$1")])])
François Gouget14259412001-11-06 20:57:11 +00001222
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001223AH_TOP([#define __WINE_CONFIG_H])
1224
1225WINE_CONFIG_EXTRA_DIR(dlls/ddraw/d3ddevice)
1226WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dclipper)
1227WINE_CONFIG_EXTRA_DIR(dlls/ddraw/ddraw)
1228WINE_CONFIG_EXTRA_DIR(dlls/ddraw/direct3d)
1229WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dpalette)
1230WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dsurface)
1231WINE_CONFIG_EXTRA_DIR(dlls/dinput/joystick)
1232WINE_CONFIG_EXTRA_DIR(dlls/dinput/keyboard)
1233WINE_CONFIG_EXTRA_DIR(dlls/dinput/mouse)
1234WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001235WINE_CONFIG_EXTRA_DIR(dlls/kernel/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001236WINE_CONFIG_EXTRA_DIR(dlls/user/dde)
1237WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001238WINE_CONFIG_EXTRA_DIR(dlls/user/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001239WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
1240WINE_CONFIG_EXTRA_DIR(include/wine)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001241WINE_CONFIG_EXTRA_DIR(programs/regapi/tests)
1242WINE_CONFIG_EXTRA_DIR(programs/winetest/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001243
1244AC_CONFIG_COMMANDS([include/wine/version.h],
1245[AC_MSG_NOTICE([creating include/wine/version.h])
1246cat >$tmp/version.h <<CEOF
1247/* Generated automatically by configure; DO NOT EDIT! */
1248#define WINE_RELEASE_INFO "Wine version $wine_version"
1249CEOF
1250if cmp -s $tmp/version.h include/wine/version.h 2>/dev/null; then
1251 AC_MSG_NOTICE([include/wine/version.h is unchanged])
1252 rm -f $tmp/version.h
1253else
1254 rm -f include/wine/version.h
1255 mv $tmp/version.h include/wine/version.h
1256fi],
1257[wine_version=$PACKAGE_VERSION])
Alexandre Julliard87a2f8d2000-04-09 18:20:25 +00001258
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001259MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001260AC_SUBST_FILE(MAKE_RULES)
1261
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001262MAKE_DLL_RULES=dlls/Makedll.rules
1263AC_SUBST_FILE(MAKE_DLL_RULES)
1264
Alexandre Julliard626f4252000-11-10 23:35:20 +00001265MAKE_PROG_RULES=programs/Makeprog.rules
1266AC_SUBST_FILE(MAKE_PROG_RULES)
1267
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001268AC_CONFIG_FILES([
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001269Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001270dlls/Makedll.rules
1271programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001272Makefile
Joseph Pranevich791cd6a1998-12-02 19:58:08 +00001273console/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001274controls/Makefile
1275debugger/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001276dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001277dlls/advapi32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001278dlls/avicap32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001279dlls/avifil32/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001280dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001281dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001282dlls/crtdll/Makefile
Travis Michielsen0f21ee82002-01-10 19:41:11 +00001283dlls/crypt32/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001284dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001285dlls/ddraw/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001286dlls/devenum/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001287dlls/dinput/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001288dlls/dplay/Makefile
Peter Hunnisett22b861c1999-09-28 16:35:32 +00001289dlls/dplayx/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001290dlls/dsound/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001291dlls/gdi/Makefile
Marcus Meissnerb63ab442001-06-08 19:02:57 +00001292dlls/glu32/Makefile
Francois Gougetedf3e431999-11-07 21:22:17 +00001293dlls/icmp/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001294dlls/imagehlp/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001295dlls/imm32/Makefile
Dimitrie O. Paun36b5b6b2000-06-03 00:07:44 +00001296dlls/kernel/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001297dlls/lzexpand/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001298dlls/mapi32/Makefile
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001299dlls/mpr/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001300dlls/msacm/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001301dlls/msdmo/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001302dlls/msimg32/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001303dlls/msnet32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001304dlls/msrle32/Makefile
Jon Griffiths1db20bf2001-01-10 23:59:25 +00001305dlls/msvcrt/Makefile
Aric Stewartc2a5ebc2002-01-29 18:09:46 +00001306dlls/msvcrt20/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001307dlls/msvideo/Makefile
Mike McCormack2e40b962001-11-06 17:52:36 +00001308dlls/netapi32/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001309dlls/ntdll/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001310dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001311dlls/ole32/Makefile
1312dlls/oleaut32/Makefile
1313dlls/olecli/Makefile
1314dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001315dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001316dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001317dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001318dlls/psapi/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001319dlls/qcap/Makefile
Hidenori Takeshimab7d4b4e2001-07-02 18:57:22 +00001320dlls/quartz/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001321dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001322dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001323dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001324dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001325dlls/setupapi/Makefile
John R. Sheetsbc80a3b2001-01-11 22:32:44 +00001326dlls/shdocvw/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001327dlls/shell32/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001328dlls/shfolder/Makefile
1329dlls/shlwapi/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001330dlls/sti/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001331dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001332dlls/ttydrv/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001333dlls/url/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001334dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001335dlls/user/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001336dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001337dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001338dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001339dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001340dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001341dlls/wininet/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001342dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001343dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001344dlls/winmm/mcianim/Makefile
1345dlls/winmm/mciavi/Makefile
1346dlls/winmm/mcicda/Makefile
1347dlls/winmm/mciseq/Makefile
1348dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001349dlls/winmm/midimap/Makefile
1350dlls/winmm/wavemap/Makefile
Chris Morgan9b0ba7c2002-03-21 01:38:19 +00001351dlls/winmm/winearts/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001352dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001353dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001354dlls/winsock/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001355dlls/winspool/Makefile
Rein Klazes2a4c68b2001-04-16 19:36:12 +00001356dlls/wintrust/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001357dlls/wow32/Makefile
1358dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001359dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001360documentation/Makefile
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +00001361files/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001362graphics/Makefile
Huw D M Davies3a24f3f1999-05-02 10:15:16 +00001363graphics/enhmetafiledrv/Makefile
Alexandre Julliardbf9130a1996-10-13 17:45:47 +00001364graphics/metafiledrv/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001365graphics/win16drv/Makefile
1366graphics/x11drv/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001367if1632/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001368include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001369library/Makefile
1370libtest/Makefile
1371loader/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001372loader/ne/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001373memory/Makefile
1374misc/Makefile
1375miscemu/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001376msdos/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001377objects/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001378ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001379programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001380programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001381programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001382programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001383programs/control/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001384programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001385programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001386programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001387programs/regapi/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001388programs/regtest/Makefile
1389programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001390programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001391programs/wcmd/Makefile
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001392programs/wineconsole/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001393programs/winemine/Makefile
Alexandre Julliardfc684342001-03-21 21:41:27 +00001394programs/winetest/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001395programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001396programs/winver/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001397relay32/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001398scheduler/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001399server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001400tools/Makefile
Patrik Stridvall647ac512001-07-30 20:21:34 +00001401tools/winapi/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001402tools/winebuild/Makefile
Eric Pouechd786a122001-09-07 16:04:38 +00001403tools/winedump/Makefile
Bertho Stultiens30855912000-06-13 04:34:41 +00001404tools/wmc/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001405tools/wrc/Makefile
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001406tsx11/Makefile
Alexandre Julliardfb270dd2000-06-09 05:27:21 +00001407unicode/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001408win32/Makefile
Patrik Stridvallea584721998-11-01 16:22:07 +00001409windows/Makefile
1410windows/x11drv/Makefile ])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001411
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001412AC_OUTPUT
1413
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001414if test "$have_x" = "no"
1415then
1416 echo
1417 echo "*** Warning: X development files not found. Wine will be built without"
1418 echo "*** X support, which currently does not work, and would probably not be"
1419 echo "*** what you want anyway. You will need to install devel packages of"
Alexandre Julliard18e4b5e2002-01-04 18:52:40 +00001420 echo "*** Xlib/Xfree86 at the very least."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001421fi
1422
Alexandre Julliard638f1691999-01-17 16:32:32 +00001423if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1424then
1425 echo
1426 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1427 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001428fi
1429
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001430if test "$wine_cv_libc_reentrant" = "no"
1431then
1432 echo
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001433 echo "*** Warning: non-reentrant libc detected. Wine will be built without"
1434 echo "*** threading support. Consider upgrading libc to a more recent"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001435 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001436fi
1437
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001438if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001439then
1440 echo
1441 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001442 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1443fi
1444
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001445if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "x"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001446then
1447 echo
1448 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001449 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
Andreas Mohr18a9d742001-01-17 21:52:42 +00001450 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 +00001451 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001452fi
1453
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001454if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "xyes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001455then
1456 echo
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +00001457 echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001458 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1459 echo "*** support before reporting bugs."
1460fi
1461
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001462if test "$wine_cv_warn_cups_h" = "yes"
1463then
1464 echo
1465 echo "*** Note: You have cups runtime libraries, but no development"
1466 echo "*** libraries. Install the cups-devel package or whichever package"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001467 echo "*** contains cups.h to enable CUPS support in Wine."
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001468fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001469
Ian Pilcher563598d2001-05-16 20:56:05 +00001470if test "$wine_cv_msg_freetype" = "yes"
1471then
1472 echo
1473 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001474 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1475 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1476 echo "*** enable Wine to use TrueType fonts."
Ian Pilcher563598d2001-05-16 20:56:05 +00001477fi
1478
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001479echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001480echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001481echo
1482
1483dnl Local Variables:
1484dnl comment-start: "dnl "
1485dnl comment-end: ""
1486dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001487dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001488dnl End: