configure.ac 51.7 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1
dnl Process this file with autoconf to produce a configure script.
2 3 4 5 6
dnl Original author: Michael Patra
dnl See ChangeLog file for detailed change history.

m4_define(WINE_VERSION,regexp(m4_include(VERSION),[version \([-.0-9A-Za-z]+\)],[\1]))

7
AC_PREREQ(2.53b)
8
AC_INIT([Wine],WINE_VERSION,[wine-devel@winehq.org])
9
AC_CONFIG_SRCDIR(server/atom.c)
10
AC_CONFIG_HEADERS(include/config.h)
Alexandre Julliard's avatar
Alexandre Julliard committed
11
AC_CONFIG_AUX_DIR(tools)
Alexandre Julliard's avatar
Alexandre Julliard committed
12

Alexandre Julliard's avatar
Alexandre Julliard committed
13 14
dnl **** Command-line arguments ****

15
AC_ARG_ENABLE(win16, AC_HELP_STRING([--disable-win16],[do not include Win16 support]))
16 17
AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile out all debugging messages]))
AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE messages]))
18
AC_ARG_ENABLE(win64, AC_HELP_STRING([--enable-win64], [build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
19 20

AC_ARG_WITH(opengl,    AC_HELP_STRING([--without-opengl],[do not use OpenGL]))
21 22
AC_ARG_WITH(curses,    AC_HELP_STRING([--without-curses],[do not use curses]))
AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=<dir>],[use Wine tools from directory <dir>]))
Alexandre Julliard's avatar
Alexandre Julliard committed
23

24
AC_SUBST(DLLDEFS,"")
25
if test "x$enable_debug" = "xno"
Alexandre Julliard's avatar
Alexandre Julliard committed
26
then
27
  DLLDEFS="$DLLDEFS -DWINE_NO_DEBUG_MSGS"
28
fi
29
if test "x$enable_trace" = "xno" -o "x$enable_debug" = "xno"
30
then
31
  DLLDEFS="$DLLDEFS -DWINE_NO_TRACE_MSGS"
Alexandre Julliard's avatar
Alexandre Julliard committed
32 33
fi

34
AC_CANONICAL_HOST
35 36 37 38 39 40 41
case $host in
  x86_64*linux*)
    if test "x$enable_win64" != "xyes"
    then
      test -n "$CC" || CC="gcc -m32"
      test -n "$LD" || LD="ld -m elf_i386"
      test -n "$AS" || AS="as --32"
42
      host_cpu="i386"
43 44 45 46
    fi
    ;;
esac

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
dnl enable_win16 defaults to yes on x86, to no on other CPUs
case $host_cpu in
  *i[[3456789]]86*)
    if test "x$enable_win16" != "xno" 
    then
      enable_win16="yes"
    fi
    ;;
esac
   
AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)")
AC_SUBST(WIN16_INSTALL,"\$(WIN16_INSTALL)")
if test "x$enable_win16" != "xyes"
then
  WIN16_FILES=""
  WIN16_INSTALL=""
fi

dnl **** Check for some programs ****

Alexandre Julliard's avatar
Alexandre Julliard committed
67 68
AC_PROG_MAKE_SET
AC_PROG_CC
69
AC_PROG_CXX
70 71
dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
AC_CHECK_TOOL(CPPBIN,cpp,cpp)
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89

AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
  [if test -z "$with_wine_tools"; then
     if test "$cross_compiling" = "yes"; then
       AC_MSG_ERROR([you must use the --with-wine-tools option when cross-compiling.])
     else
       wine_cv_toolsdir="\$(TOPOBJDIR)"
     fi
   elif test -d "$with_wine_tools/tools/winebuild"; then
     case $with_wine_tools in
       /*) wine_cv_toolsdir="$with_wine_tools" ;;
       *)  wine_cv_toolsdir="\$(TOPOBJDIR)/$with_wine_tools" ;;
     esac
   else
     AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
   fi])
AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)

Alexandre Julliard's avatar
Alexandre Julliard committed
90
AC_PATH_XTRA
Alexandre Julliard's avatar
Alexandre Julliard committed
91
AC_PROG_LEX
92

93
dnl **** Just additional warning checks, since AC_PROG just sets 'lex' even
94
dnl **** without one present.
95 96 97
AC_CHECK_PROGS(XLEX,$LEX flex lex,none)
if test "$XLEX" = "none"
then
98
  AC_MSG_ERROR([no suitable lex found. Please install the 'flex' package.])
99
fi
100

101 102 103 104 105 106 107
dnl Check for bison
AC_CHECK_PROGS(BISON,bison,none)
if test "$BISON" = "none"
then
  AC_MSG_ERROR([no suitable bison found. Please install the 'bison' package.])
fi

108
AC_CHECK_TOOLS(AS,[gas as],as)
109
AC_CHECK_TOOL(LD,ld,ld)
110
AC_CHECK_TOOL(AR,ar,ar)
Alexandre Julliard's avatar
Alexandre Julliard committed
111
AC_PROG_RANLIB
112 113
AC_CHECK_TOOL(STRIP,strip,strip)
AC_CHECK_TOOL(WINDRES,windres,false)
Alexandre Julliard's avatar
Alexandre Julliard committed
114
AC_PROG_LN_S
Alexandre Julliard's avatar
Alexandre Julliard committed
115
WINE_PROG_LN
116
AC_PROG_EGREP
117
AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
118 119 120
AC_PROG_INSTALL
dnl Prepend src dir to install path dir if it's a relative path
case "$INSTALL" in
121
  [[\\/$]]* | ?:[[\\/]]* ) ;;
122 123
  *)  INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;;
esac
Alexandre Julliard's avatar
Alexandre Julliard committed
124

125 126 127 128 129 130 131 132 133 134
dnl Check for lint
AC_CHECK_PROGS(LINT, lclint lint)
if test "$LINT" = "lint"
then
  LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
  dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
fi
AC_SUBST(LINT)
AC_SUBST(LINTFLAGS)

135 136
dnl Check for various programs
AC_CHECK_PROGS(FONTFORGE, fontforge, false)
137
AC_CHECK_PROGS(PKG_CONFIG, pkg-config, false)
138

139 140 141 142 143 144
case $host_cpu in
  *i[[3456789]]86*)
    AC_CHECK_PROGS(PRELINK, prelink, false, [/sbin /usr/sbin $PATH])
    ;;
esac

Alexandre Julliard's avatar
Alexandre Julliard committed
145 146
dnl **** Check for some libraries ****

Alexandre Julliard's avatar
Alexandre Julliard committed
147
dnl Check for -li386 for NetBSD and OpenBSD
Alexandre Julliard's avatar
Alexandre Julliard committed
148
AC_CHECK_LIB(i386,i386_set_ldt)
149 150
dnl Check for -lossaudio for NetBSD
AC_CHECK_LIB(ossaudio,_oss_ioctl)
151
dnl Check for -lnsl for Solaris
152
AC_CHECK_FUNCS(gethostbyname,,AC_CHECK_LIB(nsl,gethostbyname))
153
dnl Check for -lsocket for Solaris
154
AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
155
dnl Check for -lresolv for Solaris
156
AC_CHECK_FUNCS(inet_aton,,AC_CHECK_LIB(resolv,inet_aton))
Alexandre Julliard's avatar
Alexandre Julliard committed
157
dnl Check for -lxpg4 for FreeBSD
158
AC_CHECK_LIB(xpg4,_xpg4_setrunelocale)
159 160
dnl Check for -lpoll for Mac OS X/Darwin
AC_CHECK_LIB(poll,poll)
161 162
dnl Check for -lresolv for Mac OS X/Darwin
AC_CHECK_LIB(resolv,res_9_init)
163 164
dnl Check for -lpthread
AC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread"))
165

166 167 168 169 170
AC_SUBST(XLIB,"")
AC_SUBST(XFILES,"")
AC_SUBST(OPENGLFILES,"")
AC_SUBST(GLU32FILES,"")
AC_SUBST(OPENGL_LIBS,"")
171 172 173 174

dnl **** Check for header files ****

AC_CHECK_HEADERS(\
175
	IOKit/IOKitLib.h \
176
	alsa/asoundlib.h \
177 178
	arpa/inet.h \
	arpa/nameser.h \
179
	asm/types.h \
180
	capi20.h \
181
	cups/cups.h \
182
	curses.h \
183
	direct.h \
184
	dlfcn.h \
185 186 187 188 189 190 191 192 193
	elf.h \
	float.h \
	fontconfig/fontconfig.h \
	getopt.h \
	gif_lib.h \
	ieeefp.h \
	io.h \
	jack/jack.h \
	jpeglib.h \
194
	lber.h \
195
	lcms.h \
196
	lcms/lcms.h \
197
	ldap.h \
198
	libaudioio.h \
199 200 201 202 203 204 205 206 207 208 209
	link.h \
	linux/cdrom.h \
	linux/compiler.h \
	linux/hdreg.h \
	linux/input.h \
	linux/ioctl.h \
	linux/joystick.h \
	linux/major.h \
	linux/param.h \
	linux/serial.h \
	linux/ucdrom.h \
210
	mach/machine.h \
211
	machine/cpu.h \
212
	machine/limits.h \
213
	machine/soundcard.h \
214
	mntent.h \
215
	ncurses.h \
216 217 218 219 220
	netdb.h \
	netinet/in.h \
	netinet/in_systm.h \
	netinet/tcp.h \
	netinet/tcp_fsm.h \
221
	openssl/err.h \
222
	openssl/ssl.h \
223
	poll.h \
224 225 226 227 228 229 230
	process.h \
	pthread.h \
	pwd.h \
	regex.h \
	sched.h \
	scsi/scsi.h \
	scsi/scsi_ioctl.h \
231 232
	scsi/sg.h \
	soundcard.h \
233 234
	stdint.h \
	strings.h \
235
	sys/asoundlib.h \
236 237 238
	sys/cdio.h \
	sys/elf32.h \
	sys/epoll.h \
239
	sys/errno.h \
240 241 242 243
	sys/exec_elf.h \
	sys/filio.h \
	sys/ioctl.h \
	sys/ipc.h \
244
	sys/limits.h \
245 246 247 248 249
	sys/link.h \
	sys/lwp.h \
	sys/mman.h \
	sys/modem.h \
	sys/msg.h \
250
	sys/mtio.h \
251 252 253 254
	sys/param.h \
	sys/poll.h \
	sys/ptrace.h \
	sys/reg.h \
255
	sys/resource.h \
256 257 258 259 260
	sys/scsiio.h \
	sys/shm.h \
	sys/signal.h \
	sys/socket.h \
	sys/sockio.h \
261
	sys/soundcard.h \
262 263 264 265 266 267 268 269 270 271 272 273
	sys/statvfs.h \
	sys/strtio.h \
	sys/syscall.h \
	sys/sysctl.h \
	sys/time.h \
	sys/times.h \
	sys/uio.h \
	sys/un.h \
	sys/vm86.h \
	sys/wait.h \
	syscall.h \
	termios.h \
274
	unicode/ubidi.h \
275 276 277 278 279 280
	unistd.h \
	utime.h \
	valgrind/memcheck.h
)
AC_HEADER_STAT()

281 282 283
dnl Check for broken kernel header that doesn't define __user
AC_CHECK_HEADERS([linux/capi.h],,,[#define __user])

284 285
dnl **** Check for X11 ****

286 287
if test "$have_x" = "yes"
then
288
    XLIB="-lXext -lX11"
289 290
    ac_save_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS $X_CFLAGS"
291

292
    dnl *** All of the following tests require X11/Xlib.h
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
    AC_CHECK_HEADERS([X11/Xlib.h \
                      X11/XKBlib.h \
                      X11/Xutil.h \
                      X11/extensions/shape.h \
                      X11/extensions/XInput.h \
                      X11/extensions/XShm.h \
                      X11/extensions/Xrandr.h \
                      X11/extensions/Xrender.h \
                      X11/extensions/xf86dga.h \
                      X11/extensions/xf86vmode.h],,,
[#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
#endif
#ifdef HAVE_X11_XUTIL_H
# include <X11/Xutil.h>
#endif])
309

310
        dnl *** Check for X keyboard extension
311 312
        if test "$ac_cv_header_X11_XKBlib_h" = "yes"
        then
313
              AC_CHECK_LIB(X11, XkbQueryExtension,
314
              AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,
315
              $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
316
        fi
317

318
        dnl *** Check for X Shm extension
319 320
        if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
        then
321
              AC_CHECK_LIB(Xext, XShmQueryExtension,
322
              AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
323
              $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
324
        fi
325

326
        dnl *** Check for X shape extension
327 328
        if test "$ac_cv_header_X11_extensions_shape_h" = "yes"
        then
329
              AC_CHECK_LIB(Xext,XShapeQueryExtension,
330
	      AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,
331
	      $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
332
        fi
333

334
        dnl *** Check for XFree86 DGA / DGA 2.0 extension
335 336
        if test "$ac_cv_header_X11_extensions_xf86dga_h" = "yes"
        then
337
              AC_CHECK_LIB(Xxf86dga, XDGAQueryExtension,
338
                [ AC_DEFINE(HAVE_LIBXXF86DGA2, 1,
339
                            [Define if you have the Xxf86dga library version 2])
340
                  X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga"
341
                ],,
342 343
                $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
        fi
344 345

        dnl *** Check for XFree86 VMODE extension
346 347
        if test "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes"
        then
348
                AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
349
                  [ AC_DEFINE(HAVE_LIBXXF86VM, 1, [Define if you have the Xxf86vm library])
350 351
                     X_PRE_LIBS="$X_PRE_LIBS -lXxf86vm"
                  ],,
352 353
                  $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
        fi
354

355
        dnl *** Check for X RandR extension
356 357
        if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
        then
358 359 360
                AC_TRY_COMPILE([#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>],[static typeof(XRRSetScreenConfigAndRate) * func;],
                  [AC_DEFINE(HAVE_LIBXRANDR, 1, [Define if you have the Xrandr library])])
361
        fi
362

363 364 365 366 367 368 369 370
        dnl *** Check for Transform functions in Xrender
        if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
        then
              AC_CHECK_LIB(Xrender, XRenderSetPictureTransform,
                [AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
                 [Define if Xrender has the XRenderSetPictureTransform function])],,
                $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
        fi
371
    dnl *** End of X11/Xlib.h check
372

Lionel Ulmer's avatar
Lionel Ulmer committed
373
    dnl Check for the presence of OpenGL
374
    if test "x$with_opengl" != "xno"
375
    then
376
	AC_CHECK_HEADERS(GL/gl.h GL/glx.h GL/glext.h GL/glu.h,,,
377 378 379
[#ifdef HAVE_GL_GLX_H
# include <GL/glx.h>
#endif])
380
	if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
381 382
	then
	    dnl Check for some problems due to old Mesa versions
383
	    AC_CACHE_CHECK([for up-to-date OpenGL version], wine_cv_opengl_version_OK,
384
	      AC_TRY_COMPILE(
385
		[#include <GL/gl.h>],
386
		[GLenum test = GL_UNSIGNED_SHORT_5_6_5;],
Lionel Ulmer's avatar
Lionel Ulmer committed
387 388
		[wine_cv_opengl_version_OK="yes"],
		[wine_cv_opengl_version_OK="no"]
389
	      )
390 391
            )

392
	    if test "$wine_cv_opengl_version_OK" = "yes"
393
            then
394
		dnl Check for the presence of the library
395
		AC_CHECK_LIB(GL,glXCreateContext,
396
			     OPENGL_LIBS="-lGL"
397 398 399
			     ,,
			     $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)

400
		if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
401
		then
402
			OPENGLFILES='$(OPENGLFILES)'
403
			AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
404 405 406 407 408 409
		else
                    if test -f /usr/X11R6/lib/libGL.a
                    then 
                       AC_MSG_ERROR([/usr/X11R6/lib/libGL.a is present on your system.
This prevents linking to OpenGL. Delete the file and restart configure.])
                    fi
410
		fi
411

412
	        dnl Check for GLU32 library.
413
		AC_CHECK_LIB(GLU,gluLookAt,
414
			     [OPENGL_LIBS="$OPENGL_LIBS -lGLU"
415
			     GLU32FILES='$(GLU32FILES)']
416
			     ,,
417
			     $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS
418
		)
419
	     fi
Jacek Caban's avatar
Jacek Caban committed
420 421 422

             dnl Check for glut32 library.
             AC_CHECK_LIB(glut,glutMainLoop,
423
                       [AC_SUBST(GLUT_LIBS,"-lglut -lXmu -lXi")
Jacek Caban's avatar
Jacek Caban committed
424
                        AC_SUBST(GLUT32FILES,'$(GLUT32FILES)')],,
425
                        $OPENGL_LIBS $X_LIBS $X_PRE_LIBS -lXmu -lXi -lX11 $X_EXTRA_LIBS)
426
	 fi
427
    fi
428

429 430 431 432 433 434 435 436 437
    dnl **** Check for NAS ****
    AC_SUBST(NASLIBS,"")
    AC_CHECK_HEADERS(audio/audiolib.h,
         [AC_CHECK_HEADERS(audio/soundlib.h,,,[#include <audio/audiolib.h>])
          AC_CHECK_LIB(audio,AuCreateFlow,
                       [AC_DEFINE(HAVE_NAS,1,[Define if you have NAS including devel headers])
                        NASLIBS="-laudio -lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS"],,
                       [-lXt $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])

438
    CPPFLAGS="$ac_save_CPPFLAGS"
439
    XFILES='$(XFILES)'
440 441 442 443 444
else
    XLIB=""
    X_CFLAGS=""
    X_LIBS=""
fi
Alexandre Julliard's avatar
Alexandre Julliard committed
445

446 447 448 449
dnl **** Check for libxml2 ****

AC_SUBST(XML2LIBS,"")
AC_SUBST(XML2INCL,"")
450 451
AC_SUBST(XSLTLIBS,"")
AC_SUBST(XSLTINCL,"")
452 453 454 455 456 457 458 459 460 461
if test "$PKG_CONFIG" != "false"
then
    ac_save_CPPFLAGS="$CPPFLAGS"
    ac_xml_libs="`$PKG_CONFIG --libs libxml-2.0`"
    ac_xml_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
    CPPFLAGS="$CPPFLAGS $ac_xml_cflags"
    AC_CHECK_HEADERS(libxml/parser.h,
        [AC_CHECK_LIB(xml2, xmlParseMemory,
            [AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])
             XML2LIBS="$ac_xml_libs"
462 463
             XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)
         AC_CHECK_LIB(xml2, xmlReadMemory,
464 465 466 467 468 469
            [AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory function])],,$ac_xml_libs)
        ])
    CPPFLAGS="$ac_save_CPPFLAGS"
    ac_xslt_libs="`$PKG_CONFIG --libs libxslt`"
    ac_xslt_cflags="`$PKG_CONFIG --cflags libxslt`"
    CPPFLAGS="$CPPFLAGS $ac_xslt_cflags"
470
    AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],
471 472 473 474
        [AC_CHECK_LIB(xslt, xsltCompilePattern,
            [AC_DEFINE(HAVE_LIBXSLT, 1, [Define if you have the libxslt library])
             XSLTLIBS="$ac_xslt_libs"
             XSLTINCL="$ac_xslt_cflags"],,$ac_xslt_libs)
475 476 477 478
        ],,
[#ifdef HAVE_LIBXSLT_PATTERN_H
# include <libxslt/pattern.h>
#endif])
479 480
    CPPFLAGS="$ac_save_CPPFLAGS"
fi
481

482
dnl **** Check which curses lib to use ***
483
CURSESLIBS=""
484
if test "x$with_curses" != "xno"
485
then
486 487 488
    if test "$ac_cv_header_ncurses_h" = "yes"
    then
        AC_CHECK_LIB(ncurses,waddch,
489
            [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
490 491 492 493 494 495 496
             CURSESLIBS="-lncurses"])
    elif test "$ac_cv_header_curses_h" = "yes"
    then
        AC_CHECK_LIB(curses,waddch,
            [AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have the curses library (-lcurses)])
             CURSESLIBS="-lcurses"])
    fi
497
fi
498
AC_SUBST(CURSESLIBS)
499

500 501
dnl **** Check for SANE ****
AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
502 503 504
AC_SUBST(SANELIBS,"")
AC_SUBST(SANEINCL,"")
if test "$sane_devel" != "no"
505 506 507 508 509 510 511
then
    SANELIBS="`$sane_devel --libs`"
    SANEINCL="`$sane_devel --cflags`"
    ac_save_CPPFLAGS="$CPPFLAGS"
    ac_save_LIBS="$LIBS"
    CPPFLAGS="$CPPFLAGS $SANEINCL"
    LIBS="$LIBS $SANELIBS"
512 513 514 515 516 517 518
    AC_CHECK_HEADER(sane/sane.h,
                    [AC_CHECK_LIB(sane,sane_open,
                                  [AC_DEFINE(HAVE_SANE, 1, [Define if we have SANE development environment])],
                                  [SANELIBS=""
                                  SANEINCL=""])],
                    [SANELIBS=""
                    SANEINCL=""])
519 520 521 522
    LIBS="$ac_save_LIBS"
    CPPFLAGS="$ac_save_CPPFLAGS"
fi

523 524 525
dnl **** Check for the ICU library ****
if test "$ac_cv_header_unicode_ubidi_h" = "yes"
then
526 527
    saved_libs="$LIBS"
    ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}"
528 529 530
    ICUUC_LIB="${ICUUC_LIB-$ICU_LIB_DIR/libsicuuc.a}"
    ICUDATA_LIB="${ICUDATA_LIB-$ICU_LIB_DIR/libsicudata.a}"
    AC_MSG_CHECKING(whether can link with ICU libraries $ICUUC_LIB and $ICUDATA_LIB)
531 532 533
    LIBS="$LIBS $ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s"
    AC_TRY_LINK([#include <unicode/ubidi.h>],[ubidi_open()],
                [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed])
534 535 536
                 AC_SUBST(ICULIBS,"$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s")
                 AC_MSG_RESULT(yes)],
                [AC_MSG_RESULT(no)])
537
    LIBS="$saved_libs"
538 539
fi

540 541 542 543 544 545 546 547 548
dnl **** Check for LittleCMS ***
AC_SUBST(LCMSLIBS,"")
if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes"
then
    AC_CHECK_LIB(lcms, cmsOpenProfileFromFile,
        [AC_DEFINE(HAVE_LCMS, 1, [Define if you have the LittleCMS development environment])
         LCMSLIBS="-llcms"])
fi

549 550 551 552
dnl **** Check for OpenLDAP ***
AC_SUBST(LDAPLIBS,"")
if test "$ac_cv_header_ldap_h" = "yes" -a "$ac_cv_header_lber_h" = "yes"
then
553
    AC_CHECK_LIB(ldap_r, ldap_initialize,
554 555
        [AC_CHECK_LIB(lber, ber_init,
            [AC_DEFINE(HAVE_LDAP, 1, [Define if you have the OpenLDAP development environment])
556 557 558
             LDAPLIBS="-lldap_r -llber"],,
             [$LIBPTHREAD])],,
             [$LIBPTHREAD])
559
    WINE_CHECK_LIB_FUNCS(\
560 561 562
	ldap_count_references \
	ldap_first_reference \
	ldap_next_reference \
563 564
	ldap_parse_reference,
        [$LDAPLIBS $LIBPTHREAD])
565 566
fi

567
dnl **** Check for FreeType 2 ****
568 569
AC_SUBST(FREETYPELIBS,"")
AC_SUBST(FREETYPEINCL,"")
570
AC_CHECK_LIB(freetype,FT_Init_FreeType,ft_lib=yes,ft_lib=no,$X_LIBS)
571 572 573 574
if test "$ft_lib" = "no"
then
    wine_cv_msg_freetype=no
else
575 576 577 578 579 580 581 582 583
    AC_CHECK_PROG(ft_devel,freetype-config,freetype-config,no)
    if test "$ft_devel" = "no"
    then
        AC_CHECK_PROG(ft_devel2,freetype2-config,freetype2-config,no)
        if test "$ft_devel2" = "freetype2-config"
	then
		ft_devel=$ft_devel2
	fi
    fi
584 585 586 587
    if test "$ft_devel" = "no"
    then
	wine_cv_msg_freetype=yes
    else
588
	FREETYPELIBS=`$ft_devel --libs`
589
	FREETYPEINCL=`$ft_devel --cflags`
590 591
	ac_save_CPPFLAGS="$CPPFLAGS"
	CPPFLAGS="$FREETYPEINCL $CPPFLAGS"
592 593
	AC_CHECK_HEADERS(ft2build.h \
                         freetype/freetype.h \
594 595 596 597
                         freetype/ftglyph.h \
                         freetype/tttables.h \
                         freetype/ftnames.h \
                         freetype/ftsnames.h \
598
                         freetype/ttnameid.h \
Huw D M Davies's avatar
Huw D M Davies committed
599
                         freetype/ftoutln.h \
600
                         freetype/ftwinfnt.h \
601
                         freetype/ftmodapi.h \
602 603 604 605
                         freetype/internal/sfnt.h,,,
                         [#if HAVE_FT2BUILD_H
                          #include <ft2build.h>
                          #endif])
606 607
	AC_TRY_CPP([#include <ft2build.h>
                    #include <freetype/fttrigon.h>],
608 609 610 611
                    [AC_DEFINE(HAVE_FREETYPE_FTTRIGON_H, 1,
          [Define if you have the <freetype/fttrigon.h> header file.])
                    wine_cv_fttrigon=yes],
                    wine_cv_fttrigon=no)
612
        AC_CHECK_TYPES(FT_TrueTypeEngineType,,,[#include <freetype/ftmodapi.h>])
613
	CPPFLAGS="$ac_save_CPPFLAGS"
614
	dnl Check that we have at least freetype/freetype.h
615
	if test "$ac_cv_header_freetype_freetype_h" = "yes" -a "$wine_cv_fttrigon" = "yes"
616 617 618 619
	then
	    AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
	    wine_cv_msg_freetype=no
	else
620
	    FREETYPELIBS=""
621 622 623
	    FREETYPEINCL=""
	    wine_cv_msg_freetype=yes
	fi
624 625 626
    fi
fi

627 628 629 630 631 632
dnl Only build the fonts dir if we have both freetype and fontforge
if test "$FONTFORGE" != "false" -a -n "$FREETYPELIBS"
then
  AC_SUBST(FONTSSUBDIRS,"fonts")
fi

633
dnl **** Check for parport (currently Linux only) ****
634
AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
635 636 637 638 639 640 641 642
 AC_TRY_COMPILE(
   [#include <linux/ppdev.h>],
   [ioctl (1,PPCLAIM,0)],
   [ac_cv_c_ppdev="yes"],
   [ac_cv_c_ppdev="no"])
 )
if test "$ac_cv_c_ppdev" = "yes"
then
643
    AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
644 645
fi

646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673
dnl **** Check for va_copy ****
AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
 AC_TRY_LINK(
   [#include <stdarg.h>],
   [va_list ap1, ap2;
    va_copy(ap1,ap2);
   ],
   [ac_cv_c_va_copy="yes"],
   [ac_cv_c_va_copy="no"])
 )
if test "$ac_cv_c_va_copy" = "yes"
then
    AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy])
fi
AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
 AC_TRY_LINK(
   [#include <stdarg.h>],
   [va_list ap1, ap2;
    __va_copy(ap1,ap2);
   ],
   [ac_cv_c___va_copy="yes"],
   [ac_cv_c___va_copy="no"])
 )
if test "$ac_cv_c___va_copy" = "yes"
then
    AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
fi

674 675 676 677 678 679 680 681 682 683 684 685 686 687 688
dnl **** Check for sigsetjmp ****
AC_CACHE_CHECK([for sigsetjmp], ac_cv_c_sigsetjmp,
 AC_TRY_LINK(
   [#include <setjmp.h>],
   [sigjmp_buf buf;
    sigsetjmp( buf, 1 );
    siglongjmp( buf, 1 );],
   [ac_cv_c_sigsetjmp="yes"],
   [ac_cv_c_sigsetjmp="no"])
 )
if test "$ac_cv_c_sigsetjmp" = "yes"
then
    AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have the sigsetjmp (and siglongjmp) function])
fi

689 690 691 692
dnl **** Check for pthread_rwlock_t ****
AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
#include <pthread.h>])

693
dnl **** Check for pthread functions ****
694
WINE_CHECK_LIB_FUNCS(\
695 696
        pthread_getattr_np \
        pthread_get_stackaddr_np \
697 698
        pthread_get_stacksize_np,
        [$LIBPTHREAD])
699

Chris Morgan's avatar
Chris Morgan committed
700 701
dnl **** Check for aRts Sound Server ****
AC_PATH_PROG(ARTSCCONFIG, artsc-config)
702
if test x$ARTSCCONFIG != x -a x$ARTSCCONFIG != x'"$ARTSCCONFIG"';
Chris Morgan's avatar
Chris Morgan committed
703
then
704 705 706 707 708 709 710
    ARTSC_CFLAGS=""
    for i in `$ARTSCCONFIG --cflags`
    do
      case "$i" in
        -I*) ARTSC_CFLAGS="$ARTSC_CFLAGS $i";;
      esac
    done
711 712 713
    ARTSC_LIBS=`$ARTSCCONFIG --libs`
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $ARTSC_CFLAGS"
714 715 716 717
    AC_CHECK_LIB(artsc,arts_init,
        [AC_TRY_COMPILE([#include <artsc.h>],[arts_stream_t stream;],
            [AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
            AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
Vitaliy Margolen's avatar
Vitaliy Margolen committed
718 719
            AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])])],,
            $ARTSC_LIBS)
720
    CFLAGS="$save_CFLAGS"
Chris Morgan's avatar
Chris Morgan committed
721 722
fi

723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743
dnl **** Check for EsounD ****
AC_PATH_PROG(ESDCONFIG, esd-config)
if test x$ESDCONFIG != x -a x$ESDCONFIG != x'"$ESDCONFIG"';
then
    ESD_CFLAGS=""
    for i in `$ESDCONFIG --cflags`
    do
      case "$i" in
        -I*) ESD_CFLAGS="$ESD_CFLAGS $i";;
      esac
    done
    ESD_LIBS=`$ESDCONFIG --libs`
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $ESD_CFLAGS"
    AC_CHECK_LIB(esd,esd_open_sound,
        [AC_SUBST(ESDLIBS, $ESD_LIBS)
         AC_SUBST(ESDINCL, $ESD_CFLAGS)
         AC_DEFINE(HAVE_ESD, 1, [Define if you have EsounD sound server])])
    CFLAGS="$save_CFLAGS"
fi

744
dnl **** Check for ALSA 1.x ****
745
AC_SUBST(ALSALIBS,"")
746
if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
747
then
748 749 750 751 752 753 754 755 756
    AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access,
        [AC_TRY_COMPILE([#ifdef HAVE_ALSA_ASOUNDLIB_H
#include <alsa/asoundlib.h>
#elif defined(HAVE_SYS_ASOUNDLIB_H)
#include <sys/asoundlib.h>
#endif],
                        [int ret = snd_pcm_hw_params_get_access(NULL, NULL)],
                        [AC_DEFINE(HAVE_ALSA,1,[Define if you have ALSA 1.x including devel headers])
                         ALSALIBS="-lasound"])])
757 758
fi

759 760 761
dnl **** Check for libaudioio (which can be used to get solaris audio support) ****

AC_SUBST(AUDIOIOLIBS,"")
762 763 764
if test "$ac_cv_header_libaudioio_h" = "yes"
then
    AC_CHECK_LIB(audioio,AudioIOGetVersion,
765
                  [AUDIOIOLIBS="-laudioio"
766 767
                   AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])
fi
768

769 770
dnl **** Check for capi4linux ****

771 772 773 774
if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
then
    AC_CHECK_LIB(capi20,capi20_register,[AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])])
fi
775

776
dnl **** Check for gcc specific options ****
Alexandre Julliard's avatar
Alexandre Julliard committed
777

778
AC_SUBST(EXTRACFLAGS,"")
Alexandre Julliard's avatar
Alexandre Julliard committed
779 780
if test "x${GCC}" = "xyes"
then
781
  EXTRACFLAGS="-Wall -pipe"
782 783

  dnl Check for strength-reduce bug
784
  AC_CACHE_CHECK( [for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
Alexandre Julliard's avatar
Alexandre Julliard committed
785
                  AC_TRY_RUN([
786
int	L[[4]] = {0,1,2,3};
Alexandre Julliard's avatar
Alexandre Julliard committed
787
int main(void) {
Alexandre Julliard's avatar
Alexandre Julliard committed
788
  static int Array[[3]];
Alexandre Julliard's avatar
Alexandre Julliard committed
789 790
  unsigned int B = 3;
  int i;
Alexandre Julliard's avatar
Alexandre Julliard committed
791
  for(i=0; i<B; i++) Array[[i]] = i - 3;
792 793
  for(i=0; i<4 - 1; i++) L[[i]] = L[[i + 1]];
  L[[i]] = 4;
794

795
  exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard's avatar
Alexandre Julliard committed
796 797 798 799 800 801
}],
    ac_cv_c_gcc_strength_bug="no",
    ac_cv_c_gcc_strength_bug="yes",
    ac_cv_c_gcc_strength_bug="yes") )
  if test "$ac_cv_c_gcc_strength_bug" = "yes"
  then
802
    EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
Alexandre Julliard's avatar
Alexandre Julliard committed
803
  fi
804

805 806 807 808 809 810 811 812 813
  dnl Check for -fshort-wchar
  AC_CACHE_CHECK([for gcc -fshort-wchar support], ac_cv_c_gcc_fshort_wchar,
      [WINE_TRY_CFLAGS([-fshort-wchar],
                      ac_cv_c_gcc_fshort_wchar="yes",ac_cv_c_gcc_fshort_wchar="no")])
  if test "$ac_cv_c_gcc_fshort_wchar" = "yes"
  then
      AC_DEFINE(CC_FLAG_SHORT_WCHAR, "-fshort-wchar", [Specifies the compiler flag that forces a short wchar_t])
  fi

814 815 816 817 818 819 820 821 822
  dnl Check for -fno-strict-aliasing
  AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing,
      [WINE_TRY_CFLAGS([-fno-strict-aliasing],
                      ac_cv_c_gcc_no_strict_aliasing="yes",ac_cv_c_gcc_no_strict_aliasing="no")])
  if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes"
  then
    EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
  fi

823 824 825 826 827
  dnl Check for -gstabs+ option
  AC_CACHE_CHECK([for gcc -gstabs+ support], ac_cv_c_gcc_gstabs,
      [WINE_TRY_CFLAGS([-gstabs+],ac_cv_c_gcc_gstabs="yes", ac_cv_c_gcc_gstabs="no")])
  if test "$ac_cv_c_gcc_gstabs" = "yes"
  then
828
    EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
829
  fi
830

831 832 833 834 835 836 837 838
  dnl Check for -Wdeclaration-after-statement option
  AC_CACHE_CHECK([for gcc -Wdeclaration-after-statement support], ac_cv_c_gcc_decl_after_statement,
      [WINE_TRY_CFLAGS([-Wdeclaration-after-statement],ac_cv_c_gcc_decl_after_statement="yes", ac_cv_c_gcc_decl_after_statement="no")])
  if test "$ac_cv_c_gcc_decl_after_statement" = "yes"
  then
    EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
  fi

839
  dnl Check for noisy string.h
840
  saved_CFLAGS="$CFLAGS"
841 842 843 844
  CFLAGS="$CFLAGS -Wpointer-arith -Werror"
  AC_CACHE_CHECK([for broken string.h that generates warnings], ac_cv_c_string_h_warnings,
      AC_TRY_COMPILE([#include <string.h>],[],
                     [ac_cv_c_string_h_warnings=no],[ac_cv_c_string_h_warnings=yes]))
845
  CFLAGS="$saved_CFLAGS"
846 847
  if test "$ac_cv_c_string_h_warnings" = "no"
  then
848
    EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
849
  fi
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868

  AC_SUBST(BUILTINFLAG,"")
  saved_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Werror"
  AC_CACHE_CHECK([for builtin wchar inlines], ac_cv_c_builtin_wchar_ctype,
      AC_TRY_COMPILE([],
                     [int iswlower(unsigned short);],
                     [ac_cv_c_builtin_wchar_ctype=no],[ac_cv_c_builtin_wchar_ctype=yes]))
  CFLAGS="$saved_CFLAGS"
  if test "$ac_cv_c_builtin_wchar_ctype" = "yes"
  then
    BUILTINFLAG=""
    for builtin in \
      iswalnum iswalpha iswcntrl iswdigit iswgraph iswlower \
      iswprint iswpunct iswspace iswupper iswxdigit towlower towupper
    do
      BUILTINFLAG="$BUILTINFLAG -fno-builtin-$builtin"
    done
  fi
Alexandre Julliard's avatar
Alexandre Julliard committed
869 870
fi

871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893
dnl **** Check how to define a function in assembly code ****

AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
  WINE_TRY_ASM_LINK(
      ["\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0"],,,
      ac_cv_asm_func_def=".def",
    [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0"],,,
      ac_cv_asm_func_def=".type @function",
    [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0"],,,
      ac_cv_asm_func_def=".type 2",
      ac_cv_asm_func_def="unknown")])]))

AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function directive])
case "$ac_cv_asm_func_def" in
  ".def")
     AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"]) ;;
  ".type @function")
     AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"]) ;;
  ".type 2")
     AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"]) ;;
  *)
     AC_DEFINE([__ASM_FUNC(name)], [""]) ;;
esac
894

Alexandre Julliard's avatar
Alexandre Julliard committed
895 896
dnl **** Check for underscore on external symbols ****

897
AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
898 899 900 901 902 903
    WINE_TRY_ASM_LINK([".globl _ac_test\n_ac_test:\t.long 0"],
                      [extern int ac_test;],
                      [if (ac_test) return 1],
                      ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))

AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
Alexandre Julliard's avatar
Alexandre Julliard committed
904 905
if test "$ac_cv_c_extern_prefix" = "yes"
then
906 907 908
  AC_DEFINE([__ASM_NAME(name)], ["_" name])
else
  AC_DEFINE([__ASM_NAME(name)], [name])
Alexandre Julliard's avatar
Alexandre Julliard committed
909 910
fi

Alexandre Julliard's avatar
Alexandre Julliard committed
911 912
dnl **** Check for working dll ****

913
AC_SUBST(DLLEXT,"")
914
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
915 916
AC_SUBST(DLLIBS,"")
AC_SUBST(LDSHARED,"")
917
AC_SUBST(LDDLLFLAGS,"")
918 919
AC_SUBST(LIBEXT,"so")
AC_SUBST(IMPLIBEXT,"def")
920

921 922
case $host_os in
  cygwin*|mingw32*)
923
    AC_CHECK_TOOL(DLLTOOL,dlltool,false)
924 925 926 927
    AC_CHECK_TOOL(DLLWRAP,dllwrap,false)
    if test "$DLLWRAP" = "false"; then
      LIBEXT="a"
    else
928 929 930
      dnl FIXME - check whether dllwrap works correctly...
      LIBEXT="dll"
    fi
931
    IMPLIBEXT="a"
932 933 934
    dnl We can't build 16-bit NE dlls
    WIN16_FILES=""
    WIN16_INSTALL=""
935 936
    ;;
  *)
937 938 939
    if test "$ac_cv_header_dlfcn_h" = "yes"
    then
        AC_CHECK_FUNCS(dlopen,,
940 941 942
            [AC_CHECK_LIB(dl,dlopen,
                         [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
                          DLLIBS="-ldl"],
943
                         [LIBEXT="a"])])
944
        WINE_CHECK_LIB_FUNCS(dladdr,[$DLLIBS])
945 946 947
    else
        LIBEXT="a"
    fi
948 949 950

    if test "$LIBEXT" = "so"
    then
951
      DLLFLAGS="$DLLFLAGS -fPIC"
952
      DLLEXT=".so"
953
      AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
954 955
          [WINE_TRY_SHLIB_FLAGS([-fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic],
                                ac_cv_c_dll_gnuelf="yes",ac_cv_c_dll_gnuelf="no")])
956 957 958
      if test "$ac_cv_c_dll_gnuelf" = "yes"
      then
        LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
959
        LDDLLFLAGS="-shared -Wl,-Bsymbolic"
960 961 962 963 964
        AC_CACHE_CHECK([whether the linker accepts -z defs], ac_cv_c_dll_zdefs,
          [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-z,defs],
                           ac_cv_c_dll_zdefs="yes",ac_cv_c_dll_zdefs="no")])
        if test "$ac_cv_c_dll_zdefs" = "yes"
        then
965
          LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
966
        fi
967

968 969 970 971 972
        AC_CACHE_CHECK([whether the linker accepts -init and -fini], ac_cv_c_dll_init_fini,
          [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini],
                           ac_cv_c_dll_init_fini="yes",ac_cv_c_dll_init_fini="no")])
        if test "$ac_cv_c_dll_init_fini" = "yes"
        then
973
          LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
974 975
        fi

976 977 978 979 980 981 982 983 984 985
        AC_CACHE_CHECK([whether the linker accepts version scripts], ac_cv_c_ld_version_scripts,
          [echo '{ global: *; };' >conftest.map
           WINE_TRY_CFLAGS([-fPIC -shared -Wl,--version-script=conftest.map],
                           ac_cv_c_ld_version_scripts="yes",ac_cv_c_ld_version_scripts="no")
           rm -f conftest.map])
        if test "$ac_cv_c_ld_version_scripts" = "yes"
        then
          LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"
        fi

986 987 988 989 990
        AC_CACHE_CHECK([whether the linker accepts --export-dynamic], ac_cv_c_export_dynamic,
          [WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
                           ac_cv_c_export_dynamic="yes",ac_cv_c_export_dynamic="no")])
        if test "$ac_cv_c_export_dynamic" = "yes"
        then
991
          AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])
992
        fi
993

994 995 996 997 998 999
        AC_CACHE_CHECK([whether the linker accepts --rpath], ac_cv_ld_rpath,
          [WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
                           ac_cv_ld_rpath="yes",ac_cv_ld_rpath="no")])
        if test "$ac_cv_ld_rpath" = "yes"
        then
          AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])
1000
          AC_SUBST(LDDLLRPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(dlldir) \$(libdir)\`"])
1001 1002
        fi

1003 1004
        case $host_cpu in
          *i[[3456789]]86*)
1005 1006
            AC_CACHE_CHECK([whether we can relocate the executable to 0x7bf00000], ac_cv_ld_reloc_exec,
              [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
1007
                               ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")])
1008 1009
            if test "$ac_cv_ld_reloc_exec" = "yes"
            then
1010
              LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
1011 1012 1013 1014
            fi
            ;;
        esac

1015
      else
1016
        AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
1017 1018
            [WINE_TRY_SHLIB_FLAGS([-fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic],
                                  ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
1019 1020 1021
        if test "$ac_cv_c_dll_unixware" = "yes"
        then
          LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
1022
          LDDLLFLAGS="-Wl,-G,-B,symbolic"
1023 1024 1025

        else
          AC_CACHE_CHECK(whether we can build a Mach-O (Mac OS X/Darwin) dll, ac_cv_c_dll_macho,
1026
            [WINE_TRY_SHLIB_FLAGS([-bundle], ac_cv_c_dll_macho="yes", ac_cv_c_dll_macho="no")])
1027 1028 1029
          if test "$ac_cv_c_dll_macho" = "yes"
          then
            LIBEXT="dylib"
1030
            LDDLLFLAGS="-bundle"
1031
            LDSHARED="\$(CC) -dynamiclib"
1032
            STRIP="$STRIP -u -r"
1033 1034 1035
            dnl declare needed frameworks
            AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
            AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation")
1036
            AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00000000,-segaddr,WINE_SHARED_HEAP,0x7ffe0000"])
1037 1038 1039 1040 1041 1042 1043
            case $host_cpu in
              *powerpc*)
                CFLAGS="$CFLAGS -ffixed-r13"
                LDDLLFLAGS="$LDDLLFLAGS -read_only_relocs warning"
                ;;
            esac

1044 1045 1046 1047 1048 1049
          else
            AC_CACHE_CHECK(whether we can build an HP-UX dll, ac_cv_c_dll_hpux,
              [WINE_TRY_SHLIB_FLAGS([-shared], ac_cv_c_dll_hpux="yes", ac_cv_c_dll_hpux="no")])
            if test "$ac_cv_c_dll_hpux" = "yes"
            then
              LIBEXT="sl"
1050 1051
              DLLEXT=".sl"
              LDDLLFLAGS="-shared -fPIC"
1052 1053
              LDSHARED="\$(CC) -shared"
            fi
1054
          fi
1055 1056
        fi
      fi
1057
    fi
1058 1059 1060 1061 1062

    dnl Check for cross compiler to build test programs
    AC_SUBST(CROSSTEST,"")
    if test "$cross_compiling" = "no"
    then
1063 1064 1065
      AC_CHECK_PROGS(CROSSCC,i586-mingw32msvc-gcc i386-mingw32msvc-gcc i386-mingw32-gcc mingw-gcc,false)
      AC_CHECK_PROGS(DLLTOOL,i586-mingw32msvc-dlltool i386-mingw32msvc-dlltool i386-mingw32-dlltool mingw-dlltool,false)
      AC_CHECK_PROGS(CROSSWINDRES,i586-mingw32msvc-windres i386-mingw32msvc-windres i386-mingw32-windres mingw-windres,false)
1066 1067
      if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
    fi
1068 1069
    ;;
esac
1070

1071
if test "$LIBEXT" = "a"; then
1072 1073 1074 1075 1076 1077
  AC_MSG_ERROR(
[could not find a way to build shared libraries.
It is currently not possible to build Wine without shared library
(.so) support to allow transparent switch between .so and .dll files.
If you are using Linux, you will need a newer binutils.]
)
1078 1079
fi

1080 1081
case $build_os in
  cygwin*|mingw32*)
1082
    AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$PATH\"") ;;
1083 1084
  darwin*|macosx*)
    AC_SUBST(LDPATH,"DYLD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$DYLD_LIBRARY_PATH\"") ;;
1085
  *)
1086
    AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$LD_LIBRARY_PATH\"") ;;
1087 1088
esac

1089
dnl Mingw needs explicit msvcrt for linking libwine and winsock for wininet
1090 1091
case $host_os in
  mingw32*)
1092 1093 1094
    AC_SUBST(CRTLIBS,"-lmsvcrt")
    AC_SUBST(SOCKETLIBS,"-lws2_32")
    ;;
1095 1096
esac

1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107
case $host_cpu in
  *i[[3456789]]86*)
    case $host_os in
      linux* | k*bsd*-gnu)
        AC_SUBST(MAIN_BINARY,"wine-glibc")
        AC_SUBST(EXTRA_BINARIES,"wine-kthread wine-pthread wine-preloader") ;;
      darwin*)
        AC_SUBST(MAIN_BINARY,"wine-pthread") ;;
      *)
        AC_SUBST(MAIN_BINARY,"wine-kthread") ;;
    esac
1108
    ;;
1109
  *) AC_SUBST(MAIN_BINARY,"wine-pthread") ;;
1110
esac
Alexandre Julliard's avatar
Alexandre Julliard committed
1111

1112 1113
dnl **** Get the soname for libraries that we load dynamically ****

1114
if test "$LIBEXT" = "so" -o "$LIBEXT" = "dylib"
1115
then
1116 1117
  WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
  WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
1118
  WINE_GET_SONAME(Xi,XOpenDevice,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1119
  WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1120
  WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1121
  WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
1122
  WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS])
1123
  WINE_GET_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
1124
  WINE_GET_SONAME(cups,cupsGetDefault)
1125
  WINE_GET_SONAME(jack,jack_client_new)
1126
  WINE_GET_SONAME(fontconfig,FcInit)
1127 1128
  WINE_GET_SONAME(ssl,SSL_library_init)
  WINE_GET_SONAME(crypto,BIO_new_socket)
1129 1130
  WINE_GET_SONAME(ncurses,waddch)
  WINE_GET_SONAME(curses,waddch)
1131 1132
  WINE_GET_SONAME(jpeg,jpeg_start_decompress)
  WINE_GET_SONAME(ungif,DGifOpen)
1133
  WINE_GET_SONAME(gif,DGifOpen)
1134
  WINE_GET_SONAME(capi20,capi20_isinstalled)
1135
fi
1136 1137


1138 1139 1140 1141
dnl **** Check for functions ****

AC_CHECK_FUNCS(\
	_lwp_create \
1142
	_lwp_self \
1143 1144
	_pclose \
	_popen \
1145
	_snprintf \
1146
	_spawnvp \
1147 1148
	_stricmp \
	_strnicmp \
1149
	_vsnprintf \
1150
	asctime_r \
1151
	chsize \
1152
	clone \
1153
	epoll_create \
1154
	ffs \
1155
	finite \
1156
	fork \
1157
	fpclass \
1158 1159
	fstatfs \
	fstatvfs \
1160
	ftruncate \
1161
	futimes \
1162
	futimesat \
1163
	getaddrinfo \
1164
	getnameinfo \
1165
	getnetbyname \
1166
	getopt_long \
1167
	getpagesize \
1168 1169
	getprotobyname \
	getprotobynumber \
1170
	getpwuid \
1171
	getservbyport \
1172
	gettid \
Alexandre Julliard's avatar
Alexandre Julliard committed
1173
	gettimeofday \
1174
	getuid \
1175
	inet_network \
1176
	lstat \
1177
	memmove \
1178
	mmap \
1179 1180
	pclose \
	popen \
1181
	pread \
1182
	pwrite \
1183
	readlink \
1184
	rfork \
1185
	sched_yield \
1186
	select \
1187
	sendmsg \
1188
	settimeofday \
1189
	sigaltstack \
1190
	sigprocmask \
1191
	snprintf \
1192
	spawnvp \
1193
	statfs \
1194
	statvfs \
1195
	strcasecmp \
1196
	strerror \
1197
	strncasecmp \
1198 1199 1200
	tcgetattr \
	timegm \
	usleep \
1201
	vsnprintf \
1202 1203 1204 1205
	wait4 \
	waitpid \
)

1206 1207
dnl **** Checks for headers that depend on other ones ****

1208
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
1209 1210 1211
    [#include <sys/types.h>
     #if HAVE_SYS_PARAM_H
     # include <sys/param.h>
1212 1213
     #endif])

1214
AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
1215
    [#include <sys/types.h>
1216
     #if HAVE_SYS_SOCKET_H
1217 1218 1219
     # include <sys/socket.h>
     #endif])

1220 1221 1222 1223 1224 1225 1226
AC_CHECK_HEADERS([resolv.h],,,
    [#include <sys/types.h>
     #if HAVE_SYS_SOCKET_H
     # include <sys/socket.h>
     #endif
     #if HAVE_NETINET_IN_H
     # include <netinet/in.h>
1227 1228 1229
     #endif
     #if HAVE_ARPA_NAMESER_H
     # include <arpa/nameser.h>
1230 1231
     #endif])

1232 1233
AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])

1234
AC_CHECK_HEADERS([linux/ipx.h linux/videodev.h],,,
1235 1236 1237
[#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
1238
#include <sys/types.h>
1239 1240 1241 1242
#ifdef HAVE_ASM_TYPES_H
#include <asm/types.h>
#endif])

1243 1244
dnl **** Check for types ****

1245 1246
AC_C_CONST
AC_C_INLINE
1247
AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t])
1248
AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])
1249
AC_CHECK_TYPES([request_sense],,,[#include <linux/cdrom.h>])
Alexandre Julliard's avatar
Alexandre Julliard committed
1250

1251 1252 1253 1254 1255
AC_CHECK_MEMBERS([struct ff_effect.direction],,,
[#ifdef HAVE_LINUX_INPUT_H
#include <linux/input.h>
#endif])

1256 1257 1258 1259 1260 1261 1262 1263
AC_CACHE_CHECK([for sigaddset],wine_cv_have_sigaddset,
               AC_TRY_LINK([#include <signal.h>],[sigset_t set; sigaddset(&set,SIGTERM);],
                           wine_cv_have_sigaddset=yes,wine_cv_have_sigaddset=no))
if test "$wine_cv_have_sigaddset" = "yes"
then
  AC_DEFINE(HAVE_SIGADDSET, 1, [Define if sigaddset is supported])
fi

1264

1265
AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
1266
   	wine_cv_linux_gethostbyname_r_6,
1267
	AC_TRY_LINK([
1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287
#include <netdb.h>
	], [
    char *name=NULL;
    struct hostent he;
    struct hostent *result;
    char *buf=NULL;
    int bufsize=0;
    int res,errnr;
    char *addr=NULL;
    int addrlen=0;
    int addrtype=0;
    res=gethostbyname_r(name,&he,buf,bufsize,&result,&errnr);
    res=gethostbyaddr_r(addr, addrlen, addrtype,&he,buf,bufsize,&result,&errnr);
    ],
	wine_cv_linux_gethostbyname_r_6=yes,
	wine_cv_linux_gethostbyname_r_6=no
	)
   )
   if test "$wine_cv_linux_gethostbyname_r_6" = "yes"
   then
1288 1289
      AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
                [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
1290 1291
   fi

1292 1293
if test "$ac_cv_header_linux_joystick_h" = "yes"
then
1294
   AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
1295 1296 1297 1298 1299 1300
   	wine_cv_linux_joystick_22_api,
	AC_TRY_COMPILE([
	#include <sys/ioctl.h>
	#include <linux/joystick.h>

	struct js_event blub;
1301 1302 1303
	#if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
	#error "no 2.2 header"
	#endif
1304 1305 1306 1307 1308 1309
	],/*empty*/,
	wine_cv_linux_joystick_22_api=yes,
	wine_cv_linux_joystick_22_api=no,
	wine_cv_linux_joystick_22_api=no
	)
   )
1310
   if test "$wine_cv_linux_joystick_22_api" = "yes"
1311
   then
1312 1313
      AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
                [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
1314 1315 1316
   fi
fi

1317
dnl **** FIXME: what about mixed cases, where we need two of them? ***
1318

1319
dnl Check for statfs members
1320
AC_CHECK_MEMBERS([struct statfs.f_bfree, struct statfs.f_bavail, struct statfs.f_frsize, struct statfs.f_ffree, struct statfs.f_favail, struct statfs.f_namelen],,,
1321 1322 1323 1324
[#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
1325
#ifdef HAVE_SYS_MOUNT_H
1326
# include <sys/mount.h>
1327 1328 1329 1330 1331 1332
#endif
#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_STATFS_H
# include <sys/statfs.h>
1333
#endif])
1334 1335 1336 1337 1338

AC_CHECK_MEMBERS([struct statvfs.f_blocks],,,
[#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#endif])
1339

1340 1341
dnl Check for socket structure members
AC_CHECK_MEMBERS([struct msghdr.msg_accrights, struct sockaddr.sa_len, struct sockaddr_un.sun_len],,,
1342
[#include <sys/types.h>
1343 1344 1345 1346 1347
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
1348 1349
#endif])

1350 1351 1352 1353 1354 1355 1356
dnl Check for scsireq_t and sg_io_hdr_t members
AC_CHECK_MEMBERS([scsireq_t.cmd, sg_io_hdr_t.interface_id],,,
[#include <sys/types.h>
#ifdef HAVE_SCSI_SG_H
#include <scsi/sg.h>
#endif])

1357 1358
dnl Check for siginfo_t members
AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
1359

1360
dnl Check for struct mtget members
1361
AC_CHECK_MEMBERS([struct mtget.mt_blksiz, struct mtget.mt_gstat, struct mtget.mt_blkno],,,
1362 1363
[#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H
1364 1365 1366
#include <sys/mtio.h>
#endif])

1367 1368 1369 1370 1371 1372
dnl Check for struct option
AC_CHECK_MEMBERS([struct option.name],,,
[#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif])

1373 1374 1375
dnl Check for stat.st_blocks
AC_CHECK_MEMBERS([struct stat.st_blocks])

1376 1377 1378 1379 1380 1381 1382 1383 1384
dnl Check for sin6_scope_id
AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif])

1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400
dnl Check for the external timezone variables timezone and daylight
AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
               AC_TRY_LINK([#include <time.h>],[timezone;],
			   ac_cv_have_timezone="yes", ac_cv_have_timezone="no"))
if test "$ac_cv_have_timezone" = "yes"
then
    AC_DEFINE(HAVE_TIMEZONE, 1, [Define if you have the timezone variable])
fi
AC_CACHE_CHECK([for daylight variable], ac_cv_have_daylight,
               AC_TRY_LINK([#include <time.h>],[daylight;],
			   ac_cv_have_daylight="yes", ac_cv_have_daylight="no"))
if test "$ac_cv_have_daylight" = "yes"
then
    AC_DEFINE(HAVE_DAYLIGHT, 1, [Define if you have the daylight variable])
fi

1401
dnl *** check for the need to define platform-specific symbols
1402

1403
case $host_cpu in
1404
  *i[[3456789]]86*) WINE_CHECK_DEFINE([__i386__]) ;;
1405
  *x86_64*)         WINE_CHECK_DEFINE([__x86_64__]) ;;
1406 1407
  *alpha*)          WINE_CHECK_DEFINE([__ALPHA__]) ;;
  *sparc*)          WINE_CHECK_DEFINE([__sparc__]) ;;
1408
  *powerpc*)        WINE_CHECK_DEFINE([__powerpc__]) ;;
1409
esac
1410 1411

case $host_vendor in
1412
  *sun*) WINE_CHECK_DEFINE([__sun__]) ;;
1413 1414
esac

Alexandre Julliard's avatar
Alexandre Julliard committed
1415
dnl **** Generate output files ****
Alexandre Julliard's avatar
Alexandre Julliard committed
1416

1417 1418
AH_TOP([#define __WINE_CONFIG_H])

1419 1420
WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1421 1422 1423 1424 1425
WINE_CONFIG_EXTRA_DIR(dlls/kernel/messages)
WINE_CONFIG_EXTRA_DIR(dlls/user/resources)
WINE_CONFIG_EXTRA_DIR(dlls/wineps/data)
WINE_CONFIG_EXTRA_DIR(include/wine)

Alexandre Julliard's avatar
Alexandre Julliard committed
1426
MAKE_RULES=Make.rules
Alexandre Julliard's avatar
Alexandre Julliard committed
1427
AC_SUBST_FILE(MAKE_RULES)
Alexandre Julliard's avatar
Alexandre Julliard committed
1428

1429 1430 1431
MAKE_DLL_RULES=dlls/Makedll.rules
AC_SUBST_FILE(MAKE_DLL_RULES)

1432 1433 1434
MAKE_IMPLIB_RULES=dlls/Makeimplib.rules
AC_SUBST_FILE(MAKE_IMPLIB_RULES)

1435 1436 1437
MAKE_TEST_RULES=dlls/Maketest.rules
AC_SUBST_FILE(MAKE_TEST_RULES)

1438 1439 1440
MAKE_LIB_RULES=libs/Makelib.rules
AC_SUBST_FILE(MAKE_LIB_RULES)

1441 1442 1443
MAKE_PROG_RULES=programs/Makeprog.rules
AC_SUBST_FILE(MAKE_PROG_RULES)

1444
AC_CONFIG_FILES([
Alexandre Julliard's avatar
Alexandre Julliard committed
1445
Make.rules
1446
dlls/Makedll.rules
1447
dlls/Makeimplib.rules
1448
dlls/Maketest.rules
1449
libs/Makelib.rules
1450
programs/Makeprog.rules
Alexandre Julliard's avatar
Alexandre Julliard committed
1451
Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1452
dlls/Makefile
1453
dlls/activeds/Makefile
1454
dlls/advapi32/Makefile
1455
dlls/advapi32/tests/Makefile
1456
dlls/advpack/Makefile
1457
dlls/advpack/tests/Makefile
1458
dlls/amstream/Makefile
1459
dlls/atl/Makefile
1460
dlls/avicap32/Makefile
1461
dlls/avifil32/Makefile
1462
dlls/cabinet/Makefile
1463
dlls/cabinet/tests/Makefile
1464
dlls/capi2032/Makefile
1465
dlls/cards/Makefile
1466
dlls/cfgmgr32/Makefile
1467
dlls/comcat/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1468
dlls/comctl32/Makefile
1469
dlls/comctl32/tests/Makefile
1470
dlls/commdlg/Makefile
1471
dlls/crtdll/Makefile
1472
dlls/crypt32/Makefile
1473
dlls/crypt32/tests/Makefile
1474
dlls/cryptdll/Makefile
1475
dlls/ctl3d32/Makefile
1476
dlls/d3d8/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1477
dlls/d3d9/Makefile
1478
dlls/d3d9/tests/Makefile
1479
dlls/d3dim/Makefile
1480
dlls/d3drm/Makefile
Raphael Junqueira's avatar
Raphael Junqueira committed
1481
dlls/d3dx8/Makefile
1482
dlls/d3dxof/Makefile
1483
dlls/dbghelp/Makefile
1484
dlls/dciman32/Makefile
1485
dlls/ddraw/Makefile
1486
dlls/ddraw/tests/Makefile
1487
dlls/devenum/Makefile
1488
dlls/dinput/Makefile
Robert Reif's avatar
Robert Reif committed
1489
dlls/dinput/tests/Makefile
1490
dlls/dinput8/Makefile
1491 1492 1493 1494 1495 1496 1497
dlls/dmband/Makefile
dlls/dmcompos/Makefile
dlls/dmime/Makefile
dlls/dmloader/Makefile
dlls/dmscript/Makefile
dlls/dmstyle/Makefile
dlls/dmsynth/Makefile
1498
dlls/dmusic/Makefile
1499
dlls/dmusic32/Makefile
1500
dlls/dplay/Makefile
1501
dlls/dplayx/Makefile
1502
dlls/dpnet/Makefile
1503
dlls/dpnhpast/Makefile
1504
dlls/dsound/Makefile
1505
dlls/dsound/tests/Makefile
1506
dlls/dswave/Makefile
1507
dlls/dxdiagn/Makefile
1508 1509
dlls/dxerr8/Makefile
dlls/dxerr9/Makefile
1510
dlls/dxguid/Makefile
1511
dlls/gdi/Makefile
1512
dlls/gdi/tests/Makefile
1513
dlls/glu32/Makefile
Jacek Caban's avatar
Jacek Caban committed
1514
dlls/glut32/Makefile
1515
dlls/hhctrl.ocx/Makefile
1516
dlls/iccvid/Makefile
1517
dlls/icmp/Makefile
1518
dlls/ifsmgr.vxd/Makefile
1519
dlls/imagehlp/Makefile
1520
dlls/imm32/Makefile
1521
dlls/iphlpapi/Makefile
1522
dlls/iphlpapi/tests/Makefile
1523
dlls/itss/Makefile
1524
dlls/kernel/Makefile
1525
dlls/kernel/tests/Makefile
1526 1527
dlls/lz32/Makefile
dlls/lz32/tests/Makefile
1528
dlls/mapi32/Makefile
1529
dlls/mapi32/tests/Makefile
1530
dlls/mciavi32/Makefile
1531 1532
dlls/mcicda/Makefile
dlls/mciseq/Makefile
1533
dlls/midimap/Makefile
1534 1535
dlls/mlang/Makefile
dlls/mlang/tests/Makefile
1536 1537
dlls/mmdevldr.vxd/Makefile
dlls/monodebg.vxd/Makefile
1538
dlls/mpr/Makefile
1539
dlls/msacm/Makefile
1540
dlls/msacm/imaadp32/Makefile
1541
dlls/msacm/msadp32/Makefile
1542
dlls/msacm/msg711/Makefile
1543
dlls/msacm/tests/Makefile
1544
dlls/msacm/winemp3/Makefile
1545
dlls/mscms/Makefile
1546
dlls/mscms/tests/Makefile
1547
dlls/msdmo/Makefile
Stefan Leichter's avatar
Stefan Leichter committed
1548
dlls/msftedit/Makefile
1549
dlls/mshtml/Makefile
Jacek Caban's avatar
Jacek Caban committed
1550
dlls/mshtml/tests/Makefile
1551
dlls/msi/Makefile
1552
dlls/msi/tests/Makefile
1553
dlls/msimg32/Makefile
1554
dlls/msisys/Makefile
1555
dlls/msnet32/Makefile
1556
dlls/msrle32/Makefile
1557
dlls/msvcrt/Makefile
1558
dlls/msvcrt/tests/Makefile
1559
dlls/msvcrt20/Makefile
1560
dlls/msvcrt40/Makefile
1561
dlls/msvcrtd/Makefile
1562
dlls/msvcrtd/tests/Makefile
1563
dlls/msvfw32/Makefile
1564
dlls/msvidc32/Makefile
1565
dlls/mswsock/Makefile
1566
dlls/msxml3/Makefile
Mike McCormack's avatar
Mike McCormack committed
1567
dlls/msxml3/tests/Makefile
1568
dlls/netapi32/Makefile
1569
dlls/netapi32/tests/Makefile
1570
dlls/newdev/Makefile
1571
dlls/ntdll/Makefile
1572
dlls/ntdll/tests/Makefile
1573
dlls/objsel/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1574
dlls/odbc32/Makefile
1575
dlls/odbccp32/Makefile
1576
dlls/ole32/Makefile
1577
dlls/ole32/tests/Makefile
1578
dlls/oleacc/Makefile
1579
dlls/oleaut32/Makefile
1580
dlls/oleaut32/tests/Makefile
1581
dlls/olecli32/Makefile
1582
dlls/oledlg/Makefile
Sean Langley's avatar
Sean Langley committed
1583
dlls/olepro32/Makefile
1584
dlls/olesvr32/Makefile
Lionel Ulmer's avatar
Lionel Ulmer committed
1585
dlls/opengl32/Makefile
1586
dlls/powrprof/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1587
dlls/psapi/Makefile
1588
dlls/psapi/tests/Makefile
1589
dlls/qcap/Makefile
1590
dlls/quartz/Makefile
1591
dlls/quartz/tests/Makefile
1592
dlls/rasapi32/Makefile
1593
dlls/riched20/Makefile
1594
dlls/riched20/tests/Makefile
1595
dlls/richedit/Makefile
Huw D M Davies's avatar
Huw D M Davies committed
1596
dlls/rpcrt4/Makefile
1597
dlls/rpcrt4/tests/Makefile
1598
dlls/rsabase/Makefile
1599
dlls/rsabase/tests/Makefile
1600 1601
dlls/rsaenh/Makefile
dlls/rsaenh/tests/Makefile
1602
dlls/secur32/Makefile
Kai Blin's avatar
Kai Blin committed
1603
dlls/secur32/tests/Makefile
1604
dlls/security/Makefile
1605
dlls/sensapi/Makefile
1606
dlls/serialui/Makefile
1607
dlls/setupapi/Makefile
1608
dlls/setupapi/tests/Makefile
1609
dlls/sfc/Makefile
1610
dlls/shdocvw/Makefile
1611
dlls/shdocvw/tests/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1612
dlls/shell32/Makefile
1613
dlls/shell32/tests/Makefile
1614 1615
dlls/shfolder/Makefile
dlls/shlwapi/Makefile
1616
dlls/shlwapi/tests/Makefile
1617
dlls/snmpapi/Makefile
Huw Davies's avatar
Huw Davies committed
1618
dlls/stdole2.tlb/Makefile
Huw Davies's avatar
Huw Davies committed
1619
dlls/stdole32.tlb/Makefile
1620
dlls/sti/Makefile
Francois Gouget's avatar
Francois Gouget committed
1621
dlls/strmiids/Makefile
1622
dlls/tapi32/Makefile
1623
dlls/twain/Makefile
1624
dlls/unicows/Makefile
1625
dlls/url/Makefile
1626
dlls/urlmon/Makefile
1627
dlls/urlmon/tests/Makefile
1628
dlls/user/Makefile
1629
dlls/user/tests/Makefile
1630
dlls/usp10/Makefile
Jeff Latimer's avatar
Jeff Latimer committed
1631
dlls/usp10/tests/Makefile
1632
dlls/uuid/Makefile
1633
dlls/uxtheme/Makefile
1634
dlls/vdhcp.vxd/Makefile
1635
dlls/vdmdbg/Makefile
1636
dlls/version/Makefile
1637
dlls/version/tests/Makefile
1638
dlls/vmm.vxd/Makefile
1639
dlls/vnbt.vxd/Makefile
1640 1641 1642
dlls/vnetbios.vxd/Makefile
dlls/vtdapi.vxd/Makefile
dlls/vwin32.vxd/Makefile
1643
dlls/w32skrnl/Makefile
1644
dlls/winecrt0/Makefile
1645
dlls/wined3d/Makefile
1646
dlls/winedos/Makefile
1647
dlls/wineps/Makefile
1648
dlls/wininet/Makefile
1649
dlls/wininet/tests/Makefile
1650
dlls/winmm/Makefile
1651
dlls/winmm/joystick/Makefile
1652
dlls/winmm/mciwave/Makefile
1653
dlls/winmm/tests/Makefile
1654
dlls/winmm/wavemap/Makefile
1655
dlls/winmm/winealsa/Makefile
Chris Morgan's avatar
Chris Morgan committed
1656
dlls/winmm/winearts/Makefile
1657
dlls/winmm/wineaudioio/Makefile
1658
dlls/winmm/wineesd/Makefile
1659
dlls/winmm/winejack/Makefile
1660
dlls/winmm/winenas/Makefile
1661
dlls/winmm/wineoss/Makefile
1662
dlls/winnls32/Makefile
1663
dlls/winspool/Makefile
1664
dlls/winspool/tests/Makefile
1665
dlls/wintab32/Makefile
1666
dlls/wintrust/Makefile
Hans Leidekker's avatar
Hans Leidekker committed
1667
dlls/wldap32/Makefile
1668
dlls/wnaspi32/Makefile
1669
dlls/wow32/Makefile
1670 1671
dlls/ws2_32/Makefile
dlls/ws2_32/tests/Makefile
1672
dlls/wsock32/Makefile
Ulrich Czekalla's avatar
Ulrich Czekalla committed
1673
dlls/wtsapi32/Makefile
1674
dlls/x11drv/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1675
documentation/Makefile
1676
fonts/Makefile
1677
include/Makefile
1678 1679
libs/Makefile
libs/port/Makefile
1680
libs/unicode/Makefile
1681
libs/wine/Makefile
1682
libs/wpp/Makefile
1683
loader/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1684
programs/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1685
programs/clock/Makefile
1686
programs/cmdlgtst/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1687
programs/control/Makefile
1688
programs/eject/Makefile
1689
programs/expand/Makefile
1690
programs/explorer/Makefile
Jacek Caban's avatar
Jacek Caban committed
1691
programs/hh/Makefile
1692
programs/icinfo/Makefile
1693
programs/msiexec/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1694
programs/notepad/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1695
programs/progman/Makefile
1696
programs/regedit/Makefile
1697
programs/regsvr32/Makefile
1698
programs/rpcss/Makefile
1699
programs/rundll32/Makefile
1700
programs/start/Makefile
1701
programs/taskmgr/Makefile
1702
programs/uninstaller/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1703
programs/view/Makefile
1704
programs/wcmd/Makefile
1705
programs/wineboot/Makefile
1706
programs/winebrowser/Makefile
1707
programs/winecfg/Makefile
1708
programs/wineconsole/Makefile
1709
programs/winedbg/Makefile
1710
programs/winefile/Makefile
1711
programs/winemenubuilder/Makefile
Joshua Thielen's avatar
Joshua Thielen committed
1712
programs/winemine/Makefile
1713
programs/winepath/Makefile
1714
programs/winetest/Makefile
1715
programs/winevdm/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1716
programs/winhelp/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1717
programs/winver/Makefile
1718
programs/wordpad/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1719
server/Makefile
Alexandre Julliard's avatar
Alexandre Julliard committed
1720
tools/Makefile
1721
tools/widl/Makefile
1722
tools/winapi/Makefile
1723
tools/winebuild/Makefile
1724
tools/winedump/Makefile
1725
tools/winegcc/Makefile
1726
tools/wmc/Makefile
1727
tools/wrc/Makefile])
Alexandre Julliard's avatar
Alexandre Julliard committed
1728

1729 1730
AC_OUTPUT

1731 1732 1733 1734 1735 1736
if test "$have_x" = "no"
then
  echo
  echo "*** Warning: X development files not found. Wine will be built without"
  echo "*** X support, which currently does not work, and would probably not be"
  echo "*** what you want anyway. You will need to install devel packages of"
1737
  echo "*** Xlib/Xfree86 at the very least."
1738 1739
fi

Lionel Ulmer's avatar
Lionel Ulmer committed
1740
if test "$wine_cv_opengl_version_OK" = "no"
1741 1742 1743
then
  echo
  echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1744 1745 1746
  echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
fi

1747 1748 1749 1750
if test "$wine_cv_msg_freetype" = "yes"
then
  echo
  echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
1751 1752 1753
  echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
  echo "*** freetype-devel package (or its equivalent on your distribution) to"
  echo "*** enable Wine to use TrueType fonts."
1754 1755
fi

1756 1757 1758 1759 1760 1761 1762 1763 1764
if test -z "$ALSALIBS" -a \
        -z "$ARTSC_LIBS" -a \
        -z "$AUDIOIOLIBS" -a \
        -z "$NASLIBS" -a \
        -z "$ESD_LIBS" -a \
        -z "$ac_cv_lib_soname_jack" -a \
        "$ac_cv_header_sys_soundcard_h" != "yes" -a \
        "$ac_cv_header_machine_soundcard_h" != "yes" -a \
        "$ac_cv_header_soundcard_h" != "yes"
1765 1766 1767
then
    echo "*** No sound system was found. Windows applications will be silent."
    echo "*** The currently supported sound systems are:"
1768
    echo "*** ALSA, ARTS, EsounD, AudioIO, Jack, NAS and OSS"
1769 1770
fi

Alexandre Julliard's avatar
Alexandre Julliard committed
1771
echo
1772
echo "Configure finished.  Do '${ac_make} depend && ${ac_make}' to compile Wine."
Alexandre Julliard's avatar
Alexandre Julliard committed
1773 1774 1775 1776 1777 1778
echo

dnl Local Variables:
dnl comment-start: "dnl "
dnl comment-end: ""
dnl comment-start-skip: "\\bdnl\\b\\s *"
1779
dnl compile-command: "autoconf && autoheader"
Alexandre Julliard's avatar
Alexandre Julliard committed
1780
dnl End: