blob: 948abe36f6e4b7fdd3bdfb15f643a8e572942494 [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)
Alexandre Julliard7cae5582002-06-01 02:55:48 +00009AC_CONFIG_SRCDIR(server/atom.c)
Alexandre Julliardf5818d22002-02-14 19:47:29 +000010AC_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
Alexandre Julliardeb5f89c2002-05-24 21:22:10 +000075AC_CHECK_TOOL(LD,ld,ld)
Alexandre Julliardfc01b722002-05-12 03:16:39 +000076AC_CHECK_TOOL(AR,ar,ar)
Alexandre Julliardff8331e1995-09-18 11:19:54 +000077AC_PROG_RANLIB
Alexandre Julliardfc01b722002-05-12 03:16:39 +000078AC_CHECK_TOOL(STRIP,strip,strip)
79AC_CHECK_TOOL(WINDRES,windres,false)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000080AC_PROG_INSTALL
Alexandre Julliard641ee761997-08-04 16:34:36 +000081AC_PROG_LN_S
Alexandre Julliarddf234a92002-05-22 02:10:39 +000082WINE_PROG_LN
Mike McCormacke0df32f2000-08-11 21:15:21 +000083AC_CHECK_PROG(C2MAN,c2man,c2man,\$(TOPSRCDIR)/tools/c2man.pl)
Bill Medland91372b32002-04-20 21:00:42 +000084AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
Alexandre Julliard02e90081998-01-04 17:49:09 +000085
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000086dnl Check for lint
87AC_CHECK_PROGS(LINT, lclint lint)
88if test "$LINT" = "lint"
89then
90 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
91 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
92fi
93AC_SUBST(LINT)
94AC_SUBST(LINTFLAGS)
95
Alexandre Julliard02e90081998-01-04 17:49:09 +000096dnl **** Check for some libraries ****
97
Marcus Meissnerb63ab442001-06-08 19:02:57 +000098dnl Check for -lm
Howard Abrams13277481999-07-10 13:16:29 +000099AC_CHECK_LIB(m,sqrt)
Alexandre Julliardd37eb361997-07-20 16:23:21 +0000100dnl Check for -li386 for NetBSD and OpenBSD
Alexandre Julliard02e90081998-01-04 17:49:09 +0000101AC_CHECK_LIB(i386,i386_set_ldt)
Todd Vierlingecc76691998-12-15 17:49:02 +0000102dnl Check for -lossaudio for NetBSD
103AC_CHECK_LIB(ossaudio,_oss_ioctl)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000104dnl Check for -lw for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000105AC_CHECK_FUNCS(iswalnum,,AC_CHECK_LIB(w,iswalnum))
Patrik Stridvallea584721998-11-01 16:22:07 +0000106dnl Check for -lnsl for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000107AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000108dnl Check for -lsocket for Solaris
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000109AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
Francois Gouget3b943bc2002-04-01 21:05:15 +0000110dnl Check for -lresolv for Solaris
Alexandre Julliardc5552742002-04-03 20:24:44 +0000111AC_CHECK_FUNCS(inet_aton,,AC_CHECK_LIB(resolv,inet_aton))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000112dnl Check for -lxpg4 for FreeBSD
Satsuki Fujishima66fb6072001-03-19 19:19:59 +0000113AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
Alexandre Julliard0e7bd081999-05-02 11:46:02 +0000114dnl Check for -lmmap for OS/2
115AC_CHECK_LIB(mmap,mmap)
Alexandre Julliard3f510ad2002-01-01 01:13:03 +0000116
Marcus Meissner252b0fe2001-08-06 18:52:14 +0000117JPEGLIB=""
118AC_SUBST(JPEGLIB)
119AC_CHECK_HEADERS(jpeglib.h,
120 AC_CHECK_LIB(jpeg,jpeg_start_decompress,
121 AC_DEFINE(HAVE_LIBJPEG,1,[Define if you have libjpeg including devel headers])
122 JPEGLIB="-ljpeg"
123 )
124)
125
126
Patrik Stridvallea584721998-11-01 16:22:07 +0000127AC_SUBST(XLIB)
Patrik Stridvall2941a212000-04-25 20:34:22 +0000128AC_SUBST(XFILES)
129XFILES=""
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000130AC_SUBST(OPENGLFILES)
131OPENGLFILES=""
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000132AC_SUBST(GLU32FILES)
Alexandre Julliardf33f7f02001-09-17 20:09:08 +0000133GLU32FILES=""
Patrik Stridvallea584721998-11-01 16:22:07 +0000134if test "$have_x" = "yes"
135then
Patrik Stridvall24110281999-02-04 10:09:54 +0000136 XLIB="-lXext -lX11"
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000137 ac_save_CPPFLAGS="$CPPFLAGS"
138 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Patrik Stridvall24110281999-02-04 10:09:54 +0000139
Huw D M Daviesff453fc2001-09-14 01:04:25 +0000140 dnl *** All of the following tests require X11/Xlib.h
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000141 AC_CHECK_HEADERS(X11/Xlib.h,
142 [
Ove Kaavenc90fb252001-01-02 22:39:14 +0000143 dnl *** Check for X keyboard extension
144 AC_CHECK_HEADERS(X11/XKBlib.h,
145 [ dnl *** If X11/XKBlib.h exists...
146 AC_CHECK_LIB(X11, XkbQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000147 AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
Ove Kaavenc90fb252001-01-02 22:39:14 +0000148 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
149 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000150 AC_MSG_WARN([[Xkb extension not found, Wine will be built without it]])
Ove Kaavenc90fb252001-01-02 22:39:14 +0000151 )
152
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000153 dnl *** Check for X Shm extension
154 AC_CHECK_HEADERS(X11/extensions/XShm.h,
155 [ dnl *** If X11/extensions/XShm.h exists...
156 AC_CHECK_LIB(Xext, XShmQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000157 AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000158 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
159 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000160 AC_MSG_WARN([[XShm extension not found, Wine will be built without it]]),
161 [#include <X11/Xlib.h>])
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000162
Francois Jacques5b6879c2000-07-28 23:04:54 +0000163 dnl *** Check for X shape extension
Ove Kaavenc90fb252001-01-02 22:39:14 +0000164 AC_CHECK_HEADERS(X11/extensions/shape.h,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000165 [ dnl *** If X11/extensions/shape.h exists...
166 AC_CHECK_LIB(Xext,XShapeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000167 AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000168 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
169 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000170 AC_MSG_WARN([[XShape extension not found, Wine will be built without it]]),
171 [#include <X11/Xlib.h>])
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000172
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000173 dnl *** Check for XFree86 DGA / DGA 2.0 extension
174 AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000175 [ dnl *** If X11/extensions/xf86dga.h exists, check
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000176 dnl *** for XDGAQueryExtension()...
177 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
178 [ dnl *** If found...
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000179 AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
180 [Define if you have the Xxf86dga library version 2])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000181 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000182 ],
183 [ dnl *** If not found, look for XF86DGAQueryExtension()
184 dnl *** instead (DGA 2.0 not found)...
185 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000186 [ AC_DEFINE(HAVE_LIBXXF86DGA, 1,
187 [Define if you have the Xxf86dga library version 1])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000188 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000189 ],,
190 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
191 )
192 ],
193 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
194 )
195 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000196 AC_MSG_WARN([[DGA extension not found, Wine will be built without it]]),
197 [#include <X11/Xlib.h>])
Patrik Stridvall24110281999-02-04 10:09:54 +0000198
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000199 dnl *** Check for XFree86 VMODE extension
200 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
201 [ dnl *** If X11/extensions/xf86vmode.h exists...
202 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000203 [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000204 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
205 ],,
206 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
207 )
208 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000209 AC_MSG_WARN([[XFree86 VMODE extension not found, Wine will be built without it]]),
210 [#include <X11/Xlib.h>])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000211
212 dnl *** Check for XVideo extension supporting XvImages
213 AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
214 [ dnl *** If X11/extensions/Xvlib.h exists...
215 AC_CHECK_LIB(Xv, XvShmCreateImage,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000216 [ AC_DEFINE(HAVE_XVIDEO, 1, [Define if the X libraries support XVideo])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000217 X_PRE_LIBS="$X_PRE_LIBS -lXv"
218 ],,
219 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
220 )
221 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000222 AC_MSG_WARN([[XVideo extension not found, Wine will be built without it]]),
223 [#include <X11/Xlib.h>])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000224
Alexandre Julliard21e91662002-04-23 22:06:41 +0000225 dnl *** Check for XRender include file
226 AC_CHECK_HEADERS(X11/extensions/Xrender.h,,,[#include <X11/Xlib.h>])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000227 ]
228 ) dnl *** End of X11/Xlib.h check
Lionel Ulmer5c085701999-02-28 19:48:53 +0000229
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000230 dnl Check for the presence of OpenGL
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000231 if test "x$enable_opengl" != "xno"
Patrik Stridvall24110281999-02-04 10:09:54 +0000232 then
Francois Gouget42dcd972002-01-29 17:52:28 +0000233 if test -f /usr/X11R6/lib/libGL.a -a ! -f /usr/X11R6/lib/libGL.so
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000234 then
235 AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
236This prevents linking to OpenGL. Delete the file and restart configure.])
237 fi
238
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000239 AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
Marcus Meissner22a969b2000-08-08 20:46:50 +0000240 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000241 then
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000242 AC_CHECK_HEADERS(GL/glext.h,,,[#include <GL/glx.h>])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000243 dnl Check for some problems due to old Mesa versions
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000244 AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000245 AC_TRY_COMPILE(
Lionel Ulmer48c08162000-01-05 01:51:02 +0000246 [#include <GL/gl.h>],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000247 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000248 [wine_cv_opengl_version_OK="yes"],
249 [wine_cv_opengl_version_OK="no"]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000250 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000251 )
252
253 dnl Check for the thread-safety of the OpenGL library
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000254 AC_CACHE_CHECK([for thread-safe OpenGL version],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000255 wine_cv_opengl_version_threadsafe,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000256 [saved_libs=$LIBS
257 LIBS="$X_LIBS -lGL"
258 AC_TRY_LINK([],[pthread_getspecific();],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000259 [wine_cv_opengl_version_threadsafe="yes"],
260 [wine_cv_opengl_version_threadsafe="no"])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000261 LIBS=$saved_libs]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000262 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000263
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000264 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 +0000265 then
Andreas Mohr4eefb962000-08-01 00:27:35 +0000266 dnl Check for the presence of the library
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000267 AC_CHECK_LIB(GL,glXCreateContext,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000268 X_PRE_LIBS="$X_PRE_LIBS -lGL"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000269 ,,
270 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
271
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000272 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000273 then
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000274 OPENGLFILES='$(OPENGLFILES)'
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000275 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000276
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000277 AC_CHECK_LIB(GL,glXGetProcAddressARB,
278 AC_DEFINE(HAVE_GLX_GETPROCADDRESS, 1,
279 [Define if the OpenGL library supports the glXGetProcAddressARB call]),,
280 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000281
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000282 if test "$ac_cv_lib_GL_glXGetProcAddressARB" = "yes"
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000283 then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000284 AC_CACHE_CHECK([for OpenGL extension functions prototypes], wine_cv_extension_prototypes,
285 [AC_TRY_COMPILE([#include <GL/gl.h>
Marcus Meissner6bb6d4c2000-08-09 22:21:08 +0000286 #ifdef HAVE_GL_GLEXT_H
287 # include <GL/glext.h>
288 #endif
289 ],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000290 [PFNGLCOLORTABLEEXTPROC test_proc;],
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000291 [wine_cv_extension_prototypes="yes"],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000292 [wine_cv_extension_prototypes="no"]
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000293 )]
Lionel Ulmer1434d872000-07-23 14:23:31 +0000294 )
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000295 if test "$wine_cv_extension_prototypes" = "yes"
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000296 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000297 AC_DEFINE(HAVE_GLEXT_PROTOTYPES, 1,
298 [Define if the OpenGL headers define extension typedefs])
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000299 fi
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000300 fi
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000301
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000302 fi
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000303 dnl Check for GLU32 library.
Marcus Meissner6e9ab402001-08-08 23:21:16 +0000304 AC_CHECK_LIB(GLU,gluLookAt,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000305 [X_PRE_LIBS="$X_PRE_LIBS -lGLU"
306 GLU32FILES='$(GLU32FILES)']
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000307 ,,
308 $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
309 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000310 fi
311 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000312 fi
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000313
314 CPPFLAGS="$ac_save_CPPFLAGS"
Patrik Stridvall2941a212000-04-25 20:34:22 +0000315 XFILES='$(XFILES)'
Patrik Stridvallea584721998-11-01 16:22:07 +0000316else
317 XLIB=""
318 X_CFLAGS=""
319 X_LIBS=""
320fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000321
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000322dnl **** Check which curses lib to use ***
Alexandre Julliard48957682001-12-26 23:08:31 +0000323CURSESLIBS=""
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000324if test "x$with_curses" != "xno"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000325then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000326 AC_CHECK_HEADERS(ncurses.h,
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000327 [AC_CHECK_LIB(ncurses,waddch,
Alexandre Julliard48957682001-12-26 23:08:31 +0000328 [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
329 CURSESLIBS="-lncurses"],
330 [AC_CHECK_HEADERS(curses.h,
331 [AC_CHECK_LIB(curses,waddch,
332 [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000333 CURSESLIBS="-lcurses"])])])])
Alexandre Julliard48957682001-12-26 23:08:31 +0000334 saved_libs="$LIBS"
335 LIBS="$CURSESLIBS $LIBS"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000336 AC_CHECK_FUNCS(getbkgd resizeterm)
Alexandre Julliard48957682001-12-26 23:08:31 +0000337 LIBS="$saved_libs"
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000338fi
Alexandre Julliard48957682001-12-26 23:08:31 +0000339AC_SUBST(CURSESLIBS)
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000340
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000341CUPSLIBS=""
342dnl **** Check for CUPS ****
Marcus Meissner3ee02ba2001-04-30 18:18:50 +0000343wine_cv_warn_cups_h=no
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000344AC_CHECK_LIB(cups,cupsGetPPD,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000345 [AC_CHECK_HEADER(cups/cups.h,
346 [AC_DEFINE(HAVE_CUPS, 1, [Define if we have CUPS])
347 CUPSLIBS="-lcups"],
348 wine_cv_warn_cups_h=yes)]
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000349)
350AC_SUBST(CUPSLIBS)
351
Shi Quan He6b0720f2002-03-21 02:58:39 +0000352dnl **** Check for SANE ****
353AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
354if test "$sane_devel" = "no"
355then
356 SANELIBS=""
357 SANEINCL=""
358else
359 SANELIBS="`$sane_devel --libs`"
360 SANEINCL="`$sane_devel --cflags`"
361 ac_save_CPPFLAGS="$CPPFLAGS"
362 ac_save_LIBS="$LIBS"
363 CPPFLAGS="$CPPFLAGS $SANEINCL"
364 LIBS="$LIBS $SANELIBS"
Alexandre Julliard96328b32002-03-31 19:23:41 +0000365 AC_CHECK_HEADER(sane/sane.h,
366 [AC_CHECK_LIB(sane,sane_open,
367 [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
368 [SANELIBS=""
369 SANEINCL=""])],
370 [SANELIBS=""
371 SANEINCL=""])
Shi Quan He6b0720f2002-03-21 02:58:39 +0000372 LIBS="$ac_save_LIBS"
373 CPPFLAGS="$ac_save_CPPFLAGS"
374fi
375AC_SUBST(SANELIBS)
376AC_SUBST(SANEINCL)
377
Ian Pilcher563598d2001-05-16 20:56:05 +0000378dnl **** Check for FreeType 2 ****
Dmitry Timoshkov8871a112001-11-06 22:26:53 +0000379AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
Ian Pilcher563598d2001-05-16 20:56:05 +0000380if test "$ft_lib" = "no"
381then
Ian Pilcher563598d2001-05-16 20:56:05 +0000382 FREETYPEINCL=""
383 wine_cv_msg_freetype=no
384else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000385 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
386 if test "$ft_devel" = "no"
387 then
388 AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
389 if test "$ft_devel2" = "freetype2-config"
390 then
391 ft_devel=$ft_devel2
392 fi
393 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000394 if test "$ft_devel" = "no"
395 then
Ian Pilcher563598d2001-05-16 20:56:05 +0000396 FREETYPEINCL=""
397 wine_cv_msg_freetype=yes
398 else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000399 FREETYPEINCL=`$ft_devel --cflags`
Ian Pilcher40432fe2001-06-06 21:05:23 +0000400 ac_save_CPPFLAGS="$CPPFLAGS"
401 CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
402 AC_CHECK_HEADERS(freetype/freetype.h \
403 freetype/ftglyph.h \
404 freetype/tttables.h \
405 freetype/ftnames.h \
406 freetype/ftsnames.h \
Huw D M Davies814654e2001-09-12 20:21:06 +0000407 freetype/ttnameid.h \
Huw D M Davies4e2024e2001-10-23 20:06:32 +0000408 freetype/ftoutln.h \
409 freetype/internal/sfnt.h)
Alexandre Julliard18d75732002-01-29 03:02:50 +0000410 AC_TRY_CPP([#include <ft2build.h>
411 #include <freetype/fttrigon.h>],
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000412 [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
413 [Define if you have the <freetype/fttrigon.h> header file.])
414 wine_cv_fttrigon=yes],
415 wine_cv_fttrigon=no)
Ian Pilcher40432fe2001-06-06 21:05:23 +0000416 CPPFLAGS="$ac_save_CPPFLAGS"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000417 dnl Check that we have at least freetype/freetype.h
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000418 if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000419 then
420 AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
421 wine_cv_msg_freetype=no
422 else
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000423 FREETYPEINCL=""
424 wine_cv_msg_freetype=yes
425 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000426 fi
427fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000428AC_SUBST(FREETYPEINCL)
429
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000430dnl **** Check for parport (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000431AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000432 AC_TRY_COMPILE(
433 [#include <linux/ppdev.h>],
434 [ioctl (1,PPCLAIM,0)],
435 [ac_cv_c_ppdev="yes"],
436 [ac_cv_c_ppdev="no"])
437 )
438if test "$ac_cv_c_ppdev" = "yes"
439then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000440 AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000441fi
442
Pavel Roskin94d99641998-12-26 11:52:51 +0000443dnl **** Check for IPX (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000444AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
Pavel Roskin94d99641998-12-26 11:52:51 +0000445 AC_TRY_COMPILE(
446 [#include <sys/socket.h>
447 #include <netipx/ipx.h>],
448 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000449 [ac_cv_c_ipx_gnu="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000450 [ac_cv_c_ipx_gnu="no"])
451 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000452if test "$ac_cv_c_ipx_gnu" = "yes"
453then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000454 AC_DEFINE(HAVE_IPX_GNU, 1, [Define if IPX should use netipx/ipx.h from libc])
Aaron Hopec23872d2000-01-15 23:43:21 +0000455fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000456
457if test "$ac_cv_c_ipx_gnu" = "no"
458then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000459 AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
Pavel Roskin94d99641998-12-26 11:52:51 +0000460 AC_TRY_COMPILE(
461 [#include <sys/socket.h>
462 #include <asm/types.h>
463 #include <linux/ipx.h>],
464 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000465 [ac_cv_c_ipx_linux="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000466 [ac_cv_c_ipx_linux="no"])
467 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000468 if test "$ac_cv_c_ipx_linux" = "yes"
469 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000470 AC_DEFINE(HAVE_IPX_LINUX, 1, [Define if IPX includes are taken from Linux kernel])
Aaron Hopec23872d2000-01-15 23:43:21 +0000471 fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000472fi
473
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000474dnl **** Check for Open Sound System ****
Todd Vierlingecc76691998-12-15 17:49:02 +0000475AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000476
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000477AC_CACHE_CHECK([for Open Sound System],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000478 ac_cv_c_opensoundsystem,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000479 AC_TRY_COMPILE([
Todd Vierlingecc76691998-12-15 17:49:02 +0000480 #if defined(HAVE_SYS_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000481 #include <sys/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000482 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000483 #include <machine/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000484 #elif defined(HAVE_SOUNDCARD_H)
485 #include <soundcard.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000486 #endif
487 ],[
488
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000489/* check for one of the Open Sound System specific SNDCTL_ defines */
490#if !defined(SNDCTL_DSP_STEREO)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000491#error No open sound system
492#endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000493],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
494
495if test "$ac_cv_c_opensoundsystem" = "yes"
496then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000497 AC_DEFINE(HAVE_OSS, 1, [Define if you have the Open Sound system])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000498fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000499
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000500AC_CACHE_CHECK([for Open Sound System/MIDI interface],
Eric Pouech338d3b21999-05-22 18:52:21 +0000501 ac_cv_c_opensoundsystem_midi,
502 AC_TRY_COMPILE([
503 #if defined(HAVE_SYS_SOUNDCARD_H)
504 #include <sys/soundcard.h>
505 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
506 #include <machine/soundcard.h>
507 #elif defined(HAVE_SOUNDCARD_H)
508 #include <soundcard.h>
509 #endif
510 ],[
511
512/* check for one of the Open Sound System specific SNDCTL_SEQ defines */
513#if !defined(SNDCTL_SEQ_SYNC)
514#error No open sound system MIDI interface
515#endif
516],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
517
518if test "$ac_cv_c_opensoundsystem_midi" = "yes"
519then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000520 AC_DEFINE(HAVE_OSS_MIDI, 1, [Define if you have the Open Sound system (MIDI interface)])
Eric Pouech338d3b21999-05-22 18:52:21 +0000521fi
522
Chris Morgan9b0ba7c2002-03-21 01:38:19 +0000523dnl **** Check for aRts Sound Server ****
524AC_PATH_PROG(ARTSCCONFIG, artsc-config)
525AC_CACHE_CHECK([for aRts Sound server],
526 ac_cv_c_artsserver,
527 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"';
528 then
529 ac_cv_c_artsserver=no
530 else
531 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
532 ARTSC_LIBS=`$ARTSCCONFIG --libs`
533 ac_cv_c_artsserver=no
534 save_CFLAGS="$CFLAGS"
535 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
536 AC_TRY_COMPILE([
537 #include <artsc.h>
538 ],[
539 arts_stream_t stream;
540 ],[
541 ac_cv_c_artsserver=yes
542 ])
543 CFLAGS="$save_CFLAGS"
544 fi)
545
546if test "$ac_cv_c_artsserver" = "yes"
547then
548 AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
549 AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
550
551 AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])
552fi
553
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000554dnl **** Check for broken glibc mmap64 ****
555
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000556AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000557 AC_TRY_RUN([
558 #define _FILE_OFFSET_BITS 64
559 #include <stdio.h>
560 #include <unistd.h>
561 #include <fcntl.h>
562 #include <sys/mman.h>
563 #include <errno.h>
564
565 int main(int argc,char **argv) {
566 int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
567 if (fd == -1) exit(1);
568
569 unlink("conftest.map");
570
571 write(fd,"test",4);
572
573 if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
574 (errno == EINVAL)
575 ) {
576 exit(1);
577 }
578 close(fd);
579 fprintf(stderr,"success!\n");
580 exit(0);
581 }
582
583 ],
584 ac_cv_mmap64_works="yes",
585 ac_cv_mmap64_works="no",
586 ac_cv_mmap64_works="no") )
587
588if test "$ac_cv_mmap64_works" = "yes"
589then
590 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
591fi
592
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000593dnl **** Check for gcc strength-reduce bug ****
594
595if test "x${GCC}" = "xyes"
596then
597 CFLAGS="$CFLAGS -Wall"
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000598 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000599 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000600int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000601int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000602 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000603 unsigned int B = 3;
604 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000605 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000606 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
607 L[[i]] = 4;
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000608
Eric Pouech5aee80f2000-11-11 00:31:39 +0000609 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000610}],
611 ac_cv_c_gcc_strength_bug="no",
612 ac_cv_c_gcc_strength_bug="yes",
613 ac_cv_c_gcc_strength_bug="yes") )
614 if test "$ac_cv_c_gcc_strength_bug" = "yes"
615 then
616 CFLAGS="$CFLAGS -fno-strength-reduce"
617 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000618
619 dnl Check for -mpreferred-stack-boundary
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000620 AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support], ac_cv_c_gcc_stack_boundary,
621 [WINE_TRY_CFLAGS([-mpreferred-stack-boundary=2],
622 ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000623 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
624 then
625 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
626 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000627fi
628
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000629dnl **** Check if we need to place .type inside a .def directive ****
630
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000631AC_CACHE_CHECK([whether .type must sit inside a .def directive], ac_cv_c_type_in_def,
632 WINE_TRY_ASM_LINK(
633[ .globl _ac_test
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000634 .def _ac_test; .scl 2; .type 32; .endef
635_ac_test:
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000636 .long 0],,,
637 ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no"))
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000638if test "$ac_cv_c_type_in_def" = "yes"
639then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000640 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 +0000641fi
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000642
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000643dnl **** Check for underscore on external symbols ****
644
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000645AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
646 WINE_TRY_ASM_LINK(
647[ .globl _ac_test
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000648_ac_test:
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000649 .long 0],
650[extern int ac_test;],
651[if (ac_test) return 1],
652 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000653if test "$ac_cv_c_extern_prefix" = "yes"
654then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000655 AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1,
656 [Define if symbols declared in assembly code need an underscore prefix])
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000657fi
658
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000659dnl **** Check whether stdcall symbols need to be decorated ****
660
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000661AC_CACHE_CHECK([whether stdcall symbols need to be decorated], ac_cv_c_stdcall_decoration,
662 WINE_TRY_ASM_LINK(
663[ .globl _ac_test@0
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000664_ac_test@0:
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000665 .globl ac_test@0
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000666ac_test@0:],
667[extern void __attribute__((__stdcall__)) ac_test(void);],
668[ac_test()],
669 ac_cv_c_stdcall_decoration="yes",ac_cv_c_stdcall_decoration="no"))
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000670if test "$ac_cv_c_stdcall_decoration" = "yes"
671then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000672 AC_DEFINE(NEED_STDCALL_DECORATION, 1, [Define if stdcall symbols need to be decorated])
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000673fi
674
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000675dnl **** Check for .string in assembler ****
676
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000677AC_CACHE_CHECK([whether assembler accepts .string], ac_cv_c_asm_string,
678 WINE_TRY_ASM_LINK(
679[ .string "test"],,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no"))
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000680if test "$ac_cv_c_asm_string" = "yes"
681then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000682 AC_DEFINE(HAVE_ASM_STRING, 1, [Define to use .string instead of .ascii])
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000683fi
684
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000685dnl **** Check for working dll ****
686
Todd Vierling4b992b01998-12-15 15:26:27 +0000687LDSHARED=""
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000688LDDLLFLAGS=""
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000689DLLIBS=""
690
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000691case $host_os in
692 cygwin*|mingw32*)
693 AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
694 if test "$DLLWRAP" = "false"; then
695 LIBEXT="a"
696 else
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000697 dnl FIXME - check whether dllwrap works correctly...
698 LIBEXT="dll"
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000699 fi
700 ;;
701 *)
702 AC_CHECK_HEADERS(dlfcn.h,
703 [AC_CHECK_FUNCS(dlopen,,
704 [AC_CHECK_LIB(dl,dlopen,
705 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
706 DLLIBS="-ldl"],
707 [LIBEXT="a"])])],
708 [LIBEXT="a"])
709
710 if test "$LIBEXT" = "so"
711 then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000712 AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
713 [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
714 ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
Alexandre Julliard466ae142002-05-07 18:33:47 +0000715 if test "$ac_cv_c_dll_gnuelf" = "yes"
716 then
717 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
718 LDDLLFLAGS="-Wl,-Bsymbolic"
719 else
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000720 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
721 [WINE_TRY_CFLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
722 ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
Alexandre Julliard466ae142002-05-07 18:33:47 +0000723 if test "$ac_cv_c_dll_unixware" = "yes"
724 then
725 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
726 LDDLLFLAGS="-Wl,-B,symbolic"
727 fi
728 fi
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000729 fi
730 ;;
731esac
Alexandre Julliard0adad952000-01-26 01:45:58 +0000732
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000733if test "$LIBEXT" = "a"; then
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000734 AC_MSG_ERROR(
735[could not find a way to build shared libraries.
736It is currently not possible to build Wine without shared library
737(.so) support to allow transparent switch between .so and .dll files.
738If you are using Linux, you will need a newer binutils.]
739)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000740fi
741
Alexandre Julliard0adad952000-01-26 01:45:58 +0000742DLLFLAGS=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000743
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000744if test "$LIBEXT" = "so"; then
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000745 DLLFLAGS="-fPIC"
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000746 DLLEXT=".so"
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000747elif test "$LIBEXT" = "dll"; then
748 #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000749 DLLEXT=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000750fi
751
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000752case $build_os in
753 cygwin*|mingw32*)
754 LDPATH="PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\"" ;;
755 *)
756 LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"" ;;
757esac
758
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000759AC_SUBST(DLLIBS)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000760AC_SUBST(DLLFLAGS)
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000761AC_SUBST(DLLEXT)
Todd Vierling4b992b01998-12-15 15:26:27 +0000762AC_SUBST(LDSHARED)
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000763AC_SUBST(LDDLLFLAGS)
Alexandre Julliard0adad952000-01-26 01:45:58 +0000764AC_SUBST(LIBEXT)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000765AC_SUBST(LDPATH)
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000766
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000767dnl **** Get the soname for libraries that we load dynamically ****
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000768
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000769if test "$LIBEXT" = "so"
Alexandre Julliard598412e2001-01-17 20:22:22 +0000770then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000771 WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
772 WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
773 WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
774 WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
Alexandre Julliard598412e2001-01-17 20:22:22 +0000775fi
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000776
777
778dnl **** Check for reentrant libc ****
Alexandre Julliard598412e2001-01-17 20:22:22 +0000779
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000780wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000781dnl Linux style errno location
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000782WINE_CHECK_ERRNO([__errno_location], [wine_cv_libc_reentrant=__errno_location],
783 dnl FreeBSD style errno location
784 WINE_CHECK_ERRNO([__error], [wine_cv_libc_reentrant=__error],
785 dnl Solaris style errno location
786 WINE_CHECK_ERRNO([___errno], [wine_cv_libc_reentrant=___errno],
787 dnl UnixWare style errno location
788 WINE_CHECK_ERRNO([__thr_errno], [wine_cv_libc_reentrant=__thr_errno],
789 dnl NetBSD style errno location
790 WINE_CHECK_ERRNO([__errno], [wine_cv_libc_reentrant=__errno])
791))))
Alexandre Julliard598412e2001-01-17 20:22:22 +0000792
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000793if test "$wine_cv_libc_reentrant" != "no"
Ron Recorde977d6c1999-09-05 12:32:05 +0000794then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000795 AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant,
796 [Define to the name of the function returning errno for reentrant libc])
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000797fi
798
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000799dnl **** Check for reentrant X libraries ****
800dnl
801dnl This may fail to determine whether X libraries are reentrant if
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000802dnl AC_PATH_XTRA does not set x_libraries.
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000803
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000804if test "$have_x" = "yes"
Patrik Stridvall24110281999-02-04 10:09:54 +0000805then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000806AC_CACHE_CHECK( [for reentrant X libraries], wine_cv_x_reentrant,
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000807 [libX11_check=none
808 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
809 if test -r $dir/libX11.so; then
810 libX11_check="-D $dir/libX11.so"
811 break
812 fi
813 if test -r $dir/libX11.a; then
814 libX11_check="$dir/libX11.a"
815 break
816 fi
817 done
818 if test "$libX11_check" != "none"; then
819 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
820 then
821 wine_cv_x_reentrant=yes
822 else
823 wine_cv_x_reentrant=no
824 fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000825 else
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000826 wine_cv_x_reentrant=unknown
827 fi])
Patrik Stridvall24110281999-02-04 10:09:54 +0000828fi
Ulrich Weigand97591402000-12-19 03:38:53 +0000829
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000830dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000831
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000832AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000833AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000834 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000835 _lwp_create \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000836 _pclose \
837 _popen \
Steven Edwards0a8e15a2002-05-10 01:33:40 +0000838 _snprintf \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000839 _stricmp \
840 _strnicmp \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000841 chsize \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000842 clone \
Andreas Mohra7ca2ba2001-01-12 23:07:11 +0000843 ecvt \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000844 finite \
845 fpclass \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000846 ftruncate \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000847 ftruncate64 \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000848 getnetbyaddr \
849 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000850 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000851 getprotobyname \
852 getprotobynumber \
853 getservbyport \
854 getsockopt \
855 inet_network \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000856 lseek64 \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000857 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000858 memmove \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000859 mmap \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000860 pclose \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000861 popen \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000862 pread \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000863 pwrite \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000864 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000865 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000866 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000867 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000868 sigaltstack \
Steven Edwards0a8e15a2002-05-10 01:33:40 +0000869 snprintf \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000870 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000871 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000872 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000873 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000874 tcgetattr \
875 timegm \
876 usleep \
877 vfscanf \
878 wait4 \
879 waitpid \
880)
881
882dnl **** Check for header files ****
883
884AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000885 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000886 arpa/nameser.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000887 direct.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000888 elf.h \
889 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000890 ieeefp.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000891 io.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000892 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000893 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000894 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000895 linux/cdrom.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000896 linux/hdreg.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000897 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000898 linux/joystick.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000899 linux/major.h \
Laurent Pinchart0314a652002-05-01 22:01:30 +0000900 linux/param.h \
Lawson Whitney533e7ee2002-02-19 18:41:56 +0000901 linux/serial.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000902 linux/ucdrom.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000903 net/if.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000904 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000905 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000906 netinet/in_systm.h \
907 netinet/ip.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000908 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000909 pty.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000910 resolv.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000911 sched.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000912 scsi/sg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000913 socket.h \
Bang Jun-Youngeda758e2001-12-14 22:47:19 +0000914 stdint.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000915 strings.h \
916 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000917 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000918 sys/file.h \
919 sys/filio.h \
Michal Pasternak60983992002-03-29 18:04:43 +0000920 sys/inttypes.h \
Alexandre Julliardc3e06df2002-05-14 23:18:23 +0000921 sys/ioctl.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000922 sys/ipc.h \
Eric Pouech624cbd72001-08-10 22:29:21 +0000923 sys/link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000924 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000925 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000926 sys/modem.h \
927 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000928 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000929 sys/param.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000930 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +0000931 sys/reg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000932 sys/shm.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000933 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000934 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000935 sys/sockio.h \
936 sys/statfs.h \
937 sys/strtio.h \
938 sys/syscall.h \
Alexandre Julliard127ec922002-05-07 01:51:30 +0000939 sys/sysctl.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000940 sys/time.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000941 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000942 sys/v86.h \
943 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000944 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000945 sys/vm86.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000946 sys/wait.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000947 syscall.h \
Alexandre Julliardc3e06df2002-05-14 23:18:23 +0000948 termios.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000949 ucontext.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000950 unistd.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000951)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000952AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000953
954dnl **** Check for types ****
955
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000956AC_C_CONST
957AC_C_INLINE
Alexandre Julliard5769d1d2002-04-26 19:05:15 +0000958AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000959AC_CHECK_SIZEOF(long long,0)
960
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000961AC_CACHE_CHECK([whether linux/input.h is for real],
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000962 wine_cv_linux_input_h,
963 AC_TRY_COMPILE([
964 #include <linux/input.h>
965 ] , [
966 int foo = EVIOCGBIT(EV_ABS,42);
967 int bar = BTN_PINKIE;
968 int fortytwo = 42;
969 ],
970 wine_cv_linux_input_h=yes,
971 wine_cv_linux_input_h=no,
972 no
973 )
974 )
975 if test "$wine_cv_linux_input_h" = "yes"
976 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000977 AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H, 1,
978 [Define if we have linux/input.h AND it contains the INPUT event API])
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000979 fi
980
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000981
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000982AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
Rein Klazesff7a61f2000-09-24 19:41:57 +0000983 wine_cv_linux_gethostbyname_r_6,
984 AC_TRY_COMPILE([
985#include <netdb.h>
986 ], [
987 char *name=NULL;
988 struct hostent he;
989 struct hostent *result;
990 char *buf=NULL;
991 int bufsize=0;
992 int res,errnr;
993 char *addr=NULL;
994 int addrlen=0;
995 int addrtype=0;
996 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
997 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
998 ],
999 wine_cv_linux_gethostbyname_r_6=yes,
1000 wine_cv_linux_gethostbyname_r_6=no
1001 )
1002 )
1003 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1004 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001005 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1006 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
Rein Klazesff7a61f2000-09-24 19:41:57 +00001007 fi
1008
Marcus Meissner028e9a11999-08-04 15:07:56 +00001009if test "$ac_cv_header_linux_joystick_h" = "yes"
1010then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001011 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
Marcus Meissner028e9a11999-08-04 15:07:56 +00001012 wine_cv_linux_joystick_22_api,
1013 AC_TRY_COMPILE([
1014 #include <sys/ioctl.h>
1015 #include <linux/joystick.h>
1016
1017 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +00001018 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1019 #error "no 2.2 header"
1020 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +00001021 ],/*empty*/,
1022 wine_cv_linux_joystick_22_api=yes,
1023 wine_cv_linux_joystick_22_api=no,
1024 wine_cv_linux_joystick_22_api=no
1025 )
1026 )
Rein Klazes87d224a2000-04-24 17:33:49 +00001027 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +00001028 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001029 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1030 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
Marcus Meissner028e9a11999-08-04 15:07:56 +00001031 fi
1032fi
1033
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001034dnl **** statfs checks ****
1035
1036if test "$ac_cv_header_sys_vfs_h" = "yes"
1037then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001038 AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001039 wine_cv_sys_vfs_has_statfs,
1040 AC_TRY_COMPILE([
1041 #include <sys/types.h>
1042 #ifdef HAVE_SYS_PARAM_H
1043 # include <sys/param.h>
1044 #endif
1045 #include <sys/vfs.h>
1046 ],[
1047 struct statfs stfs;
1048
1049 memset(&stfs,0,sizeof(stfs));
1050 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1051 )
1052 )
1053 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1054 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001055 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1056 [Define if the struct statfs is defined by <sys/vfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001057 fi
1058fi
1059
1060if test "$ac_cv_header_sys_statfs_h" = "yes"
1061then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001062 AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001063 wine_cv_sys_statfs_has_statfs,
1064 AC_TRY_COMPILE([
1065 #include <sys/types.h>
1066 #ifdef HAVE_SYS_PARAM_H
1067 # include <sys/param.h>
1068 #endif
1069 #include <sys/statfs.h>
1070 ],[
1071 struct statfs stfs;
1072 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1073 )
1074 )
1075 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1076 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001077 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1078 [Define if the struct statfs is defined by <sys/statfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001079 fi
1080fi
1081
1082if test "$ac_cv_header_sys_mount_h" = "yes"
1083then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001084 AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001085 wine_cv_sys_mount_has_statfs,
1086 AC_TRY_COMPILE([
1087 #include <sys/types.h>
1088 #ifdef HAVE_SYS_PARAM_H
1089 # include <sys/param.h>
1090 #endif
1091 #include <sys/mount.h>
1092 ],[
1093 struct statfs stfs;
1094 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1095 )
1096 )
1097 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1098 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001099 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1100 [Define if the struct statfs is defined by <sys/mount.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001101 fi
1102fi
1103
1104dnl **** FIXME: what about mixed cases, where we need two of them? ***
1105
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001106WINE_CHECK_STRUCT_MEMBER(statfs,f_bfree,
1107[#include <sys/types.h>
1108#ifdef HAVE_SYS_PARAM_H
1109# include <sys/param.h>
1110#endif
1111#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1112# include <sys/mount.h>
1113#else
1114# ifdef STATFS_DEFINED_BY_SYS_VFS
1115# include <sys/vfs.h>
1116# else
1117# ifdef STATFS_DEFINED_BY_SYS_STATFS
1118# include <sys/statfs.h>
1119# endif
1120# endif
1121#endif],
1122 [AC_DEFINE(STATFS_HAS_BFREE, 1, [Define if the struct statfs has the member bfree])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001123
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001124WINE_CHECK_STRUCT_MEMBER(statfs,f_bavail,
1125[#include <sys/types.h>
1126#ifdef HAVE_SYS_PARAM_H
1127# include <sys/param.h>
1128#endif
1129#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1130# include <sys/mount.h>
1131#else
1132# ifdef STATFS_DEFINED_BY_SYS_VFS
1133# include <sys/vfs.h>
1134# else
1135# ifdef STATFS_DEFINED_BY_SYS_STATFS
1136# include <sys/statfs.h>
1137# endif
1138# endif
1139#endif],
1140 [AC_DEFINE(STATFS_HAS_BAVAIL, 1, [Define if the struct statfs has the member bavail])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001141
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001142dnl Check for file descriptor passing with msg_accrights
1143WINE_CHECK_STRUCT_MEMBER(msghdr,msg_accrights,
1144[#include <sys/types.h>
1145#include <sys/socket.h>],
1146 [AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001147
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001148dnl Check for the sa_len member in struct sockaddr
1149WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len,
1150[#include <sys/types.h>
1151#include <sys/socket.h>],
1152 [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001153
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001154dnl Check for the sun_len member in struct sockaddr_un
1155WINE_CHECK_STRUCT_MEMBER(sockaddr_un,sun_len,
1156[#include <sys/types.h>
Patrik Stridvall09da9662001-07-08 22:30:50 +00001157#include <sys/socket.h>
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001158#include <sys/un.h>],
1159 [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])])
Juergen Lock2d33ab92000-02-13 16:03:29 +00001160
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001161dnl *** check for the need to define __i386__
1162
Alexandre Julliardfc01b722002-05-12 03:16:39 +00001163case $host_cpu in
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001164 *i[3456789]86* )
1165 AC_CACHE_CHECK([whether we need to define __i386__],ac_cv_cpp_def_i386,
1166 AC_EGREP_CPP(yes,[#ifndef __i386__
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001167yes
1168#endif],
1169 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001170 ;;
1171esac
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001172if test "$ac_cv_cpp_def_i386" = "yes"
1173then
1174 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001175 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001176fi
1177
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001178dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001179
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001180AH_TOP([#define __WINE_CONFIG_H])
1181
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001182WINE_CONFIG_EXTRA_DIR(controls)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001183WINE_CONFIG_EXTRA_DIR(dlls/ddraw/d3ddevice)
1184WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dclipper)
1185WINE_CONFIG_EXTRA_DIR(dlls/ddraw/ddraw)
1186WINE_CONFIG_EXTRA_DIR(dlls/ddraw/direct3d)
1187WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dpalette)
1188WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dsurface)
1189WINE_CONFIG_EXTRA_DIR(dlls/dinput/joystick)
1190WINE_CONFIG_EXTRA_DIR(dlls/dinput/keyboard)
1191WINE_CONFIG_EXTRA_DIR(dlls/dinput/mouse)
Alexandre Julliard89118562002-03-27 21:13:40 +00001192WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1193WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1194WINE_CONFIG_EXTRA_DIR(dlls/gdi/win16drv)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001195WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001196WINE_CONFIG_EXTRA_DIR(dlls/kernel/tests)
Marcus Meissnere8d97702002-03-26 01:54:25 +00001197WINE_CONFIG_EXTRA_DIR(dlls/oleaut32/tests)
Juergen Schmiedc74a7912002-05-09 19:48:07 +00001198WINE_CONFIG_EXTRA_DIR(dlls/shlwapi/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001199WINE_CONFIG_EXTRA_DIR(dlls/user/dde)
1200WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001201WINE_CONFIG_EXTRA_DIR(dlls/user/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001202WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
Alexandre Julliard9a68b7b2002-04-27 21:19:22 +00001203WINE_CONFIG_EXTRA_DIR(dlls/winsock/tests)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001204WINE_CONFIG_EXTRA_DIR(files)
1205WINE_CONFIG_EXTRA_DIR(graphics)
1206WINE_CONFIG_EXTRA_DIR(graphics/x11drv)
1207WINE_CONFIG_EXTRA_DIR(if1632)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001208WINE_CONFIG_EXTRA_DIR(include/wine)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001209WINE_CONFIG_EXTRA_DIR(loader)
1210WINE_CONFIG_EXTRA_DIR(loader/ne)
1211WINE_CONFIG_EXTRA_DIR(memory)
1212WINE_CONFIG_EXTRA_DIR(misc)
1213WINE_CONFIG_EXTRA_DIR(msdos)
1214WINE_CONFIG_EXTRA_DIR(objects)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001215WINE_CONFIG_EXTRA_DIR(programs/regapi/tests)
1216WINE_CONFIG_EXTRA_DIR(programs/winetest/tests)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001217WINE_CONFIG_EXTRA_DIR(relay32)
1218WINE_CONFIG_EXTRA_DIR(scheduler)
1219WINE_CONFIG_EXTRA_DIR(win32)
1220WINE_CONFIG_EXTRA_DIR(windows)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001221
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001222MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001223AC_SUBST_FILE(MAKE_RULES)
1224
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001225MAKE_DLL_RULES=dlls/Makedll.rules
1226AC_SUBST_FILE(MAKE_DLL_RULES)
1227
Alexandre Julliard626f4252000-11-10 23:35:20 +00001228MAKE_PROG_RULES=programs/Makeprog.rules
1229AC_SUBST_FILE(MAKE_PROG_RULES)
1230
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001231AC_CONFIG_FILES([
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001232Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001233dlls/Makedll.rules
1234programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001235Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001236debugger/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001237dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001238dlls/advapi32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001239dlls/avicap32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001240dlls/avifil32/Makefile
John K. Hohm34909c22002-05-14 21:50:56 +00001241dlls/comcat/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001242dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001243dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001244dlls/crtdll/Makefile
Travis Michielsen0f21ee82002-01-10 19:41:11 +00001245dlls/crypt32/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001246dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001247dlls/ddraw/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001248dlls/devenum/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001249dlls/dinput/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001250dlls/dplay/Makefile
Peter Hunnisett22b861c1999-09-28 16:35:32 +00001251dlls/dplayx/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001252dlls/dsound/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001253dlls/gdi/Makefile
Marcus Meissnerb63ab442001-06-08 19:02:57 +00001254dlls/glu32/Makefile
Francois Gougetedf3e431999-11-07 21:22:17 +00001255dlls/icmp/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001256dlls/imagehlp/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001257dlls/imm32/Makefile
Dimitrie O. Paun36b5b6b2000-06-03 00:07:44 +00001258dlls/kernel/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001259dlls/lzexpand/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001260dlls/mapi32/Makefile
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001261dlls/mpr/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001262dlls/msacm/Makefile
Hidenori Takeshima0307f6d2002-03-23 20:18:11 +00001263dlls/msacm/imaadp32/Makefile
Eric Pouechbed67fc2002-05-22 02:00:05 +00001264dlls/msacm/msadp32/Makefile
Hidenori Takeshimabcb9c462002-03-22 19:16:10 +00001265dlls/msacm/msg711/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001266dlls/msdmo/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001267dlls/msimg32/Makefile
Mike McCormackf6be0442002-04-08 23:56:14 +00001268dlls/msisys/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001269dlls/msnet32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001270dlls/msrle32/Makefile
Jon Griffiths1db20bf2001-01-10 23:59:25 +00001271dlls/msvcrt/Makefile
Aric Stewartc2a5ebc2002-01-29 18:09:46 +00001272dlls/msvcrt20/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001273dlls/msvideo/Makefile
Mike McCormack2e40b962001-11-06 17:52:36 +00001274dlls/netapi32/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001275dlls/ntdll/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001276dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001277dlls/ole32/Makefile
1278dlls/oleaut32/Makefile
1279dlls/olecli/Makefile
1280dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001281dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001282dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001283dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001284dlls/psapi/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001285dlls/qcap/Makefile
Hidenori Takeshimab7d4b4e2001-07-02 18:57:22 +00001286dlls/quartz/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001287dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001288dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001289dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001290dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001291dlls/setupapi/Makefile
John R. Sheetsbc80a3b2001-01-11 22:32:44 +00001292dlls/shdocvw/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001293dlls/shell32/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001294dlls/shfolder/Makefile
1295dlls/shlwapi/Makefile
Patrik Stridvall4c692b92002-04-29 18:43:35 +00001296dlls/snmpapi/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001297dlls/sti/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001298dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001299dlls/ttydrv/Makefile
Shi Quan He6b0720f2002-03-21 02:58:39 +00001300dlls/twain/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001301dlls/url/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001302dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001303dlls/user/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001304dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001305dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001306dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001307dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001308dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001309dlls/wininet/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001310dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001311dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001312dlls/winmm/mcianim/Makefile
1313dlls/winmm/mciavi/Makefile
1314dlls/winmm/mcicda/Makefile
1315dlls/winmm/mciseq/Makefile
1316dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001317dlls/winmm/midimap/Makefile
1318dlls/winmm/wavemap/Makefile
Chris Morgan9b0ba7c2002-03-21 01:38:19 +00001319dlls/winmm/winearts/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001320dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001321dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001322dlls/winsock/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001323dlls/winspool/Makefile
Rein Klazes2a4c68b2001-04-16 19:36:12 +00001324dlls/wintrust/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001325dlls/wow32/Makefile
1326dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001327dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001328documentation/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001329include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001330library/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001331miscemu/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001332ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001333programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001334programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001335programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001336programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001337programs/control/Makefile
Alexandre Julliardacfda142002-05-20 19:18:16 +00001338programs/expand/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001339programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001340programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001341programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001342programs/regapi/Makefile
Andriy Palamarchuk4e2e1762002-04-11 23:58:40 +00001343programs/regedit/Makefile
Andriy Palamarchuk2f0d85c2002-04-29 23:47:39 +00001344programs/regsvr32/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001345programs/regtest/Makefile
1346programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001347programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001348programs/wcmd/Makefile
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001349programs/wineconsole/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001350programs/winemine/Makefile
Mike Wetherell0d8a9fa2002-05-05 20:31:54 +00001351programs/winepath/Makefile
Alexandre Julliardfc684342001-03-21 21:41:27 +00001352programs/winetest/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001353programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001354programs/winver/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001355server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001356tools/Makefile
Patrik Stridvall647ac512001-07-30 20:21:34 +00001357tools/winapi/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001358tools/winebuild/Makefile
Eric Pouechd786a122001-09-07 16:04:38 +00001359tools/winedump/Makefile
Bertho Stultiens30855912000-06-13 04:34:41 +00001360tools/wmc/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001361tools/wrc/Makefile
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001362tsx11/Makefile
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001363unicode/Makefile])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001364
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001365AC_OUTPUT
1366
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001367if test "$have_x" = "no"
1368then
1369 echo
1370 echo "*** Warning: X development files not found. Wine will be built without"
1371 echo "*** X support, which currently does not work, and would probably not be"
1372 echo "*** what you want anyway. You will need to install devel packages of"
Alexandre Julliard18e4b5e2002-01-04 18:52:40 +00001373 echo "*** Xlib/Xfree86 at the very least."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001374fi
1375
Alexandre Julliard638f1691999-01-17 16:32:32 +00001376if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1377then
1378 echo
1379 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1380 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001381fi
1382
Alexandre Julliard7cae5582002-06-01 02:55:48 +00001383if test "$wine_cv_libc_reentrant" = "no"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001384then
1385 echo
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001386 echo "*** Warning: non-reentrant libc detected. Wine will be built without"
1387 echo "*** threading support. Consider upgrading libc to a more recent"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001388 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001389fi
1390
Alexandre Julliard867fb9d2002-04-24 22:24:43 +00001391if test "$have_x" = "yes" -a "$wine_cv_x_reentrant" != "yes"
1392then
1393 echo
1394 echo "*** Warning: non-reentrant X11 library detected. Multi-threaded"
1395 echo "*** applications won't work properly. You should upgrade your X11 library."
1396fi
1397
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001398if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001399then
1400 echo
1401 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001402 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1403fi
1404
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001405if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "x"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001406then
1407 echo
1408 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001409 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
Andreas Mohr18a9d742001-01-17 21:52:42 +00001410 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 +00001411 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001412fi
1413
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001414if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "xyes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001415then
1416 echo
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +00001417 echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001418 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1419 echo "*** support before reporting bugs."
1420fi
1421
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001422if test "$wine_cv_warn_cups_h" = "yes"
1423then
1424 echo
1425 echo "*** Note: You have cups runtime libraries, but no development"
1426 echo "*** libraries. Install the cups-devel package or whichever package"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001427 echo "*** contains cups.h to enable CUPS support in Wine."
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001428fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001429
Ian Pilcher563598d2001-05-16 20:56:05 +00001430if test "$wine_cv_msg_freetype" = "yes"
1431then
1432 echo
1433 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001434 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1435 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1436 echo "*** enable Wine to use TrueType fonts."
Ian Pilcher563598d2001-05-16 20:56:05 +00001437fi
1438
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001439echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001440echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001441echo
1442
1443dnl Local Variables:
1444dnl comment-start: "dnl "
1445dnl comment-end: ""
1446dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001447dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001448dnl End: