configure.ac 50.9 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
	link.h \
200
	linux/capi.h \
201 202 203 204 205 206 207 208 209 210
	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 \
211
	mach/machine.h \
212
	machine/cpu.h \
213
	machine/limits.h \
214
	machine/soundcard.h \
215
	mntent.h \
216
	ncurses.h \
217 218 219 220 221
	netdb.h \
	netinet/in.h \
	netinet/in_systm.h \
	netinet/tcp.h \
	netinet/tcp_fsm.h \
222
	openssl/err.h \
223
	openssl/ssl.h \
224
	poll.h \
225 226 227 228 229 230 231
	process.h \
	pthread.h \
	pwd.h \
	regex.h \
	sched.h \
	scsi/scsi.h \
	scsi/scsi_ioctl.h \
232 233
	scsi/sg.h \
	soundcard.h \
234 235
	stdint.h \
	strings.h \
236
	sys/asoundlib.h \
237 238 239
	sys/cdio.h \
	sys/elf32.h \
	sys/epoll.h \
240
	sys/errno.h \
241 242 243 244
	sys/exec_elf.h \
	sys/filio.h \
	sys/ioctl.h \
	sys/ipc.h \
245
	sys/limits.h \
246 247 248 249 250
	sys/link.h \
	sys/lwp.h \
	sys/mman.h \
	sys/modem.h \
	sys/msg.h \
251
	sys/mtio.h \
252 253 254 255 256 257 258 259 260
	sys/param.h \
	sys/poll.h \
	sys/ptrace.h \
	sys/reg.h \
	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 281 282
	unistd.h \
	utime.h \
	valgrind/memcheck.h
)
AC_HEADER_STAT()

dnl **** Check for X11 ****

283 284
if test "$have_x" = "yes"
then
285
    XLIB="-lXext -lX11"
286 287
    ac_save_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS $X_CFLAGS"
288

289
    dnl *** All of the following tests require X11/Xlib.h
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
    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])
306

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

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

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

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

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

352
        dnl *** Check for X RandR extension
353 354
        if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
        then
355 356 357
                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])])
358
        fi
359

360 361 362 363 364 365 366 367
        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
368
    dnl *** End of X11/Xlib.h check
369

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

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

397
		if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
398
		then
399
			OPENGLFILES='$(OPENGLFILES)'
400
			AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is present on the system])
401 402 403 404 405 406
		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
407
		fi
408

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

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

426 427 428 429 430 431 432 433 434
    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])])

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

443 444 445 446
dnl **** Check for libxml2 ****

AC_SUBST(XML2LIBS,"")
AC_SUBST(XML2INCL,"")
447 448
AC_SUBST(XSLTLIBS,"")
AC_SUBST(XSLTINCL,"")
449 450 451 452 453 454 455 456 457 458
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"
459 460
             XML2INCL="$ac_xml_cflags"],,$ac_xml_libs)
         AC_CHECK_LIB(xml2, xmlReadMemory,
461 462 463 464 465 466
            [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"
467
    AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],
468 469 470 471
        [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)
472 473 474 475
        ],,
[#ifdef HAVE_LIBXSLT_PATTERN_H
# include <libxslt/pattern.h>
#endif])
476 477
    CPPFLAGS="$ac_save_CPPFLAGS"
fi
478

479
dnl **** Check which curses lib to use ***
480
CURSESLIBS=""
481
if test "x$with_curses" != "xno"
482
then
483 484 485
    if test "$ac_cv_header_ncurses_h" = "yes"
    then
        AC_CHECK_LIB(ncurses,waddch,
486
            [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
487 488 489 490 491 492 493
             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
494
fi
495
AC_SUBST(CURSESLIBS)
496

497 498
dnl **** Check for SANE ****
AC_CHECK_PROG(sane_devel,sane-config,sane-config,no)
499 500 501
AC_SUBST(SANELIBS,"")
AC_SUBST(SANEINCL,"")
if test "$sane_devel" != "no"
502 503 504 505 506 507 508
then
    SANELIBS="`$sane_devel --libs`"
    SANEINCL="`$sane_devel --cflags`"
    ac_save_CPPFLAGS="$CPPFLAGS"
    ac_save_LIBS="$LIBS"
    CPPFLAGS="$CPPFLAGS $SANEINCL"
    LIBS="$LIBS $SANELIBS"
509 510 511 512 513 514 515
    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=""])
516 517 518 519
    LIBS="$ac_save_LIBS"
    CPPFLAGS="$ac_save_CPPFLAGS"
fi

520 521 522
dnl **** Check for the ICU library ****
if test "$ac_cv_header_unicode_ubidi_h" = "yes"
then
523 524
    saved_libs="$LIBS"
    ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}"
525 526 527
    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)
528 529 530
    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])
531 532 533
                 AC_SUBST(ICULIBS,"$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s")
                 AC_MSG_RESULT(yes)],
                [AC_MSG_RESULT(no)])
534
    LIBS="$saved_libs"
535 536
fi

537 538 539 540 541 542 543 544 545
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

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

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

623 624 625 626 627 628
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

629
dnl **** Check for parport (currently Linux only) ****
630
AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
631 632 633 634 635 636 637 638
 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
639
    AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
640 641
fi

642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669
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

670 671 672 673 674 675 676 677 678 679 680 681 682 683 684
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

685 686 687 688
dnl **** Check for pthread_rwlock_t ****
AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
#include <pthread.h>])

689
dnl **** Check for pthread functions ****
690
WINE_CHECK_LIB_FUNCS(\
691 692
        pthread_getattr_np \
        pthread_get_stackaddr_np \
693 694
        pthread_get_stacksize_np,
        [$LIBPTHREAD])
695

Chris Morgan's avatar
Chris Morgan committed
696 697
dnl **** Check for aRts Sound Server ****
AC_PATH_PROG(ARTSCCONFIG, artsc-config)
698
if test x$ARTSCCONFIG != x -a x$ARTSCCONFIG != x'"$ARTSCCONFIG"';
Chris Morgan's avatar
Chris Morgan committed
699
then
700 701 702 703 704 705 706
    ARTSC_CFLAGS=""
    for i in `$ARTSCCONFIG --cflags`
    do
      case "$i" in
        -I*) ARTSC_CFLAGS="$ARTSC_CFLAGS $i";;
      esac
    done
707 708 709
    ARTSC_LIBS=`$ARTSCCONFIG --libs`
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $ARTSC_CFLAGS"
710 711 712 713
    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
714 715
            AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])])],,
            $ARTSC_LIBS)
716
    CFLAGS="$save_CFLAGS"
Chris Morgan's avatar
Chris Morgan committed
717 718
fi

719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739
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

740
dnl **** Check for ALSA 1.x ****
741
AC_SUBST(ALSALIBS,"")
742
if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
743
then
744 745 746 747 748 749 750 751 752
    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"])])
753 754
fi

755 756 757
dnl **** Check for libaudioio (which can be used to get solaris audio support) ****

AC_SUBST(AUDIOIOLIBS,"")
758 759 760
if test "$ac_cv_header_libaudioio_h" = "yes"
then
    AC_CHECK_LIB(audioio,AudioIOGetVersion,
761
                  [AUDIOIOLIBS="-laudioio"
762 763
                   AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])
fi
764

765 766
dnl **** Check for capi4linux ****

767 768 769 770
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
771

772
dnl **** Check for gcc specific options ****
Alexandre Julliard's avatar
Alexandre Julliard committed
773

774
AC_SUBST(EXTRACFLAGS,"")
Alexandre Julliard's avatar
Alexandre Julliard committed
775 776
if test "x${GCC}" = "xyes"
then
777
  EXTRACFLAGS="-Wall -pipe"
778 779

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

791
  exit( Array[[1]] != -2 || L[[2]] != 3);
Alexandre Julliard's avatar
Alexandre Julliard committed
792 793 794 795 796 797
}],
    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
798
    EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
Alexandre Julliard's avatar
Alexandre Julliard committed
799
  fi
800

801 802 803 804 805 806 807 808 809
  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

810 811 812 813 814 815 816 817 818
  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

819 820 821 822 823
  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
824
    EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
825
  fi
826

827 828 829 830 831 832 833 834
  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

835
  dnl Check for noisy string.h
836
  saved_CFLAGS="$CFLAGS"
837 838 839 840
  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]))
841
  CFLAGS="$saved_CFLAGS"
842 843
  if test "$ac_cv_c_string_h_warnings" = "no"
  then
844
    EXTRACFLAGS="$EXTRACFLAGS -Wpointer-arith"
845
  fi
846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864

  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
865 866
fi

867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889
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
890

Alexandre Julliard's avatar
Alexandre Julliard committed
891 892
dnl **** Check for underscore on external symbols ****

893
AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
894 895 896 897 898 899
    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
900 901
if test "$ac_cv_c_extern_prefix" = "yes"
then
902 903 904
  AC_DEFINE([__ASM_NAME(name)], ["_" name])
else
  AC_DEFINE([__ASM_NAME(name)], [name])
Alexandre Julliard's avatar
Alexandre Julliard committed
905 906
fi

Alexandre Julliard's avatar
Alexandre Julliard committed
907 908
dnl **** Check for working dll ****

909
AC_SUBST(DLLEXT,"")
910
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
911 912
AC_SUBST(DLLIBS,"")
AC_SUBST(LDSHARED,"")
913
AC_SUBST(LDDLLFLAGS,"")
914 915
AC_SUBST(LIBEXT,"so")
AC_SUBST(IMPLIBEXT,"def")
916

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

    if test "$LIBEXT" = "so"
    then
947
      DLLFLAGS="$DLLFLAGS -fPIC"
948
      DLLEXT=".so"
949
      AC_CACHE_CHECK([whether we can build a GNU style ELF dll], ac_cv_c_dll_gnuelf,
950 951
          [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")])
952 953 954
      if test "$ac_cv_c_dll_gnuelf" = "yes"
      then
        LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
955
        LDDLLFLAGS="-shared -Wl,-Bsymbolic"
956 957 958 959 960
        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
961
          LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
962
        fi
963

964 965 966 967 968
        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
969
          LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
970 971
        fi

972 973 974 975 976 977 978 979 980 981
        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

982 983 984 985 986
        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
987
          AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])
988
        fi
989 990 991

        case $host_cpu in
          *i[[3456789]]86*)
992 993
            AC_CACHE_CHECK([whether we can relocate the executable to 0x7bf00000], ac_cv_ld_reloc_exec,
              [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
994
                               ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")])
995 996
            if test "$ac_cv_ld_reloc_exec" = "yes"
            then
997
              LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
998 999 1000 1001
            fi
            ;;
        esac

1002
      else
1003
        AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
1004 1005
            [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")])
1006 1007 1008
        if test "$ac_cv_c_dll_unixware" = "yes"
        then
          LDSHARED="\$(CC) -Wl,-G \$(SONAME:%=-Wl,-h,%)"
1009
          LDDLLFLAGS="-Wl,-G,-B,symbolic"
1010 1011 1012

        else
          AC_CACHE_CHECK(whether we can build a Mach-O (Mac OS X/Darwin) dll, ac_cv_c_dll_macho,
1013
            [WINE_TRY_SHLIB_FLAGS([-bundle], ac_cv_c_dll_macho="yes", ac_cv_c_dll_macho="no")])
1014 1015 1016
          if test "$ac_cv_c_dll_macho" = "yes"
          then
            LIBEXT="dylib"
1017
            LDDLLFLAGS="-bundle"
1018
            LDSHARED="\$(CC) -dynamiclib"
1019
            STRIP="$STRIP -u -r"
1020 1021 1022
            dnl declare needed frameworks
            AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
            AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation")
1023
            AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00000000,-segaddr,WINE_SHARED_HEAP,0x7ffe0000"])
1024 1025 1026 1027 1028 1029 1030
            case $host_cpu in
              *powerpc*)
                CFLAGS="$CFLAGS -ffixed-r13"
                LDDLLFLAGS="$LDDLLFLAGS -read_only_relocs warning"
                ;;
            esac

1031 1032 1033 1034 1035 1036
          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"
1037 1038
              DLLEXT=".sl"
              LDDLLFLAGS="-shared -fPIC"
1039 1040
              LDSHARED="\$(CC) -shared"
            fi
1041
          fi
1042 1043
        fi
      fi
1044
    fi
1045 1046 1047 1048 1049

    dnl Check for cross compiler to build test programs
    AC_SUBST(CROSSTEST,"")
    if test "$cross_compiling" = "no"
    then
1050 1051 1052
      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)
1053 1054
      if test "$CROSSCC" != "false"; then CROSSTEST="\$(CROSSTEST)"; fi
    fi
1055 1056
    ;;
esac
1057

1058
if test "$LIBEXT" = "a"; then
1059 1060 1061 1062 1063 1064
  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.]
)
1065 1066
fi

1067 1068
case $build_os in
  cygwin*|mingw32*)
1069
    AC_SUBST(LDPATH,"PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$PATH\"") ;;
1070 1071
  darwin*|macosx*)
    AC_SUBST(LDPATH,"DYLD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$DYLD_LIBRARY_PATH\"") ;;
1072
  *)
1073
    AC_SUBST(LDPATH,"LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/unicode:\$\$LD_LIBRARY_PATH\"") ;;
1074 1075
esac

1076
dnl Mingw needs explicit msvcrt for linking libwine and winsock for wininet
1077 1078
case $host_os in
  mingw32*)
1079 1080 1081
    AC_SUBST(CRTLIBS,"-lmsvcrt")
    AC_SUBST(SOCKETLIBS,"-lws2_32")
    ;;
1082 1083 1084
esac

case $host_os in
1085
  linux* | k*bsd*-gnu)
1086 1087 1088 1089
    case $host_cpu in
      *i[[3456789]]86*) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread wine-preloader") ;;
      *) AC_SUBST(WINE_BINARIES,"wine-glibc wine-kthread wine-pthread") ;;
    esac
1090
    AC_SUBST(MAIN_BINARY,"wine-glibc")
1091
    ;;
1092 1093 1094 1095
  darwin*)
    AC_SUBST(WINE_BINARIES,"wine-pthread")
    AC_SUBST(MAIN_BINARY,"wine-pthread")
    ;;
1096 1097 1098 1099
  *)
    AC_SUBST(WINE_BINARIES,"wine-kthread")
    AC_SUBST(MAIN_BINARY,"wine-kthread")
    ;;
1100
esac
Alexandre Julliard's avatar
Alexandre Julliard committed
1101

1102 1103
dnl **** Get the soname for libraries that we load dynamically ****

1104
if test "$LIBEXT" = "so" -o "$LIBEXT" = "dylib"
1105
then
1106 1107
  WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
  WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
1108
  WINE_GET_SONAME(Xi,XOpenDevice,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1109
  WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1110
  WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
1111
  WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])
1112
  WINE_GET_SONAME(GL,glXQueryExtension,[$X_LIBS $X_EXTRA_LIBS])
1113
  WINE_GET_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
1114
  WINE_GET_SONAME(cups,cupsGetDefault)
1115
  WINE_GET_SONAME(jack,jack_client_new)
1116
  WINE_GET_SONAME(fontconfig,FcInit)
1117 1118
  WINE_GET_SONAME(ssl,SSL_library_init)
  WINE_GET_SONAME(crypto,BIO_new_socket)
1119 1120
  WINE_GET_SONAME(ncurses,waddch)
  WINE_GET_SONAME(curses,waddch)
1121 1122
  WINE_GET_SONAME(jpeg,jpeg_start_decompress)
  WINE_GET_SONAME(ungif,DGifOpen)
1123
  WINE_GET_SONAME(gif,DGifOpen)
1124
  WINE_GET_SONAME(capi20,capi20_isinstalled)
1125
fi
1126 1127


1128 1129 1130 1131
dnl **** Check for functions ****

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

1195 1196
dnl **** Checks for headers that depend on other ones ****

1197
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
1198 1199 1200
    [#include <sys/types.h>
     #if HAVE_SYS_PARAM_H
     # include <sys/param.h>
1201 1202
     #endif])

1203
AC_CHECK_HEADERS([net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
1204
    [#include <sys/types.h>
1205
     #if HAVE_SYS_SOCKET_H
1206 1207 1208
     # include <sys/socket.h>
     #endif])

1209 1210 1211 1212 1213 1214 1215
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>
1216 1217 1218
     #endif
     #if HAVE_ARPA_NAMESER_H
     # include <arpa/nameser.h>
1219 1220
     #endif])

1221 1222
AC_CHECK_HEADERS(ucontext.h,,,[#include <signal.h>])

1223
AC_CHECK_HEADERS([linux/ipx.h linux/videodev.h],,,
1224 1225 1226
[#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
1227
#include <sys/types.h>
1228 1229 1230 1231
#ifdef HAVE_ASM_TYPES_H
#include <asm/types.h>
#endif])

1232 1233
dnl **** Check for types ****

1234 1235
AC_C_CONST
AC_C_INLINE
1236
AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t])
1237
AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])
1238
AC_CHECK_TYPES([request_sense],,,[#include <linux/cdrom.h>])
Alexandre Julliard's avatar
Alexandre Julliard committed
1239

1240 1241 1242 1243 1244
AC_CHECK_MEMBERS([struct ff_effect.direction],,,
[#ifdef HAVE_LINUX_INPUT_H
#include <linux/input.h>
#endif])

1245 1246 1247 1248 1249 1250 1251 1252
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

1253

1254
AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
1255
   	wine_cv_linux_gethostbyname_r_6,
1256
	AC_TRY_LINK([
1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276
#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
1277 1278
      AC_DEFINE(HAVE_LINUX_GETHOSTBYNAME_R_6, 1,
                [Define if Linux-style gethostbyname_r and gethostbyaddr_r are available])
1279 1280
   fi

1281 1282
if test "$ac_cv_header_linux_joystick_h" = "yes"
then
1283
   AC_CACHE_CHECK([whether linux/joystick.h uses the Linux 2.2+ API],
1284 1285 1286 1287 1288 1289
   	wine_cv_linux_joystick_22_api,
	AC_TRY_COMPILE([
	#include <sys/ioctl.h>
	#include <linux/joystick.h>

	struct js_event blub;
1290 1291 1292
	#if !defined(JS_EVENT_AXIS) || !defined(JS_EVENT_BUTTON)
	#error "no 2.2 header"
	#endif
1293 1294 1295 1296 1297 1298
	],/*empty*/,
	wine_cv_linux_joystick_22_api=yes,
	wine_cv_linux_joystick_22_api=no,
	wine_cv_linux_joystick_22_api=no
	)
   )
1299
   if test "$wine_cv_linux_joystick_22_api" = "yes"
1300
   then
1301 1302
      AC_DEFINE(HAVE_LINUX_22_JOYSTICK_API, 1,
                [Define if <linux/joystick.h> defines the Linux 2.2 joystick API])
1303 1304 1305
   fi
fi

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

1308
dnl Check for statfs members
1309
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],,,
1310 1311 1312 1313
[#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
1314
#ifdef HAVE_SYS_MOUNT_H
1315
# include <sys/mount.h>
1316 1317 1318 1319 1320 1321
#endif
#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_STATFS_H
# include <sys/statfs.h>
1322
#endif])
1323 1324 1325 1326 1327

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

1329 1330
dnl Check for socket structure members
AC_CHECK_MEMBERS([struct msghdr.msg_accrights, struct sockaddr.sa_len, struct sockaddr_un.sun_len],,,
1331
[#include <sys/types.h>
1332 1333 1334 1335 1336
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
1337 1338
#endif])

1339 1340 1341 1342 1343 1344 1345
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])

1346 1347
dnl Check for siginfo_t members
AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
1348

1349
dnl Check for struct mtget members
1350
AC_CHECK_MEMBERS([struct mtget.mt_blksiz, struct mtget.mt_gstat, struct mtget.mt_blkno],,,
1351 1352
[#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H
1353 1354 1355
#include <sys/mtio.h>
#endif])

1356 1357 1358 1359 1360 1361
dnl Check for struct option
AC_CHECK_MEMBERS([struct option.name],,,
[#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif])

1362 1363 1364
dnl Check for stat.st_blocks
AC_CHECK_MEMBERS([struct stat.st_blocks])

1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380
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

1381
dnl *** check for the need to define platform-specific symbols
1382

1383
case $host_cpu in
1384
  *i[[3456789]]86*) WINE_CHECK_DEFINE([__i386__]) ;;
1385
  *x86_64*)         WINE_CHECK_DEFINE([__x86_64__]) ;;
1386 1387
  *alpha*)          WINE_CHECK_DEFINE([__ALPHA__]) ;;
  *sparc*)          WINE_CHECK_DEFINE([__sparc__]) ;;
1388
  *powerpc*)        WINE_CHECK_DEFINE([__powerpc__]) ;;
1389
esac
1390 1391

case $host_vendor in
1392
  *sun*) WINE_CHECK_DEFINE([__sun__]) ;;
1393 1394
esac

Alexandre Julliard's avatar
Alexandre Julliard committed
1395
dnl **** Generate output files ****
Alexandre Julliard's avatar
Alexandre Julliard committed
1396

1397 1398
AH_TOP([#define __WINE_CONFIG_H])

1399 1400
WINE_CONFIG_EXTRA_DIR(dlls/gdi/enhmfdrv)
WINE_CONFIG_EXTRA_DIR(dlls/gdi/mfdrv)
1401 1402 1403 1404 1405
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
1406
MAKE_RULES=Make.rules
Alexandre Julliard's avatar
Alexandre Julliard committed
1407
AC_SUBST_FILE(MAKE_RULES)
Alexandre Julliard's avatar
Alexandre Julliard committed
1408

1409 1410 1411
MAKE_DLL_RULES=dlls/Makedll.rules
AC_SUBST_FILE(MAKE_DLL_RULES)

1412 1413 1414
MAKE_IMPLIB_RULES=dlls/Makeimplib.rules
AC_SUBST_FILE(MAKE_IMPLIB_RULES)

1415 1416 1417
MAKE_TEST_RULES=dlls/Maketest.rules
AC_SUBST_FILE(MAKE_TEST_RULES)

1418 1419 1420
MAKE_LIB_RULES=libs/Makelib.rules
AC_SUBST_FILE(MAKE_LIB_RULES)

1421 1422 1423
MAKE_PROG_RULES=programs/Makeprog.rules
AC_SUBST_FILE(MAKE_PROG_RULES)

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

1708 1709
AC_OUTPUT

1710 1711 1712 1713 1714 1715
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"
1716
  echo "*** Xlib/Xfree86 at the very least."
1717 1718
fi

Lionel Ulmer's avatar
Lionel Ulmer committed
1719
if test "$wine_cv_opengl_version_OK" = "no"
1720 1721 1722
then
  echo
  echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
1723 1724 1725
  echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
fi

1726 1727 1728 1729
if test "$wine_cv_msg_freetype" = "yes"
then
  echo
  echo "*** Note: Your system appears to have the FreeType 2 runtime libraries"
1730 1731 1732
  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."
1733 1734
fi

1735 1736 1737 1738 1739 1740 1741 1742 1743
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"
1744 1745 1746
then
    echo "*** No sound system was found. Windows applications will be silent."
    echo "*** The currently supported sound systems are:"
1747
    echo "*** ALSA, ARTS, EsounD, AudioIO, Jack, NAS and OSS"
1748 1749
fi

Alexandre Julliard's avatar
Alexandre Julliard committed
1750
echo
1751
echo "Configure finished.  Do '${ac_make} depend && ${ac_make}' to compile Wine."
Alexandre Julliard's avatar
Alexandre Julliard committed
1752 1753 1754 1755 1756 1757
echo

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