blob: 569dc4249ce6f3ce5a665bf64835dc87d5db89b1 [file] [log] [blame]
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001dnl Process this file with autoconf to produce a configure script.
Alexandre Julliardf5818d22002-02-14 19:47:29 +00002dnl Original author: Michael Patra
3dnl See ChangeLog file for detailed change history.
4
5m4_define(WINE_VERSION,regexp(m4_include(VERSION),[version \([-.0-9A-Za-z]+\)],[\1]))
6
Alexandre Julliarddaa28862002-04-11 21:54:01 +00007AC_PREREQ(2.53)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00008AC_INIT([Wine],WINE_VERSION)
9AC_CONFIG_SRCDIR(server/atom.c)
10AC_CONFIG_HEADERS(include/config.h)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000011AC_CONFIG_AUX_DIR(tools)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000012
Alexandre Julliardff8331e1995-09-18 11:19:54 +000013dnl **** Command-line arguments ****
14
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000015dnl Default values
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000016LIBEXT=so # library type .so or .a
Alexandre Julliard7e56f681996-01-31 19:02:28 +000017
Alexandre Julliardf5818d22002-02-14 19:47:29 +000018AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile out all debugging messages]))
19AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE messages]))
20AC_ARG_ENABLE(opengl,AC_HELP_STRING([--enable-opengl],[force usage of OpenGL even if the latter is thread-safe via pthread]))
21AC_ARG_WITH(curses, AC_HELP_STRING([--without-curses],[do not use curses]))
Alexandre Julliarda11d7b11998-03-01 20:05:02 +000022
Alexandre Julliard18f92e71996-07-17 20:02:21 +000023AC_SUBST(OPTIONS)
Alexandre Julliardf5818d22002-02-14 19:47:29 +000024if test "x$enable_debug" = "xno"
Alexandre Julliardf90efa91998-06-14 15:24:15 +000025then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000026 AC_DEFINE(NO_DEBUG_MSGS,1,[Define to disable all debug messages.])
Alexandre Julliarded2f19a2001-06-27 21:42:00 +000027fi
Alexandre Julliardf5818d22002-02-14 19:47:29 +000028if test "x$enable_trace" = "xno" -o "x$enable_debug" = "xno"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +000029then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000030 AC_DEFINE(NO_TRACE_MSGS,1,[Define to disable trace messages.])
Alexandre Julliardf90efa91998-06-14 15:24:15 +000031fi
32
Alexandre Julliard02e90081998-01-04 17:49:09 +000033dnl **** Check for some programs ****
Alexandre Julliardff8331e1995-09-18 11:19:54 +000034
Alexandre Julliardf5818d22002-02-14 19:47:29 +000035AC_CANONICAL_TARGET
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000036AC_PROG_MAKE_SET
37AC_PROG_CC
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000038AC_PROG_CPP
Alexandre Julliardff8331e1995-09-18 11:19:54 +000039AC_PATH_XTRA
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000040AC_PROG_YACC
41AC_PROG_LEX
Marcus Meissner5c5a6212002-01-22 18:28:25 +000042
43dnl **** Just additional warning checks, since AC_PROG just sets 'yacc' even
44dnl **** without one present.
45AC_CHECK_PROGS(XYACC,$YACC bison yacc,none)
46if test "$XYACC" = "none"
47then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000048 AC_MSG_ERROR([no suitable bison/yacc found. Please install the 'bison' package.])
Marcus Meissner5c5a6212002-01-22 18:28:25 +000049fi
Marcus Meissnerb53bb412000-07-23 13:41:51 +000050AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
51if test "$XLEX" = "none"
52then
Alexandre Julliardf5818d22002-02-14 19:47:29 +000053 AC_MSG_ERROR([no suitable lex found. Please install the 'flex' package.])
Marcus Meissnerb53bb412000-07-23 13:41:51 +000054fi
Alexandre Julliardff8331e1995-09-18 11:19:54 +000055AC_PROG_RANLIB
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000056AC_PROG_INSTALL
Alexandre Julliard641ee761997-08-04 16:34:36 +000057AC_PROG_LN_S
Mike McCormacke0df32f2000-08-11 21:15:21 +000058AC_CHECK_PROG(C2MAN,c2man,c2man,\$(TOPSRCDIR)/tools/c2man.pl)
Bill Medland91372b32002-04-20 21:00:42 +000059AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
Alexandre Julliard02e90081998-01-04 17:49:09 +000060
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000061dnl Check for lint
62AC_CHECK_PROGS(LINT, lclint lint)
63if test "$LINT" = "lint"
64then
65 LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
66 dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
67fi
68AC_SUBST(LINT)
69AC_SUBST(LINTFLAGS)
70
Alexandre Julliardf5818d22002-02-14 19:47:29 +000071case $host_os in
72 *cygwin*) LDCOMBINE="ld -r --enable-stdcall-fixup" ;;
73 *) LDCOMBINE="ld -r" ;;
74esac
Dimitrie O. Paun79e44ab2000-12-05 04:13:36 +000075AC_SUBST(LDCOMBINE)
76
Alexandre Julliard02e90081998-01-04 17:49:09 +000077dnl **** Check for some libraries ****
78
Marcus Meissnerb63ab442001-06-08 19:02:57 +000079dnl Check for -lm
Howard Abrams13277481999-07-10 13:16:29 +000080AC_CHECK_LIB(m,sqrt)
Alexandre Julliardd37eb361997-07-20 16:23:21 +000081dnl Check for -li386 for NetBSD and OpenBSD
Alexandre Julliard02e90081998-01-04 17:49:09 +000082AC_CHECK_LIB(i386,i386_set_ldt)
Todd Vierlingecc76691998-12-15 17:49:02 +000083dnl Check for -lossaudio for NetBSD
84AC_CHECK_LIB(ossaudio,_oss_ioctl)
Alexandre Julliard02e90081998-01-04 17:49:09 +000085dnl Check for -lw for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +000086AC_CHECK_FUNCS(iswalnum,,AC_CHECK_LIB(w,iswalnum))
Patrik Stridvallea584721998-11-01 16:22:07 +000087dnl Check for -lnsl for Solaris
Ulrich Weigand2e8e2332000-12-27 18:49:08 +000088AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
Ulrich Weigand715a55e1999-04-18 13:19:56 +000089dnl Check for -lsocket for Solaris
Marcus Meissnerf070fda1999-04-24 12:02:14 +000090AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
Francois Gouget3b943bc2002-04-01 21:05:15 +000091dnl Check for -lresolv for Solaris
Alexandre Julliardc5552742002-04-03 20:24:44 +000092AC_CHECK_FUNCS(inet_aton,,AC_CHECK_LIB(resolv,inet_aton))
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000093dnl Check for -lxpg4 for FreeBSD
Satsuki Fujishima66fb6072001-03-19 19:19:59 +000094AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
Alexandre Julliard0e7bd081999-05-02 11:46:02 +000095dnl Check for -lmmap for OS/2
96AC_CHECK_LIB(mmap,mmap)
Alexandre Julliard3f510ad2002-01-01 01:13:03 +000097
Alexandre Julliard562089b2001-12-31 22:28:35 +000098DLLIBS=""
99AC_SUBST(DLLIBS)
Marcus Meissnerf070fda1999-04-24 12:02:14 +0000100AC_CHECK_HEADERS(dlfcn.h,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000101 [AC_CHECK_FUNCS(dlopen,,
102 [AC_CHECK_LIB(dl,dlopen,
103 [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
Alexandre Julliard562089b2001-12-31 22:28:35 +0000104 DLLIBS="-ldl"],
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000105 LIBEXT="a")]
106 )],
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000107 LIBEXT="a"
108 )
109
Marcus Meissner252b0fe2001-08-06 18:52:14 +0000110JPEGLIB=""
111AC_SUBST(JPEGLIB)
112AC_CHECK_HEADERS(jpeglib.h,
113 AC_CHECK_LIB(jpeg,jpeg_start_decompress,
114 AC_DEFINE(HAVE_LIBJPEG,1,[Define if you have libjpeg including devel headers])
115 JPEGLIB="-ljpeg"
116 )
117)
118
119
Patrik Stridvallea584721998-11-01 16:22:07 +0000120AC_SUBST(XLIB)
Patrik Stridvall2941a212000-04-25 20:34:22 +0000121AC_SUBST(XFILES)
122XFILES=""
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000123AC_SUBST(OPENGLFILES)
124OPENGLFILES=""
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000125AC_SUBST(GLU32FILES)
Alexandre Julliardf33f7f02001-09-17 20:09:08 +0000126GLU32FILES=""
Patrik Stridvallea584721998-11-01 16:22:07 +0000127if test "$have_x" = "yes"
128then
Patrik Stridvall24110281999-02-04 10:09:54 +0000129 XLIB="-lXext -lX11"
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000130 ac_save_CPPFLAGS="$CPPFLAGS"
131 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Patrik Stridvall24110281999-02-04 10:09:54 +0000132
Huw D M Daviesff453fc2001-09-14 01:04:25 +0000133 dnl *** All of the following tests require X11/Xlib.h
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000134 AC_CHECK_HEADERS(X11/Xlib.h,
135 [
Ove Kaavenc90fb252001-01-02 22:39:14 +0000136 dnl *** Check for X keyboard extension
137 AC_CHECK_HEADERS(X11/XKBlib.h,
138 [ dnl *** If X11/XKBlib.h exists...
139 AC_CHECK_LIB(X11, XkbQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000140 AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
Ove Kaavenc90fb252001-01-02 22:39:14 +0000141 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
142 ],
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000143 AC_MSG_WARN([[Xkb extension not found, Wine will be built without it]])
Ove Kaavenc90fb252001-01-02 22:39:14 +0000144 )
145
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000146 dnl *** Check for X Shm extension
147 AC_CHECK_HEADERS(X11/extensions/XShm.h,
148 [ dnl *** If X11/extensions/XShm.h exists...
149 AC_CHECK_LIB(Xext, XShmQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000150 AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000151 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
152 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000153 AC_MSG_WARN([[XShm extension not found, Wine will be built without it]]),
154 [#include <X11/Xlib.h>])
Marcus Meissnercb99b0e1999-12-20 04:10:06 +0000155
Francois Jacques5b6879c2000-07-28 23:04:54 +0000156 dnl *** Check for X shape extension
Ove Kaavenc90fb252001-01-02 22:39:14 +0000157 AC_CHECK_HEADERS(X11/extensions/shape.h,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000158 [ dnl *** If X11/extensions/shape.h exists...
159 AC_CHECK_LIB(Xext,XShapeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000160 AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
Francois Jacques5b6879c2000-07-28 23:04:54 +0000161 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
162 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000163 AC_MSG_WARN([[XShape extension not found, Wine will be built without it]]),
164 [#include <X11/Xlib.h>])
Francois Jacques5b6879c2000-07-28 23:04:54 +0000165
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000166 dnl *** Check for XFree86 DGA / DGA 2.0 extension
167 AC_CHECK_HEADERS(X11/extensions/xf86dga.h,
168 [ dnl *** If X11/extensions/xf86dga.h exists, check
169 dnl *** for XDGAQueryExtension()...
170 AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
171 [ dnl *** If found...
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000172 AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
173 [Define if you have the Xxf86dga library version 2])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000174 X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000175 ],
176 [ dnl *** If not found, look for XF86DGAQueryExtension()
177 dnl *** instead (DGA 2.0 not found)...
178 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000179 [ AC_DEFINE(HAVE_LIBXXF86DGA, 1,
180 [Define if you have the Xxf86dga library version 1])
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 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
184 )
185 ],
186 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
187 )
188 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000189 AC_MSG_WARN([[DGA extension not found, Wine will be built without it]]),
190 [#include <X11/Xlib.h>])
Patrik Stridvall24110281999-02-04 10:09:54 +0000191
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000192 dnl *** Check for XFree86 VMODE extension
193 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,
194 [ dnl *** If X11/extensions/xf86vmode.h exists...
195 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000196 [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000197 X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
198 ],,
199 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
200 )
201 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000202 AC_MSG_WARN([[XFree86 VMODE extension not found, Wine will be built without it]]),
203 [#include <X11/Xlib.h>])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000204
205 dnl *** Check for XVideo extension supporting XvImages
206 AC_CHECK_HEADERS(X11/extensions/Xvlib.h,
207 [ dnl *** If X11/extensions/Xvlib.h exists...
208 AC_CHECK_LIB(Xv, XvShmCreateImage,
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000209 [ AC_DEFINE(HAVE_XVIDEO, 1, [Define if the X libraries support XVideo])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000210 X_PRE_LIBS="$X_PRE_LIBS -lXv"
211 ],,
212 $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
213 )
214 ],
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000215 AC_MSG_WARN([[XVideo extension not found, Wine will be built without it]]),
216 [#include <X11/Xlib.h>])
Lionel Ulmer3d2f32d2000-09-06 19:46:59 +0000217
Alexandre Julliard21e91662002-04-23 22:06:41 +0000218 dnl *** Check for XRender include file
219 AC_CHECK_HEADERS(X11/extensions/Xrender.h,,,[#include <X11/Xlib.h>])
John R. Sheetsf2b77cc2000-05-23 21:18:51 +0000220 ]
221 ) dnl *** End of X11/Xlib.h check
Lionel Ulmer5c085701999-02-28 19:48:53 +0000222
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000223 dnl Check for the presence of OpenGL
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000224 if test "x$enable_opengl" != "xno"
Patrik Stridvall24110281999-02-04 10:09:54 +0000225 then
Francois Gouget42dcd972002-01-29 17:52:28 +0000226 if test -f /usr/X11R6/lib/libGL.a -a ! -f /usr/X11R6/lib/libGL.so
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000227 then
228 AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
229This prevents linking to OpenGL. Delete the file and restart configure.])
230 fi
231
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000232 AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
Marcus Meissner22a969b2000-08-08 20:46:50 +0000233 if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000234 then
Alexandre Julliarddaa28862002-04-11 21:54:01 +0000235 AC_CHECK_HEADERS(GL/glext.h,,,[#include <GL/glx.h>])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000236 dnl Check for some problems due to old Mesa versions
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000237 AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000238 AC_TRY_COMPILE(
Lionel Ulmer48c08162000-01-05 01:51:02 +0000239 [#include <GL/gl.h>],
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000240 [GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000241 [wine_cv_opengl_version_OK="yes"],
242 [wine_cv_opengl_version_OK="no"]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000243 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000244 )
245
246 dnl Check for the thread-safety of the OpenGL library
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000247 AC_CACHE_CHECK([for thread-safe OpenGL version],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000248 wine_cv_opengl_version_threadsafe,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000249 [saved_libs=$LIBS
250 LIBS="$X_LIBS -lGL"
251 AC_TRY_LINK([],[pthread_getspecific();],
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000252 [wine_cv_opengl_version_threadsafe="yes"],
253 [wine_cv_opengl_version_threadsafe="no"])
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000254 LIBS=$saved_libs]
Lionel Ulmer48c08162000-01-05 01:51:02 +0000255 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000256
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000257 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 +0000258 then
Andreas Mohr4eefb962000-08-01 00:27:35 +0000259 dnl Check for the presence of the library
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000260 AC_CHECK_LIB(GL,glXCreateContext,
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000261 X_PRE_LIBS="$X_PRE_LIBS -lGL"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000262 ,,
263 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
264
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000265 if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000266 then
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000267 OPENGLFILES='$(OPENGLFILES)'
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000268 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
Lionel Ulmerbd8ede12000-10-12 20:45:58 +0000269
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000270 AC_CHECK_LIB(GL,glXGetProcAddressARB,
271 AC_DEFINE(HAVE_GLX_GETPROCADDRESS, 1,
272 [Define if the OpenGL library supports the glXGetProcAddressARB call]),,
273 $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000274
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000275 if test "$ac_cv_lib_GL_glXGetProcAddressARB" = "yes"
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000276 then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000277 AC_CACHE_CHECK([for OpenGL extension functions prototypes], wine_cv_extension_prototypes,
278 [AC_TRY_COMPILE([#include <GL/gl.h>
Marcus Meissner6bb6d4c2000-08-09 22:21:08 +0000279 #ifdef HAVE_GL_GLEXT_H
280 # include <GL/glext.h>
281 #endif
282 ],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000283 [PFNGLCOLORTABLEEXTPROC test_proc;],
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000284 [wine_cv_extension_prototypes="yes"],
Lionel Ulmer1434d872000-07-23 14:23:31 +0000285 [wine_cv_extension_prototypes="no"]
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000286 )]
Lionel Ulmer1434d872000-07-23 14:23:31 +0000287 )
Alexandre Julliardb508a1d2002-01-21 18:06:10 +0000288 if test "$wine_cv_extension_prototypes" = "yes"
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000289 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000290 AC_DEFINE(HAVE_GLEXT_PROTOTYPES, 1,
291 [Define if the OpenGL headers define extension typedefs])
Lionel Ulmerfe210ef2000-07-29 11:30:56 +0000292 fi
Lionel Ulmerbedf40b2000-05-12 20:18:14 +0000293 fi
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +0000294
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000295 fi
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000296 dnl Check for GLU32 library.
Marcus Meissner6e9ab402001-08-08 23:21:16 +0000297 AC_CHECK_LIB(GLU,gluLookAt,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000298 [X_PRE_LIBS="$X_PRE_LIBS -lGLU"
299 GLU32FILES='$(GLU32FILES)']
Marcus Meissnerb63ab442001-06-08 19:02:57 +0000300 ,,
301 $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
302 )
Lionel Ulmerfbc15b12000-04-29 14:23:22 +0000303 fi
304 fi
Patrik Stridvall24110281999-02-04 10:09:54 +0000305 fi
Ove Kaaven1eb593c1999-02-14 09:34:46 +0000306
307 CPPFLAGS="$ac_save_CPPFLAGS"
Patrik Stridvall2941a212000-04-25 20:34:22 +0000308 XFILES='$(XFILES)'
Patrik Stridvallea584721998-11-01 16:22:07 +0000309else
310 XLIB=""
311 X_CFLAGS=""
312 X_LIBS=""
313fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000314
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000315dnl **** Check which curses lib to use ***
Alexandre Julliard48957682001-12-26 23:08:31 +0000316CURSESLIBS=""
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000317if test "x$with_curses" != "xno"
Alexandre Julliard638f1691999-01-17 16:32:32 +0000318then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000319 AC_CHECK_HEADERS(ncurses.h,
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000320 [AC_CHECK_LIB(ncurses,waddch,
Alexandre Julliard48957682001-12-26 23:08:31 +0000321 [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
322 CURSESLIBS="-lncurses"],
323 [AC_CHECK_HEADERS(curses.h,
324 [AC_CHECK_LIB(curses,waddch,
325 [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
Bernhard Rosenkraenzer5ea30312002-01-06 19:08:03 +0000326 CURSESLIBS="-lcurses"])])])])
Alexandre Julliard48957682001-12-26 23:08:31 +0000327 saved_libs="$LIBS"
328 LIBS="$CURSESLIBS $LIBS"
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000329 AC_CHECK_FUNCS(getbkgd resizeterm)
Alexandre Julliard48957682001-12-26 23:08:31 +0000330 LIBS="$saved_libs"
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000331fi
Alexandre Julliard48957682001-12-26 23:08:31 +0000332AC_SUBST(CURSESLIBS)
Joseph Praneviche884f9c1999-01-03 16:14:34 +0000333
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000334CUPSLIBS=""
335dnl **** Check for CUPS ****
Marcus Meissner3ee02ba2001-04-30 18:18:50 +0000336wine_cv_warn_cups_h=no
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000337AC_CHECK_LIB(cups,cupsGetPPD,
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000338 [AC_CHECK_HEADER(cups/cups.h,
339 [AC_DEFINE(HAVE_CUPS, 1, [Define if we have CUPS])
340 CUPSLIBS="-lcups"],
341 wine_cv_warn_cups_h=yes)]
Marcus Meissnerab8b7db2001-04-27 18:02:46 +0000342)
343AC_SUBST(CUPSLIBS)
344
Shi Quan He6b0720f2002-03-21 02:58:39 +0000345dnl **** Check for SANE ****
346AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
347if test "$sane_devel" = "no"
348then
349 SANELIBS=""
350 SANEINCL=""
351else
352 SANELIBS="`$sane_devel --libs`"
353 SANEINCL="`$sane_devel --cflags`"
354 ac_save_CPPFLAGS="$CPPFLAGS"
355 ac_save_LIBS="$LIBS"
356 CPPFLAGS="$CPPFLAGS $SANEINCL"
357 LIBS="$LIBS $SANELIBS"
Alexandre Julliard96328b32002-03-31 19:23:41 +0000358 AC_CHECK_HEADER(sane/sane.h,
359 [AC_CHECK_LIB(sane,sane_open,
360 [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
361 [SANELIBS=""
362 SANEINCL=""])],
363 [SANELIBS=""
364 SANEINCL=""])
Shi Quan He6b0720f2002-03-21 02:58:39 +0000365 LIBS="$ac_save_LIBS"
366 CPPFLAGS="$ac_save_CPPFLAGS"
367fi
368AC_SUBST(SANELIBS)
369AC_SUBST(SANEINCL)
370
Ian Pilcher563598d2001-05-16 20:56:05 +0000371dnl **** Check for FreeType 2 ****
Dmitry Timoshkov8871a112001-11-06 22:26:53 +0000372AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
Ian Pilcher563598d2001-05-16 20:56:05 +0000373if test "$ft_lib" = "no"
374then
Ian Pilcher563598d2001-05-16 20:56:05 +0000375 FREETYPEINCL=""
376 wine_cv_msg_freetype=no
377else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000378 AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
379 if test "$ft_devel" = "no"
380 then
381 AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
382 if test "$ft_devel2" = "freetype2-config"
383 then
384 ft_devel=$ft_devel2
385 fi
386 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000387 if test "$ft_devel" = "no"
388 then
Ian Pilcher563598d2001-05-16 20:56:05 +0000389 FREETYPEINCL=""
390 wine_cv_msg_freetype=yes
391 else
Marcus Meissnerd28955d2001-05-31 21:35:15 +0000392 FREETYPEINCL=`$ft_devel --cflags`
Ian Pilcher40432fe2001-06-06 21:05:23 +0000393 ac_save_CPPFLAGS="$CPPFLAGS"
394 CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
395 AC_CHECK_HEADERS(freetype/freetype.h \
396 freetype/ftglyph.h \
397 freetype/tttables.h \
398 freetype/ftnames.h \
399 freetype/ftsnames.h \
Huw D M Davies814654e2001-09-12 20:21:06 +0000400 freetype/ttnameid.h \
Huw D M Davies4e2024e2001-10-23 20:06:32 +0000401 freetype/ftoutln.h \
402 freetype/internal/sfnt.h)
Alexandre Julliard18d75732002-01-29 03:02:50 +0000403 AC_TRY_CPP([#include <ft2build.h>
404 #include <freetype/fttrigon.h>],
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000405 [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
406 [Define if you have the <freetype/fttrigon.h> header file.])
407 wine_cv_fttrigon=yes],
408 wine_cv_fttrigon=no)
Ian Pilcher40432fe2001-06-06 21:05:23 +0000409 CPPFLAGS="$ac_save_CPPFLAGS"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000410 dnl Check that we have at least freetype/freetype.h
Huw D M Daviesc1d38132002-02-08 17:09:50 +0000411 if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000412 then
413 AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
414 wine_cv_msg_freetype=no
415 else
Huw D M Davies9b1d3722002-01-29 17:09:28 +0000416 FREETYPEINCL=""
417 wine_cv_msg_freetype=yes
418 fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000419 fi
420fi
Ian Pilcher563598d2001-05-16 20:56:05 +0000421AC_SUBST(FREETYPEINCL)
422
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000423dnl **** Check for parport (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000424AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000425 AC_TRY_COMPILE(
426 [#include <linux/ppdev.h>],
427 [ioctl (1,PPCLAIM,0)],
428 [ac_cv_c_ppdev="yes"],
429 [ac_cv_c_ppdev="no"])
430 )
431if test "$ac_cv_c_ppdev" = "yes"
432then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000433 AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
Uwe Bonnes6509fa92001-06-26 21:06:07 +0000434fi
435
Pavel Roskin94d99641998-12-26 11:52:51 +0000436dnl **** Check for IPX (currently Linux only) ****
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000437AC_CACHE_CHECK([for GNU style IPX support], ac_cv_c_ipx_gnu,
Pavel Roskin94d99641998-12-26 11:52:51 +0000438 AC_TRY_COMPILE(
439 [#include <sys/socket.h>
440 #include <netipx/ipx.h>],
441 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000442 [ac_cv_c_ipx_gnu="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000443 [ac_cv_c_ipx_gnu="no"])
444 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000445if test "$ac_cv_c_ipx_gnu" = "yes"
446then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000447 AC_DEFINE(HAVE_IPX_GNU, 1, [Define if IPX should use netipx/ipx.h from libc])
Aaron Hopec23872d2000-01-15 23:43:21 +0000448fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000449
450if test "$ac_cv_c_ipx_gnu" = "no"
451then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000452 AC_CACHE_CHECK([for linux style IPX support], ac_cv_c_ipx_linux,
Pavel Roskin94d99641998-12-26 11:52:51 +0000453 AC_TRY_COMPILE(
454 [#include <sys/socket.h>
455 #include <asm/types.h>
456 #include <linux/ipx.h>],
457 [((struct sockaddr_ipx *)0)->sipx_family == AF_IPX],
Aaron Hopec23872d2000-01-15 23:43:21 +0000458 [ac_cv_c_ipx_linux="yes"],
Pavel Roskin94d99641998-12-26 11:52:51 +0000459 [ac_cv_c_ipx_linux="no"])
460 )
Aaron Hopec23872d2000-01-15 23:43:21 +0000461 if test "$ac_cv_c_ipx_linux" = "yes"
462 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000463 AC_DEFINE(HAVE_IPX_LINUX, 1, [Define if IPX includes are taken from Linux kernel])
Aaron Hopec23872d2000-01-15 23:43:21 +0000464 fi
Pavel Roskin94d99641998-12-26 11:52:51 +0000465fi
466
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000467dnl **** Check for Open Sound System ****
Todd Vierlingecc76691998-12-15 17:49:02 +0000468AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h soundcard.h, break)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000469
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000470AC_CACHE_CHECK([for Open Sound System],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000471 ac_cv_c_opensoundsystem,
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000472 AC_TRY_COMPILE([
Todd Vierlingecc76691998-12-15 17:49:02 +0000473 #if defined(HAVE_SYS_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000474 #include <sys/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000475 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000476 #include <machine/soundcard.h>
Todd Vierlingecc76691998-12-15 17:49:02 +0000477 #elif defined(HAVE_SOUNDCARD_H)
478 #include <soundcard.h>
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000479 #endif
480 ],[
481
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000482/* check for one of the Open Sound System specific SNDCTL_ defines */
483#if !defined(SNDCTL_DSP_STEREO)
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000484#error No open sound system
485#endif
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000486],ac_cv_c_opensoundsystem="yes",ac_cv_c_opensoundsystem="no"))
487
488if test "$ac_cv_c_opensoundsystem" = "yes"
489then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000490 AC_DEFINE(HAVE_OSS, 1, [Define if you have the Open Sound system])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000491fi
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000492
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000493AC_CACHE_CHECK([for Open Sound System/MIDI interface],
Eric Pouech338d3b21999-05-22 18:52:21 +0000494 ac_cv_c_opensoundsystem_midi,
495 AC_TRY_COMPILE([
496 #if defined(HAVE_SYS_SOUNDCARD_H)
497 #include <sys/soundcard.h>
498 #elif defined(HAVE_MACHINE_SOUNDCARD_H)
499 #include <machine/soundcard.h>
500 #elif defined(HAVE_SOUNDCARD_H)
501 #include <soundcard.h>
502 #endif
503 ],[
504
505/* check for one of the Open Sound System specific SNDCTL_SEQ defines */
506#if !defined(SNDCTL_SEQ_SYNC)
507#error No open sound system MIDI interface
508#endif
509],ac_cv_c_opensoundsystem_midi="yes",ac_cv_c_opensoundsystem_midi="no"))
510
511if test "$ac_cv_c_opensoundsystem_midi" = "yes"
512then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000513 AC_DEFINE(HAVE_OSS_MIDI, 1, [Define if you have the Open Sound system (MIDI interface)])
Eric Pouech338d3b21999-05-22 18:52:21 +0000514fi
515
Chris Morgan9b0ba7c2002-03-21 01:38:19 +0000516dnl **** Check for aRts Sound Server ****
517AC_PATH_PROG(ARTSCCONFIG, artsc-config)
518AC_CACHE_CHECK([for aRts Sound server],
519 ac_cv_c_artsserver,
520 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"';
521 then
522 ac_cv_c_artsserver=no
523 else
524 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
525 ARTSC_LIBS=`$ARTSCCONFIG --libs`
526 ac_cv_c_artsserver=no
527 save_CFLAGS="$CFLAGS"
528 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
529 AC_TRY_COMPILE([
530 #include <artsc.h>
531 ],[
532 arts_stream_t stream;
533 ],[
534 ac_cv_c_artsserver=yes
535 ])
536 CFLAGS="$save_CFLAGS"
537 fi)
538
539if test "$ac_cv_c_artsserver" = "yes"
540then
541 AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
542 AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
543
544 AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])
545fi
546
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000547dnl **** Check for broken glibc mmap64 ****
548
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000549AC_CACHE_CHECK( [whether mmap64 works defined as mmap], ac_cv_mmap64_works,
Marcus Meissner0f6cfbc2001-06-08 19:34:56 +0000550 AC_TRY_RUN([
551 #define _FILE_OFFSET_BITS 64
552 #include <stdio.h>
553 #include <unistd.h>
554 #include <fcntl.h>
555 #include <sys/mman.h>
556 #include <errno.h>
557
558 int main(int argc,char **argv) {
559 int fd = open("conftest.map",O_CREAT|O_RDWR,0600);
560 if (fd == -1) exit(1);
561
562 unlink("conftest.map");
563
564 write(fd,"test",4);
565
566 if ((-1 == mmap(0,4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0)) &&
567 (errno == EINVAL)
568 ) {
569 exit(1);
570 }
571 close(fd);
572 fprintf(stderr,"success!\n");
573 exit(0);
574 }
575
576 ],
577 ac_cv_mmap64_works="yes",
578 ac_cv_mmap64_works="no",
579 ac_cv_mmap64_works="no") )
580
581if test "$ac_cv_mmap64_works" = "yes"
582then
583 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Set this to 64 to enable 64-bit file support on Linux])
584fi
585
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000586dnl **** Check for gcc strength-reduce bug ****
587
588if test "x${GCC}" = "xyes"
589then
590 CFLAGS="$CFLAGS -Wall"
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000591 AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000592 AC_TRY_RUN([
Eric Pouech5aee80f2000-11-11 00:31:39 +0000593int L[[4]] = {0,1,2,3};
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000594int main(void) {
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000595 static int Array[[3]];
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000596 unsigned int B = 3;
597 int i;
Alexandre Julliardd2e1c1a1996-03-09 16:12:43 +0000598 for(i=0; i<B; i++) Array[[i]] = i - 3;
Eric Pouech5aee80f2000-11-11 00:31:39 +0000599 for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
600 L[[i]] = 4;
601
602 exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000603}],
604 ac_cv_c_gcc_strength_bug="no",
605 ac_cv_c_gcc_strength_bug="yes",
606 ac_cv_c_gcc_strength_bug="yes") )
607 if test "$ac_cv_c_gcc_strength_bug" = "yes"
608 then
609 CFLAGS="$CFLAGS -fno-strength-reduce"
610 fi
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000611
612 dnl Check for -mpreferred-stack-boundary
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000613 AC_CACHE_CHECK([for gcc -mpreferred-stack-boundary=2 support],
Alexandre Julliardf9b94cb2000-12-06 03:50:22 +0000614 ac_cv_c_gcc_stack_boundary,
615 [saved_cflags=$CFLAGS
616 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
617 AC_TRY_COMPILE(,[return 0],ac_cv_c_gcc_stack_boundary="yes",ac_cv_c_gcc_stack_boundary="no")
618 CFLAGS=$saved_cflags
619 ])
620 if test "$ac_cv_c_gcc_stack_boundary" = "yes"
621 then
622 CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"
623 fi
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000624fi
625
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000626dnl **** Check if we need to place .type inside a .def directive ****
627
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000628AC_CACHE_CHECK([whether .type must sit inside a .def directive],
Dimitrie O. Paunc77cbbc2000-11-27 23:32:55 +0000629 ac_cv_c_type_in_def,
630[saved_libs=$LIBS
631LIBS="conftest_asm.s $LIBS"
632cat > conftest_asm.s <<EOF
633 .globl _ac_test
634 .def _ac_test; .scl 2; .type 32; .endef
635_ac_test:
636 .long 0
637EOF
638AC_TRY_LINK(,,ac_cv_c_type_in_def="yes",ac_cv_c_type_in_def="no")
639LIBS=$saved_libs])
640if test "$ac_cv_c_type_in_def" = "yes"
641then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000642 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 +0000643fi
644
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000645dnl **** Check for underscore on external symbols ****
646
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000647AC_CACHE_CHECK([whether external symbols need an underscore prefix],
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000648 ac_cv_c_extern_prefix,
649[saved_libs=$LIBS
650LIBS="conftest_asm.s $LIBS"
651cat > conftest_asm.s <<EOF
652 .globl _ac_test
653_ac_test:
654 .long 0
655EOF
656AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
657 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
658LIBS=$saved_libs])
659if test "$ac_cv_c_extern_prefix" = "yes"
660then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000661 AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1,
662 [Define if symbols declared in assembly code need an underscore prefix])
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000663fi
664
Dmitry Timoshkov93a5b862002-02-04 18:48:18 +0000665dnl **** Check whether stdcall symbols need to be decorated ****
666
667AC_CACHE_CHECK([whether stdcall symbols need to be decorated],
668 ac_cv_c_stdcall_decoration,
669[saved_libs=$LIBS
670LIBS="conftest_asm.s $LIBS"
671if test "$ac_cv_c_extern_prefix" = "yes"
672then
673cat > conftest_asm.s <<EOF
674 .globl _ac_test@0
675_ac_test@0:
676EOF
677else
678cat > conftest_asm.s <<EOF
679 .globl ac_test@0
680ac_test@0:
681EOF
682fi
683AC_TRY_LINK([extern void __attribute__((__stdcall__)) ac_test(void);],
684 [ac_test(); return 0],
685 ac_cv_c_stdcall_decoration="yes",ac_cv_c_stdcall_decoration="no")
686LIBS=$saved_libs])
687if test "$ac_cv_c_stdcall_decoration" = "yes"
688then
689 AC_DEFINE(NEED_STDCALL_DECORATION, 1,
690 [Define if stdcall symbols need to be decorated])
691fi
692
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000693dnl **** Check for .string in assembler ****
694
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000695AC_CACHE_CHECK([whether assembler accepts .string],
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000696 ac_cv_c_asm_string,
697[saved_libs=$LIBS
698LIBS="conftest_asm.s $LIBS"
699cat > conftest_asm.s <<EOF
700 .string "test"
701EOF
702AC_TRY_LINK(,,ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no")
703LIBS=$saved_libs])
704if test "$ac_cv_c_asm_string" = "yes"
705then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000706 AC_DEFINE(HAVE_ASM_STRING, 1, [Define to use .string instead of .ascii])
Alexandre Julliard0623a6f1998-01-18 18:01:49 +0000707fi
708
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000709dnl **** Check for working dll ****
710
Todd Vierling4b992b01998-12-15 15:26:27 +0000711LDSHARED=""
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000712LDDLLFLAGS=""
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000713if test "$LIBEXT" = "so"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000714then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000715 AC_CACHE_CHECK([whether we can build a GNU style ELF dll],
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000716 ac_cv_c_dll_gnuelf,
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000717 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000718 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000719 AC_TRY_LINK(,[return 1],ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000720 CFLAGS=$saved_cflags
721 ])
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000722 if test "$ac_cv_c_dll_gnuelf" = "yes"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000723 then
Jeremy Whitec7b4ed72001-07-14 00:49:50 +0000724 LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000725 LDDLLFLAGS="-Wl,-Bsymbolic"
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000726 else
Patrik Stridvalla9ee4a22000-01-30 00:36:50 +0000727 AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
Ron Recorde977d6c1999-09-05 12:32:05 +0000728 ac_cv_c_dll_unixware,
Todd Vierling4b992b01998-12-15 15:26:27 +0000729 [saved_cflags=$CFLAGS
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000730 CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
Ron Recorde977d6c1999-09-05 12:32:05 +0000731 AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
Todd Vierling4b992b01998-12-15 15:26:27 +0000732 CFLAGS=$saved_cflags
733 ])
Ron Recorde977d6c1999-09-05 12:32:05 +0000734 if test "$ac_cv_c_dll_unixware" = "yes"
Todd Vierling4b992b01998-12-15 15:26:27 +0000735 then
Jeremy Whitec7b4ed72001-07-14 00:49:50 +0000736 LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000737 LDDLLFLAGS="-Wl,-B,symbolic"
Todd Vierling4b992b01998-12-15 15:26:27 +0000738 fi
739 fi
Bang Jun-Young37e5e7f2001-06-06 21:21:27 +0000740 if test "$ac_cv_c_dll_gnuelf" = "no" -a "$ac_cv_c_dll_unixware" = "no"
Todd Vierling4b992b01998-12-15 15:26:27 +0000741 then
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000742 LIBEXT="a"
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000743 AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000744 if test "$DLLWRAP" = "dllwrap"; then
745 dnl FIXME - check whether dllwrap works correctly...
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000746 case $host_os in
747 *cygwin*)
748 LIBEXT="dll"
749 ;;
750 esac
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000751 fi
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000752 fi
753fi
Alexandre Julliard0adad952000-01-26 01:45:58 +0000754
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000755if test "$LIBEXT" = "a"; then
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000756 AC_MSG_ERROR(
757[could not find a way to build shared libraries.
758It is currently not possible to build Wine without shared library
759(.so) support to allow transparent switch between .so and .dll files.
760If you are using Linux, you will need a newer binutils.]
761)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000762fi
763
Alexandre Julliard0adad952000-01-26 01:45:58 +0000764DLLFLAGS=""
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000765LDPATH=""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000766
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000767if test "$LIBEXT" = "so"; then
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000768 DLLFLAGS="-fPIC"
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000769 DLLEXT=".so"
Alexandre Julliard9a68b7b2002-04-27 21:19:22 +0000770 LDPATH="LD_LIBRARY_PATH=\"\$(TOPOBJDIR)/library:\$(TOPOBJDIR)/unicode:\$\$LD_LIBRARY_PATH\""
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000771elif test "$LIBEXT" = "dll"; then
772 #DLLFLAGS="-fPIC" # -fPIC doesn't work(at least in cygwin-b20) - FIXME
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000773 DLLEXT=""
Alexandre Julliard9a68b7b2002-04-27 21:19:22 +0000774 LDPATH="PATH=\"\$(TOPOBJDIR)/library:\$(TOPOBJDIR)/unicode:\$\$PATH\""
Alexandre Julliard0adad952000-01-26 01:45:58 +0000775fi
776
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000777AC_SUBST(DLLFLAGS)
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000778AC_SUBST(DLLEXT)
Todd Vierling4b992b01998-12-15 15:26:27 +0000779AC_SUBST(LDSHARED)
Alexandre Julliard4354cda2000-11-09 20:27:45 +0000780AC_SUBST(LDDLLFLAGS)
Alexandre Julliard0adad952000-01-26 01:45:58 +0000781AC_SUBST(LIBEXT)
Hidenori Takeshimad48ca942000-12-22 22:28:00 +0000782AC_SUBST(LDPATH)
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000783
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000784dnl **** Check for reentrant libc ****
785dnl
786dnl For cross-compiling we blindly assume that libc is reentrant. This is
787dnl ok since non-reentrant libc is quite rare (mostly old libc5 versions).
788
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000789AC_DEFUN([WINE_CHECK_ERRNO],
Alexandre Julliard598412e2001-01-17 20:22:22 +0000790[
791 AC_CACHE_CHECK(for reentrant libc: $1, wine_cv_libc_r_$1,
792 [AC_TRY_RUN([int myerrno = 0;
793char buf[256];
794int *$1(){return &myerrno;}
795main(){connect(0,buf,255); exit(!myerrno);}],
796 wine_cv_libc_r_$1=yes, wine_cv_libc_r_$1=no,
797 wine_cv_libc_r_$1=yes )
798])
799if test "$wine_cv_libc_r_$1" = "yes"
800then
801 wine_cv_libc_reentrant=$1
802fi
803])
804
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000805wine_cv_libc_reentrant=no
Marcus Meissnerc2606381999-04-11 15:20:29 +0000806dnl Linux style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000807WINE_CHECK_ERRNO(__errno_location)
Marcus Meissnerc2606381999-04-11 15:20:29 +0000808dnl FreeBSD style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000809WINE_CHECK_ERRNO(__error)
Ulrich Weigand715a55e1999-04-18 13:19:56 +0000810dnl Solaris style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000811WINE_CHECK_ERRNO(___errno)
Ron Recorde977d6c1999-09-05 12:32:05 +0000812dnl UnixWare style errno location
Alexandre Julliard598412e2001-01-17 20:22:22 +0000813WINE_CHECK_ERRNO(__thr_errno)
Bang Jun-Young33dff342001-05-07 18:21:10 +0000814dnl NetBSD style errno location
815WINE_CHECK_ERRNO(__errno)
Alexandre Julliard598412e2001-01-17 20:22:22 +0000816
817if test "$wine_cv_libc_reentrant" != "no"
Ron Recorde977d6c1999-09-05 12:32:05 +0000818then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000819 AC_DEFINE_UNQUOTED(ERRNO_LOCATION,$wine_cv_libc_reentrant,
820 [Define to the name of the function returning errno for reentrant libc])
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000821fi
822
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000823dnl **** Check for reentrant X libraries ****
824dnl
825dnl This may fail to determine whether X libraries are reentrant if
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000826dnl AC_PATH_XTRA does not set x_libraries.
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000827
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000828if test "$have_x" = "yes"
Patrik Stridvall24110281999-02-04 10:09:54 +0000829then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000830AC_CACHE_CHECK( [for reentrant X libraries], wine_cv_x_reentrant,
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000831 [libX11_check=none
832 for dir in "$x_libraries" /usr/lib /usr/local/lib /lib; do
833 if test -r $dir/libX11.so; then
834 libX11_check="-D $dir/libX11.so"
835 break
836 fi
837 if test -r $dir/libX11.a; then
838 libX11_check="$dir/libX11.a"
839 break
840 fi
841 done
842 if test "$libX11_check" != "none"; then
843 if nm $libX11_check | grep $wine_cv_libc_reentrant >/dev/null 2>&1
844 then
845 wine_cv_x_reentrant=yes
846 else
847 wine_cv_x_reentrant=no
848 fi
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000849 else
Alexandre Julliard867fb9d2002-04-24 22:24:43 +0000850 wine_cv_x_reentrant=unknown
851 fi])
Patrik Stridvall24110281999-02-04 10:09:54 +0000852fi
Ulrich Weigand97591402000-12-19 03:38:53 +0000853
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000854dnl **** Check for functions ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000855
Patrik Stridvall1bb94031999-05-08 15:47:44 +0000856AC_FUNC_ALLOCA()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000857AC_CHECK_FUNCS(\
Eric Pouechf61d7e02000-04-29 16:44:19 +0000858 __libc_fork \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000859 _lwp_create \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000860 _pclose \
861 _popen \
862 _stricmp \
863 _strnicmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000864 clone \
Andreas Mohra7ca2ba2001-01-12 23:07:11 +0000865 ecvt \
Jon Griffithsd6deb6d2000-11-27 01:37:28 +0000866 finite \
867 fpclass \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000868 ftruncate64 \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000869 getnetbyaddr \
870 getnetbyname \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000871 getpagesize \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000872 getprotobyname \
873 getprotobynumber \
874 getservbyport \
875 getsockopt \
876 inet_network \
Marcus Meissner3f1ed522001-05-14 20:09:37 +0000877 lseek64 \
Alexandre Julliard27bb3112000-11-29 17:48:06 +0000878 lstat \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000879 memmove \
Hidenori Takeshimaa85b0a62000-11-25 23:54:12 +0000880 mmap \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000881 pclose \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000882 pread \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000883 popen \
Alexandre Julliardf1a0de92002-01-07 21:00:27 +0000884 pwrite \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000885 rfork \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000886 select \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000887 sendmsg \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000888 settimeofday \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000889 sigaltstack \
Patrik Stridvallb9010211999-11-13 22:23:35 +0000890 statfs \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000891 strcasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000892 strerror \
Alexandre Julliard3b96efc1999-09-04 14:36:02 +0000893 strncasecmp \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000894 tcgetattr \
895 timegm \
896 usleep \
897 vfscanf \
898 wait4 \
899 waitpid \
900)
901
902dnl **** Check for header files ****
903
904AC_CHECK_HEADERS(\
Patrik Stridvall96336321999-10-24 22:13:47 +0000905 arpa/inet.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000906 arpa/nameser.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000907 direct.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000908 elf.h \
909 float.h \
Ulrich Weigand2e8e2332000-12-27 18:49:08 +0000910 ieeefp.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000911 io.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000912 libio.h \
Hidenori Takeshima01f78aa2000-07-09 12:19:09 +0000913 libutil.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000914 link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000915 linux/cdrom.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000916 linux/hdreg.h \
Marcus Meissnerc9b3b2e2000-12-12 00:38:58 +0000917 linux/input.h \
Marcus Meissner028e9a11999-08-04 15:07:56 +0000918 linux/joystick.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000919 linux/major.h \
Laurent Pinchart0314a652002-05-01 22:01:30 +0000920 linux/param.h \
Lawson Whitney533e7ee2002-02-19 18:41:56 +0000921 linux/serial.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000922 linux/ucdrom.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000923 net/if.h \
Hidenori Takeshima5d1a6382000-11-26 04:00:53 +0000924 netdb.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000925 netinet/in.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000926 netinet/in_systm.h \
927 netinet/ip.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000928 netinet/tcp.h \
Marcus Meissner2d7be871999-12-05 23:06:40 +0000929 pty.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000930 resolv.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000931 sched.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000932 scsi/sg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000933 socket.h \
Bang Jun-Youngeda758e2001-12-14 22:47:19 +0000934 stdint.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000935 strings.h \
936 sys/cdio.h \
Howard Abrams13277481999-07-10 13:16:29 +0000937 sys/errno.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000938 sys/file.h \
939 sys/filio.h \
Michal Pasternak60983992002-03-29 18:04:43 +0000940 sys/inttypes.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000941 sys/ipc.h \
Eric Pouech624cbd72001-08-10 22:29:21 +0000942 sys/link.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000943 sys/lwp.h \
Howard Abrams13277481999-07-10 13:16:29 +0000944 sys/mman.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000945 sys/modem.h \
946 sys/mount.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000947 sys/msg.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000948 sys/param.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000949 sys/ptrace.h \
Ulrich Weigand8a1bdb32000-01-30 22:22:22 +0000950 sys/reg.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000951 sys/shm.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000952 sys/signal.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000953 sys/socket.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000954 sys/sockio.h \
955 sys/statfs.h \
956 sys/strtio.h \
957 sys/syscall.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000958 sys/time.h \
Dimitrie O. Paun2af03e42000-11-29 20:04:09 +0000959 sys/user.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000960 sys/v86.h \
961 sys/v86intr.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000962 sys/vfs.h \
Patrik Stridvall96336321999-10-24 22:13:47 +0000963 sys/vm86.h \
Rizsanyi Zsolte7c6d172002-05-01 22:25:41 +0000964 sys/wait.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000965 syscall.h \
Patrik Stridvall7a4e5992000-12-01 23:53:46 +0000966 ucontext.h \
Patrik Stridvall81ecb522002-03-11 05:08:14 +0000967 unistd.h \
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000968)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000969AC_HEADER_STAT()
Alexandre Julliard2487cce1999-04-18 14:43:16 +0000970
971dnl **** Check for types ****
972
Alexandre Julliardf5818d22002-02-14 19:47:29 +0000973AC_C_CONST
974AC_C_INLINE
Alexandre Julliard5769d1d2002-04-26 19:05:15 +0000975AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000976AC_CHECK_SIZEOF(long long,0)
977
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000978AC_CACHE_CHECK([whether linux/input.h is for real],
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000979 wine_cv_linux_input_h,
980 AC_TRY_COMPILE([
981 #include <linux/input.h>
982 ] , [
983 int foo = EVIOCGBIT(EV_ABS,42);
984 int bar = BTN_PINKIE;
985 int fortytwo = 42;
986 ],
987 wine_cv_linux_input_h=yes,
988 wine_cv_linux_input_h=no,
989 no
990 )
991 )
992 if test "$wine_cv_linux_input_h" = "yes"
993 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +0000994 AC_DEFINE(HAVE_CORRECT_LINUXINPUT_H, 1,
995 [Define if we have linux/input.h AND it contains the INPUT event API])
Marcus Meissner74f2b4b2001-01-19 21:09:07 +0000996 fi
997
Rein Klazesff7a61f2000-09-24 19:41:57 +0000998
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +0000999AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
Rein Klazesff7a61f2000-09-24 19:41:57 +00001000 wine_cv_linux_gethostbyname_r_6,
1001 AC_TRY_COMPILE([
1002#include <netdb.h>
1003 ], [
1004 char *name=NULL;
1005 struct hostent he;
1006 struct hostent *result;
1007 char *buf=NULL;
1008 int bufsize=0;
1009 int res,errnr;
1010 char *addr=NULL;
1011 int addrlen=0;
1012 int addrtype=0;
1013 res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
1014 res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
1015 ],
1016 wine_cv_linux_gethostbyname_r_6=yes,
1017 wine_cv_linux_gethostbyname_r_6=no
1018 )
1019 )
1020 if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
1021 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001022 AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
1023 [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
Rein Klazesff7a61f2000-09-24 19:41:57 +00001024 fi
1025
Marcus Meissner028e9a11999-08-04 15:07:56 +00001026if test "$ac_cv_header_linux_joystick_h" = "yes"
1027then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001028 AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
Marcus Meissner028e9a11999-08-04 15:07:56 +00001029 wine_cv_linux_joystick_22_api,
1030 AC_TRY_COMPILE([
1031 #include <sys/ioctl.h>
1032 #include <linux/joystick.h>
1033
1034 struct js_event blub;
Marcus Meissner605a9c31999-11-04 02:04:01 +00001035 #if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
1036 #error "no 2.2 header"
1037 #endif
Marcus Meissner028e9a11999-08-04 15:07:56 +00001038 ],/*empty*/,
1039 wine_cv_linux_joystick_22_api=yes,
1040 wine_cv_linux_joystick_22_api=no,
1041 wine_cv_linux_joystick_22_api=no
1042 )
1043 )
Rein Klazes87d224a2000-04-24 17:33:49 +00001044 if test "$wine_cv_linux_joystick_22_api" = "yes"
Marcus Meissner028e9a11999-08-04 15:07:56 +00001045 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001046 AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
1047 [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
Marcus Meissner028e9a11999-08-04 15:07:56 +00001048 fi
1049fi
1050
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001051dnl **** statfs checks ****
1052
1053if test "$ac_cv_header_sys_vfs_h" = "yes"
1054then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001055 AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001056 wine_cv_sys_vfs_has_statfs,
1057 AC_TRY_COMPILE([
1058 #include <sys/types.h>
1059 #ifdef HAVE_SYS_PARAM_H
1060 # include <sys/param.h>
1061 #endif
1062 #include <sys/vfs.h>
1063 ],[
1064 struct statfs stfs;
1065
1066 memset(&stfs,0,sizeof(stfs));
1067 ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
1068 )
1069 )
1070 if test "$wine_cv_sys_vfs_has_statfs" = "yes"
1071 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001072 AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
1073 [Define if the struct statfs is defined by <sys/vfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001074 fi
1075fi
1076
1077if test "$ac_cv_header_sys_statfs_h" = "yes"
1078then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001079 AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001080 wine_cv_sys_statfs_has_statfs,
1081 AC_TRY_COMPILE([
1082 #include <sys/types.h>
1083 #ifdef HAVE_SYS_PARAM_H
1084 # include <sys/param.h>
1085 #endif
1086 #include <sys/statfs.h>
1087 ],[
1088 struct statfs stfs;
1089 ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
1090 )
1091 )
1092 if test "$wine_cv_sys_statfs_has_statfs" = "yes"
1093 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001094 AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
1095 [Define if the struct statfs is defined by <sys/statfs.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001096 fi
1097fi
1098
1099if test "$ac_cv_header_sys_mount_h" = "yes"
1100then
Bernhard Rosenkraenzerfea260a2001-09-19 20:30:28 +00001101 AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001102 wine_cv_sys_mount_has_statfs,
1103 AC_TRY_COMPILE([
1104 #include <sys/types.h>
1105 #ifdef HAVE_SYS_PARAM_H
1106 # include <sys/param.h>
1107 #endif
1108 #include <sys/mount.h>
1109 ],[
1110 struct statfs stfs;
1111 ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
1112 )
1113 )
1114 if test "$wine_cv_sys_mount_has_statfs" = "yes"
1115 then
Alexandre Julliarded2f19a2001-06-27 21:42:00 +00001116 AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
1117 [Define if the struct statfs is defined by <sys/mount.h>])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001118 fi
1119fi
1120
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001121dnl *** Check for some structure members
1122
1123dnl Macro to check if a structure contains a specified member
1124dnl Usage: WINE_CHECK_STRUCT_MEMBER(struct,member,[includes,[action-if-found,[action-if-not-found]]])
1125
1126AC_DEFUN([WINE_CHECK_STRUCT_MEMBER],
1127[AC_CACHE_CHECK([for $2 in struct $1], ac_cv_c_$1_$2,
1128 AC_TRY_COMPILE([$3],[struct $1 s; s.$2 = 0],ac_cv_c_$1_$2="yes",ac_cv_c_$1_$2="no"))
1129AS_IF([ test "x$ac_cv_c_$1_$2" = "xyes"],[$4],[$5])
1130])
1131
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001132dnl **** FIXME: what about mixed cases, where we need two of them? ***
1133
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001134WINE_CHECK_STRUCT_MEMBER(statfs,f_bfree,
1135[#include <sys/types.h>
1136#ifdef HAVE_SYS_PARAM_H
1137# include <sys/param.h>
1138#endif
1139#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1140# include <sys/mount.h>
1141#else
1142# ifdef STATFS_DEFINED_BY_SYS_VFS
1143# include <sys/vfs.h>
1144# else
1145# ifdef STATFS_DEFINED_BY_SYS_STATFS
1146# include <sys/statfs.h>
1147# endif
1148# endif
1149#endif],
1150 [AC_DEFINE(STATFS_HAS_BFREE, 1, [Define if the struct statfs has the member bfree])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001151
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001152WINE_CHECK_STRUCT_MEMBER(statfs,f_bavail,
1153[#include <sys/types.h>
1154#ifdef HAVE_SYS_PARAM_H
1155# include <sys/param.h>
1156#endif
1157#ifdef STATFS_DEFINED_BY_SYS_MOUNT
1158# include <sys/mount.h>
1159#else
1160# ifdef STATFS_DEFINED_BY_SYS_VFS
1161# include <sys/vfs.h>
1162# else
1163# ifdef STATFS_DEFINED_BY_SYS_STATFS
1164# include <sys/statfs.h>
1165# endif
1166# endif
1167#endif],
1168 [AC_DEFINE(STATFS_HAS_BAVAIL, 1, [Define if the struct statfs has the member bavail])])
Alexandre Julliarddadf78f1998-05-17 17:13:43 +00001169
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001170dnl Check for file descriptor passing with msg_accrights
1171WINE_CHECK_STRUCT_MEMBER(msghdr,msg_accrights,
1172[#include <sys/types.h>
1173#include <sys/socket.h>],
1174 [AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS, 1, [Define if struct msghdr contains msg_accrights])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001175
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001176dnl Check for the sa_len member in struct sockaddr
1177WINE_CHECK_STRUCT_MEMBER(sockaddr,sa_len,
1178[#include <sys/types.h>
1179#include <sys/socket.h>],
1180 [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if struct sockaddr contains sa_len])])
Alexandre Julliardc7c217b1998-04-13 12:21:30 +00001181
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001182dnl Check for the sun_len member in struct sockaddr_un
1183WINE_CHECK_STRUCT_MEMBER(sockaddr_un,sun_len,
1184[#include <sys/types.h>
Patrik Stridvall09da9662001-07-08 22:30:50 +00001185#include <sys/socket.h>
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001186#include <sys/un.h>],
1187 [AC_DEFINE(HAVE_SOCKADDR_SUN_LEN, 1, [Define if struct sockaddr_un contains sun_len])])
Juergen Lock2d33ab92000-02-13 16:03:29 +00001188
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001189dnl *** check for the need to define __i386__
1190
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001191case $target_cpu in
1192 *i[3456789]86* )
1193 AC_CACHE_CHECK([whether we need to define __i386__],ac_cv_cpp_def_i386,
1194 AC_EGREP_CPP(yes,[#ifndef __i386__
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001195yes
1196#endif],
1197 ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001198 ;;
1199esac
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001200if test "$ac_cv_cpp_def_i386" = "yes"
1201then
1202 CFLAGS="$CFLAGS -D__i386__"
Patrik Stridvalla9be64e1999-07-31 17:39:44 +00001203 LINTFLAGS="$LINTFLAGS -D__i386__"
Alexandre Julliard51d46ba1999-05-08 16:05:27 +00001204fi
1205
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001206dnl **** Generate output files ****
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001207
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001208dnl Macro to create non-existent directories from config.status
1209dnl Usage: WINE_CONFIG_EXTRA_DIR(dirname)
1210AC_DEFUN([WINE_CONFIG_EXTRA_DIR],
1211[AC_CONFIG_COMMANDS([$1],[test -d "$1" || (AC_MSG_NOTICE([creating $1]) && mkdir "$1")])])
François Gouget14259412001-11-06 20:57:11 +00001212
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001213AH_TOP([#define __WINE_CONFIG_H])
1214
1215WINE_CONFIG_EXTRA_DIR(dlls/ddraw/d3ddevice)
1216WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dclipper)
1217WINE_CONFIG_EXTRA_DIR(dlls/ddraw/ddraw)
1218WINE_CONFIG_EXTRA_DIR(dlls/ddraw/direct3d)
1219WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dpalette)
1220WINE_CONFIG_EXTRA_DIR(dlls/ddraw/dsurface)
1221WINE_CONFIG_EXTRA_DIR(dlls/dinput/joystick)
1222WINE_CONFIG_EXTRA_DIR(dlls/dinput/keyboard)
1223WINE_CONFIG_EXTRA_DIR(dlls/dinput/mouse)
Alexandre Julliard89118562002-03-27 21:13:40 +00001224WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
1225WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1226WINE_CONFIG_EXTRA_DIR(dlls/gdi/win16drv)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001227WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001228WINE_CONFIG_EXTRA_DIR(dlls/kernel/tests)
Marcus Meissnere8d97702002-03-26 01:54:25 +00001229WINE_CONFIG_EXTRA_DIR(dlls/oleaut32/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001230WINE_CONFIG_EXTRA_DIR(dlls/user/dde)
1231WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001232WINE_CONFIG_EXTRA_DIR(dlls/user/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001233WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
Alexandre Julliard9a68b7b2002-04-27 21:19:22 +00001234WINE_CONFIG_EXTRA_DIR(dlls/winsock/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001235WINE_CONFIG_EXTRA_DIR(include/wine)
Alexandre Julliardc72f0b22002-02-28 21:47:58 +00001236WINE_CONFIG_EXTRA_DIR(programs/regapi/tests)
1237WINE_CONFIG_EXTRA_DIR(programs/winetest/tests)
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001238
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001239MAKE_RULES=Make.rules
Alexandre Julliardff8331e1995-09-18 11:19:54 +00001240AC_SUBST_FILE(MAKE_RULES)
1241
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +00001242MAKE_DLL_RULES=dlls/Makedll.rules
1243AC_SUBST_FILE(MAKE_DLL_RULES)
1244
Alexandre Julliard626f4252000-11-10 23:35:20 +00001245MAKE_PROG_RULES=programs/Makeprog.rules
1246AC_SUBST_FILE(MAKE_PROG_RULES)
1247
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001248AC_CONFIG_FILES([
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001249Make.rules
Alexandre Julliard626f4252000-11-10 23:35:20 +00001250dlls/Makedll.rules
1251programs/Makeprog.rules
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001252Makefile
1253controls/Makefile
1254debugger/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001255dlls/Makefile
Juergen Schmiedf7b0de31999-01-03 12:48:29 +00001256dlls/advapi32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001257dlls/avicap32/Makefile
Marcus Meissnerb3d1a221999-03-13 18:07:44 +00001258dlls/avifil32/Makefile
Alexandre Julliarda0d77311998-09-13 16:32:00 +00001259dlls/comctl32/Makefile
Klaas van Gendc9127491999-02-28 20:05:11 +00001260dlls/commdlg/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001261dlls/crtdll/Makefile
Travis Michielsen0f21ee82002-01-10 19:41:11 +00001262dlls/crypt32/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001263dlls/dciman32/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001264dlls/ddraw/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001265dlls/devenum/Makefile
Alexandre Julliardddce6522000-03-17 16:58:10 +00001266dlls/dinput/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
Hidenori Takeshimabcb9c462002-03-22 19:16:10 +00001281dlls/msacm/msg711/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001282dlls/msdmo/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001283dlls/msimg32/Makefile
Mike McCormackf6be0442002-04-08 23:56:14 +00001284dlls/msisys/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001285dlls/msnet32/Makefile
Hidenori Takeshima1c53a7f2001-11-06 00:41:05 +00001286dlls/msrle32/Makefile
Jon Griffiths1db20bf2001-01-10 23:59:25 +00001287dlls/msvcrt/Makefile
Aric Stewartc2a5ebc2002-01-29 18:09:46 +00001288dlls/msvcrt20/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001289dlls/msvideo/Makefile
Mike McCormack2e40b962001-11-06 17:52:36 +00001290dlls/netapi32/Makefile
Marcus Meissner51505b11998-11-01 14:00:21 +00001291dlls/ntdll/Makefile
Alexandre Julliard8551f8c1999-12-11 23:56:46 +00001292dlls/odbc32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001293dlls/ole32/Makefile
1294dlls/oleaut32/Makefile
1295dlls/olecli/Makefile
1296dlls/oledlg/Makefile
Sean Langley58c71d42000-02-07 16:26:56 +00001297dlls/olepro32/Makefile
Ulrich Weigand2a722f41999-09-19 18:36:53 +00001298dlls/olesvr/Makefile
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001299dlls/opengl32/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001300dlls/psapi/Makefile
Hidenori Takeshimab4be9982001-10-23 20:35:23 +00001301dlls/qcap/Makefile
Hidenori Takeshimab7d4b4e2001-07-02 18:57:22 +00001302dlls/quartz/Makefile
Marcus Meissner30ef8771998-12-11 13:26:26 +00001303dlls/rasapi32/Makefile
Hidenori Takeshimae75f9fb2000-05-03 18:12:19 +00001304dlls/richedit/Makefile
Huw D M Davies10b1b232000-07-15 19:53:50 +00001305dlls/rpcrt4/Makefile
Mike McCormackdc2461e2000-07-15 21:35:55 +00001306dlls/serialui/Makefile
Francois Jacquesdf5e5792000-07-08 18:27:03 +00001307dlls/setupapi/Makefile
John R. Sheetsbc80a3b2001-01-11 22:32:44 +00001308dlls/shdocvw/Makefile
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00001309dlls/shell32/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001310dlls/shfolder/Makefile
1311dlls/shlwapi/Makefile
Patrik Stridvall4c692b92002-04-29 18:43:35 +00001312dlls/snmpapi/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001313dlls/sti/Makefile
Andreas Mohr5aa96c11999-03-14 12:34:25 +00001314dlls/tapi32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001315dlls/ttydrv/Makefile
Shi Quan He6b0720f2002-03-21 02:58:39 +00001316dlls/twain/Makefile
Hidenori Takeshima1a8b3392001-09-14 21:36:30 +00001317dlls/url/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001318dlls/urlmon/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001319dlls/user/Makefile
Ulrich Weigandd43a46a1999-01-31 10:11:04 +00001320dlls/version/Makefile
Ulrich Weigand6c6da671999-08-04 09:49:49 +00001321dlls/win32s/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001322dlls/winaspi/Makefile
Ove Kaavene5557b32000-12-26 00:22:45 +00001323dlls/winedos/Makefile
Dimitrie O. Paun84bde6a2000-05-30 20:27:23 +00001324dlls/wineps/Makefile
Alexandre Julliard819fa8c2000-04-11 20:07:00 +00001325dlls/wininet/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001326dlls/winmm/Makefile
Eric Pouech2a3b0a12000-02-26 13:14:04 +00001327dlls/winmm/joystick/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001328dlls/winmm/mcianim/Makefile
1329dlls/winmm/mciavi/Makefile
1330dlls/winmm/mcicda/Makefile
1331dlls/winmm/mciseq/Makefile
1332dlls/winmm/mciwave/Makefile
Eric Pouechabe72271999-10-31 02:23:49 +00001333dlls/winmm/midimap/Makefile
1334dlls/winmm/wavemap/Makefile
Chris Morgan9b0ba7c2002-03-21 01:38:19 +00001335dlls/winmm/winearts/Makefile
Eric Pouech68944c21999-10-24 18:42:42 +00001336dlls/winmm/wineoss/Makefile
Hidenori Takeshima9c672132000-12-14 21:56:18 +00001337dlls/winnls/Makefile
Alexandre Julliardde078692000-01-23 22:07:15 +00001338dlls/winsock/Makefile
Huw D M Daviese39b6761999-05-17 16:20:51 +00001339dlls/winspool/Makefile
Rein Klazes2a4c68b2001-04-16 19:36:12 +00001340dlls/wintrust/Makefile
Alexandre Julliardc6075322000-07-09 11:19:35 +00001341dlls/wow32/Makefile
1342dlls/wsock32/Makefile
Alexandre Julliard1dac57f2000-03-19 12:08:09 +00001343dlls/x11drv/Makefile
Alexandre Julliardd37eb361997-07-20 16:23:21 +00001344documentation/Makefile
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +00001345files/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001346graphics/Makefile
Alexandre Julliard0e270f41996-08-24 18:26:35 +00001347graphics/x11drv/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001348if1632/Makefile
James Juranc70dc831999-02-13 12:18:33 +00001349include/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001350library/Makefile
1351libtest/Makefile
1352loader/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001353loader/ne/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001354memory/Makefile
1355misc/Makefile
1356miscemu/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001357msdos/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001358objects/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001359ole/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001360programs/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001361programs/avitools/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001362programs/clock/Makefile
Eric Williams30008a01999-02-05 17:40:47 +00001363programs/cmdlgtst/Makefile
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001364programs/control/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001365programs/notepad/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001366programs/osversioncheck/Makefile
Alexandre Julliard02ed4c21996-03-02 19:34:10 +00001367programs/progman/Makefile
Sylvain St.Germain1bb0e661999-03-14 14:00:22 +00001368programs/regapi/Makefile
Andriy Palamarchuk4e2e1762002-04-11 23:58:40 +00001369programs/regedit/Makefile
Andriy Palamarchuk2f0d85c2002-04-29 23:47:39 +00001370programs/regsvr32/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001371programs/regtest/Makefile
1372programs/uninstaller/Makefile
Alexandre Julliarda11d7b11998-03-01 20:05:02 +00001373programs/view/Makefile
Dave Pickles74f440e1999-06-06 15:24:04 +00001374programs/wcmd/Makefile
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001375programs/wineconsole/Makefile
Joshua Thielena3f23802000-03-15 19:06:39 +00001376programs/winemine/Makefile
Mike Wetherell0d8a9fa2002-05-05 20:31:54 +00001377programs/winepath/Makefile
Alexandre Julliardfc684342001-03-21 21:41:27 +00001378programs/winetest/Makefile
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001379programs/winhelp/Makefile
Alexandre Julliarde658d821997-11-30 17:45:40 +00001380programs/winver/Makefile
Alexandre Julliard44ed71f1997-12-21 19:17:50 +00001381relay32/Makefile
Alexandre Julliard9ea19e51997-01-01 17:29:55 +00001382scheduler/Makefile
Alexandre Julliard642d3131998-07-12 19:29:36 +00001383server/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001384tools/Makefile
Patrik Stridvall647ac512001-07-30 20:21:34 +00001385tools/winapi/Makefile
Alexandre Julliarde482eeb2000-06-23 20:15:35 +00001386tools/winebuild/Makefile
Eric Pouechd786a122001-09-07 16:04:38 +00001387tools/winedump/Makefile
Bertho Stultiens30855912000-06-13 04:34:41 +00001388tools/wmc/Makefile
Andreas Mohr4eefb962000-08-01 00:27:35 +00001389tools/wrc/Makefile
Alexandre Julliard60ce85c1998-02-01 18:33:27 +00001390tsx11/Makefile
Alexandre Julliardfb270dd2000-06-09 05:27:21 +00001391unicode/Makefile
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001392win32/Makefile
Alexandre Julliardd0893542002-04-30 21:16:39 +00001393windows/Makefile])
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001394
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001395AC_OUTPUT
1396
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001397if test "$have_x" = "no"
1398then
1399 echo
1400 echo "*** Warning: X development files not found. Wine will be built without"
1401 echo "*** X support, which currently does not work, and would probably not be"
1402 echo "*** what you want anyway. You will need to install devel packages of"
Alexandre Julliard18e4b5e2002-01-04 18:52:40 +00001403 echo "*** Xlib/Xfree86 at the very least."
Ove Kaaven8b4431f1999-01-23 13:59:11 +00001404fi
1405
Alexandre Julliard638f1691999-01-17 16:32:32 +00001406if test "$ac_cv_lib_ncurses_resizeterm" = "no" -a "$ac_cv_lib_ncurses_waddch" = "yes"
1407then
1408 echo
1409 echo "*** Warning: resizeterm not found in ncurses. Wine will be built without"
1410 echo "*** terminal resize support. Consider upgrading ncurses."
Alexandre Julliard638f1691999-01-17 16:32:32 +00001411fi
1412
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001413if test "$wine_cv_libc_reentrant" = "no"
1414then
1415 echo
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001416 echo "*** Warning: non-reentrant libc detected. Wine will be built without"
1417 echo "*** threading support. Consider upgrading libc to a more recent"
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001418 echo "*** reentrant version of libc."
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001419fi
1420
Alexandre Julliard867fb9d2002-04-24 22:24:43 +00001421if test "$have_x" = "yes" -a "$wine_cv_x_reentrant" != "yes"
1422then
1423 echo
1424 echo "*** Warning: non-reentrant X11 library detected. Multi-threaded"
1425 echo "*** applications won't work properly. You should upgrade your X11 library."
1426fi
1427
Lionel Ulmerbedf40b2000-05-12 20:18:14 +00001428if test "$wine_cv_opengl_version_OK" = "no"
Lionel Ulmer5c085701999-02-28 19:48:53 +00001429then
1430 echo
1431 echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001432 echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
1433fi
1434
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001435if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "x"
Lionel Ulmer5eee0bf2000-03-24 21:20:33 +00001436then
1437 echo
1438 echo "*** Warning: the OpenGL version you have installed relies on libpthread for"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001439 echo "*** thread-safety. To prevent crashes, OpenGL support has been removed."
Andreas Mohr18a9d742001-01-17 21:52:42 +00001440 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 +00001441 echo "*** start configure with '--enable-opengl' to force OpenGL support."
Lionel Ulmer5c085701999-02-28 19:48:53 +00001442fi
1443
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001444if test "$wine_cv_opengl_version_threadsafe" = "yes" -a "x$enable_opengl" = "xyes"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001445then
1446 echo
Alexandre Julliardd6c0f9f2001-01-04 22:44:55 +00001447 echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001448 echo "*** experience unusual crashes on DirectDraw games, try first to disable OpenGL"
1449 echo "*** support before reporting bugs."
1450fi
1451
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001452if test "$wine_cv_warn_cups_h" = "yes"
1453then
1454 echo
1455 echo "*** Note: You have cups runtime libraries, but no development"
1456 echo "*** libraries. Install the cups-devel package or whichever package"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001457 echo "*** contains cups.h to enable CUPS support in Wine."
Marcus Meissner3ee02ba2001-04-30 18:18:50 +00001458fi
Lionel Ulmerfbc15b12000-04-29 14:23:22 +00001459
Ian Pilcher563598d2001-05-16 20:56:05 +00001460if test "$wine_cv_msg_freetype" = "yes"
1461then
1462 echo
1463 echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
Alexandre Julliardf5818d22002-02-14 19:47:29 +00001464 echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
1465 echo "*** freetype-devel package (or its equivalent on your distribution) to"
1466 echo "*** enable Wine to use TrueType fonts."
Ian Pilcher563598d2001-05-16 20:56:05 +00001467fi
1468
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001469echo
Steffen Moeller1511bae1999-02-17 15:27:03 +00001470echo "Configure finished. Do 'make depend && make' to compile Wine."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001471echo
1472
1473dnl Local Variables:
1474dnl comment-start: "dnl "
1475dnl comment-end: ""
1476dnl comment-start-skip: "\\bdnl\\b\\s *"
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +00001477dnl compile-command: "autoconf"
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001478dnl End: