blob: fff35d3ed80d2794b0af224c04e96a7c087947f0 [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 Julliard7bf07d12002-08-03 00:25:59 +000015dnl Library type .so or .a
16AC_SUBST(LIBEXT,"so")
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 ],
Gregg Mattinson044b5c42002-07-19 03:16:51 +0000150 AC_MSG_WARN([[Xkb extension not found, Wine will be built without it]]),
151 [#include <X11/Xlib.h>])
Ove Kaavenc90fb252001-01-02 22:39:14 +0000152
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
Gregg Mattinson044b5c42002-07-19 03:16:51 +0000163 dnl *** Check for Xutil
164 AC_CHECK_HEADERS(X11/Xutil.h,,,
165 [#include <X11/Xlib.h>])
166
Francois Jacques5b6879c2000-07-28 23:04:54 +0000167 dnl *** Check for X shape extension
Ove Kaavenc90fb252001-01-02 22:39:14 +0000168 AC_CHECK_HEADERS(X11/extensions/shape.h,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000169 [ dnl *** If X11/extensions/shape.h exists...
170 AC_CHECK_LIB(Xext,XShapeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000171 AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000172 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
173 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000174 AC_MSG_WARN([[XShape extension not found, Wine will be built without it]]),
Gregg Mattinson044b5c42002-07-19 03:16:51 +0000175 [#include <X11/Xlib.h>
176 #ifdef HAVE_X11_XUTIL_H
177 # include <X11/Xutil.h>
178 #endif])
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000179
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000180 dnl *** Check for XFree86 DGA / DGA 2.0 extension
181 AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000182 [ dnl *** If X11/extensions/xf86dga.h exists, check
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000183 dnl *** for XDGAQueryExtension()...
184 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
185 [ dnl *** If found...
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000186 AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
187 [Define if you have the Xxf86dga library version 2])
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 [ dnl *** If not found, look for XF86DGAQueryExtension()
191 dnl *** instead (DGA 2.0 not found)...
192 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000193 [ AC_DEFINE(HAVE_LIBXXF86DGA, 1,
194 [Define if you have the Xxf86dga library version 1])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000195 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000196 ],,
197 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
198 )
199 ],
200 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
201 )
202 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000203 AC_MSG_WARN([[DGA extension not found, Wine will be built without it]]),
204 [#include <X11/Xlib.h>])
Patrik Stridvall24110281999-02-04 10:09:54 +0000205
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000206 dnl *** Check for XFree86 VMODE extension
207 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
208 [ dnl *** If X11/extensions/xf86vmode.h exists...
209 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000210 [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000211 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
212 ],,
213 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
214 )
215 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000216 AC_MSG_WARN([[XFree86 VMODE extension not found, Wine will be built without it]]),
217 [#include <X11/Xlib.h>])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000218
219 dnl *** Check for XVideo extension supporting XvImages
220 AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
221 [ dnl *** If X11/extensions/Xvlib.h exists...
222 AC_CHECK_LIB(Xv, XvShmCreateImage,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000223 [ AC_DEFINE(HAVE_XVIDEO, 1, [Define if the X libraries support XVideo])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000224 X_PRE_LIBS="$X_PRE_LIBS -lXv"
225 ],,
226 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
227 )
228 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000229 AC_MSG_WARN([[XVideo extension not found, Wine will be built without it]]),
230 [#include <X11/Xlib.h>])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000231
Alexandre Julliard21e91662002-04-23 22:06:41 +0000232 dnl *** Check for XRender include file
233 AC_CHECK_HEADERS(X11/extensions/Xrender.h,,,[#include <X11/Xlib.h>])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000234 ]
235 ) dnl *** End of X11/Xlib.h check
Lionel Ulmer5c085701999-02-28 19:48:53 +0000236
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000237 dnl Check for the presence of OpenGL
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000238 if test "x$enable_opengl" != "xno"
Patrik Stridvall24110281999-02-04 10:09:54 +0000239 then
Francois Gouget42dcd972002-01-29 17:52:28 +0000240 if test -f /usr/X11R6/lib/libGL.a -a ! -f /usr/X11R6/lib/libGL.so
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000241 then
242 AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
243This prevents linking to OpenGL. Delete the file and restart configure.])
244 fi
245
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000246 AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
Marcus Meissner22a969b2000-08-08 20:46:50 +0000247 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000248 then
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000249 AC_CHECK_HEADERS(GL/glext.h,,,[#include <GL/glx.h>])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000250 dnl Check for some problems due to old Mesa versions
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000251 AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000252 AC_TRY_COMPILE(
Lionel Ulmer48c08162000-01-05 01:51:02 +0000253 [#include <GL/gl.h>],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000254 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000255 [wine_cv_opengl_version_OK="yes"],
256 [wine_cv_opengl_version_OK="no"]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000257 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000258 )
259
260 dnl Check for the thread-safety of the OpenGL library
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000261 AC_CACHE_CHECK([for thread-safe OpenGL version],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000262 wine_cv_opengl_version_threadsafe,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000263 [saved_libs=$LIBS
264 LIBS="$X_LIBS -lGL"
265 AC_TRY_LINK([],[pthread_getspecific();],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000266 [wine_cv_opengl_version_threadsafe="yes"],
267 [wine_cv_opengl_version_threadsafe="no"])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000268 LIBS=$saved_libs]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000269 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000270
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000271 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 +0000272 then
Andreas Mohr4eefb962000-08-01 00:27:35 +0000273 dnl Check for the presence of the library
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000274 AC_CHECK_LIB(GL,glXCreateContext,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000275 X_PRE_LIBS="$X_PRE_LIBS -lGL"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000276 ,,
277 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
278
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000279 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000280 then
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000281 OPENGLFILES='$(OPENGLFILES)'
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000282 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000283
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000284 AC_CHECK_LIB(GL,glXGetProcAddressARB,
285 AC_DEFINE(HAVE_GLX_GETPROCADDRESS, 1,
286 [Define if the OpenGL library supports the glXGetProcAddressARB call]),,
287 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000288
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000289 if test "$ac_cv_lib_GL_glXGetProcAddressARB" = "yes"
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000290 then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000291 AC_CACHE_CHECK([for OpenGL extension functions prototypes], wine_cv_extension_prototypes,
292 [AC_TRY_COMPILE([#include <GL/gl.h>
Marcus Meissner6bb6d4c2000-08-09 22:21:08 +0000293 #ifdef HAVE_GL_GLEXT_H
294 # include <GL/glext.h>
295 #endif
296 ],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000297 [PFNGLCOLORTABLEEXTPROC test_proc;],
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000298 [wine_cv_extension_prototypes="yes"],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000299 [wine_cv_extension_prototypes="no"]
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000300 )]
Lionel Ulmer1434d872000-07-23 14:23:31 +0000301 )
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000302 if test "$wine_cv_extension_prototypes" = "yes"
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000303 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000304 AC_DEFINE(HAVE_GLEXT_PROTOTYPES, 1,
305 [Define if the OpenGL headers define extension typedefs])
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000306 fi
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000307 fi
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000308
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000309 fi
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000310 dnl Check for GLU32 library.
Marcus Meissner6e9ab402001-08-08 23:21:16 +0000311 AC_CHECK_LIB(GLU,gluLookAt,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000312 [X_PRE_LIBS="$X_PRE_LIBS -lGLU"
313 GLU32FILES='$(GLU32FILES)']
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000314 ,,
315 $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
316 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000317 fi
318 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000319 fi
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000320
321 CPPFLAGS="$ac_save_CPPFLAGS"
Patrik Stridvall2941a212000-04-25 20:34:22 +0000322 XFILES='$(XFILES)'
Patrik Stridvallea584721998-11-01 16:22:07 +0000323else
324 XLIB=""
325 X_CFLAGS=""
326 X_LIBS=""
327fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000328
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000329dnl **** Check which curses lib to use ***
Alexandre Julliard48957682001-12-26 23:08:31 +0000330CURSESLIBS=""
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000331if test "x$with_curses" != "xno"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000332then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000333 AC_CHECK_HEADERS(ncurses.h,
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000334 [AC_CHECK_LIB(ncurses,waddch,
Alexandre Julliard48957682001-12-26 23:08:31 +0000335 [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
336 CURSESLIBS="-lncurses"],
337 [AC_CHECK_HEADERS(curses.h,
338 [AC_CHECK_LIB(curses,waddch,
339 [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000340 CURSESLIBS="-lcurses"])])])])
Alexandre Julliard48957682001-12-26 23:08:31 +0000341 saved_libs="$LIBS"
342 LIBS="$CURSESLIBS $LIBS"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000343 AC_CHECK_FUNCS(getbkgd resizeterm)
Alexandre Julliard48957682001-12-26 23:08:31 +0000344 LIBS="$saved_libs"
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000345fi
Alexandre Julliard48957682001-12-26 23:08:31 +0000346AC_SUBST(CURSESLIBS)
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000347
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000348CUPSLIBS=""
349dnl **** Check for CUPS ****
Marcus Meissner3ee02ba2001-04-30 18:18:50 +0000350wine_cv_warn_cups_h=no
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000351AC_CHECK_LIB(cups,cupsGetPPD,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000352 [AC_CHECK_HEADER(cups/cups.h,
353 [AC_DEFINE(HAVE_CUPS, 1, [Define if we have CUPS])
354 CUPSLIBS="-lcups"],
355 wine_cv_warn_cups_h=yes)]
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000356)
357AC_SUBST(CUPSLIBS)
358
Shi Quan He6b0720f2002-03-21 02:58:39 +0000359dnl **** Check for SANE ****
360AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
361if test "$sane_devel" = "no"
362then
363 SANELIBS=""
364 SANEINCL=""
365else
366 SANELIBS="`$sane_devel --libs`"
367 SANEINCL="`$sane_devel --cflags`"
368 ac_save_CPPFLAGS="$CPPFLAGS"
369 ac_save_LIBS="$LIBS"
370 CPPFLAGS="$CPPFLAGS $SANEINCL"
371 LIBS="$LIBS $SANELIBS"
Alexandre Julliard96328b32002-03-31 19:23:41 +0000372 AC_CHECK_HEADER(sane/sane.h,
373 [AC_CHECK_LIB(sane,sane_open,
374 [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
375 [SANELIBS=""
376 SANEINCL=""])],
377 [SANELIBS=""
378 SANEINCL=""])
Shi Quan He6b0720f2002-03-21 02:58:39 +0000379 LIBS="$ac_save_LIBS"
380 CPPFLAGS="$ac_save_CPPFLAGS"
381fi
382AC_SUBST(SANELIBS)
383AC_SUBST(SANEINCL)
384
Ian Pilcher563598d2001-05-16 20:56:05 +0000385dnl **** Check for FreeType 2 ****
Dmitry Timoshkov8871a112001-11-06 22:26:53 +0000386AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
Ian Pilcher563598d2001-05-16 20:56:05 +0000387if test "$ft_lib" = "no"
388then
Ian Pilcher563598d2001-05-16 20:56:05 +0000389 FREETYPEINCL=""
390 wine_cv_msg_freetype=no
391else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000392 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
393 if test "$ft_devel" = "no"
394 then
395 AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
396 if test "$ft_devel2" = "freetype2-config"
397 then
398 ft_devel=$ft_devel2
399 fi
400 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000401 if test "$ft_devel" = "no"
402 then
Ian Pilcher563598d2001-05-16 20:56:05 +0000403 FREETYPEINCL=""
404 wine_cv_msg_freetype=yes
405 else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000406 FREETYPEINCL=`$ft_devel --cflags`
Ian Pilcher40432fe2001-06-06 21:05:23 +0000407 ac_save_CPPFLAGS="$CPPFLAGS"
408 CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
409 AC_CHECK_HEADERS(freetype/freetype.h \
410 freetype/ftglyph.h \
411 freetype/tttables.h \
412 freetype/ftnames.h \
413 freetype/ftsnames.h \
Huw D M Davies814654e2001-09-12 20:21:06 +0000414 freetype/ttnameid.h \
Huw D M Davies4e2024e2001-10-23 20:06:32 +0000415 freetype/ftoutln.h \
416 freetype/internal/sfnt.h)
Alexandre Julliard18d75732002-01-29 03:02:50 +0000417 AC_TRY_CPP([#include <ft2build.h>
418 #include <freetype/fttrigon.h>],
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000419 [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
420 [Define if you have the <freetype/fttrigon.h> header file.])
421 wine_cv_fttrigon=yes],
422 wine_cv_fttrigon=no)
Ian Pilcher40432fe2001-06-06 21:05:23 +0000423 CPPFLAGS="$ac_save_CPPFLAGS"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000424 dnl Check that we have at least freetype/freetype.h
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000425 if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000426 then
427 AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
428 wine_cv_msg_freetype=no
429 else
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000430 FREETYPEINCL=""
431 wine_cv_msg_freetype=yes
432 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000433 fi
434fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000435AC_SUBST(FREETYPEINCL)
436
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000437dnl **** Check for parport (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000438AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000439 AC_TRY_COMPILE(
440 [#include <linux/ppdev.h>],
441 [ioctl (1,PPCLAIM,0)],
442 [ac_cv_c_ppdev="yes"],
443 [ac_cv_c_ppdev="no"])
444 )
445if test "$ac_cv_c_ppdev" = "yes"
446then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000447 AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000448fi
449
Marcus Meissner5ee517a2002-08-09 19:49:31 +0000450dnl **** Check for va_copy ****
451AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
452 AC_TRY_LINK(
453 [#include <stdarg.h>],
454 [va_list ap1, ap2;
455 va_copy(ap1,ap2);
456 ],
457 [ac_cv_c_va_copy="yes"],
458 [ac_cv_c_va_copy="no"])
459 )
460if test "$ac_cv_c_va_copy" = "yes"
461then
462 AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy])
463fi
464AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
465 AC_TRY_LINK(
466 [#include <stdarg.h>],
467 [va_list ap1, ap2;
468 __va_copy(ap1,ap2);
469 ],
470 [ac_cv_c___va_copy="yes"],
471 [ac_cv_c___va_copy="no"])
472 )
473if test "$ac_cv_c___va_copy" = "yes"
474then
475 AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
476fi
477
Pavel Roskin94d99641998-12-26 11:52:51 +0000478dnl **** Check for IPX (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000479AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
Pavel Roskin94d99641998-12-26 11:52:51 +0000480 AC_TRY_COMPILE(
481 [#include <sys/socket.h>
482 #include <netipx/ipx.h>],
483 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000484 [ac_cv_c_ipx_gnu="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000485 [ac_cv_c_ipx_gnu="no"])
486 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000487if test "$ac_cv_c_ipx_gnu" = "yes"
488then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000489 AC_DEFINE(HAVE_IPX_GNU, 1, [Define if IPX should use netipx/ipx.h from libc])
Aaron Hopec23872d2000-01-15 23:43:21 +0000490fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000491
492if test "$ac_cv_c_ipx_gnu" = "no"
493then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000494 AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
Pavel Roskin94d99641998-12-26 11:52:51 +0000495 AC_TRY_COMPILE(
496 [#include <sys/socket.h>
497 #include <asm/types.h>
498 #include <linux/ipx.h>],
499 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000500 [ac_cv_c_ipx_linux="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000501 [ac_cv_c_ipx_linux="no"])
502 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000503 if test "$ac_cv_c_ipx_linux" = "yes"
504 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000505 AC_DEFINE(HAVE_IPX_LINUX, 1, [Define if IPX includes are taken from Linux kernel])
Aaron Hopec23872d2000-01-15 23:43:21 +0000506 fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000507fi
508
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000509dnl **** Check for Open Sound System ****
Todd Vierlingecc76691998-12-15 17:49:02 +0000510AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000511
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000512AC_CACHE_CHECK([for Open Sound System],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000513 ac_cv_c_opensoundsystem,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000514 AC_TRY_COMPILE([
Todd Vierlingecc76691998-12-15 17:49:02 +0000515 #if defined(HAVE_SYS_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000516 #include <sys/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000517 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000518 #include <machine/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000519 #elif defined(HAVE_SOUNDCARD_H)
520 #include <soundcard.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000521 #endif
522 ],[
523
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000524/* check for one of the Open Sound System specific SNDCTL_ defines */
525#if !defined(SNDCTL_DSP_STEREO)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000526#error No open sound system
527#endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000528],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
529
530if test "$ac_cv_c_opensoundsystem" = "yes"
531then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000532 AC_DEFINE(HAVE_OSS, 1, [Define if you have the Open Sound system])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000533fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000534
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000535AC_CACHE_CHECK([for Open Sound System/MIDI interface],
Eric Pouech338d3b21999-05-22 18:52:21 +0000536 ac_cv_c_opensoundsystem_midi,
537 AC_TRY_COMPILE([
538 #if defined(HAVE_SYS_SOUNDCARD_H)
539 #include <sys/soundcard.h>
540 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
541 #include <machine/soundcard.h>
542 #elif defined(HAVE_SOUNDCARD_H)
543 #include <soundcard.h>
544 #endif
545 ],[
546
547/* check for one of the Open Sound System specific SNDCTL_SEQ defines */
548#if !defined(SNDCTL_SEQ_SYNC)
549#error No open sound system MIDI interface
550#endif
551],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
552
553if test "$ac_cv_c_opensoundsystem_midi" = "yes"
554then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000555 AC_DEFINE(HAVE_OSS_MIDI, 1, [Define if you have the Open Sound system (MIDI interface)])
Eric Pouech338d3b21999-05-22 18:52:21 +0000556fi
557
Chris Morgan9b0ba7c2002-03-21 01:38:19 +0000558dnl **** Check for aRts Sound Server ****
559AC_PATH_PROG(ARTSCCONFIG, artsc-config)
560AC_CACHE_CHECK([for aRts Sound server],
561 ac_cv_c_artsserver,
562 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"';
563 then
564 ac_cv_c_artsserver=no
565 else
566 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
567 ARTSC_LIBS=`$ARTSCCONFIG --libs`
568 ac_cv_c_artsserver=no
569 save_CFLAGS="$CFLAGS"
570 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
571 AC_TRY_COMPILE([
572 #include <artsc.h>
573 ],[
574 arts_stream_t stream;
575 ],[
576 ac_cv_c_artsserver=yes
577 ])
578 CFLAGS="$save_CFLAGS"
579 fi)
580
581if test "$ac_cv_c_artsserver" = "yes"
582then
583 AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
584 AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
585
586 AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])
587fi
588
Alexandre Julliardf92b7c02002-06-28 18:31:01 +0000589dnl **** Check for ALSA ****
590AC_SUBST(ALSALIBS,"")
Marco Pietrobono0e79a412002-08-29 01:51:31 +0000591AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h, break)
592if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
Alexandre Julliardf92b7c02002-06-28 18:31:01 +0000593then
594 AC_CHECK_LIB(asound,snd_pcm_open,
595 AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA including devel headers])
596 ALSALIBS="-lasound")
597fi
598
Alexandre Julliard04b5a862002-07-30 02:44:19 +0000599dnl **** Check for NAS ****
600AC_SUBST(NASLIBS,"")
601AC_CHECK_HEADERS(audio/audiolib.h,
602 [AC_CHECK_HEADERS(audio/soundlib.h,,,[#include <audio/audiolib.h>])
603 AC_CHECK_LIB(audio,AuCreateFlow,
604 [AC_DEFINE(HAVE_NAS,1,[Define if you have NAS including devel headers])
605 NASLIBS="-laudio -lXt \$(X_LIBS) \$(XLIB)"],,
606 [-lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
607
Robert Lunnon2a91e3f2002-08-01 18:22:38 +0000608dnl **** Check for libaudioio (which can be used to get solaris audio support) ****
609
610AC_SUBST(AUDIOIOLIBS,"")
611AC_CHECK_HEADERS(libaudioio.h,
612 [AC_CHECK_LIB(audioio,AudioIOGetVersion,
613 [AUDIOIOLIBS="-laudioio"
614 AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])])
615
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000616dnl **** Check for broken glibc mmap64 ****
617
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000618AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000619 AC_TRY_RUN([
620 #define _FILE_OFFSET_BITS 64
621 #include <stdio.h>
622 #include <unistd.h>
623 #include <fcntl.h>
624 #include <sys/mman.h>
625 #include <errno.h>
626
627 int main(int argc,char **argv) {
628 int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
629 if (fd == -1) exit(1);
630
631 unlink("conftest.map");
632
633 write(fd,"test",4);
634
635 if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
636 (errno == EINVAL)
637 ) {
638 exit(1);
639 }
640 close(fd);
641 fprintf(stderr,"success!\n");
642 exit(0);
643 }
644
645 ],
646 ac_cv_mmap64_works="yes",
647 ac_cv_mmap64_works="no",
648 ac_cv_mmap64_works="no") )
649
650if test "$ac_cv_mmap64_works" = "yes"
651then
652 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
653fi
654
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000655dnl **** Check for gcc strength-reduce bug ****
656
657if test "x${GCC}" = "xyes"
658then
659 CFLAGS="$CFLAGS -Wall"
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000660 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000661 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000662int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000663int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000664 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000665 unsigned int B = 3;
666 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000667 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000668 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
669 L[[i]] = 4;
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000670
Eric Pouech5aee80f2000-11-11 00:31:39 +0000671 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000672}],
673 ac_cv_c_gcc_strength_bug="no",
674 ac_cv_c_gcc_strength_bug="yes",
675 ac_cv_c_gcc_strength_bug="yes") )
676 if test "$ac_cv_c_gcc_strength_bug" = "yes"
677 then
678 CFLAGS="$CFLAGS -fno-strength-reduce"
679 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000680
681 dnl Check for -mpreferred-stack-boundary
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000682 AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support], ac_cv_c_gcc_stack_boundary,
683 [WINE_TRY_CFLAGS([-mpreferred-stack-boundary=2],
684 ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")])
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000685 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
686 then
687 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
688 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000689fi
690
Alexandre Julliard84555cc2002-07-22 20:51:02 +0000691dnl **** Check how to define a function in assembly code ****
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000692
Alexandre Julliard84555cc2002-07-22 20:51:02 +0000693AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
694 WINE_TRY_ASM_LINK(
695 ["\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0"],,,
696 ac_cv_asm_func_def=".def",
697 [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0"],,,
698 ac_cv_asm_func_def=".type @function",
699 [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0"],,,
700 ac_cv_asm_func_def=".type 2",
701 ac_cv_asm_func_def="unknown")])]))
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000702
Alexandre Julliard84555cc2002-07-22 20:51:02 +0000703AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function directive])
704case "$ac_cv_asm_func_def" in
705 ".def")
706 AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"]) ;;
707 ".type @function")
708 AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"]) ;;
709 ".type 2")
710 AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"]) ;;
711 *)
712 AC_DEFINE([__ASM_FUNC(name)], [""]) ;;
713esac
Gregg Mattinson57807fa2002-07-20 20:17:13 +0000714
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000715dnl **** Check for underscore on external symbols ****
716
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000717AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
Alexandre Julliard84555cc2002-07-22 20:51:02 +0000718 WINE_TRY_ASM_LINK([".globl _ac_test\n_ac_test:\t.long 0"],
719 [extern int ac_test;],
720 [if (ac_test) return 1],
721 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
722
723AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000724if test "$ac_cv_c_extern_prefix" = "yes"
725then
Alexandre Julliard84555cc2002-07-22 20:51:02 +0000726 AC_DEFINE([__ASM_NAME(name)], ["_" name])
727else
728 AC_DEFINE([__ASM_NAME(name)], [name])
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000729fi
730
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000731dnl **** Check whether stdcall symbols need to be decorated ****
732
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000733AC_CACHE_CHECK([whether stdcall symbols need to be decorated], ac_cv_c_stdcall_decoration,
Alexandre Julliard84555cc2002-07-22 20:51:02 +0000734 WINE_TRY_ASM_LINK(["\t.globl _ac_test@0\n_ac_test@0:\n\t.globl ac_test@0\nac_test@0:"],
735 [extern void __attribute__((__stdcall__)) ac_test(void);],
736 [ac_test()],
737 ac_cv_c_stdcall_decoration="yes",ac_cv_c_stdcall_decoration="no"))
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000738if test "$ac_cv_c_stdcall_decoration" = "yes"
739then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000740 AC_DEFINE(NEED_STDCALL_DECORATION, 1, [Define if stdcall symbols need to be decorated])
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000741fi
742
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000743dnl **** Check for .string in assembler ****
744
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000745AC_CACHE_CHECK([whether assembler accepts .string], ac_cv_c_asm_string,
Marcus Meissner49163d52002-08-20 00:26:40 +0000746 WINE_TRY_ASM_LINK([".data\n\t.string \"test\"\n\t.text"],,,
747 ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no"))
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000748if test "$ac_cv_c_asm_string" = "yes"
749then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000750 AC_DEFINE(HAVE_ASM_STRING, 1, [Define to use .string instead of .ascii])
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000751fi
752
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000753dnl **** Check for working dll ****
754
Alexandre Julliard7bf07d12002-08-03 00:25:59 +0000755AC_SUBST(DLLEXT,"")
756AC_SUBST(DLLFLAGS,"")
757AC_SUBST(DLLIBS,"")
758AC_SUBST(LDDLLFLAGS,"")
759AC_SUBST(LDSHARED,"")
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000760
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000761case $host_os in
762 cygwin*|mingw32*)
763 AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
764 if test "$DLLWRAP" = "false"; then
765 LIBEXT="a"
766 else
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000767 dnl FIXME - check whether dllwrap works correctly...
768 LIBEXT="dll"
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000769 fi
770 ;;
771 *)
772 AC_CHECK_HEADERS(dlfcn.h,
773 [AC_CHECK_FUNCS(dlopen,,
774 [AC_CHECK_LIB(dl,dlopen,
775 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
776 DLLIBS="-ldl"],
777 [LIBEXT="a"])])],
778 [LIBEXT="a"])
779
780 if test "$LIBEXT" = "so"
781 then
Alexandre Julliard7bf07d12002-08-03 00:25:59 +0000782 DLLFLAGS="-fPIC"
783 DLLEXT=".so"
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000784 AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
785 [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
786 ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
Alexandre Julliard466ae142002-05-07 18:33:47 +0000787 if test "$ac_cv_c_dll_gnuelf" = "yes"
788 then
789 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
790 LDDLLFLAGS="-Wl,-Bsymbolic"
791 else
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000792 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
793 [WINE_TRY_CFLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
794 ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
Alexandre Julliard466ae142002-05-07 18:33:47 +0000795 if test "$ac_cv_c_dll_unixware" = "yes"
796 then
797 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
798 LDDLLFLAGS="-Wl,-B,symbolic"
799 fi
800 fi
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000801 fi
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000802
803 dnl Check for cross compiler to build test programs
804 AC_SUBST(CROSSTEST,"")
805 if test "$cross_compiling" = "no"
806 then
807 AC_CHECK_PROGS(CROSSCC,i586-mingw32msvc-gcc,false)
808 AC_CHECK_PROGS(DLLTOOL,i586-mingw32msvc-dlltool,false)
809 if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
810 fi
Alexandre Julliardfa3a5362002-05-09 01:49:54 +0000811 ;;
812esac
Alexandre Julliard0adad952000-01-26 01:45:58 +0000813
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000814if test "$LIBEXT" = "a"; then
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000815 AC_MSG_ERROR(
816[could not find a way to build shared libraries.
817It is currently not possible to build Wine without shared library
818(.so) support to allow transparent switch between .so and .dll files.
819If you are using Linux, you will need a newer binutils.]
820)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000821fi
822
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000823case $build_os in
824 cygwin*|mingw32*)
Alexandre Julliard7bf07d12002-08-03 00:25:59 +0000825 AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$PATH\"") ;;
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000826 *)
Alexandre Julliard7bf07d12002-08-03 00:25:59 +0000827 AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/library:\$(TOOLSDIR)/unicode:\$\$LD_LIBRARY_PATH\"") ;;
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000828esac
829
Alexandre Julliard7bf07d12002-08-03 00:25:59 +0000830dnl Mingw needs explicit msvcrt for linking libwine
831AC_SUBST(CRTLIBS,"")
832case $host_os in
833 mingw32*)
834 CRTLIBS="-lmsvcrt" ;;
835esac
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000836
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000837dnl **** Get the soname for libraries that we load dynamically ****
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000838
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000839if test "$LIBEXT" = "so"
Alexandre Julliard598412e2001-01-17 20:22:22 +0000840then
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000841 WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
842 WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
843 WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
844 WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
Alexandre Julliard598412e2001-01-17 20:22:22 +0000845fi
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000846
847
848dnl **** Check for reentrant libc ****
Alexandre Julliard598412e2001-01-17 20:22:22 +0000849
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000850wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000851dnl Linux style errno location
Alexandre Julliard67e8dc62002-05-20 18:29:58 +0000852WINE_CHECK_ERRNO([__errno_location], [wine_cv_libc_reentrant=__errno_location],
853 dnl FreeBSD style errno location
854 WINE_CHECK_ERRNO([__error], [wine_cv_libc_reentrant=__error],
855 dnl Solaris style errno location
856 WINE_CHECK_ERRNO([___errno], [wine_cv_libc_reentrant=___errno],
857 dnl UnixWare style errno location
858 WINE_CHECK_ERRNO([__thr_errno], [wine_cv_libc_reentrant=__thr_errno],
859 dnl NetBSD style errno location
860 WINE_CHECK_ERRNO([__errno], [wine_cv_libc_reentrant=__errno])
861))))
Alexandre Julliard598412e2001-01-17 20:22:22 +0000862
Alexandre Julliard7cae5582002-06-01 02:55:48 +0000863if test "$wine_cv_libc_reentrant" != "no"
Ron Recorde977d6c1999-09-05 12:32:05 +0000864then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000865 AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant,
866 [Define to the name of the function returning errno for reentrant libc])
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000867fi
868
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000869dnl **** Check for reentrant X libraries ****
870dnl
871dnl This may fail to determine whether X libraries are reentrant if
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000872dnl AC_PATH_XTRA does not set x_libraries.
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000873
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000874if test "$have_x" = "yes"
Patrik Stridvall24110281999-02-04 10:09:54 +0000875then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000876AC_CACHE_CHECK( [for reentrant X libraries], wine_cv_x_reentrant,
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000877 [libX11_check=none
878 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
879 if test -r $dir/libX11.so; then
880 libX11_check="-D $dir/libX11.so"
881 break
882 fi
883 if test -r $dir/libX11.a; then
884 libX11_check="$dir/libX11.a"
885 break
886 fi
887 done
888 if test "$libX11_check" != "none"; then
889 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
890 then
891 wine_cv_x_reentrant=yes
892 else
893 wine_cv_x_reentrant=no
894 fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000895 else
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000896 wine_cv_x_reentrant=unknown
897 fi])
Patrik Stridvall24110281999-02-04 10:09:54 +0000898fi
Ulrich Weigand97591402000-12-19 03:38:53 +0000899
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000900dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000901
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000902AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000903AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000904 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000905 _lwp_create \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000906 _pclose \
907 _popen \
Steven Edwards0a8e15a2002-05-10 01:33:40 +0000908 _snprintf \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000909 _stricmp \
910 _strnicmp \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000911 chsize \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000912 clone \
Andreas Mohra7ca2ba2001-01-12 23:07:11 +0000913 ecvt \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000914 finite \
915 fpclass \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000916 ftruncate \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000917 ftruncate64 \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000918 getnetbyaddr \
919 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000920 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000921 getprotobyname \
922 getprotobynumber \
Alexandre Julliard142dab82002-07-01 18:17:30 +0000923 getpwuid \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000924 getservbyport \
925 getsockopt \
926 inet_network \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000927 lseek64 \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000928 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000929 memmove \
Marcus Meissner786d2492002-07-29 23:55:39 +0000930 mkstemp \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000931 mmap \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000932 pclose \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000933 popen \
Steven Edwardsb9627c12002-05-05 21:03:44 +0000934 pread \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000935 pwrite \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000936 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000937 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000938 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000939 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000940 sigaltstack \
Steven Edwards0a8e15a2002-05-10 01:33:40 +0000941 snprintf \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000942 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000943 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000944 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000945 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000946 tcgetattr \
947 timegm \
948 usleep \
949 vfscanf \
950 wait4 \
951 waitpid \
952)
953
954dnl **** Check for header files ****
955
956AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000957 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000958 arpa/nameser.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000959 direct.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000960 elf.h \
961 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000962 ieeefp.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000963 io.h \
Robert Lunnon2a91e3f2002-08-01 18:22:38 +0000964 libaudioio.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000965 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000966 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000967 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000968 linux/cdrom.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000969 linux/hdreg.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000970 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000971 linux/joystick.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000972 linux/major.h \
Laurent Pinchart0314a652002-05-01 22:01:30 +0000973 linux/param.h \
Lawson Whitney533e7ee2002-02-19 18:41:56 +0000974 linux/serial.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000975 linux/ucdrom.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000976 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000977 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000978 netinet/in_systm.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000979 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000980 pty.h \
Steven Edwardsff4525c2002-06-24 23:00:25 +0000981 pwd.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000982 sched.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000983 scsi/sg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000984 socket.h \
Bang Jun-Youngeda758e2001-12-14 22:47:19 +0000985 stdint.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000986 strings.h \
987 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000988 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000989 sys/file.h \
990 sys/filio.h \
Michal Pasternak60983992002-03-29 18:04:43 +0000991 sys/inttypes.h \
Alexandre Julliardc3e06df2002-05-14 23:18:23 +0000992 sys/ioctl.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000993 sys/ipc.h \
Eric Pouech624cbd72001-08-10 22:29:21 +0000994 sys/link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000995 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000996 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000997 sys/modem.h \
998 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000999 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +00001000 sys/param.h \
Patrik Stridvall57bf4502002-08-26 21:53:24 +00001001 sys/poll.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +00001002 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +00001003 sys/reg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +00001004 sys/shm.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +00001005 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +00001006 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +00001007 sys/sockio.h \
1008 sys/statfs.h \
1009 sys/strtio.h \
1010 sys/syscall.h \
Alexandre Julliard127ec922002-05-07 01:51:30 +00001011 sys/sysctl.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +00001012 sys/time.h \
Patrik Stridvall57bf4502002-08-26 21:53:24 +00001013 sys/times.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +00001014 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +00001015 sys/v86.h \
1016 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +00001017 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +00001018 sys/vm86.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +00001019 sys/wait.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +00001020 syscall.h \
Alexandre Julliardc3e06df2002-05-14 23:18:23 +00001021 termios.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +00001022 ucontext.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +00001023 unistd.h \
Patrik Stridvall57bf4502002-08-26 21:53:24 +00001024 utime.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +00001025)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001026AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +00001027
Gregg Mattinson044b5c42002-07-19 03:16:51 +00001028dnl *** Check for net/if.h
1029AC_CHECK_HEADERS(net/if.h,,,
Gerald Pfeifer87c369d2002-07-23 02:02:02 +00001030 [#if HAVE_SYS_TYPES_H
1031 # include <sys/types.h>
1032 #endif
1033 #if HAVE_SYS_SOCKET_H
Gregg Mattinson044b5c42002-07-19 03:16:51 +00001034 # include <sys/socket.h>
1035 #endif])
1036
1037dnl *** Check for netinet/ip.h
1038AC_CHECK_HEADERS(netinet/ip.h,,,
1039 [#if HAVE_SYS_SOCKET_H
1040 # include <sys/socket.h>
1041 #endif
1042 #if HAVE_NETINET_IN_SYSTM_H
1043 # include <netinet/in_systm.h>
1044 #endif])
1045
1046dnl *** Check for resolv.h
1047AC_CHECK_HEADERS(resolv.h,,,
1048 [#if HAVE_SYS_SOCKET_H
1049 # include <sys/socket.h>
1050 #endif])
1051
Alexandre Julliard2487cce1999-04-18 14:43:16 +00001052dnl **** Check for types ****
1053
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001054AC_C_CONST
1055AC_C_INLINE
Alexandre Julliard5769d1d2002-04-26 19:05:15 +00001056AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001057AC_CHECK_SIZEOF(long long,0)
1058
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001059AC_CACHE_CHECK([whether linux/input.h is for real],
Marcus Meissner74f2b4b2001-01-19 21:09:07 +00001060 wine_cv_linux_input_h,
1061 AC_TRY_COMPILE([
1062 #include <linux/input.h>
1063 ] , [
1064 int foo = EVIOCGBIT(EV_ABS,42);
1065 int bar = BTN_PINKIE;
1066 int fortytwo = 42;
1067 ],
1068 wine_cv_linux_input_h=yes,
1069 wine_cv_linux_input_h=no,
1070 no
1071 )
1072 )
1073 if test "$wine_cv_linux_input_h" = "yes"
1074 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001075 AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H, 1,
1076 [Define if we have linux/input.h AND it contains the INPUT event API])
Marcus Meissner74f2b4b2001-01-19 21:09:07 +00001077 fi
1078
Alexandre Julliard7cae5582002-06-01 02:55:48 +00001079
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001080AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
Rein Klazesff7a61f2000-09-24 19:41:57 +00001081 wine_cv_linux_gethostbyname_r_6,
1082 AC_TRY_COMPILE([
1083#include <netdb.h>
1084 ], [
1085 char *name=NULL;
1086 struct hostent he;
1087 struct hostent *result;
1088 char *buf=NULL;
1089 int bufsize=0;
1090 int res,errnr;
1091 char *addr=NULL;
1092 int addrlen=0;
1093 int addrtype=0;
1094 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1095 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1096 ],
1097 wine_cv_linux_gethostbyname_r_6=yes,
1098 wine_cv_linux_gethostbyname_r_6=no
1099 )
1100 )
1101 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1102 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001103 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1104 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
Rein Klazesff7a61f2000-09-24 19:41:57 +00001105 fi
1106
Marcus Meissner028e9a11999-08-04 15:07:56 +00001107if test "$ac_cv_header_linux_joystick_h" = "yes"
1108then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001109 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
Marcus Meissner028e9a11999-08-04 15:07:56 +00001110 wine_cv_linux_joystick_22_api,
1111 AC_TRY_COMPILE([
1112 #include <sys/ioctl.h>
1113 #include <linux/joystick.h>
1114
1115 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +00001116 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1117 #error "no 2.2 header"
1118 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +00001119 ],/*empty*/,
1120 wine_cv_linux_joystick_22_api=yes,
1121 wine_cv_linux_joystick_22_api=no,
1122 wine_cv_linux_joystick_22_api=no
1123 )
1124 )
Rein Klazes87d224a2000-04-24 17:33:49 +00001125 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +00001126 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001127 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1128 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
Marcus Meissner028e9a11999-08-04 15:07:56 +00001129 fi
1130fi
1131
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001132dnl **** statfs checks ****
1133
1134if test "$ac_cv_header_sys_vfs_h" = "yes"
1135then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001136 AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001137 wine_cv_sys_vfs_has_statfs,
1138 AC_TRY_COMPILE([
1139 #include <sys/types.h>
1140 #ifdef HAVE_SYS_PARAM_H
1141 # include <sys/param.h>
1142 #endif
1143 #include <sys/vfs.h>
1144 ],[
1145 struct statfs stfs;
1146
1147 memset(&stfs,0,sizeof(stfs));
1148 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1149 )
1150 )
1151 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1152 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001153 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1154 [Define if the struct statfs is defined by <sys/vfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001155 fi
1156fi
1157
1158if test "$ac_cv_header_sys_statfs_h" = "yes"
1159then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001160 AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001161 wine_cv_sys_statfs_has_statfs,
1162 AC_TRY_COMPILE([
1163 #include <sys/types.h>
1164 #ifdef HAVE_SYS_PARAM_H
1165 # include <sys/param.h>
1166 #endif
1167 #include <sys/statfs.h>
1168 ],[
1169 struct statfs stfs;
1170 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1171 )
1172 )
1173 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1174 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001175 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1176 [Define if the struct statfs is defined by <sys/statfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001177 fi
1178fi
1179
1180if test "$ac_cv_header_sys_mount_h" = "yes"
1181then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001182 AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001183 wine_cv_sys_mount_has_statfs,
1184 AC_TRY_COMPILE([
1185 #include <sys/types.h>
1186 #ifdef HAVE_SYS_PARAM_H
1187 # include <sys/param.h>
1188 #endif
1189 #include <sys/mount.h>
1190 ],[
1191 struct statfs stfs;
1192 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1193 )
1194 )
1195 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1196 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001197 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1198 [Define if the struct statfs is defined by <sys/mount.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001199 fi
1200fi
1201
1202dnl **** FIXME: what about mixed cases, where we need two of them? ***
1203
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001204WINE_CHECK_STRUCT_MEMBER(statfs,f_bfree,
1205[#include <sys/types.h>
1206#ifdef HAVE_SYS_PARAM_H
1207# include <sys/param.h>
1208#endif
1209#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1210# include <sys/mount.h>
1211#else
1212# ifdef STATFS_DEFINED_BY_SYS_VFS
1213# include <sys/vfs.h>
1214# else
1215# ifdef STATFS_DEFINED_BY_SYS_STATFS
1216# include <sys/statfs.h>
1217# endif
1218# endif
1219#endif],
1220 [AC_DEFINE(STATFS_HAS_BFREE, 1, [Define if the struct statfs has the member bfree])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001221
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001222WINE_CHECK_STRUCT_MEMBER(statfs,f_bavail,
1223[#include <sys/types.h>
1224#ifdef HAVE_SYS_PARAM_H
1225# include <sys/param.h>
1226#endif
1227#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1228# include <sys/mount.h>
1229#else
1230# ifdef STATFS_DEFINED_BY_SYS_VFS
1231# include <sys/vfs.h>
1232# else
1233# ifdef STATFS_DEFINED_BY_SYS_STATFS
1234# include <sys/statfs.h>
1235# endif
1236# endif
1237#endif],
1238 [AC_DEFINE(STATFS_HAS_BAVAIL, 1, [Define if the struct statfs has the member bavail])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001239
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001240dnl Check for file descriptor passing with msg_accrights
1241WINE_CHECK_STRUCT_MEMBER(msghdr,msg_accrights,
1242[#include <sys/types.h>
1243#include <sys/socket.h>],
1244 [AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001245
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001246dnl Check for the sa_len member in struct sockaddr
1247WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len,
1248[#include <sys/types.h>
1249#include <sys/socket.h>],
1250 [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001251
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001252dnl Check for the sun_len member in struct sockaddr_un
1253WINE_CHECK_STRUCT_MEMBER(sockaddr_un,sun_len,
1254[#include <sys/types.h>
Patrik Stridvall09da9662001-07-08 22:30:50 +00001255#include <sys/socket.h>
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001256#include <sys/un.h>],
1257 [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])])
Juergen Lock2d33ab92000-02-13 16:03:29 +00001258
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001259dnl *** check for the need to define __i386__
1260
Alexandre Julliardfc01b722002-05-12 03:16:39 +00001261case $host_cpu in
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001262 *i[3456789]86* )
1263 AC_CACHE_CHECK([whether we need to define __i386__],ac_cv_cpp_def_i386,
1264 AC_EGREP_CPP(yes,[#ifndef __i386__
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001265yes
1266#endif],
1267 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001268 ;;
1269esac
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001270if test "$ac_cv_cpp_def_i386" = "yes"
1271then
1272 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001273 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001274fi
1275
Gregg Mattinson57807fa2002-07-20 20:17:13 +00001276dnl *** check for the need to define __sparc__
1277
1278case $host_cpu in
1279 *sparc* )
1280 AC_CACHE_CHECK([whether we need to define __sparc__],ac_cv_cpp_def_sparc,
1281 AC_EGREP_CPP(yes,[#ifndef __sparc__
1282yes
1283#endif],
1284 ac_cv_cpp_def_sparc="yes", ac_cv_cpp_def_sparc="no"))
1285 ;;
1286esac
1287if test "$ac_cv_cpp_def_sparc" = "yes"
1288then
1289 CFLAGS="$CFLAGS -D__sparc__"
1290 LINTFLAGS="$LINTFLAGS -D__sparc__"
1291fi
1292
1293dnl *** check for the need to define __sun__
1294
1295case $host_vendor in
1296 *sun* )
1297 AC_CACHE_CHECK([whether we need to define __sun__],ac_cv_cpp_def_sun,
1298 AC_EGREP_CPP(yes,[#ifndef __sun__
1299yes
1300#endif],
1301 ac_cv_cpp_def_sun="yes", ac_cv_cpp_def_sun="no"))
1302 ;;
1303esac
1304if test "$ac_cv_cpp_def_sun" = "yes"
1305then
1306 CFLAGS="$CFLAGS -D__sun__"
1307 LINTFLAGS="$LINTFLAGS -D__sun__"
1308fi
1309
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001310dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001311
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001312AH_TOP([#define __WINE_CONFIG_H])
1313
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001314WINE_CONFIG_EXTRA_DIR(controls)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001315WINE_CONFIG_EXTRA_DIR(dlls/ddraw/d3ddevice)
1316WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dclipper)
1317WINE_CONFIG_EXTRA_DIR(dlls/ddraw/ddraw)
1318WINE_CONFIG_EXTRA_DIR(dlls/ddraw/direct3d)
1319WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dpalette)
1320WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dsurface)
1321WINE_CONFIG_EXTRA_DIR(dlls/dinput/joystick)
1322WINE_CONFIG_EXTRA_DIR(dlls/dinput/keyboard)
1323WINE_CONFIG_EXTRA_DIR(dlls/dinput/mouse)
Alexandre Julliard89118562002-03-27 21:13:40 +00001324WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1325WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1326WINE_CONFIG_EXTRA_DIR(dlls/gdi/win16drv)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001327WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
1328WINE_CONFIG_EXTRA_DIR(dlls/user/dde)
1329WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
1330WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001331WINE_CONFIG_EXTRA_DIR(files)
1332WINE_CONFIG_EXTRA_DIR(graphics)
1333WINE_CONFIG_EXTRA_DIR(graphics/x11drv)
1334WINE_CONFIG_EXTRA_DIR(if1632)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001335WINE_CONFIG_EXTRA_DIR(include/wine)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001336WINE_CONFIG_EXTRA_DIR(loader)
1337WINE_CONFIG_EXTRA_DIR(loader/ne)
1338WINE_CONFIG_EXTRA_DIR(memory)
1339WINE_CONFIG_EXTRA_DIR(misc)
1340WINE_CONFIG_EXTRA_DIR(msdos)
1341WINE_CONFIG_EXTRA_DIR(objects)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001342WINE_CONFIG_EXTRA_DIR(programs/regapi/tests)
Andriy Palamarchukf5aad762002-06-20 23:09:33 +00001343WINE_CONFIG_EXTRA_DIR(programs/regedit/tests)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001344WINE_CONFIG_EXTRA_DIR(programs/winetest/tests)
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001345WINE_CONFIG_EXTRA_DIR(relay32)
1346WINE_CONFIG_EXTRA_DIR(scheduler)
1347WINE_CONFIG_EXTRA_DIR(win32)
1348WINE_CONFIG_EXTRA_DIR(windows)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001349
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001350MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001351AC_SUBST_FILE(MAKE_RULES)
1352
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001353MAKE_DLL_RULES=dlls/Makedll.rules
1354AC_SUBST_FILE(MAKE_DLL_RULES)
1355
Alexandre Julliardedeee892002-08-09 01:22:40 +00001356MAKE_TEST_RULES=dlls/Maketest.rules
1357AC_SUBST_FILE(MAKE_TEST_RULES)
1358
Alexandre Julliard626f4252000-11-10 23:35:20 +00001359MAKE_PROG_RULES=programs/Makeprog.rules
1360AC_SUBST_FILE(MAKE_PROG_RULES)
1361
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001362AC_CONFIG_FILES([
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001363Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001364dlls/Makedll.rules
Alexandre Julliardedeee892002-08-09 01:22:40 +00001365dlls/Maketest.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001366programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001367Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001368dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001369dlls/advapi32/Makefile
Alexandre Julliardedeee892002-08-09 01:22:40 +00001370dlls/advapi32/tests/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001371dlls/avicap32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001372dlls/avifil32/Makefile
John K. Hohm34909c22002-05-14 21:50:56 +00001373dlls/comcat/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001374dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001375dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001376dlls/crtdll/Makefile
Travis Michielsen0f21ee82002-01-10 19:41:11 +00001377dlls/crypt32/Makefile
Sylvain Petreolle3a99d8b2002-06-25 23:23:03 +00001378dlls/d3d8/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001379dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001380dlls/ddraw/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001381dlls/devenum/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001382dlls/dinput/Makefile
Ove Kaavend2d08f02002-06-14 00:39:44 +00001383dlls/dinput8/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001384dlls/dplay/Makefile
Peter Hunnisett22b861c1999-09-28 16:35:32 +00001385dlls/dplayx/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001386dlls/dsound/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001387dlls/gdi/Makefile
Marcus Meissnerb63ab442001-06-08 19:02:57 +00001388dlls/glu32/Makefile
Francois Gougetedf3e431999-11-07 21:22:17 +00001389dlls/icmp/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001390dlls/imagehlp/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001391dlls/imm32/Makefile
Dimitrie O. Paun36b5b6b2000-06-03 00:07:44 +00001392dlls/kernel/Makefile
Alexandre Julliardedeee892002-08-09 01:22:40 +00001393dlls/kernel/tests/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001394dlls/lzexpand/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001395dlls/mapi32/Makefile
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001396dlls/mpr/Makefile
Patrik Stridvall8295c861998-10-11 17:09:05 +00001397dlls/msacm/Makefile
Hidenori Takeshima0307f6d2002-03-23 20:18:11 +00001398dlls/msacm/imaadp32/Makefile
Eric Pouechbed67fc2002-05-22 02:00:05 +00001399dlls/msacm/msadp32/Makefile
Hidenori Takeshimabcb9c462002-03-22 19:16:10 +00001400dlls/msacm/msg711/Makefile
Eric Pouechb706b232002-06-04 17:53:46 +00001401dlls/msacm/winemp3/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001402dlls/msdmo/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001403dlls/msimg32/Makefile
Mike McCormackf6be0442002-04-08 23:56:14 +00001404dlls/msisys/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001405dlls/msnet32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001406dlls/msrle32/Makefile
Jon Griffiths1db20bf2001-01-10 23:59:25 +00001407dlls/msvcrt/Makefile
Aric Stewartc2a5ebc2002-01-29 18:09:46 +00001408dlls/msvcrt20/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001409dlls/msvideo/Makefile
Mike McCormack2e40b962001-11-06 17:52:36 +00001410dlls/netapi32/Makefile
Andriy Palamarchukb812c902002-09-11 02:35:17 +00001411dlls/netapi32/tests/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001412dlls/ntdll/Makefile
Jon Griffiths1da29712002-08-15 22:08:40 +00001413dlls/ntdll/tests/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001414dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001415dlls/ole32/Makefile
1416dlls/oleaut32/Makefile
Alexandre Julliardedeee892002-08-09 01:22:40 +00001417dlls/oleaut32/tests/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001418dlls/olecli/Makefile
1419dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001420dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001421dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001422dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001423dlls/psapi/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001424dlls/qcap/Makefile
Hidenori Takeshimab7d4b4e2001-07-02 18:57:22 +00001425dlls/quartz/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001426dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001427dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001428dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001429dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001430dlls/setupapi/Makefile
John R. Sheetsbc80a3b2001-01-11 22:32:44 +00001431dlls/shdocvw/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001432dlls/shell32/Makefile
Andriy Palamarchuk5b5bea02002-08-27 01:34:33 +00001433dlls/shell32/tests/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001434dlls/shfolder/Makefile
1435dlls/shlwapi/Makefile
Alexandre Julliardedeee892002-08-09 01:22:40 +00001436dlls/shlwapi/tests/Makefile
Patrik Stridvall4c692b92002-04-29 18:43:35 +00001437dlls/snmpapi/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001438dlls/sti/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001439dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001440dlls/ttydrv/Makefile
Shi Quan He6b0720f2002-03-21 02:58:39 +00001441dlls/twain/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001442dlls/url/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001443dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001444dlls/user/Makefile
Alexandre Julliardedeee892002-08-09 01:22:40 +00001445dlls/user/tests/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001446dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001447dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001448dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001449dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001450dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001451dlls/wininet/Makefile
Alexandre Julliardedeee892002-08-09 01:22:40 +00001452dlls/wininet/tests/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001453dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001454dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001455dlls/winmm/mcianim/Makefile
1456dlls/winmm/mciavi/Makefile
1457dlls/winmm/mcicda/Makefile
1458dlls/winmm/mciseq/Makefile
1459dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001460dlls/winmm/midimap/Makefile
1461dlls/winmm/wavemap/Makefile
Eric Pouecha120ce02002-06-28 17:40:16 +00001462dlls/winmm/winealsa/Makefile
Chris Morgan9b0ba7c2002-03-21 01:38:19 +00001463dlls/winmm/winearts/Makefile
Robert Lunnon2a91e3f2002-08-01 18:22:38 +00001464dlls/winmm/wineaudioio/Makefile
1465dlls/winmm/winenas/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001466dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001467dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001468dlls/winsock/Makefile
Alexandre Julliardedeee892002-08-09 01:22:40 +00001469dlls/winsock/tests/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001470dlls/winspool/Makefile
Rein Klazes2a4c68b2001-04-16 19:36:12 +00001471dlls/wintrust/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001472dlls/wow32/Makefile
1473dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001474dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001475documentation/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001476include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001477library/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001478miscemu/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001479ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001480programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001481programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001482programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001483programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001484programs/control/Makefile
Alexandre Julliardacfda142002-05-20 19:18:16 +00001485programs/expand/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001486programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001487programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001488programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001489programs/regapi/Makefile
Andriy Palamarchuk4e2e1762002-04-11 23:58:40 +00001490programs/regedit/Makefile
Andriy Palamarchuk2f0d85c2002-04-29 23:47:39 +00001491programs/regsvr32/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001492programs/regtest/Makefile
1493programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001494programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001495programs/wcmd/Makefile
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001496programs/wineconsole/Makefile
Alexandre Julliardf264bd32002-09-13 17:54:27 +00001497programs/winedbg/Makefile
Alexandre Julliard65a42162002-06-04 21:29:40 +00001498programs/winefile/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001499programs/winemine/Makefile
Mike Wetherell0d8a9fa2002-05-05 20:31:54 +00001500programs/winepath/Makefile
Alexandre Julliardfc684342001-03-21 21:41:27 +00001501programs/winetest/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001502programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001503programs/winver/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001504server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001505tools/Makefile
Alexandre Julliard7d4ee772002-07-16 03:20:45 +00001506tools/widl/Makefile
Patrik Stridvall647ac512001-07-30 20:21:34 +00001507tools/winapi/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001508tools/winebuild/Makefile
Eric Pouechd786a122001-09-07 16:04:38 +00001509tools/winedump/Makefile
Bertho Stultiens30855912000-06-13 04:34:41 +00001510tools/wmc/Makefile
Alexandre Julliardb7d3c792002-07-16 02:33:10 +00001511tools/wpp/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001512tools/wrc/Makefile
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +00001513unicode/Makefile])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001514
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001515AC_OUTPUT
1516
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001517if test "$have_x" = "no"
1518then
1519 echo
1520 echo "*** Warning: X development files not found. Wine will be built without"
1521 echo "*** X support, which currently does not work, and would probably not be"
1522 echo "*** what you want anyway. You will need to install devel packages of"
Alexandre Julliard18e4b5e2002-01-04 18:52:40 +00001523 echo "*** Xlib/Xfree86 at the very least."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001524fi
1525
Alexandre Julliard638f1691999-01-17 16:32:32 +00001526if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1527then
1528 echo
1529 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1530 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001531fi
1532
Alexandre Julliard7cae5582002-06-01 02:55:48 +00001533if test "$wine_cv_libc_reentrant" = "no"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001534then
1535 echo
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001536 echo "*** Warning: non-reentrant libc detected. Wine will be built without"
1537 echo "*** threading support. Consider upgrading libc to a more recent"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001538 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001539fi
1540
Alexandre Julliard867fb9d2002-04-24 22:24:43 +00001541if test "$have_x" = "yes" -a "$wine_cv_x_reentrant" != "yes"
1542then
1543 echo
1544 echo "*** Warning: non-reentrant X11 library detected. Multi-threaded"
1545 echo "*** applications won't work properly. You should upgrade your X11 library."
1546fi
1547
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001548if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001549then
1550 echo
1551 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001552 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1553fi
1554
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001555if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "x"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001556then
1557 echo
1558 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Alexandre Julliardc3c587e2002-09-06 19:46:00 +00001559 echo "*** thread-safety. To prevent crashes, OpenGL support has been disabled."
Andreas Mohr18a9d742001-01-17 21:52:42 +00001560 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 +00001561 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001562fi
1563
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001564if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "xyes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001565then
1566 echo
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +00001567 echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001568 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1569 echo "*** support before reporting bugs."
1570fi
1571
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001572if test "$wine_cv_warn_cups_h" = "yes"
1573then
1574 echo
1575 echo "*** Note: You have cups runtime libraries, but no development"
1576 echo "*** libraries. Install the cups-devel package or whichever package"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001577 echo "*** contains cups.h to enable CUPS support in Wine."
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001578fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001579
Ian Pilcher563598d2001-05-16 20:56:05 +00001580if test "$wine_cv_msg_freetype" = "yes"
1581then
1582 echo
1583 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001584 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1585 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1586 echo "*** enable Wine to use TrueType fonts."
Ian Pilcher563598d2001-05-16 20:56:05 +00001587fi
1588
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001589echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001590echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001591echo
1592
1593dnl Local Variables:
1594dnl comment-start: "dnl "
1595dnl comment-end: ""
1596dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001597dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001598dnl End: