blob: 926e021df1d218463e6fd5a9d523ced5c21206b4 [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
Alexandre Julliardf92b7c02002-06-28 18:31:01 +0000554dnl **** Check for ALSA ****
555AC_SUBST(ALSALIBS,"")
556AC_CHECK_HEADERS(sys/asoundlib.h)
557if test "$ac_cv_header_sys_asoundlib_h" = "yes"
558then
559 AC_CHECK_LIB(asound,snd_pcm_open,
560 AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA including devel headers])
561 ALSALIBS="-lasound")
562fi
563
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000564dnl **** Check for broken glibc mmap64 ****
565
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000566AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000567 AC_TRY_RUN([
568 #define _FILE_OFFSET_BITS 64
569 #include <stdio.h>
570 #include <unistd.h>
571 #include <fcntl.h>
572 #include <sys/mman.h>
573 #include <errno.h>
574
575 int main(int argc,char **argv) {
576 int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
577 if (fd == -1) exit(1);
578
579 unlink("conftest.map");
580
581 write(fd,"test",4);
582
583 if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
584 (errno == EINVAL)
585 ) {
586 exit(1);
587 }
588 close(fd);
589 fprintf(stderr,"success!\n");
590 exit(0);
591 }
592
593 ],
594 ac_cv_mmap64_works="yes",
595 ac_cv_mmap64_works="no",
596 ac_cv_mmap64_works="no") )
597
598if test "$ac_cv_mmap64_works" = "yes"
599then
600 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
601fi
602
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000603dnl **** Check for gcc strength-reduce bug ****
604
605if test "x${GCC}" = "xyes"
606then
607 CFLAGS="$CFLAGS -Wall"
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000608 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000609 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000610int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000611int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000612 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000613 unsigned int B = 3;
614 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000615 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000616 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
617 L[[i]] = 4;
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000618
Eric Pouech5aee80f2000-11-11 00:31:39 +0000619 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000620}],
621 ac_cv_c_gcc_strength_bug="no",
622 ac_cv_c_gcc_strength_bug="yes",
623 ac_cv_c_gcc_strength_bug="yes") )
624 if test "$ac_cv_c_gcc_strength_bug" = "yes"
625 then
626 CFLAGS="$CFLAGS -fno-strength-reduce"
627 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000628
629 dnl Check for -mpreferred-stack-boundary
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000630 AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support], ac_cv_c_gcc_stack_boundary,
631 [WINE_TRY_CFLAGS([-mpreferred-stack-boundary=2],
632 ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000633 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
634 then
635 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
636 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000637fi
638
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000639dnl **** Check if we need to place .type inside a .def directive ****
640
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000641AC_CACHE_CHECK([whether .type must sit inside a .def directive], ac_cv_c_type_in_def,
642 WINE_TRY_ASM_LINK(
643[ .globl _ac_test
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000644 .def _ac_test; .scl 2; .type 32; .endef
645_ac_test:
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000646 .long 0],,,
647 ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no"))
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000648if test "$ac_cv_c_type_in_def" = "yes"
649then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000650 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 +0000651fi
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000652
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000653dnl **** Check for underscore on external symbols ****
654
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000655AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
656 WINE_TRY_ASM_LINK(
657[ .globl _ac_test
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000658_ac_test:
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000659 .long 0],
660[extern int ac_test;],
661[if (ac_test) return 1],
662 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000663if test "$ac_cv_c_extern_prefix" = "yes"
664then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000665 AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1,
666 [Define if symbols declared in assembly code need an underscore prefix])
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000667fi
668
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000669dnl **** Check whether stdcall symbols need to be decorated ****
670
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000671AC_CACHE_CHECK([whether stdcall symbols need to be decorated], ac_cv_c_stdcall_decoration,
672 WINE_TRY_ASM_LINK(
673[ .globl _ac_test@0
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000674_ac_test@0:
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000675 .globl ac_test@0
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000676ac_test@0:],
677[extern void __attribute__((__stdcall__)) ac_test(void);],
678[ac_test()],
679 ac_cv_c_stdcall_decoration="yes",ac_cv_c_stdcall_decoration="no"))
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000680if test "$ac_cv_c_stdcall_decoration" = "yes"
681then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000682 AC_DEFINE(NEED_STDCALL_DECORATION, 1, [Define if stdcall symbols need to be decorated])
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000683fi
684
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000685dnl **** Check for .string in assembler ****
686
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000687AC_CACHE_CHECK([whether assembler accepts .string], ac_cv_c_asm_string,
688 WINE_TRY_ASM_LINK(
689[ .string "test"],,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no"))
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000690if test "$ac_cv_c_asm_string" = "yes"
691then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000692 AC_DEFINE(HAVE_ASM_STRING, 1, [Define to use .string instead of .ascii])
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000693fi
694
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000695dnl **** Check for working dll ****
696
Todd Vierling4b992b01998-12-15 15:26:27 +0000697LDSHARED=""
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000698LDDLLFLAGS=""
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000699DLLIBS=""
700
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000701case $host_os in
702 cygwin*|mingw32*)
703 AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
704 if test "$DLLWRAP" = "false"; then
705 LIBEXT="a"
706 else
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000707 dnl FIXME - check whether dllwrap works correctly...
708 LIBEXT="dll"
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000709 fi
710 ;;
711 *)
712 AC_CHECK_HEADERS(dlfcn.h,
713 [AC_CHECK_FUNCS(dlopen,,
714 [AC_CHECK_LIB(dl,dlopen,
715 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
716 DLLIBS="-ldl"],
717 [LIBEXT="a"])])],
718 [LIBEXT="a"])
719
720 if test "$LIBEXT" = "so"
721 then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000722 AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
723 [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
724 ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
Alexandre Julliard466ae142002-05-07 18:33:47 +0000725 if test "$ac_cv_c_dll_gnuelf" = "yes"
726 then
727 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
728 LDDLLFLAGS="-Wl,-Bsymbolic"
729 else
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000730 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
731 [WINE_TRY_CFLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
732 ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
Alexandre Julliard466ae142002-05-07 18:33:47 +0000733 if test "$ac_cv_c_dll_unixware" = "yes"
734 then
735 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
736 LDDLLFLAGS="-Wl,-B,symbolic"
737 fi
738 fi
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000739 fi
740 ;;
741esac
Alexandre Julliard0adad952000-01-26 01:45:58 +0000742
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000743if test "$LIBEXT" = "a"; then
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000744 AC_MSG_ERROR(
745[could not find a way to build shared libraries.
746It is currently not possible to build Wine without shared library
747(.so) support to allow transparent switch between .so and .dll files.
748If you are using Linux, you will need a newer binutils.]
749)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000750fi
751
Alexandre Julliard0adad952000-01-26 01:45:58 +0000752DLLFLAGS=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000753
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000754if test "$LIBEXT" = "so"; then
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000755 DLLFLAGS="-fPIC"
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000756 DLLEXT=".so"
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000757elif test "$LIBEXT" = "dll"; then
758 #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000759 DLLEXT=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000760fi
761
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000762case $build_os in
763 cygwin*|mingw32*)
764 LDPATH="PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\"" ;;
765 *)
766 LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"" ;;
767esac
768
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000769AC_SUBST(DLLIBS)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000770AC_SUBST(DLLFLAGS)
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000771AC_SUBST(DLLEXT)
Todd Vierling4b992b01998-12-15 15:26:27 +0000772AC_SUBST(LDSHARED)
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000773AC_SUBST(LDDLLFLAGS)
Alexandre Julliard0adad952000-01-26 01:45:58 +0000774AC_SUBST(LIBEXT)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000775AC_SUBST(LDPATH)
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000776
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000777dnl **** Get the soname for libraries that we load dynamically ****
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000778
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000779if test "$LIBEXT" = "so"
Alexandre Julliard598412e2001-01-17 20:22:22 +0000780then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000781 WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
782 WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
783 WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
784 WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
Alexandre Julliard598412e2001-01-17 20:22:22 +0000785fi
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000786
787
788dnl **** Check for reentrant libc ****
Alexandre Julliard598412e2001-01-17 20:22:22 +0000789
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000790wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000791dnl Linux style errno location
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000792WINE_CHECK_ERRNO([__errno_location], [wine_cv_libc_reentrant=__errno_location],
793 dnl FreeBSD style errno location
794 WINE_CHECK_ERRNO([__error], [wine_cv_libc_reentrant=__error],
795 dnl Solaris style errno location
796 WINE_CHECK_ERRNO([___errno], [wine_cv_libc_reentrant=___errno],
797 dnl UnixWare style errno location
798 WINE_CHECK_ERRNO([__thr_errno], [wine_cv_libc_reentrant=__thr_errno],
799 dnl NetBSD style errno location
800 WINE_CHECK_ERRNO([__errno], [wine_cv_libc_reentrant=__errno])
801))))
Alexandre Julliard598412e2001-01-17 20:22:22 +0000802
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000803if test "$wine_cv_libc_reentrant" != "no"
Ron Recorde977d6c1999-09-05 12:32:05 +0000804then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000805 AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant,
806 [Define to the name of the function returning errno for reentrant libc])
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000807fi
808
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000809dnl **** Check for reentrant X libraries ****
810dnl
811dnl This may fail to determine whether X libraries are reentrant if
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000812dnl AC_PATH_XTRA does not set x_libraries.
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000813
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000814if test "$have_x" = "yes"
Patrik Stridvall24110281999-02-04 10:09:54 +0000815then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000816AC_CACHE_CHECK( [for reentrant X libraries], wine_cv_x_reentrant,
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000817 [libX11_check=none
818 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
819 if test -r $dir/libX11.so; then
820 libX11_check="-D $dir/libX11.so"
821 break
822 fi
823 if test -r $dir/libX11.a; then
824 libX11_check="$dir/libX11.a"
825 break
826 fi
827 done
828 if test "$libX11_check" != "none"; then
829 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
830 then
831 wine_cv_x_reentrant=yes
832 else
833 wine_cv_x_reentrant=no
834 fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000835 else
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000836 wine_cv_x_reentrant=unknown
837 fi])
Patrik Stridvall24110281999-02-04 10:09:54 +0000838fi
Ulrich Weigand97591402000-12-19 03:38:53 +0000839
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000840dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000841
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000842AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000843AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000844 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000845 _lwp_create \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000846 _pclose \
847 _popen \
Steven Edwards0a8e15a2002-05-10 01:33:40 +0000848 _snprintf \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000849 _stricmp \
850 _strnicmp \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000851 chsize \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000852 clone \
Andreas Mohra7ca2ba2001-01-12 23:07:11 +0000853 ecvt \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000854 finite \
855 fpclass \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000856 ftruncate \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000857 ftruncate64 \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000858 getnetbyaddr \
859 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000860 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000861 getprotobyname \
862 getprotobynumber \
Alexandre Julliard142dab82002-07-01 18:17:30 +0000863 getpwuid \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000864 getservbyport \
865 getsockopt \
866 inet_network \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000867 lseek64 \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000868 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000869 memmove \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000870 mmap \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000871 pclose \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000872 popen \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000873 pread \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000874 pwrite \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000875 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000876 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000877 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000878 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000879 sigaltstack \
Steven Edwards0a8e15a2002-05-10 01:33:40 +0000880 snprintf \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000881 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000882 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000883 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000884 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000885 tcgetattr \
886 timegm \
887 usleep \
888 vfscanf \
889 wait4 \
890 waitpid \
891)
892
893dnl **** Check for header files ****
894
895AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000896 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000897 arpa/nameser.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000898 direct.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000899 elf.h \
900 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000901 ieeefp.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000902 io.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000903 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000904 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000905 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000906 linux/cdrom.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000907 linux/hdreg.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000908 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000909 linux/joystick.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000910 linux/major.h \
Laurent Pinchart0314a652002-05-01 22:01:30 +0000911 linux/param.h \
Lawson Whitney533e7ee2002-02-19 18:41:56 +0000912 linux/serial.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000913 linux/ucdrom.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000914 net/if.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000915 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000916 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000917 netinet/in_systm.h \
918 netinet/ip.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000919 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000920 pty.h \
Steven Edwardsff4525c2002-06-24 23:00:25 +0000921 pwd.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000922 resolv.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000923 sched.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000924 scsi/sg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000925 socket.h \
Bang Jun-Youngeda758e2001-12-14 22:47:19 +0000926 stdint.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000927 strings.h \
928 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000929 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000930 sys/file.h \
931 sys/filio.h \
Michal Pasternak60983992002-03-29 18:04:43 +0000932 sys/inttypes.h \
Alexandre Julliardc3e06df2002-05-14 23:18:23 +0000933 sys/ioctl.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000934 sys/ipc.h \
Eric Pouech624cbd72001-08-10 22:29:21 +0000935 sys/link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000936 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000937 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000938 sys/modem.h \
939 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000940 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000941 sys/param.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000942 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +0000943 sys/reg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000944 sys/shm.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000945 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000946 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000947 sys/sockio.h \
948 sys/statfs.h \
949 sys/strtio.h \
950 sys/syscall.h \
Alexandre Julliard127ec922002-05-07 01:51:30 +0000951 sys/sysctl.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000952 sys/time.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000953 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000954 sys/v86.h \
955 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000956 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000957 sys/vm86.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000958 sys/wait.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000959 syscall.h \
Alexandre Julliardc3e06df2002-05-14 23:18:23 +0000960 termios.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000961 ucontext.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000962 unistd.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000963)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000964AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000965
966dnl **** Check for types ****
967
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000968AC_C_CONST
969AC_C_INLINE
Alexandre Julliard5769d1d2002-04-26 19:05:15 +0000970AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000971AC_CHECK_SIZEOF(long long,0)
972
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000973AC_CACHE_CHECK([whether linux/input.h is for real],
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000974 wine_cv_linux_input_h,
975 AC_TRY_COMPILE([
976 #include <linux/input.h>
977 ] , [
978 int foo = EVIOCGBIT(EV_ABS,42);
979 int bar = BTN_PINKIE;
980 int fortytwo = 42;
981 ],
982 wine_cv_linux_input_h=yes,
983 wine_cv_linux_input_h=no,
984 no
985 )
986 )
987 if test "$wine_cv_linux_input_h" = "yes"
988 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000989 AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H, 1,
990 [Define if we have linux/input.h AND it contains the INPUT event API])
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000991 fi
992
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000993
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000994AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
Rein Klazesff7a61f2000-09-24 19:41:57 +0000995 wine_cv_linux_gethostbyname_r_6,
996 AC_TRY_COMPILE([
997#include <netdb.h>
998 ], [
999 char *name=NULL;
1000 struct hostent he;
1001 struct hostent *result;
1002 char *buf=NULL;
1003 int bufsize=0;
1004 int res,errnr;
1005 char *addr=NULL;
1006 int addrlen=0;
1007 int addrtype=0;
1008 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1009 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1010 ],
1011 wine_cv_linux_gethostbyname_r_6=yes,
1012 wine_cv_linux_gethostbyname_r_6=no
1013 )
1014 )
1015 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1016 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001017 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1018 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
Rein Klazesff7a61f2000-09-24 19:41:57 +00001019 fi
1020
Marcus Meissner028e9a11999-08-04 15:07:56 +00001021if test "$ac_cv_header_linux_joystick_h" = "yes"
1022then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001023 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
Marcus Meissner028e9a11999-08-04 15:07:56 +00001024 wine_cv_linux_joystick_22_api,
1025 AC_TRY_COMPILE([
1026 #include <sys/ioctl.h>
1027 #include <linux/joystick.h>
1028
1029 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +00001030 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1031 #error "no 2.2 header"
1032 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +00001033 ],/*empty*/,
1034 wine_cv_linux_joystick_22_api=yes,
1035 wine_cv_linux_joystick_22_api=no,
1036 wine_cv_linux_joystick_22_api=no
1037 )
1038 )
Rein Klazes87d224a2000-04-24 17:33:49 +00001039 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +00001040 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001041 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1042 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
Marcus Meissner028e9a11999-08-04 15:07:56 +00001043 fi
1044fi
1045
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001046dnl **** statfs checks ****
1047
1048if test "$ac_cv_header_sys_vfs_h" = "yes"
1049then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001050 AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001051 wine_cv_sys_vfs_has_statfs,
1052 AC_TRY_COMPILE([
1053 #include <sys/types.h>
1054 #ifdef HAVE_SYS_PARAM_H
1055 # include <sys/param.h>
1056 #endif
1057 #include <sys/vfs.h>
1058 ],[
1059 struct statfs stfs;
1060
1061 memset(&stfs,0,sizeof(stfs));
1062 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1063 )
1064 )
1065 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1066 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001067 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1068 [Define if the struct statfs is defined by <sys/vfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001069 fi
1070fi
1071
1072if test "$ac_cv_header_sys_statfs_h" = "yes"
1073then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001074 AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001075 wine_cv_sys_statfs_has_statfs,
1076 AC_TRY_COMPILE([
1077 #include <sys/types.h>
1078 #ifdef HAVE_SYS_PARAM_H
1079 # include <sys/param.h>
1080 #endif
1081 #include <sys/statfs.h>
1082 ],[
1083 struct statfs stfs;
1084 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1085 )
1086 )
1087 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1088 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001089 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1090 [Define if the struct statfs is defined by <sys/statfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001091 fi
1092fi
1093
1094if test "$ac_cv_header_sys_mount_h" = "yes"
1095then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001096 AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001097 wine_cv_sys_mount_has_statfs,
1098 AC_TRY_COMPILE([
1099 #include <sys/types.h>
1100 #ifdef HAVE_SYS_PARAM_H
1101 # include <sys/param.h>
1102 #endif
1103 #include <sys/mount.h>
1104 ],[
1105 struct statfs stfs;
1106 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1107 )
1108 )
1109 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1110 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001111 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1112 [Define if the struct statfs is defined by <sys/mount.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001113 fi
1114fi
1115
1116dnl **** FIXME: what about mixed cases, where we need two of them? ***
1117
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001118WINE_CHECK_STRUCT_MEMBER(statfs,f_bfree,
1119[#include <sys/types.h>
1120#ifdef HAVE_SYS_PARAM_H
1121# include <sys/param.h>
1122#endif
1123#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1124# include <sys/mount.h>
1125#else
1126# ifdef STATFS_DEFINED_BY_SYS_VFS
1127# include <sys/vfs.h>
1128# else
1129# ifdef STATFS_DEFINED_BY_SYS_STATFS
1130# include <sys/statfs.h>
1131# endif
1132# endif
1133#endif],
1134 [AC_DEFINE(STATFS_HAS_BFREE, 1, [Define if the struct statfs has the member bfree])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001135
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001136WINE_CHECK_STRUCT_MEMBER(statfs,f_bavail,
1137[#include <sys/types.h>
1138#ifdef HAVE_SYS_PARAM_H
1139# include <sys/param.h>
1140#endif
1141#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1142# include <sys/mount.h>
1143#else
1144# ifdef STATFS_DEFINED_BY_SYS_VFS
1145# include <sys/vfs.h>
1146# else
1147# ifdef STATFS_DEFINED_BY_SYS_STATFS
1148# include <sys/statfs.h>
1149# endif
1150# endif
1151#endif],
1152 [AC_DEFINE(STATFS_HAS_BAVAIL, 1, [Define if the struct statfs has the member bavail])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001153
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001154dnl Check for file descriptor passing with msg_accrights
1155WINE_CHECK_STRUCT_MEMBER(msghdr,msg_accrights,
1156[#include <sys/types.h>
1157#include <sys/socket.h>],
1158 [AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001159
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001160dnl Check for the sa_len member in struct sockaddr
1161WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len,
1162[#include <sys/types.h>
1163#include <sys/socket.h>],
1164 [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001165
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001166dnl Check for the sun_len member in struct sockaddr_un
1167WINE_CHECK_STRUCT_MEMBER(sockaddr_un,sun_len,
1168[#include <sys/types.h>
Patrik Stridvall09da9662001-07-08 22:30:50 +00001169#include <sys/socket.h>
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001170#include <sys/un.h>],
1171 [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])])
Juergen Lock2d33ab92000-02-13 16:03:29 +00001172
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001173dnl *** check for the need to define __i386__
1174
Alexandre Julliardfc01b722002-05-12 03:16:39 +00001175case $host_cpu in
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001176 *i[3456789]86* )
1177 AC_CACHE_CHECK([whether we need to define __i386__],ac_cv_cpp_def_i386,
1178 AC_EGREP_CPP(yes,[#ifndef __i386__
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001179yes
1180#endif],
1181 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001182 ;;
1183esac
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001184if test "$ac_cv_cpp_def_i386" = "yes"
1185then
1186 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001187 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001188fi
1189
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001190dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001191
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001192AH_TOP([#define __WINE_CONFIG_H])
1193
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001194WINE_CONFIG_EXTRA_DIR(controls)
Alexandre Julliardc345f7b2002-07-10 03:30:14 +00001195WINE_CONFIG_EXTRA_DIR(dlls/advapi32/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001196WINE_CONFIG_EXTRA_DIR(dlls/ddraw/d3ddevice)
1197WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dclipper)
1198WINE_CONFIG_EXTRA_DIR(dlls/ddraw/ddraw)
1199WINE_CONFIG_EXTRA_DIR(dlls/ddraw/direct3d)
1200WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dpalette)
1201WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dsurface)
1202WINE_CONFIG_EXTRA_DIR(dlls/dinput/joystick)
1203WINE_CONFIG_EXTRA_DIR(dlls/dinput/keyboard)
1204WINE_CONFIG_EXTRA_DIR(dlls/dinput/mouse)
Alexandre Julliard89118562002-03-27 21:13:40 +00001205WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1206WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1207WINE_CONFIG_EXTRA_DIR(dlls/gdi/win16drv)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001208WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001209WINE_CONFIG_EXTRA_DIR(dlls/kernel/tests)
Marcus Meissnere8d97702002-03-26 01:54:25 +00001210WINE_CONFIG_EXTRA_DIR(dlls/oleaut32/tests)
Juergen Schmiedc74a7912002-05-09 19:48:07 +00001211WINE_CONFIG_EXTRA_DIR(dlls/shlwapi/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001212WINE_CONFIG_EXTRA_DIR(dlls/user/dde)
1213WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001214WINE_CONFIG_EXTRA_DIR(dlls/user/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001215WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
Aric Stewartff9b9d42002-06-21 23:59:49 +00001216WINE_CONFIG_EXTRA_DIR(dlls/wininet/tests)
Alexandre Julliard9a68b7b2002-04-27 21:19:22 +00001217WINE_CONFIG_EXTRA_DIR(dlls/winsock/tests)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001218WINE_CONFIG_EXTRA_DIR(files)
1219WINE_CONFIG_EXTRA_DIR(graphics)
1220WINE_CONFIG_EXTRA_DIR(graphics/x11drv)
1221WINE_CONFIG_EXTRA_DIR(if1632)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001222WINE_CONFIG_EXTRA_DIR(include/wine)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001223WINE_CONFIG_EXTRA_DIR(loader)
1224WINE_CONFIG_EXTRA_DIR(loader/ne)
1225WINE_CONFIG_EXTRA_DIR(memory)
1226WINE_CONFIG_EXTRA_DIR(misc)
1227WINE_CONFIG_EXTRA_DIR(msdos)
1228WINE_CONFIG_EXTRA_DIR(objects)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001229WINE_CONFIG_EXTRA_DIR(programs/regapi/tests)
Andriy Palamarchukf5aad762002-06-20 23:09:33 +00001230WINE_CONFIG_EXTRA_DIR(programs/regedit/tests)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001231WINE_CONFIG_EXTRA_DIR(programs/winetest/tests)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001232WINE_CONFIG_EXTRA_DIR(relay32)
1233WINE_CONFIG_EXTRA_DIR(scheduler)
1234WINE_CONFIG_EXTRA_DIR(win32)
1235WINE_CONFIG_EXTRA_DIR(windows)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001236
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001237MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001238AC_SUBST_FILE(MAKE_RULES)
1239
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001240MAKE_DLL_RULES=dlls/Makedll.rules
1241AC_SUBST_FILE(MAKE_DLL_RULES)
1242
Alexandre Julliard626f4252000-11-10 23:35:20 +00001243MAKE_PROG_RULES=programs/Makeprog.rules
1244AC_SUBST_FILE(MAKE_PROG_RULES)
1245
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001246AC_CONFIG_FILES([
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001247Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001248dlls/Makedll.rules
1249programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001250Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001251debugger/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001252dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001253dlls/advapi32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001254dlls/avicap32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001255dlls/avifil32/Makefile
John K. Hohm34909c22002-05-14 21:50:56 +00001256dlls/comcat/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001257dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001258dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001259dlls/crtdll/Makefile
Travis Michielsen0f21ee82002-01-10 19:41:11 +00001260dlls/crypt32/Makefile
Sylvain Petreolle3a99d8b2002-06-25 23:23:03 +00001261dlls/d3d8/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001262dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001263dlls/ddraw/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001264dlls/devenum/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001265dlls/dinput/Makefile
Ove Kaavend2d08f02002-06-14 00:39:44 +00001266dlls/dinput8/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001267dlls/dplay/Makefile
Peter Hunnisett22b861c1999-09-28 16:35:32 +00001268dlls/dplayx/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001269dlls/dsound/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001270dlls/gdi/Makefile
Marcus Meissnerb63ab442001-06-08 19:02:57 +00001271dlls/glu32/Makefile
Francois Gougetedf3e431999-11-07 21:22:17 +00001272dlls/icmp/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001273dlls/imagehlp/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001274dlls/imm32/Makefile
Dimitrie O. Paun36b5b6b2000-06-03 00:07:44 +00001275dlls/kernel/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001276dlls/lzexpand/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001277dlls/mapi32/Makefile
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001278dlls/mpr/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001279dlls/msacm/Makefile
Hidenori Takeshima0307f6d2002-03-23 20:18:11 +00001280dlls/msacm/imaadp32/Makefile
Eric Pouechbed67fc2002-05-22 02:00:05 +00001281dlls/msacm/msadp32/Makefile
Hidenori Takeshimabcb9c462002-03-22 19:16:10 +00001282dlls/msacm/msg711/Makefile
Eric Pouechb706b232002-06-04 17:53:46 +00001283dlls/msacm/winemp3/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001284dlls/msdmo/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001285dlls/msimg32/Makefile
Mike McCormackf6be0442002-04-08 23:56:14 +00001286dlls/msisys/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001287dlls/msnet32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001288dlls/msrle32/Makefile
Jon Griffiths1db20bf2001-01-10 23:59:25 +00001289dlls/msvcrt/Makefile
Aric Stewartc2a5ebc2002-01-29 18:09:46 +00001290dlls/msvcrt20/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001291dlls/msvideo/Makefile
Mike McCormack2e40b962001-11-06 17:52:36 +00001292dlls/netapi32/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001293dlls/ntdll/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001294dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001295dlls/ole32/Makefile
1296dlls/oleaut32/Makefile
1297dlls/olecli/Makefile
1298dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001299dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001300dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001301dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001302dlls/psapi/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001303dlls/qcap/Makefile
Hidenori Takeshimab7d4b4e2001-07-02 18:57:22 +00001304dlls/quartz/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001305dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001306dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001307dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001308dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001309dlls/setupapi/Makefile
John R. Sheetsbc80a3b2001-01-11 22:32:44 +00001310dlls/shdocvw/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001311dlls/shell32/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001312dlls/shfolder/Makefile
1313dlls/shlwapi/Makefile
Patrik Stridvall4c692b92002-04-29 18:43:35 +00001314dlls/snmpapi/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001315dlls/sti/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001316dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001317dlls/ttydrv/Makefile
Shi Quan He6b0720f2002-03-21 02:58:39 +00001318dlls/twain/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001319dlls/url/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001320dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001321dlls/user/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001322dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001323dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001324dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001325dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001326dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001327dlls/wininet/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001328dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001329dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001330dlls/winmm/mcianim/Makefile
1331dlls/winmm/mciavi/Makefile
1332dlls/winmm/mcicda/Makefile
1333dlls/winmm/mciseq/Makefile
1334dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001335dlls/winmm/midimap/Makefile
1336dlls/winmm/wavemap/Makefile
Eric Pouecha120ce02002-06-28 17:40:16 +00001337dlls/winmm/winealsa/Makefile
Chris Morgan9b0ba7c2002-03-21 01:38:19 +00001338dlls/winmm/winearts/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001339dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001340dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001341dlls/winsock/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001342dlls/winspool/Makefile
Rein Klazes2a4c68b2001-04-16 19:36:12 +00001343dlls/wintrust/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001344dlls/wow32/Makefile
1345dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001346dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001347documentation/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001348include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001349library/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001350miscemu/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001351ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001352programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001353programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001354programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001355programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001356programs/control/Makefile
Alexandre Julliardacfda142002-05-20 19:18:16 +00001357programs/expand/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001358programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001359programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001360programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001361programs/regapi/Makefile
Andriy Palamarchuk4e2e1762002-04-11 23:58:40 +00001362programs/regedit/Makefile
Andriy Palamarchuk2f0d85c2002-04-29 23:47:39 +00001363programs/regsvr32/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001364programs/regtest/Makefile
1365programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001366programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001367programs/wcmd/Makefile
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001368programs/wineconsole/Makefile
Alexandre Julliard65a42162002-06-04 21:29:40 +00001369programs/winefile/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001370programs/winemine/Makefile
Mike Wetherell0d8a9fa2002-05-05 20:31:54 +00001371programs/winepath/Makefile
Alexandre Julliardfc684342001-03-21 21:41:27 +00001372programs/winetest/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001373programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001374programs/winver/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001375server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001376tools/Makefile
Patrik Stridvall647ac512001-07-30 20:21:34 +00001377tools/winapi/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001378tools/winebuild/Makefile
Eric Pouechd786a122001-09-07 16:04:38 +00001379tools/winedump/Makefile
Bertho Stultiens30855912000-06-13 04:34:41 +00001380tools/wmc/Makefile
Alexandre Julliardb7d3c792002-07-16 02:33:10 +00001381tools/wpp/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001382tools/wrc/Makefile
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001383tsx11/Makefile
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001384unicode/Makefile])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001385
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001386AC_OUTPUT
1387
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001388if test "$have_x" = "no"
1389then
1390 echo
1391 echo "*** Warning: X development files not found. Wine will be built without"
1392 echo "*** X support, which currently does not work, and would probably not be"
1393 echo "*** what you want anyway. You will need to install devel packages of"
Alexandre Julliard18e4b5e2002-01-04 18:52:40 +00001394 echo "*** Xlib/Xfree86 at the very least."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001395fi
1396
Alexandre Julliard638f1691999-01-17 16:32:32 +00001397if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1398then
1399 echo
1400 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1401 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001402fi
1403
Alexandre Julliard7cae5582002-06-01 02:55:48 +00001404if test "$wine_cv_libc_reentrant" = "no"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001405then
1406 echo
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001407 echo "*** Warning: non-reentrant libc detected. Wine will be built without"
1408 echo "*** threading support. Consider upgrading libc to a more recent"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001409 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001410fi
1411
Alexandre Julliard867fb9d2002-04-24 22:24:43 +00001412if test "$have_x" = "yes" -a "$wine_cv_x_reentrant" != "yes"
1413then
1414 echo
1415 echo "*** Warning: non-reentrant X11 library detected. Multi-threaded"
1416 echo "*** applications won't work properly. You should upgrade your X11 library."
1417fi
1418
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001419if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001420then
1421 echo
1422 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001423 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1424fi
1425
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001426if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "x"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001427then
1428 echo
1429 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001430 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
Andreas Mohr18a9d742001-01-17 21:52:42 +00001431 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 +00001432 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001433fi
1434
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001435if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "xyes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001436then
1437 echo
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +00001438 echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001439 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1440 echo "*** support before reporting bugs."
1441fi
1442
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001443if test "$wine_cv_warn_cups_h" = "yes"
1444then
1445 echo
1446 echo "*** Note: You have cups runtime libraries, but no development"
1447 echo "*** libraries. Install the cups-devel package or whichever package"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001448 echo "*** contains cups.h to enable CUPS support in Wine."
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001449fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001450
Ian Pilcher563598d2001-05-16 20:56:05 +00001451if test "$wine_cv_msg_freetype" = "yes"
1452then
1453 echo
1454 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001455 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1456 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1457 echo "*** enable Wine to use TrueType fonts."
Ian Pilcher563598d2001-05-16 20:56:05 +00001458fi
1459
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001460echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001461echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001462echo
1463
1464dnl Local Variables:
1465dnl comment-start: "dnl "
1466dnl comment-end: ""
1467dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001468dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001469dnl End: