blob: 68245e699fd403f1809c4c4bdbe5a96cca61ce6e [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
Alexandre Julliarddaa28862002-04-11 21:54:01 +00007AC_PREREQ(2.53)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00008AC_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]))
Alexandre Julliardfc01b722002-05-12 03:16:39 +000021AC_ARG_WITH(curses, AC_HELP_STRING([--without-curses],[do not use curses]))
22AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=<dir>],[use Wine tools from directory <dir>]))
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 Julliardfc01b722002-05-12 03:16:39 +000036AC_CANONICAL_HOST
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 Julliardfc01b722002-05-12 03:16:39 +000040
41AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
42 [if test -z "$with_wine_tools"; then
43 if test "$cross_compiling" = "yes"; then
44 AC_MSG_ERROR([you must use the --with-wine-tools option when cross-compiling.])
45 else
46 wine_cv_toolsdir="\$(TOPOBJDIR)"
47 fi
48 elif test -d "$with_wine_tools/tools/winebuild"; then
49 case $with_wine_tools in
50 /*) wine_cv_toolsdir="$with_wine_tools" ;;
51 *) wine_cv_toolsdir="\$(TOPOBJDIR)/$with_wine_tools" ;;
52 esac
53 else
54 AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
55 fi])
56AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
57
Alexandre Julliardff8331e1995-09-18 11:19:54 +000058AC_PATH_XTRA
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000059AC_PROG_YACC
60AC_PROG_LEX
Marcus Meissner5c5a6212002-01-22 18:28:25 +000061
62dnl **** Just additional warning checks, since AC_PROG just sets 'yacc' even
63dnl **** without one present.
64AC_CHECK_PROGS(XYACC,$YACC bison yacc,none)
65if test "$XYACC" = "none"
66then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000067 AC_MSG_ERROR([no suitable bison/yacc found. Please install the 'bison' package.])
Marcus Meissner5c5a6212002-01-22 18:28:25 +000068fi
Marcus Meissnerb53bb412000-07-23 13:41:51 +000069AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
70if test "$XLEX" = "none"
71then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000072 AC_MSG_ERROR([no suitable lex found. Please install the 'flex' package.])
Marcus Meissnerb53bb412000-07-23 13:41:51 +000073fi
Alexandre Julliardfc01b722002-05-12 03:16:39 +000074
75AC_CHECK_TOOL(AR,ar,ar)
Alexandre Julliardff8331e1995-09-18 11:19:54 +000076AC_PROG_RANLIB
Alexandre Julliardfc01b722002-05-12 03:16:39 +000077AC_CHECK_TOOL(STRIP,strip,strip)
78AC_CHECK_TOOL(WINDRES,windres,false)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000079AC_PROG_INSTALL
Alexandre Julliard641ee761997-08-04 16:34:36 +000080AC_PROG_LN_S
Mike McCormacke0df32f2000-08-11 21:15:21 +000081AC_CHECK_PROG(C2MAN,c2man,c2man,\$(TOPSRCDIR)/tools/c2man.pl)
Bill Medland91372b32002-04-20 21:00:42 +000082AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
Alexandre Julliard02e90081998-01-04 17:49:09 +000083
Alexandre Julliardfc01b722002-05-12 03:16:39 +000084case $host_os in
85 cygwin*|mingw32*)
86 AC_CHECK_TOOL(LDCOMBINE,[ld -r --enable-stdcall-fixup],[ld -r --enable-stdcall-fixup]) ;;
87 *)
88 AC_CHECK_TOOL(LDCOMBINE,[ld -r],[ld -r]) ;;
89esac
90
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000091dnl Check for lint
92AC_CHECK_PROGS(LINT, lclint lint)
93if test "$LINT" = "lint"
94then
95 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
96 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
97fi
98AC_SUBST(LINT)
99AC_SUBST(LINTFLAGS)
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))
Francois Gouget3b943bc2002-04-01 21:05:15 +0000115dnl Check for -lresolv for Solaris
Alexandre Julliardc5552742002-04-03 20:24:44 +0000116AC_CHECK_FUNCS(inet_aton,,AC_CHECK_LIB(resolv,inet_aton))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000117dnl Check for -lxpg4 for FreeBSD
Satsuki Fujishima66fb6072001-03-19 19:19:59 +0000118AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
Alexandre Julliard0e7bd081999-05-02 11:46:02 +0000119dnl Check for -lmmap for OS/2
120AC_CHECK_LIB(mmap,mmap)
Alexandre Julliard3f510ad2002-01-01 01:13:03 +0000121
Marcus Meissner252b0fe2001-08-06 18:52:14 +0000122JPEGLIB=""
123AC_SUBST(JPEGLIB)
124AC_CHECK_HEADERS(jpeglib.h,
125 AC_CHECK_LIB(jpeg,jpeg_start_decompress,
126 AC_DEFINE(HAVE_LIBJPEG,1,[Define if you have libjpeg including devel headers])
127 JPEGLIB="-ljpeg"
128 )
129)
130
131
Patrik Stridvallea584721998-11-01 16:22:07 +0000132AC_SUBST(XLIB)
Patrik Stridvall2941a212000-04-25 20:34:22 +0000133AC_SUBST(XFILES)
134XFILES=""
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000135AC_SUBST(OPENGLFILES)
136OPENGLFILES=""
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000137AC_SUBST(GLU32FILES)
Alexandre Julliardf33f7f02001-09-17 20:09:08 +0000138GLU32FILES=""
Patrik Stridvallea584721998-11-01 16:22:07 +0000139if test "$have_x" = "yes"
140then
Patrik Stridvall24110281999-02-04 10:09:54 +0000141 XLIB="-lXext -lX11"
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000142 ac_save_CPPFLAGS="$CPPFLAGS"
143 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Patrik Stridvall24110281999-02-04 10:09:54 +0000144
Huw D M Daviesff453fc2001-09-14 01:04:25 +0000145 dnl *** All of the following tests require X11/Xlib.h
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000146 AC_CHECK_HEADERS(X11/Xlib.h,
147 [
Ove Kaavenc90fb252001-01-02 22:39:14 +0000148 dnl *** Check for X keyboard extension
149 AC_CHECK_HEADERS(X11/XKBlib.h,
150 [ dnl *** If X11/XKBlib.h exists...
151 AC_CHECK_LIB(X11, XkbQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000152 AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
Ove Kaavenc90fb252001-01-02 22:39:14 +0000153 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
154 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000155 AC_MSG_WARN([[Xkb extension not found, Wine will be built without it]])
Ove Kaavenc90fb252001-01-02 22:39:14 +0000156 )
157
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000158 dnl *** Check for X Shm extension
159 AC_CHECK_HEADERS(X11/extensions/XShm.h,
160 [ dnl *** If X11/extensions/XShm.h exists...
161 AC_CHECK_LIB(Xext, XShmQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000162 AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000163 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
164 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000165 AC_MSG_WARN([[XShm extension not found, Wine will be built without it]]),
166 [#include <X11/Xlib.h>])
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000167
Francois Jacques5b6879c2000-07-28 23:04:54 +0000168 dnl *** Check for X shape extension
Ove Kaavenc90fb252001-01-02 22:39:14 +0000169 AC_CHECK_HEADERS(X11/extensions/shape.h,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000170 [ dnl *** If X11/extensions/shape.h exists...
171 AC_CHECK_LIB(Xext,XShapeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000172 AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000173 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
174 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000175 AC_MSG_WARN([[XShape extension not found, Wine will be built without it]]),
176 [#include <X11/Xlib.h>])
Francois Jacques5b6879c2000-07-28 23:04:54 +0000177
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000178 dnl *** Check for XFree86 DGA / DGA 2.0 extension
179 AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
180 [ dnl *** If X11/extensions/xf86dga.h exists, check
181 dnl *** for XDGAQueryExtension()...
182 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
183 [ dnl *** If found...
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000184 AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
185 [Define if you have the Xxf86dga library version 2])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000186 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000187 ],
188 [ dnl *** If not found, look for XF86DGAQueryExtension()
189 dnl *** instead (DGA 2.0 not found)...
190 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000191 [ AC_DEFINE(HAVE_LIBXXF86DGA, 1,
192 [Define if you have the Xxf86dga library version 1])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000193 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000194 ],,
195 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
196 )
197 ],
198 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
199 )
200 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000201 AC_MSG_WARN([[DGA extension not found, Wine will be built without it]]),
202 [#include <X11/Xlib.h>])
Patrik Stridvall24110281999-02-04 10:09:54 +0000203
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000204 dnl *** Check for XFree86 VMODE extension
205 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
206 [ dnl *** If X11/extensions/xf86vmode.h exists...
207 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000208 [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000209 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
210 ],,
211 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
212 )
213 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000214 AC_MSG_WARN([[XFree86 VMODE extension not found, Wine will be built without it]]),
215 [#include <X11/Xlib.h>])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000216
217 dnl *** Check for XVideo extension supporting XvImages
218 AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
219 [ dnl *** If X11/extensions/Xvlib.h exists...
220 AC_CHECK_LIB(Xv, XvShmCreateImage,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000221 [ AC_DEFINE(HAVE_XVIDEO, 1, [Define if the X libraries support XVideo])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000222 X_PRE_LIBS="$X_PRE_LIBS -lXv"
223 ],,
224 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
225 )
226 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000227 AC_MSG_WARN([[XVideo extension not found, Wine will be built without it]]),
228 [#include <X11/Xlib.h>])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000229
Alexandre Julliard21e91662002-04-23 22:06:41 +0000230 dnl *** Check for XRender include file
231 AC_CHECK_HEADERS(X11/extensions/Xrender.h,,,[#include <X11/Xlib.h>])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000232 ]
233 ) dnl *** End of X11/Xlib.h check
Lionel Ulmer5c085701999-02-28 19:48:53 +0000234
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000235 dnl Check for the presence of OpenGL
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000236 if test "x$enable_opengl" != "xno"
Patrik Stridvall24110281999-02-04 10:09:54 +0000237 then
Francois Gouget42dcd972002-01-29 17:52:28 +0000238 if test -f /usr/X11R6/lib/libGL.a -a ! -f /usr/X11R6/lib/libGL.so
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000239 then
240 AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
241This prevents linking to OpenGL. Delete the file and restart configure.])
242 fi
243
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000244 AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
Marcus Meissner22a969b2000-08-08 20:46:50 +0000245 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000246 then
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000247 AC_CHECK_HEADERS(GL/glext.h,,,[#include <GL/glx.h>])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000248 dnl Check for some problems due to old Mesa versions
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000249 AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000250 AC_TRY_COMPILE(
Lionel Ulmer48c08162000-01-05 01:51:02 +0000251 [#include <GL/gl.h>],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000252 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000253 [wine_cv_opengl_version_OK="yes"],
254 [wine_cv_opengl_version_OK="no"]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000255 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000256 )
257
258 dnl Check for the thread-safety of the OpenGL library
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000259 AC_CACHE_CHECK([for thread-safe OpenGL version],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000260 wine_cv_opengl_version_threadsafe,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000261 [saved_libs=$LIBS
262 LIBS="$X_LIBS -lGL"
263 AC_TRY_LINK([],[pthread_getspecific();],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000264 [wine_cv_opengl_version_threadsafe="yes"],
265 [wine_cv_opengl_version_threadsafe="no"])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000266 LIBS=$saved_libs]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000267 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000268
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000269 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 +0000270 then
Andreas Mohr4eefb962000-08-01 00:27:35 +0000271 dnl Check for the presence of the library
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000272 AC_CHECK_LIB(GL,glXCreateContext,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000273 X_PRE_LIBS="$X_PRE_LIBS -lGL"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000274 ,,
275 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
276
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000277 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000278 then
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000279 OPENGLFILES='$(OPENGLFILES)'
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000280 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000281
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000282 AC_CHECK_LIB(GL,glXGetProcAddressARB,
283 AC_DEFINE(HAVE_GLX_GETPROCADDRESS, 1,
284 [Define if the OpenGL library supports the glXGetProcAddressARB call]),,
285 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000286
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000287 if test "$ac_cv_lib_GL_glXGetProcAddressARB" = "yes"
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000288 then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000289 AC_CACHE_CHECK([for OpenGL extension functions prototypes], wine_cv_extension_prototypes,
290 [AC_TRY_COMPILE([#include <GL/gl.h>
Marcus Meissner6bb6d4c2000-08-09 22:21:08 +0000291 #ifdef HAVE_GL_GLEXT_H
292 # include <GL/glext.h>
293 #endif
294 ],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000295 [PFNGLCOLORTABLEEXTPROC test_proc;],
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000296 [wine_cv_extension_prototypes="yes"],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000297 [wine_cv_extension_prototypes="no"]
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000298 )]
Lionel Ulmer1434d872000-07-23 14:23:31 +0000299 )
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000300 if test "$wine_cv_extension_prototypes" = "yes"
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000301 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000302 AC_DEFINE(HAVE_GLEXT_PROTOTYPES, 1,
303 [Define if the OpenGL headers define extension typedefs])
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000304 fi
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000305 fi
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000306
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000307 fi
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000308 dnl Check for GLU32 library.
Marcus Meissner6e9ab402001-08-08 23:21:16 +0000309 AC_CHECK_LIB(GLU,gluLookAt,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000310 [X_PRE_LIBS="$X_PRE_LIBS -lGLU"
311 GLU32FILES='$(GLU32FILES)']
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000312 ,,
313 $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
314 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000315 fi
316 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000317 fi
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000318
319 CPPFLAGS="$ac_save_CPPFLAGS"
Patrik Stridvall2941a212000-04-25 20:34:22 +0000320 XFILES='$(XFILES)'
Patrik Stridvallea584721998-11-01 16:22:07 +0000321else
322 XLIB=""
323 X_CFLAGS=""
324 X_LIBS=""
325fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000326
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000327dnl **** Check which curses lib to use ***
Alexandre Julliard48957682001-12-26 23:08:31 +0000328CURSESLIBS=""
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000329if test "x$with_curses" != "xno"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000330then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000331 AC_CHECK_HEADERS(ncurses.h,
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000332 [AC_CHECK_LIB(ncurses,waddch,
Alexandre Julliard48957682001-12-26 23:08:31 +0000333 [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
334 CURSESLIBS="-lncurses"],
335 [AC_CHECK_HEADERS(curses.h,
336 [AC_CHECK_LIB(curses,waddch,
337 [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000338 CURSESLIBS="-lcurses"])])])])
Alexandre Julliard48957682001-12-26 23:08:31 +0000339 saved_libs="$LIBS"
340 LIBS="$CURSESLIBS $LIBS"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000341 AC_CHECK_FUNCS(getbkgd resizeterm)
Alexandre Julliard48957682001-12-26 23:08:31 +0000342 LIBS="$saved_libs"
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000343fi
Alexandre Julliard48957682001-12-26 23:08:31 +0000344AC_SUBST(CURSESLIBS)
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000345
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000346CUPSLIBS=""
347dnl **** Check for CUPS ****
Marcus Meissner3ee02ba2001-04-30 18:18:50 +0000348wine_cv_warn_cups_h=no
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000349AC_CHECK_LIB(cups,cupsGetPPD,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000350 [AC_CHECK_HEADER(cups/cups.h,
351 [AC_DEFINE(HAVE_CUPS, 1, [Define if we have CUPS])
352 CUPSLIBS="-lcups"],
353 wine_cv_warn_cups_h=yes)]
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000354)
355AC_SUBST(CUPSLIBS)
356
Shi Quan He6b0720f2002-03-21 02:58:39 +0000357dnl **** Check for SANE ****
358AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
359if test "$sane_devel" = "no"
360then
361 SANELIBS=""
362 SANEINCL=""
363else
364 SANELIBS="`$sane_devel --libs`"
365 SANEINCL="`$sane_devel --cflags`"
366 ac_save_CPPFLAGS="$CPPFLAGS"
367 ac_save_LIBS="$LIBS"
368 CPPFLAGS="$CPPFLAGS $SANEINCL"
369 LIBS="$LIBS $SANELIBS"
Alexandre Julliard96328b32002-03-31 19:23:41 +0000370 AC_CHECK_HEADER(sane/sane.h,
371 [AC_CHECK_LIB(sane,sane_open,
372 [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
373 [SANELIBS=""
374 SANEINCL=""])],
375 [SANELIBS=""
376 SANEINCL=""])
Shi Quan He6b0720f2002-03-21 02:58:39 +0000377 LIBS="$ac_save_LIBS"
378 CPPFLAGS="$ac_save_CPPFLAGS"
379fi
380AC_SUBST(SANELIBS)
381AC_SUBST(SANEINCL)
382
Ian Pilcher563598d2001-05-16 20:56:05 +0000383dnl **** Check for FreeType 2 ****
Dmitry Timoshkov8871a112001-11-06 22:26:53 +0000384AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
Ian Pilcher563598d2001-05-16 20:56:05 +0000385if test "$ft_lib" = "no"
386then
Ian Pilcher563598d2001-05-16 20:56:05 +0000387 FREETYPEINCL=""
388 wine_cv_msg_freetype=no
389else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000390 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
391 if test "$ft_devel" = "no"
392 then
393 AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
394 if test "$ft_devel2" = "freetype2-config"
395 then
396 ft_devel=$ft_devel2
397 fi
398 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000399 if test "$ft_devel" = "no"
400 then
Ian Pilcher563598d2001-05-16 20:56:05 +0000401 FREETYPEINCL=""
402 wine_cv_msg_freetype=yes
403 else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000404 FREETYPEINCL=`$ft_devel --cflags`
Ian Pilcher40432fe2001-06-06 21:05:23 +0000405 ac_save_CPPFLAGS="$CPPFLAGS"
406 CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
407 AC_CHECK_HEADERS(freetype/freetype.h \
408 freetype/ftglyph.h \
409 freetype/tttables.h \
410 freetype/ftnames.h \
411 freetype/ftsnames.h \
Huw D M Davies814654e2001-09-12 20:21:06 +0000412 freetype/ttnameid.h \
Huw D M Davies4e2024e2001-10-23 20:06:32 +0000413 freetype/ftoutln.h \
414 freetype/internal/sfnt.h)
Alexandre Julliard18d75732002-01-29 03:02:50 +0000415 AC_TRY_CPP([#include <ft2build.h>
416 #include <freetype/fttrigon.h>],
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000417 [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
418 [Define if you have the <freetype/fttrigon.h> header file.])
419 wine_cv_fttrigon=yes],
420 wine_cv_fttrigon=no)
Ian Pilcher40432fe2001-06-06 21:05:23 +0000421 CPPFLAGS="$ac_save_CPPFLAGS"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000422 dnl Check that we have at least freetype/freetype.h
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000423 if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000424 then
425 AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
426 wine_cv_msg_freetype=no
427 else
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000428 FREETYPEINCL=""
429 wine_cv_msg_freetype=yes
430 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000431 fi
432fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000433AC_SUBST(FREETYPEINCL)
434
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000435dnl **** Check for parport (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000436AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000437 AC_TRY_COMPILE(
438 [#include <linux/ppdev.h>],
439 [ioctl (1,PPCLAIM,0)],
440 [ac_cv_c_ppdev="yes"],
441 [ac_cv_c_ppdev="no"])
442 )
443if test "$ac_cv_c_ppdev" = "yes"
444then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000445 AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000446fi
447
Pavel Roskin94d99641998-12-26 11:52:51 +0000448dnl **** Check for IPX (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000449AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
Pavel Roskin94d99641998-12-26 11:52:51 +0000450 AC_TRY_COMPILE(
451 [#include <sys/socket.h>
452 #include <netipx/ipx.h>],
453 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000454 [ac_cv_c_ipx_gnu="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000455 [ac_cv_c_ipx_gnu="no"])
456 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000457if test "$ac_cv_c_ipx_gnu" = "yes"
458then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000459 AC_DEFINE(HAVE_IPX_GNU, 1, [Define if IPX should use netipx/ipx.h from libc])
Aaron Hopec23872d2000-01-15 23:43:21 +0000460fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000461
462if test "$ac_cv_c_ipx_gnu" = "no"
463then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000464 AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
Pavel Roskin94d99641998-12-26 11:52:51 +0000465 AC_TRY_COMPILE(
466 [#include <sys/socket.h>
467 #include <asm/types.h>
468 #include <linux/ipx.h>],
469 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000470 [ac_cv_c_ipx_linux="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000471 [ac_cv_c_ipx_linux="no"])
472 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000473 if test "$ac_cv_c_ipx_linux" = "yes"
474 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000475 AC_DEFINE(HAVE_IPX_LINUX, 1, [Define if IPX includes are taken from Linux kernel])
Aaron Hopec23872d2000-01-15 23:43:21 +0000476 fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000477fi
478
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000479dnl **** Check for Open Sound System ****
Todd Vierlingecc76691998-12-15 17:49:02 +0000480AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000481
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000482AC_CACHE_CHECK([for Open Sound System],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000483 ac_cv_c_opensoundsystem,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000484 AC_TRY_COMPILE([
Todd Vierlingecc76691998-12-15 17:49:02 +0000485 #if defined(HAVE_SYS_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000486 #include <sys/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000487 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000488 #include <machine/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000489 #elif defined(HAVE_SOUNDCARD_H)
490 #include <soundcard.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000491 #endif
492 ],[
493
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000494/* check for one of the Open Sound System specific SNDCTL_ defines */
495#if !defined(SNDCTL_DSP_STEREO)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000496#error No open sound system
497#endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000498],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
499
500if test "$ac_cv_c_opensoundsystem" = "yes"
501then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000502 AC_DEFINE(HAVE_OSS, 1, [Define if you have the Open Sound system])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000503fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000504
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000505AC_CACHE_CHECK([for Open Sound System/MIDI interface],
Eric Pouech338d3b21999-05-22 18:52:21 +0000506 ac_cv_c_opensoundsystem_midi,
507 AC_TRY_COMPILE([
508 #if defined(HAVE_SYS_SOUNDCARD_H)
509 #include <sys/soundcard.h>
510 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
511 #include <machine/soundcard.h>
512 #elif defined(HAVE_SOUNDCARD_H)
513 #include <soundcard.h>
514 #endif
515 ],[
516
517/* check for one of the Open Sound System specific SNDCTL_SEQ defines */
518#if !defined(SNDCTL_SEQ_SYNC)
519#error No open sound system MIDI interface
520#endif
521],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
522
523if test "$ac_cv_c_opensoundsystem_midi" = "yes"
524then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000525 AC_DEFINE(HAVE_OSS_MIDI, 1, [Define if you have the Open Sound system (MIDI interface)])
Eric Pouech338d3b21999-05-22 18:52:21 +0000526fi
527
Chris Morgan9b0ba7c2002-03-21 01:38:19 +0000528dnl **** Check for aRts Sound Server ****
529AC_PATH_PROG(ARTSCCONFIG, artsc-config)
530AC_CACHE_CHECK([for aRts Sound server],
531 ac_cv_c_artsserver,
532 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"';
533 then
534 ac_cv_c_artsserver=no
535 else
536 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
537 ARTSC_LIBS=`$ARTSCCONFIG --libs`
538 ac_cv_c_artsserver=no
539 save_CFLAGS="$CFLAGS"
540 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
541 AC_TRY_COMPILE([
542 #include <artsc.h>
543 ],[
544 arts_stream_t stream;
545 ],[
546 ac_cv_c_artsserver=yes
547 ])
548 CFLAGS="$save_CFLAGS"
549 fi)
550
551if test "$ac_cv_c_artsserver" = "yes"
552then
553 AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
554 AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
555
556 AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])
557fi
558
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000559dnl **** Check for broken glibc mmap64 ****
560
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000561AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000562 AC_TRY_RUN([
563 #define _FILE_OFFSET_BITS 64
564 #include <stdio.h>
565 #include <unistd.h>
566 #include <fcntl.h>
567 #include <sys/mman.h>
568 #include <errno.h>
569
570 int main(int argc,char **argv) {
571 int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
572 if (fd == -1) exit(1);
573
574 unlink("conftest.map");
575
576 write(fd,"test",4);
577
578 if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
579 (errno == EINVAL)
580 ) {
581 exit(1);
582 }
583 close(fd);
584 fprintf(stderr,"success!\n");
585 exit(0);
586 }
587
588 ],
589 ac_cv_mmap64_works="yes",
590 ac_cv_mmap64_works="no",
591 ac_cv_mmap64_works="no") )
592
593if test "$ac_cv_mmap64_works" = "yes"
594then
595 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
596fi
597
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000598dnl **** Check for gcc strength-reduce bug ****
599
600if test "x${GCC}" = "xyes"
601then
602 CFLAGS="$CFLAGS -Wall"
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000603 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000604 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000605int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000606int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000607 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000608 unsigned int B = 3;
609 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000610 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000611 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
612 L[[i]] = 4;
613
614 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000615}],
616 ac_cv_c_gcc_strength_bug="no",
617 ac_cv_c_gcc_strength_bug="yes",
618 ac_cv_c_gcc_strength_bug="yes") )
619 if test "$ac_cv_c_gcc_strength_bug" = "yes"
620 then
621 CFLAGS="$CFLAGS -fno-strength-reduce"
622 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000623
624 dnl Check for -mpreferred-stack-boundary
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000625 AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support], ac_cv_c_gcc_stack_boundary,
626 [WINE_TRY_CFLAGS([-mpreferred-stack-boundary=2],
627 ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000628 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
629 then
630 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
631 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000632fi
633
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000634dnl **** Check if we need to place .type inside a .def directive ****
635
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000636AC_CACHE_CHECK([whether .type must sit inside a .def directive], ac_cv_c_type_in_def,
637 WINE_TRY_ASM_LINK(
638[ .globl _ac_test
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000639 .def _ac_test; .scl 2; .type 32; .endef
640_ac_test:
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000641 .long 0],,,
642 ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no"))
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000643if test "$ac_cv_c_type_in_def" = "yes"
644then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000645 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 +0000646fi
647
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000648dnl **** Check for underscore on external symbols ****
649
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000650AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
651 WINE_TRY_ASM_LINK(
652[ .globl _ac_test
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000653_ac_test:
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000654 .long 0],
655[extern int ac_test;],
656[if (ac_test) return 1],
657 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000658if test "$ac_cv_c_extern_prefix" = "yes"
659then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000660 AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1,
661 [Define if symbols declared in assembly code need an underscore prefix])
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000662fi
663
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000664dnl **** Check whether stdcall symbols need to be decorated ****
665
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000666AC_CACHE_CHECK([whether stdcall symbols need to be decorated], ac_cv_c_stdcall_decoration,
667 WINE_TRY_ASM_LINK(
668[ .globl _ac_test@0
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000669_ac_test@0:
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000670 .globl ac_test@0
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000671ac_test@0:],
672[extern void __attribute__((__stdcall__)) ac_test(void);],
673[ac_test()],
674 ac_cv_c_stdcall_decoration="yes",ac_cv_c_stdcall_decoration="no"))
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000675if test "$ac_cv_c_stdcall_decoration" = "yes"
676then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000677 AC_DEFINE(NEED_STDCALL_DECORATION, 1, [Define if stdcall symbols need to be decorated])
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000678fi
679
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000680dnl **** Check for .string in assembler ****
681
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000682AC_CACHE_CHECK([whether assembler accepts .string], ac_cv_c_asm_string,
683 WINE_TRY_ASM_LINK(
684[ .string "test"],,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no"))
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000685if test "$ac_cv_c_asm_string" = "yes"
686then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000687 AC_DEFINE(HAVE_ASM_STRING, 1, [Define to use .string instead of .ascii])
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000688fi
689
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000690dnl **** Check for working dll ****
691
Todd Vierling4b992b01998-12-15 15:26:27 +0000692LDSHARED=""
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000693LDDLLFLAGS=""
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000694DLLIBS=""
695
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000696case $host_os in
697 cygwin*|mingw32*)
698 AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
699 if test "$DLLWRAP" = "false"; then
700 LIBEXT="a"
701 else
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000702 dnl FIXME - check whether dllwrap works correctly...
703 LIBEXT="dll"
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000704 fi
705 ;;
706 *)
707 AC_CHECK_HEADERS(dlfcn.h,
708 [AC_CHECK_FUNCS(dlopen,,
709 [AC_CHECK_LIB(dl,dlopen,
710 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
711 DLLIBS="-ldl"],
712 [LIBEXT="a"])])],
713 [LIBEXT="a"])
714
715 if test "$LIBEXT" = "so"
716 then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000717 AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
718 [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
719 ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
Alexandre Julliard466ae142002-05-07 18:33:47 +0000720 if test "$ac_cv_c_dll_gnuelf" = "yes"
721 then
722 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
723 LDDLLFLAGS="-Wl,-Bsymbolic"
724 else
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000725 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
726 [WINE_TRY_CFLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
727 ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
Alexandre Julliard466ae142002-05-07 18:33:47 +0000728 if test "$ac_cv_c_dll_unixware" = "yes"
729 then
730 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
731 LDDLLFLAGS="-Wl,-B,symbolic"
732 fi
733 fi
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000734 fi
735 ;;
736esac
Alexandre Julliard0adad952000-01-26 01:45:58 +0000737
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000738if test "$LIBEXT" = "a"; then
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000739 AC_MSG_ERROR(
740[could not find a way to build shared libraries.
741It is currently not possible to build Wine without shared library
742(.so) support to allow transparent switch between .so and .dll files.
743If you are using Linux, you will need a newer binutils.]
744)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000745fi
746
Alexandre Julliard0adad952000-01-26 01:45:58 +0000747DLLFLAGS=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000748
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000749if test "$LIBEXT" = "so"; then
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000750 DLLFLAGS="-fPIC"
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000751 DLLEXT=".so"
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000752elif test "$LIBEXT" = "dll"; then
753 #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000754 DLLEXT=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000755fi
756
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000757case $build_os in
758 cygwin*|mingw32*)
759 LDPATH="PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\"" ;;
760 *)
761 LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"" ;;
762esac
763
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000764AC_SUBST(DLLIBS)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000765AC_SUBST(DLLFLAGS)
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000766AC_SUBST(DLLEXT)
Todd Vierling4b992b01998-12-15 15:26:27 +0000767AC_SUBST(LDSHARED)
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000768AC_SUBST(LDDLLFLAGS)
Alexandre Julliard0adad952000-01-26 01:45:58 +0000769AC_SUBST(LIBEXT)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000770AC_SUBST(LDPATH)
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000771
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000772dnl **** Get the soname for libraries that we load dynamically ****
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000773
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000774if test "$LIBEXT" = "so"
Alexandre Julliard598412e2001-01-17 20:22:22 +0000775then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000776 WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
777 WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
778 WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
779 WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
Alexandre Julliard598412e2001-01-17 20:22:22 +0000780fi
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000781
782
783dnl **** Check for reentrant libc ****
Alexandre Julliard598412e2001-01-17 20:22:22 +0000784
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000785wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000786dnl Linux style errno location
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000787WINE_CHECK_ERRNO([__errno_location], [wine_cv_libc_reentrant=__errno_location],
788 dnl FreeBSD style errno location
789 WINE_CHECK_ERRNO([__error], [wine_cv_libc_reentrant=__error],
790 dnl Solaris style errno location
791 WINE_CHECK_ERRNO([___errno], [wine_cv_libc_reentrant=___errno],
792 dnl UnixWare style errno location
793 WINE_CHECK_ERRNO([__thr_errno], [wine_cv_libc_reentrant=__thr_errno],
794 dnl NetBSD style errno location
795 WINE_CHECK_ERRNO([__errno], [wine_cv_libc_reentrant=__errno])
796))))
Alexandre Julliard598412e2001-01-17 20:22:22 +0000797
798if test "$wine_cv_libc_reentrant" != "no"
Ron Recorde977d6c1999-09-05 12:32:05 +0000799then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000800 AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant,
801 [Define to the name of the function returning errno for reentrant libc])
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000802fi
803
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000804dnl **** Check for reentrant X libraries ****
805dnl
806dnl This may fail to determine whether X libraries are reentrant if
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000807dnl AC_PATH_XTRA does not set x_libraries.
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000808
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000809if test "$have_x" = "yes"
Patrik Stridvall24110281999-02-04 10:09:54 +0000810then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000811AC_CACHE_CHECK( [for reentrant X libraries], wine_cv_x_reentrant,
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000812 [libX11_check=none
813 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
814 if test -r $dir/libX11.so; then
815 libX11_check="-D $dir/libX11.so"
816 break
817 fi
818 if test -r $dir/libX11.a; then
819 libX11_check="$dir/libX11.a"
820 break
821 fi
822 done
823 if test "$libX11_check" != "none"; then
824 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
825 then
826 wine_cv_x_reentrant=yes
827 else
828 wine_cv_x_reentrant=no
829 fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000830 else
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000831 wine_cv_x_reentrant=unknown
832 fi])
Patrik Stridvall24110281999-02-04 10:09:54 +0000833fi
Ulrich Weigand97591402000-12-19 03:38:53 +0000834
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000835dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000836
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000837AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000838AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000839 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000840 _lwp_create \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000841 _pclose \
842 _popen \
Steven Edwards0a8e15a2002-05-10 01:33:40 +0000843 _snprintf \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000844 _stricmp \
845 _strnicmp \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000846 chsize \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000847 clone \
Andreas Mohra7ca2ba2001-01-12 23:07:11 +0000848 ecvt \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000849 finite \
850 fpclass \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000851 ftruncate \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000852 ftruncate64 \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000853 getnetbyaddr \
854 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000855 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000856 getprotobyname \
857 getprotobynumber \
858 getservbyport \
859 getsockopt \
860 inet_network \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000861 lseek64 \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000862 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000863 memmove \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000864 mmap \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000865 pclose \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000866 popen \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000867 pread \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000868 pwrite \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000869 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000870 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000871 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000872 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000873 sigaltstack \
Steven Edwards0a8e15a2002-05-10 01:33:40 +0000874 snprintf \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000875 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000876 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000877 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000878 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000879 tcgetattr \
880 timegm \
881 usleep \
882 vfscanf \
883 wait4 \
884 waitpid \
885)
886
887dnl **** Check for header files ****
888
889AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000890 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000891 arpa/nameser.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000892 direct.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000893 elf.h \
894 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000895 ieeefp.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000896 io.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000897 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000898 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000899 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000900 linux/cdrom.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000901 linux/hdreg.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000902 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000903 linux/joystick.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000904 linux/major.h \
Laurent Pinchart0314a652002-05-01 22:01:30 +0000905 linux/param.h \
Lawson Whitney533e7ee2002-02-19 18:41:56 +0000906 linux/serial.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000907 linux/ucdrom.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000908 net/if.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000909 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000910 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000911 netinet/in_systm.h \
912 netinet/ip.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000913 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000914 pty.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000915 resolv.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000916 sched.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000917 scsi/sg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000918 socket.h \
Bang Jun-Youngeda758e2001-12-14 22:47:19 +0000919 stdint.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000920 strings.h \
921 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000922 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000923 sys/file.h \
924 sys/filio.h \
Michal Pasternak60983992002-03-29 18:04:43 +0000925 sys/inttypes.h \
Alexandre Julliardc3e06df2002-05-14 23:18:23 +0000926 sys/ioctl.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000927 sys/ipc.h \
Eric Pouech624cbd72001-08-10 22:29:21 +0000928 sys/link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000929 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000930 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000931 sys/modem.h \
932 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000933 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000934 sys/param.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000935 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +0000936 sys/reg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000937 sys/shm.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000938 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000939 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000940 sys/sockio.h \
941 sys/statfs.h \
942 sys/strtio.h \
943 sys/syscall.h \
Alexandre Julliard127ec922002-05-07 01:51:30 +0000944 sys/sysctl.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000945 sys/time.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000946 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000947 sys/v86.h \
948 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000949 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000950 sys/vm86.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000951 sys/wait.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000952 syscall.h \
Alexandre Julliardc3e06df2002-05-14 23:18:23 +0000953 termios.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000954 ucontext.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000955 unistd.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000956)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000957AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000958
959dnl **** Check for types ****
960
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000961AC_C_CONST
962AC_C_INLINE
Alexandre Julliard5769d1d2002-04-26 19:05:15 +0000963AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000964AC_CHECK_SIZEOF(long long,0)
965
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000966AC_CACHE_CHECK([whether linux/input.h is for real],
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000967 wine_cv_linux_input_h,
968 AC_TRY_COMPILE([
969 #include <linux/input.h>
970 ] , [
971 int foo = EVIOCGBIT(EV_ABS,42);
972 int bar = BTN_PINKIE;
973 int fortytwo = 42;
974 ],
975 wine_cv_linux_input_h=yes,
976 wine_cv_linux_input_h=no,
977 no
978 )
979 )
980 if test "$wine_cv_linux_input_h" = "yes"
981 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000982 AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H, 1,
983 [Define if we have linux/input.h AND it contains the INPUT event API])
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000984 fi
985
Rein Klazesff7a61f2000-09-24 19:41:57 +0000986
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000987AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
Rein Klazesff7a61f2000-09-24 19:41:57 +0000988 wine_cv_linux_gethostbyname_r_6,
989 AC_TRY_COMPILE([
990#include <netdb.h>
991 ], [
992 char *name=NULL;
993 struct hostent he;
994 struct hostent *result;
995 char *buf=NULL;
996 int bufsize=0;
997 int res,errnr;
998 char *addr=NULL;
999 int addrlen=0;
1000 int addrtype=0;
1001 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1002 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1003 ],
1004 wine_cv_linux_gethostbyname_r_6=yes,
1005 wine_cv_linux_gethostbyname_r_6=no
1006 )
1007 )
1008 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1009 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001010 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1011 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
Rein Klazesff7a61f2000-09-24 19:41:57 +00001012 fi
1013
Marcus Meissner028e9a11999-08-04 15:07:56 +00001014if test "$ac_cv_header_linux_joystick_h" = "yes"
1015then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001016 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
Marcus Meissner028e9a11999-08-04 15:07:56 +00001017 wine_cv_linux_joystick_22_api,
1018 AC_TRY_COMPILE([
1019 #include <sys/ioctl.h>
1020 #include <linux/joystick.h>
1021
1022 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +00001023 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1024 #error "no 2.2 header"
1025 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +00001026 ],/*empty*/,
1027 wine_cv_linux_joystick_22_api=yes,
1028 wine_cv_linux_joystick_22_api=no,
1029 wine_cv_linux_joystick_22_api=no
1030 )
1031 )
Rein Klazes87d224a2000-04-24 17:33:49 +00001032 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +00001033 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001034 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1035 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
Marcus Meissner028e9a11999-08-04 15:07:56 +00001036 fi
1037fi
1038
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001039dnl **** statfs checks ****
1040
1041if test "$ac_cv_header_sys_vfs_h" = "yes"
1042then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001043 AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001044 wine_cv_sys_vfs_has_statfs,
1045 AC_TRY_COMPILE([
1046 #include <sys/types.h>
1047 #ifdef HAVE_SYS_PARAM_H
1048 # include <sys/param.h>
1049 #endif
1050 #include <sys/vfs.h>
1051 ],[
1052 struct statfs stfs;
1053
1054 memset(&stfs,0,sizeof(stfs));
1055 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1056 )
1057 )
1058 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1059 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001060 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1061 [Define if the struct statfs is defined by <sys/vfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001062 fi
1063fi
1064
1065if test "$ac_cv_header_sys_statfs_h" = "yes"
1066then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001067 AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001068 wine_cv_sys_statfs_has_statfs,
1069 AC_TRY_COMPILE([
1070 #include <sys/types.h>
1071 #ifdef HAVE_SYS_PARAM_H
1072 # include <sys/param.h>
1073 #endif
1074 #include <sys/statfs.h>
1075 ],[
1076 struct statfs stfs;
1077 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1078 )
1079 )
1080 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1081 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001082 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1083 [Define if the struct statfs is defined by <sys/statfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001084 fi
1085fi
1086
1087if test "$ac_cv_header_sys_mount_h" = "yes"
1088then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001089 AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001090 wine_cv_sys_mount_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/mount.h>
1097 ],[
1098 struct statfs stfs;
1099 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1100 )
1101 )
1102 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1103 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001104 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1105 [Define if the struct statfs is defined by <sys/mount.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001106 fi
1107fi
1108
1109dnl **** FIXME: what about mixed cases, where we need two of them? ***
1110
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001111WINE_CHECK_STRUCT_MEMBER(statfs,f_bfree,
1112[#include <sys/types.h>
1113#ifdef HAVE_SYS_PARAM_H
1114# include <sys/param.h>
1115#endif
1116#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1117# include <sys/mount.h>
1118#else
1119# ifdef STATFS_DEFINED_BY_SYS_VFS
1120# include <sys/vfs.h>
1121# else
1122# ifdef STATFS_DEFINED_BY_SYS_STATFS
1123# include <sys/statfs.h>
1124# endif
1125# endif
1126#endif],
1127 [AC_DEFINE(STATFS_HAS_BFREE, 1, [Define if the struct statfs has the member bfree])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001128
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001129WINE_CHECK_STRUCT_MEMBER(statfs,f_bavail,
1130[#include <sys/types.h>
1131#ifdef HAVE_SYS_PARAM_H
1132# include <sys/param.h>
1133#endif
1134#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1135# include <sys/mount.h>
1136#else
1137# ifdef STATFS_DEFINED_BY_SYS_VFS
1138# include <sys/vfs.h>
1139# else
1140# ifdef STATFS_DEFINED_BY_SYS_STATFS
1141# include <sys/statfs.h>
1142# endif
1143# endif
1144#endif],
1145 [AC_DEFINE(STATFS_HAS_BAVAIL, 1, [Define if the struct statfs has the member bavail])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001146
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001147dnl Check for file descriptor passing with msg_accrights
1148WINE_CHECK_STRUCT_MEMBER(msghdr,msg_accrights,
1149[#include <sys/types.h>
1150#include <sys/socket.h>],
1151 [AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001152
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001153dnl Check for the sa_len member in struct sockaddr
1154WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len,
1155[#include <sys/types.h>
1156#include <sys/socket.h>],
1157 [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001158
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001159dnl Check for the sun_len member in struct sockaddr_un
1160WINE_CHECK_STRUCT_MEMBER(sockaddr_un,sun_len,
1161[#include <sys/types.h>
Patrik Stridvall09da9662001-07-08 22:30:50 +00001162#include <sys/socket.h>
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001163#include <sys/un.h>],
1164 [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])])
Juergen Lock2d33ab92000-02-13 16:03:29 +00001165
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001166dnl *** check for the need to define __i386__
1167
Alexandre Julliardfc01b722002-05-12 03:16:39 +00001168case $host_cpu in
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001169 *i[3456789]86* )
1170 AC_CACHE_CHECK([whether we need to define __i386__],ac_cv_cpp_def_i386,
1171 AC_EGREP_CPP(yes,[#ifndef __i386__
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001172yes
1173#endif],
1174 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001175 ;;
1176esac
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001177if test "$ac_cv_cpp_def_i386" = "yes"
1178then
1179 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001180 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001181fi
1182
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001183dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001184
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001185AH_TOP([#define __WINE_CONFIG_H])
1186
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001187WINE_CONFIG_EXTRA_DIR(controls)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001188WINE_CONFIG_EXTRA_DIR(dlls/ddraw/d3ddevice)
1189WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dclipper)
1190WINE_CONFIG_EXTRA_DIR(dlls/ddraw/ddraw)
1191WINE_CONFIG_EXTRA_DIR(dlls/ddraw/direct3d)
1192WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dpalette)
1193WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dsurface)
1194WINE_CONFIG_EXTRA_DIR(dlls/dinput/joystick)
1195WINE_CONFIG_EXTRA_DIR(dlls/dinput/keyboard)
1196WINE_CONFIG_EXTRA_DIR(dlls/dinput/mouse)
Alexandre Julliard89118562002-03-27 21:13:40 +00001197WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1198WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1199WINE_CONFIG_EXTRA_DIR(dlls/gdi/win16drv)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001200WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001201WINE_CONFIG_EXTRA_DIR(dlls/kernel/tests)
Marcus Meissnere8d97702002-03-26 01:54:25 +00001202WINE_CONFIG_EXTRA_DIR(dlls/oleaut32/tests)
Juergen Schmiedc74a7912002-05-09 19:48:07 +00001203WINE_CONFIG_EXTRA_DIR(dlls/shlwapi/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001204WINE_CONFIG_EXTRA_DIR(dlls/user/dde)
1205WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001206WINE_CONFIG_EXTRA_DIR(dlls/user/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001207WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
Alexandre Julliard9a68b7b2002-04-27 21:19:22 +00001208WINE_CONFIG_EXTRA_DIR(dlls/winsock/tests)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001209WINE_CONFIG_EXTRA_DIR(files)
1210WINE_CONFIG_EXTRA_DIR(graphics)
1211WINE_CONFIG_EXTRA_DIR(graphics/x11drv)
1212WINE_CONFIG_EXTRA_DIR(if1632)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001213WINE_CONFIG_EXTRA_DIR(include/wine)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001214WINE_CONFIG_EXTRA_DIR(loader)
1215WINE_CONFIG_EXTRA_DIR(loader/ne)
1216WINE_CONFIG_EXTRA_DIR(memory)
1217WINE_CONFIG_EXTRA_DIR(misc)
1218WINE_CONFIG_EXTRA_DIR(msdos)
1219WINE_CONFIG_EXTRA_DIR(objects)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001220WINE_CONFIG_EXTRA_DIR(programs/regapi/tests)
1221WINE_CONFIG_EXTRA_DIR(programs/winetest/tests)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001222WINE_CONFIG_EXTRA_DIR(relay32)
1223WINE_CONFIG_EXTRA_DIR(scheduler)
1224WINE_CONFIG_EXTRA_DIR(win32)
1225WINE_CONFIG_EXTRA_DIR(windows)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001226
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001227MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001228AC_SUBST_FILE(MAKE_RULES)
1229
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001230MAKE_DLL_RULES=dlls/Makedll.rules
1231AC_SUBST_FILE(MAKE_DLL_RULES)
1232
Alexandre Julliard626f4252000-11-10 23:35:20 +00001233MAKE_PROG_RULES=programs/Makeprog.rules
1234AC_SUBST_FILE(MAKE_PROG_RULES)
1235
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001236AC_CONFIG_FILES([
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001237Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001238dlls/Makedll.rules
1239programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001240Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001241debugger/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001242dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001243dlls/advapi32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001244dlls/avicap32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001245dlls/avifil32/Makefile
John K. Hohm34909c22002-05-14 21:50:56 +00001246dlls/comcat/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001247dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001248dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001249dlls/crtdll/Makefile
Travis Michielsen0f21ee82002-01-10 19:41:11 +00001250dlls/crypt32/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001251dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001252dlls/ddraw/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001253dlls/devenum/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001254dlls/dinput/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001255dlls/dplay/Makefile
Peter Hunnisett22b861c1999-09-28 16:35:32 +00001256dlls/dplayx/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001257dlls/dsound/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001258dlls/gdi/Makefile
Marcus Meissnerb63ab442001-06-08 19:02:57 +00001259dlls/glu32/Makefile
Francois Gougetedf3e431999-11-07 21:22:17 +00001260dlls/icmp/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001261dlls/imagehlp/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001262dlls/imm32/Makefile
Dimitrie O. Paun36b5b6b2000-06-03 00:07:44 +00001263dlls/kernel/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001264dlls/lzexpand/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001265dlls/mapi32/Makefile
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001266dlls/mpr/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001267dlls/msacm/Makefile
Hidenori Takeshima0307f6d2002-03-23 20:18:11 +00001268dlls/msacm/imaadp32/Makefile
Hidenori Takeshimabcb9c462002-03-22 19:16:10 +00001269dlls/msacm/msg711/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001270dlls/msdmo/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001271dlls/msimg32/Makefile
Mike McCormackf6be0442002-04-08 23:56:14 +00001272dlls/msisys/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001273dlls/msnet32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001274dlls/msrle32/Makefile
Jon Griffiths1db20bf2001-01-10 23:59:25 +00001275dlls/msvcrt/Makefile
Aric Stewartc2a5ebc2002-01-29 18:09:46 +00001276dlls/msvcrt20/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001277dlls/msvideo/Makefile
Mike McCormack2e40b962001-11-06 17:52:36 +00001278dlls/netapi32/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001279dlls/ntdll/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001280dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001281dlls/ole32/Makefile
1282dlls/oleaut32/Makefile
1283dlls/olecli/Makefile
1284dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001285dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001286dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001287dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001288dlls/psapi/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001289dlls/qcap/Makefile
Hidenori Takeshimab7d4b4e2001-07-02 18:57:22 +00001290dlls/quartz/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001291dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001292dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001293dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001294dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001295dlls/setupapi/Makefile
John R. Sheetsbc80a3b2001-01-11 22:32:44 +00001296dlls/shdocvw/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001297dlls/shell32/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001298dlls/shfolder/Makefile
1299dlls/shlwapi/Makefile
Patrik Stridvall4c692b92002-04-29 18:43:35 +00001300dlls/snmpapi/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001301dlls/sti/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001302dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001303dlls/ttydrv/Makefile
Shi Quan He6b0720f2002-03-21 02:58:39 +00001304dlls/twain/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001305dlls/url/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001306dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001307dlls/user/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001308dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001309dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001310dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001311dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001312dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001313dlls/wininet/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001314dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001315dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001316dlls/winmm/mcianim/Makefile
1317dlls/winmm/mciavi/Makefile
1318dlls/winmm/mcicda/Makefile
1319dlls/winmm/mciseq/Makefile
1320dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001321dlls/winmm/midimap/Makefile
1322dlls/winmm/wavemap/Makefile
Chris Morgan9b0ba7c2002-03-21 01:38:19 +00001323dlls/winmm/winearts/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001324dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001325dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001326dlls/winsock/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001327dlls/winspool/Makefile
Rein Klazes2a4c68b2001-04-16 19:36:12 +00001328dlls/wintrust/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001329dlls/wow32/Makefile
1330dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001331dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001332documentation/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001333include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001334library/Makefile
1335libtest/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001336miscemu/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001337ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001338programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001339programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001340programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001341programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001342programs/control/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001343programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001344programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001345programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001346programs/regapi/Makefile
Andriy Palamarchuk4e2e1762002-04-11 23:58:40 +00001347programs/regedit/Makefile
Andriy Palamarchuk2f0d85c2002-04-29 23:47:39 +00001348programs/regsvr32/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001349programs/regtest/Makefile
1350programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001351programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001352programs/wcmd/Makefile
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001353programs/wineconsole/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001354programs/winemine/Makefile
Mike Wetherell0d8a9fa2002-05-05 20:31:54 +00001355programs/winepath/Makefile
Alexandre Julliardfc684342001-03-21 21:41:27 +00001356programs/winetest/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001357programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001358programs/winver/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001359server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001360tools/Makefile
Patrik Stridvall647ac512001-07-30 20:21:34 +00001361tools/winapi/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001362tools/winebuild/Makefile
Eric Pouechd786a122001-09-07 16:04:38 +00001363tools/winedump/Makefile
Bertho Stultiens30855912000-06-13 04:34:41 +00001364tools/wmc/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001365tools/wrc/Makefile
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001366tsx11/Makefile
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001367unicode/Makefile])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001368
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001369AC_OUTPUT
1370
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001371if test "$have_x" = "no"
1372then
1373 echo
1374 echo "*** Warning: X development files not found. Wine will be built without"
1375 echo "*** X support, which currently does not work, and would probably not be"
1376 echo "*** what you want anyway. You will need to install devel packages of"
Alexandre Julliard18e4b5e2002-01-04 18:52:40 +00001377 echo "*** Xlib/Xfree86 at the very least."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001378fi
1379
Alexandre Julliard638f1691999-01-17 16:32:32 +00001380if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1381then
1382 echo
1383 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1384 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001385fi
1386
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001387if test "$wine_cv_libc_reentrant" = "no"
1388then
1389 echo
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001390 echo "*** Warning: non-reentrant libc detected. Wine will be built without"
1391 echo "*** threading support. Consider upgrading libc to a more recent"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001392 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001393fi
1394
Alexandre Julliard867fb9d2002-04-24 22:24:43 +00001395if test "$have_x" = "yes" -a "$wine_cv_x_reentrant" != "yes"
1396then
1397 echo
1398 echo "*** Warning: non-reentrant X11 library detected. Multi-threaded"
1399 echo "*** applications won't work properly. You should upgrade your X11 library."
1400fi
1401
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001402if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001403then
1404 echo
1405 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001406 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1407fi
1408
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001409if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "x"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001410then
1411 echo
1412 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001413 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
Andreas Mohr18a9d742001-01-17 21:52:42 +00001414 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 +00001415 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001416fi
1417
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001418if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "xyes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001419then
1420 echo
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +00001421 echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001422 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1423 echo "*** support before reporting bugs."
1424fi
1425
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001426if test "$wine_cv_warn_cups_h" = "yes"
1427then
1428 echo
1429 echo "*** Note: You have cups runtime libraries, but no development"
1430 echo "*** libraries. Install the cups-devel package or whichever package"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001431 echo "*** contains cups.h to enable CUPS support in Wine."
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001432fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001433
Ian Pilcher563598d2001-05-16 20:56:05 +00001434if test "$wine_cv_msg_freetype" = "yes"
1435then
1436 echo
1437 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001438 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1439 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1440 echo "*** enable Wine to use TrueType fonts."
Ian Pilcher563598d2001-05-16 20:56:05 +00001441fi
1442
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001443echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001444echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001445echo
1446
1447dnl Local Variables:
1448dnl comment-start: "dnl "
1449dnl comment-end: ""
1450dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001451dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001452dnl End: