Newer
Older

Alexandre Julliard
committed
;;
esac
else
AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll, ac_cv_c_dll_unixware,
[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")])
if test "$ac_cv_c_dll_unixware" = "yes"
then

Alexandre Julliard
committed
LIBWINE_LDFLAGS="-Wl,-G,-h,libwine.so.$libwine_soversion"

Alexandre Julliard
committed
fi
fi

Alexandre Julliard
committed
AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version")
AC_SUBST(LIBWINE_DEPENDS,"wine.map")

Alexandre Julliard
committed
TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion"
TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.so"

Alexandre Julliard
committed
;;
esac
enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
Aric Stewart
committed
enable_wineqtdecoder=${enable_wineqtdecoder:-no}
enable_wineandroid_drv=${enable_wineandroid_drv:-no}
enable_winemac_drv=${enable_winemac_drv:-no}
test "$ac_cv_header_linux_joystick_h" = "yes" -o "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}

Alexandre Julliard
committed

Alexandre Julliard
committed
dnl Check for cross compiler to build test programs
AC_SUBST(CROSSTARGET,"")
if test "x$with_mingw" != xno

Alexandre Julliard
committed
then
case "x$with_mingw" in
x|xyes) WINE_CHECK_MINGW_PROG(CROSSCC,false) ;;
*) CROSSCC=$with_mingw ;;
esac

Alexandre Julliard
committed
if test "$CROSSCC" != "false"
then
ac_save_CC="$CC"
saved_CFLAGS=$CFLAGS
AC_SUBST(CROSSCFLAGS,${CROSSCFLAGS:-"-g -O2"})
AC_SUBST(EXTRACROSSCFLAGS,"-DWINE_CROSS_PE -Wall")
CC="$CROSSCC"
CFLAGS=$CROSSCFLAGS
AC_CACHE_CHECK([whether $CROSSCC works], wine_cv_crosscc,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],[wine_cv_crosscc=yes],[wine_cv_crosscc=no])])
if test $wine_cv_crosscc = yes
then
set x $CROSSCC
shift
while test $# -ge 1
do
case "$1" in
*-gcc) CROSSTARGET=`expr "$1" : '\(.*\)-gcc'` ;;
*-clang) CROSSTARGET=`expr "$1" : '\(.*\)-clang'` ;;
esac
shift
done
fi

Alexandre Julliard
committed
WINE_TRY_CROSSCFLAGS([-fno-strict-aliasing])
dnl clang needs to be told to fail on unknown options
WINE_TRY_CROSSCFLAGS([-Werror=unknown-warning-option],[CFLAGS="$CFLAGS -Werror=unknown-warning-option"])

Alexandre Julliard
committed
WINE_TRY_CROSSCFLAGS([-Wdeclaration-after-statement])
WINE_TRY_CROSSCFLAGS([-Wempty-body])
WINE_TRY_CROSSCFLAGS([-Wignored-qualifiers])
WINE_TRY_CROSSCFLAGS([-Wpacked-not-aligned],[EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Wno-packed-not-aligned"])
WINE_TRY_CROSSCFLAGS([-Wpragma-pack],[EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Wno-pragma-pack"])
WINE_TRY_CROSSCFLAGS([-Wshift-overflow=2])
WINE_TRY_CROSSCFLAGS([-Wstrict-prototypes])
WINE_TRY_CROSSCFLAGS([-Wtype-limits])
WINE_TRY_CROSSCFLAGS([-Wunused-but-set-parameter])
WINE_TRY_CROSSCFLAGS([-Wvla])
WINE_TRY_CROSSCFLAGS([-Wwrite-strings])
WINE_TRY_CROSSCFLAGS([-Wpointer-arith])
WINE_TRY_CROSSCFLAGS([-Wlogical-op])
case $host_cpu in
*i[[3456789]]86*) WINE_TRY_CROSSCFLAGS([-fno-omit-frame-pointer]) ;;
x86_64) WINE_TRY_CROSSCFLAGS([-Wno-format]) ;;
esac
dnl Default to dwarf-2 debug info
for ac_flag in $CROSSCFLAGS; do

Alexandre Julliard
committed
case $ac_flag in
-g) WINE_TRY_CROSSCFLAGS([-gdwarf-2])
WINE_TRY_CROSSCFLAGS([-gstrict-dwarf]) ;;
esac
done
if test "x$enable_maintainer_mode" = xyes
then
WINE_TRY_CROSSCFLAGS([-Werror])
fi
CFLAGS=$saved_CFLAGS
CC="$ac_save_CC"

Alexandre Julliard
committed
fi
fi
WINE_NOTICE_WITH(mingw,[test "x$CROSSTARGET" = "x"],
[MinGW compiler not found, cross-compiling PE files won't be supported.])

Alexandre Julliard
committed
dnl **** Check for pthread ****
if test "$ac_cv_header_pthread_h" = "yes"
then

Alexandre Julliard
committed
AC_CHECK_FUNC(pthread_create,,[AC_CHECK_LIB(pthread,pthread_create,[AC_SUBST(PTHREAD_LIBS,"-lpthread")])])
fi

Alexandre Julliard
committed
WINE_ERROR_WITH(pthread,[test "x$ac_cv_func_pthread_create" != xyes -a "x$PTHREAD_LIBS" = x],
[pthread ${notice_platform}development files not found.
Wine cannot support threads without libpthread.])
dnl **** Check for X11 ****

Alexandre Julliard
committed
AC_PATH_XTRA
if test "$have_x" = "yes"
then
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"

Alexandre Julliard
committed
WINE_CHECK_SONAME(X11,XCreateWindow,,,[$X_LIBS $X_EXTRA_LIBS])
WINE_CHECK_SONAME(Xext,XextCreateExtension,[X_LIBS="$X_LIBS -lXext"],,[$X_LIBS -lX11 $X_EXTRA_LIBS])
X_LIBS="$X_LIBS -lX11"

Alexandre Julliard
committed
dnl *** All of the following tests require X11/Xlib.h
AC_CHECK_HEADERS([X11/Xlib.h \
X11/XKBlib.h \
X11/Xutil.h \
X11/Xcursor/Xcursor.h \
X11/extensions/shape.h \
X11/extensions/XInput.h \
X11/extensions/XInput2.h \
X11/extensions/XShm.h \
X11/extensions/Xcomposite.h \
X11/extensions/Xfixes.h \
X11/extensions/Xinerama.h \
X11/extensions/Xrandr.h \
X11/extensions/Xrender.h \
X11/extensions/xf86vmode.h \
X11/extensions/xf86vmproto.h],,,
[#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
#endif
#ifdef HAVE_X11_XUTIL_H
# include <X11/Xutil.h>
#endif])
dnl *** Check for X keyboard extension
if test "$ac_cv_header_X11_XKBlib_h" = "yes"
then
AC_CHECK_LIB(X11, XkbQueryExtension,
AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension]),,[$X_LIBS $X_EXTRA_LIBS])
fi

Alexandre Julliard
committed
dnl *** Check for X cursor
if test "$ac_cv_header_X11_Xcursor_Xcursor_h" = "yes"
then
WINE_CHECK_SONAME(Xcursor,XcursorImageLoadCursor,,,[$X_LIBS $X_EXTRA_LIBS])

Alexandre Julliard
committed
fi
WINE_NOTICE_WITH(xcursor,[test "x$ac_cv_lib_soname_Xcursor" = "x"],

Alexandre Julliard
committed
[libxcursor ${notice_platform}development files not found, the Xcursor extension won't be supported.])

Alexandre Julliard
committed
dnl *** Check for X input extension
if test "$ac_cv_header_X11_extensions_XInput_h" = "yes"
then
WINE_CHECK_SONAME(Xi,XOpenDevice,,,[$X_LIBS $X_EXTRA_LIBS])
fi
WINE_NOTICE_WITH(xinput,[test "x$ac_cv_lib_soname_Xi" = "x"],

Alexandre Julliard
committed
[libxi ${notice_platform}development files not found, the Xinput extension won't be supported.])
dnl *** Check for X input 2 extension
if test "x$ac_cv_lib_soname_Xi" != x
then
WINE_NOTICE_WITH(xinput2,[test "$ac_cv_header_X11_extensions_XInput2_h" != "yes"],
[XInput2 headers not found, the XInput 2 extension won't be supported.])
fi
dnl *** Check for X Shm extension
if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
then
AC_CHECK_LIB(Xext, XShmQueryExtension,
AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,[$X_LIBS $X_EXTRA_LIBS])
fi
WINE_NOTICE_WITH(xshm,[test "$ac_cv_lib_Xext_XShmQueryExtension" != "yes"],
[XShm ${notice_platform}development files not found, X Shared Memory won't be supported.])
dnl *** Check for X shape extension
if test "$ac_cv_header_X11_extensions_shape_h" = "yes"
then
AC_CHECK_LIB(Xext,XShapeQueryExtension,
AC_DEFINE(HAVE_LIBXSHAPE, 1, [Define if you have the X Shape extension]),,[$X_LIBS $X_EXTRA_LIBS])
fi
WINE_NOTICE_WITH(xshape,[test "$ac_cv_lib_Xext_XShapeQueryExtension" != "yes"],

Alexandre Julliard
committed
[XShape ${notice_platform}development files not found, XShape won't be supported.])
dnl *** Check for XFree86 VMODE extension
if test "$ac_cv_header_X11_extensions_xf86vmode_h" = "yes" -o "$ac_cv_header_X11_extensions_xf86vmproto_h" = "yes"
then
WINE_CHECK_SONAME(Xxf86vm,XF86VidModeQueryExtension,,,[$X_LIBS $X_EXTRA_LIBS])
fi
WINE_NOTICE_WITH(xxf86vm,[test "x$ac_cv_lib_soname_Xxf86vm" = "x"],

Alexandre Julliard
committed
[libXxf86vm ${notice_platform}development files not found, XFree86 Vidmode won't be supported.])
dnl *** Check for Transform functions in Xrender
if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes" -a "x$ac_cv_lib_soname_X11" != "x"
WINE_CHECK_SONAME(Xrender,XRenderQueryExtension,
[AC_CHECK_LIB(Xrender,XRenderSetPictureTransform,
[AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
[Define if Xrender has the XRenderSetPictureTransform function])],,[$X_LIBS $X_EXTRA_LIBS])
AC_CHECK_LIB(Xrender,XRenderCreateLinearGradient,
[AC_DEFINE(HAVE_XRENDERCREATELINEARGRADIENT, 1,
[Define if Xrender has the XRenderCreateLinearGradient function])],,[$X_LIBS $X_EXTRA_LIBS])],,[$X_LIBS $X_EXTRA_LIBS])
fi
WINE_WARNING_WITH(xrender,[test "x$ac_cv_lib_soname_Xrender" = "x"],

Alexandre Julliard
committed
[libxrender ${notice_platform}development files not found, XRender won't be supported.])
dnl *** Check for X RandR extension
if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes" -a "x$ac_cv_lib_soname_Xrender" != "x"
then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>]], [[static typeof(XRRSetScreenConfigAndRate) * func; if (func) return 0;]])],
[WINE_CHECK_SONAME(Xrandr,XRRQueryExtension,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>]], [[static typeof(XRRGetScreenResources) *f; if (f) return 0;]])],
[AC_DEFINE(HAVE_XRRGETSCREENRESOURCES, 1,
[Define if Xrandr has the XRRGetScreenResources function])])],,[$X_LIBS $X_EXTRA_LIBS])])
WINE_NOTICE_WITH(xrandr,[test "x$ac_cv_lib_soname_Xrandr" = "x"],

Alexandre Julliard
committed
[libxrandr ${notice_platform}development files not found, XRandr won't be supported.])
dnl *** Check for Xfixes extension
if test "$ac_cv_header_X11_extensions_Xfixes_h" = "yes"
then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>
#include <X11/extensions/Xfixes.h>]], [[static typeof(XFixesQueryVersion) * func; if (func) return 0;]])],
[WINE_CHECK_SONAME(Xfixes,XFixesQueryVersion,,,[$X_LIBS $X_EXTRA_LIBS])])
fi
WINE_NOTICE_WITH(xfixes,[test "x$ac_cv_lib_soname_Xfixes" = "x"],
[libxfixes ${notice_platform}development files not found, Xfixes won't be supported.])
dnl *** Check for Xinerama extension
if test "$ac_cv_header_X11_extensions_Xinerama_h" = "yes"
then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>
#include <X11/extensions/Xinerama.h>]], [[static typeof(XineramaQueryScreens) * func; if (func) return 0;]])],
[WINE_CHECK_SONAME(Xinerama,XineramaQueryScreens,,,[$X_LIBS $X_EXTRA_LIBS])])
WINE_NOTICE_WITH(xinerama,[test "x$ac_cv_lib_soname_Xinerama" = "x"],

Alexandre Julliard
committed
[libxinerama ${notice_platform}development files not found, multi-monitor setups won't be supported.])
dnl *** Check for X Composite extension
if test "$ac_cv_header_X11_extensions_Xcomposite_h" = "yes"
then
WINE_CHECK_SONAME(Xcomposite,XCompositeRedirectWindow,,,[$X_LIBS $X_EXTRA_LIBS])
WINE_NOTICE_WITH(xcomposite,[test "x$ac_cv_lib_soname_Xcomposite" = "x"],

Alexandre Julliard
committed
[libxcomposite ${notice_platform}development files not found, Xcomposite won't be supported.])
dnl *** Check for XICCallback struct

Alexandre Julliard
committed
AC_CHECK_MEMBERS([XICCallback.callback, XEvent.xcookie],,,
[#ifdef HAVE_X11_XLIB_H
#include <X11/Xlib.h>
#endif])
dnl *** End of X11/Xlib.h check
opengl_msg=""
if test "x$with_opengl" != "xno"
WINE_CHECK_SONAME(GL,glXCreateContext,
[OPENGL_LIBS="-lGL"],
[WINE_CHECK_SONAME(GL,glXCreateContext,
[OPENGL_LIBS="-Xlinker -dylib_file -Xlinker /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -lGL"],
[if test -f /usr/X11R6/lib/libGL.a
then
opengl_msg="/usr/X11R6/lib/libGL.a is present on your system.
This probably prevents linking to OpenGL. Try deleting the file and restarting configure."
else
opengl_msg="No OpenGL library found on this system."
fi],
$X_LIBS -lm $X_EXTRA_LIBS -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib)],
$X_LIBS -lm $X_EXTRA_LIBS)
if test "x$with_glu" != "xno"
then
WINE_CHECK_SONAME(GLU,gluLookAt,,,[$OPENGL_LIBS $X_LIBS -lm $X_EXTRA_LIBS])
WINE_NOTICE_WITH(glu,[test "x$ac_cv_lib_soname_GLU" = "x"],
[libGLU ${notice_platform}development files not found, GLU won't be supported.])
fi
if test "x$with_osmesa" != "xno"
then
WINE_CHECK_SONAME(OSMesa,OSMesaGetProcAddress,,,[$X_LIBS -lm $X_EXTRA_LIBS])
WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"],
[libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.])
fi
WINE_WARNING_WITH(opengl,[test -n "$opengl_msg"],[$opengl_msg
OpenGL and Direct3D won't be supported.])

Alexandre Julliard
committed
else
X_CFLAGS=""
X_LIBS=""
fi
if test "$enable_wineandroid_drv$enable_winemac_drv" = "nono"
then
WINE_ERROR_WITH(x,[test "x$X_LIBS" = "x"],
[X ${notice_platform}development files not found. Wine will be built

Gerald Pfeifer
committed
without X support, which probably isn't what you want. You will need
to install ${notice_platform}development packages of Xlib at the very least.],
[enable_winex11_drv])
else
WINE_NOTICE_WITH(x,[test "x$X_LIBS" = "x"],
[X ${notice_platform}development files not found, the X11 driver won't be supported.],
[enable_winex11_drv])
fi
dnl **** Check for OpenCL ****
if test "$ac_cv_header_CL_cl_h" = "yes"

Alexandre Julliard
committed
AC_CHECK_LIB(OpenCL,clGetPlatformInfo,[AC_SUBST(OPENCL_LIBS,["-lOpenCL"])])
fi
WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes],

Alexandre Julliard
committed
[OpenCL ${notice_platform}development files not found, OpenCL won't be supported.],
[enable_opencl])
dnl **** Check for libpcap ****
if test "$ac_cv_header_pcap_pcap_h" = "yes"
then
AC_CHECK_LIB(pcap,pcap_create,[AC_SUBST(PCAP_LIBS,["-lpcap"])])
fi
WINE_NOTICE_WITH(pcap,[test "x$ac_cv_lib_pcap_pcap_create" != xyes],

Alexandre Julliard
committed
[pcap ${notice_platform}development files not found, wpcap won't be supported.],
[enable_wpcap])
dnl **** Check for libxml2 ****
if test "x$with_xml" != "xno"
WINE_PACKAGE_FLAGS(XML2,[libxml-2.0],[-lxml2],
[`${XML2_CONFIG:-xml2-config} --cflags 2>/dev/null`],[`${XML2_CONFIG:-xml2-config} --libs 2>/dev/null`],

Alexandre Julliard
committed
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
[AC_CHECK_HEADERS([libxml/parser.h libxml/xmlsave.h libxml/SAX2.h])
if test "$ac_cv_header_libxml_parser_h" = "yes" -a "$ac_cv_header_libxml_xmlsave_h" = "yes" -a "$ac_cv_header_libxml_SAX2_h" = "yes"
then
AC_CHECK_LIB(xml2, xmlParseMemory,
[AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])],[XML2_LIBS=""],[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlReadMemory,
[AC_DEFINE(HAVE_XMLREADMEMORY,1,[Define if libxml2 has the xmlReadMemory function])],,[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlNewDocPI,
[AC_DEFINE(HAVE_XMLNEWDOCPI,1,[Define if libxml2 has the xmlNewDocPI function])],,[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlSchemaSetParserStructuredErrors,
[AC_DEFINE(HAVE_XMLSCHEMASSETPARSERSTRUCTUREDERRORS,1,[Define if libxml2 has the xmlSchemaSetParserStructuredErrors function])],,[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlSchemaSetValidStructuredErrors,
[AC_DEFINE(HAVE_XMLSCHEMASSETVALIDSTRUCTUREDERRORS,1,[Define if libxml2 has the xmlSchemaSetValidStructuredErrors function])],,[$XML2_LIBS])
AC_CHECK_LIB(xml2, xmlFirstElementChild,
[AC_DEFINE(HAVE_XMLFIRSTELEMENTCHILD,1,[Define if libxml2 has the xmlFirstElementChild function])],,[$XML2_LIBS])
AC_CHECK_TYPE([xmlDocProperties],
[AC_DEFINE(HAVE_XMLDOC_PROPERTIES,1,[Define if libxml2 has the xmlDocProperties enum])],,[[#include <libxml/tree.h>]])
else
XML2_CFLAGS=""
XML2_LIBS=""
fi])
WINE_WARNING_WITH(xml,[test "$ac_cv_lib_xml2_xmlParseMemory" != "yes"],
Andrew Nguyen
committed
[libxml2 ${notice_platform}development files not found (or too old), XML won't be supported.])
if test "x$with_xslt" != "xno"
WINE_PACKAGE_FLAGS(XSLT,[libxslt],[-lxml2],
[`${XSLT_CONFIG:-xslt-config} --cflags 2>/dev/null`],[`${XSLT_CONFIG:-xslt-config} --libs 2>/dev/null`],

Alexandre Julliard
committed
[AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],,,
[#ifdef HAVE_LIBXSLT_PATTERN_H
# include <libxslt/pattern.h>
#endif])

Alexandre Julliard
committed
if test "$ac_cv_header_libxslt_transform_h" = "yes"
then
WINE_CHECK_SONAME(xslt,xsltCompilePattern,,,[$XSLT_LIBS])
else
XSLT_CFLAGS=""
fi])
fi
WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"],

Alexandre Julliard
committed
[libxslt ${notice_platform}development files not found, xslt won't be supported.])
dnl **** Check for inotify ****
if test "x$with_inotify" != "xno"
then
WINE_PACKAGE_FLAGS(INOTIFY,[libinotify],,,,
[AC_CHECK_HEADERS([sys/inotify.h])
AC_CHECK_LIB(inotify,inotify_add_watch,[:],[INOTIFY_LIBS=""],[$INOTIFY_LIBS])])
fi
WINE_NOTICE_WITH(inotify,[test "$ac_cv_header_sys_inotify_h" != "yes"],
[libinotify ${notice_platform}development files not found (or too old), filesystem change notifications won't be supported.])
dnl **** Check for libdbus ****
if test "x$with_dbus" != "xno"
then

Alexandre Julliard
committed
WINE_PACKAGE_FLAGS(DBUS,[dbus-1],,,,
[AC_CHECK_HEADER([dbus/dbus.h],
[WINE_CHECK_SONAME(dbus-1, dbus_connection_close,,[DBUS_CFLAGS=""],[$DBUS_LIBS])],
[DBUS_CFLAGS=""])])
fi
WINE_NOTICE_WITH(dbus,[test "x$ac_cv_lib_soname_dbus_1" = "x" -a \
"x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"],
[libdbus ${notice_platform}development files not found, no dynamic device support.])
dnl **** Check for libhal ****
if test "x$with_hal" != "xno" -a "x$ac_cv_lib_soname_dbus_1" != x

Alexandre Julliard
committed
WINE_PACKAGE_FLAGS(HAL,[hal],[-ldbus-1],,,
[AC_CHECK_HEADER([hal/libhal.h],
[WINE_CHECK_SONAME(hal, libhal_ctx_new,,[HAL_CFLAGS=""],[$HAL_LIBS])],
[HAL_CFLAGS=""])])
WINE_NOTICE_WITH(hal,[test "x$ac_cv_lib_soname_hal" = "x" -a \
"x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"],
[libhal ${notice_platform}development files not found, no legacy dynamic device support.])
dnl **** Check for libgnutls ****
if test "x$with_gnutls" != "xno"

Alexandre Julliard
committed
WINE_PACKAGE_FLAGS(GNUTLS,[gnutls],,,,
[AC_CHECK_HEADER(gnutls/gnutls.h,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>
Alexandre Rostovtsev
committed
#include <gnutls/crypto.h>]], [[static typeof(gnutls_mac_get_key_size) *func; if (func) return 0;]])],
[WINE_CHECK_SONAME(gnutls,gnutls_global_init,,[GNUTLS_CFLAGS=""],[$GNUTLS_LIBS],[[libgnutls\\(-deb0\\)\\{0,1\\}]])
WINE_CHECK_LIB_FUNCS(gnutls_cipher_init,[$GNUTLS_LIBS],,
[WINE_NOTICE([libgnutls ${notice_platform}development files too old, bcrypt encryption won't be supported.])])])],

Alexandre Julliard
committed
[GNUTLS_CFLAGS=""])])
WINE_WARNING_WITH(gnutls,[test "x$ac_cv_lib_soname_gnutls" = "x"],

Alexandre Julliard
committed
[libgnutls ${notice_platform}development files not found, no schannel support.])
dnl **** Check which curses lib to use ***

Alexandre Julliard
committed
CURSES_LIBS=""
if test "$ac_cv_header_ncurses_h" = "yes"
WINE_CHECK_SONAME(ncurses,waddch,[CURSES_LIBS="-lncurses"],,,[[libncursesw\\{0,1\\}]])
elif test "$ac_cv_header_curses_h" = "yes"
then

Alexandre Julliard
committed
WINE_CHECK_SONAME(curses,waddch,[CURSES_LIBS="-lcurses"])
fi
ac_save_LIBS="$LIBS"

Alexandre Julliard
committed
LIBS="$LIBS $CURSES_LIBS"
AC_CHECK_FUNCS(mousemask)
LIBS="$ac_save_LIBS"
WINE_NOTICE_WITH(curses,[test "x$ac_cv_lib_soname_curses$ac_cv_lib_soname_ncurses" = "x"],

Alexandre Julliard
committed
[lib(n)curses ${notice_platform}development files not found, curses won't be supported.])
Francois Gouget
committed
if test "x$with_sane" != "xno"
WINE_PACKAGE_FLAGS(SANE,[libsane],,[`${SANE_CONFIG:-sane-config} --cflags 2>/dev/null`],[`${SANE_CONFIG:-sane-config} --ldflags 2>/dev/null`],

Alexandre Julliard
committed
[AC_CHECK_HEADER(sane/sane.h,
[WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])],
[SANE_CFLAGS=""])])
WINE_NOTICE_WITH(sane,[test "x$ac_cv_lib_soname_sane" = "x"],

Alexandre Julliard
committed
[libsane ${notice_platform}development files not found, scanners won't be supported.])
dnl **** Check for libv4l2 ****
if test "x$with_v4l2" != "xno"
WINE_NOTICE_WITH(v4l2,[test "x$ac_cv_lib_soname_v4l2" = "x"],
[libv4l2 ${notice_platform}development files not found.])
Marcus Meissner
committed
dnl **** Check for libgphoto2 ****
Francois Gouget
committed
if test "x$with_gphoto" != "xno"
Marcus Meissner
committed
then
WINE_PACKAGE_FLAGS(GPHOTO2,[libgphoto2],[-lgphoto2],
[`${GPHOTO2_CONFIG:-gphoto2-config} --cflags 2>/dev/null`],[`${GPHOTO2_CONFIG:-gphoto2-config} --libs 2>/dev/null`],

Alexandre Julliard
committed
[AC_CHECK_HEADER(gphoto2-camera.h,
[AC_CHECK_LIB(gphoto2,gp_camera_new,
[AC_DEFINE(HAVE_GPHOTO2, 1, [Define if we have the libgphoto2 development environment])],
[GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""],
[$GPHOTO2_LIBS])],
[GPHOTO2_LIBS=""; GPHOTO2_CFLAGS=""])])
WINE_PACKAGE_FLAGS(GPHOTO2_PORT,[libgphoto2_port],[-lgphoto2_port],
[`${GPHOTO2_PORT_CONFIG:-gphoto2-port-config} --cflags 2>/dev/null`],
[`${GPHOTO2_PORT_CONFIG:-gphoto2-port-config} --libs 2>/dev/null`],

Alexandre Julliard
committed
[AC_CHECK_HEADER(gphoto2-port.h,
[AC_CHECK_LIB(gphoto2_port,gp_port_info_list_new,
[AC_DEFINE(HAVE_GPHOTO2_PORT, 1, [Define if we have the libgphoto2_port development environment])],
[GPHOTO2_PORT_LIBS=""; GPHOTO2_PORT_CFLAGS=""],
[$GPHOTO2_PORT_LIBS])],
[GPHOTO2_PORT_LIBS=""; GPHOTO2_PORT_CFLAGS=""])])
Marcus Meissner
committed
fi
WINE_NOTICE_WITH(gphoto,[test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"],

Alexandre Julliard
committed
[libgphoto2 ${notice_platform}development files not found, digital cameras won't be supported.])
WINE_NOTICE_WITH(gphoto,[test "$ac_cv_lib_gphoto2_port_gp_port_info_list_new" != "yes"],
[libgphoto2_port ${notice_platform}development files not found, digital cameras won't be auto-detected.])

Alexandre Julliard
committed
Marcus Meissner
committed
dnl **** Check for resolver library ***
if test "$ac_cv_header_resolv_h" = "yes"
then
AC_CACHE_CHECK([for resolver library], ac_cv_have_resolv,
[ac_save_LIBS="$LIBS"
for lib in '' -lresolv
do
LIBS="$lib $ac_save_LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <resolv.h>]],[[if (!(_res.options & RES_INIT)) res_init(); res_query("foo",ns_c_in,0,0,0)]])],
[ac_cv_have_resolv=${lib:-"none required"}],[ac_cv_have_resolv="not found"])
test "x$ac_cv_have_resolv" = "xnot found" || break
done
LIBS="$ac_save_LIBS"])
case "$ac_cv_have_resolv" in
"not found") ;;
"none required")
AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header]) ;;
*)
AC_DEFINE(HAVE_RESOLV, 1)
AC_SUBST(RESOLV_LIBS,$ac_cv_have_resolv) ;;
esac
fi

Alexandre Julliard
committed
WINE_PACKAGE_FLAGS(LCMS2,[lcms2],[-llcms2],,,
[AC_CHECK_HEADERS([lcms2.h])
if test "$ac_cv_header_lcms2_h" = "yes"
then
AC_CHECK_LIB(lcms2, cmsOpenProfileFromFile,
[AC_DEFINE(HAVE_LCMS2, 1, [Define if you have the LittleCMS development environment])],[LCMS2_LIBS=""],[$LCMS2_LIBS])

Alexandre Julliard
committed
else
LCMS2_CFLAGS=""
LCMS2_LIBS=""
fi])
WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"],
[liblcms2 ${notice_platform}development files not found, Color Management won't be supported.])
Francois Gouget
committed
if test "x$with_freetype" != "xno"
WINE_PACKAGE_FLAGS(FREETYPE,[freetype2],[-lfreetype],
[`(${FREETYPE_CONFIG:-freetype-config} --cflags || ${FREETYPE2_CONFIG:-freetype2-config} --cflags) 2>/dev/null`],
[`(${FREETYPE_CONFIG:-freetype-config} --libs || ${FREETYPE2_CONFIG:-freetype2-config} --libs) 2>/dev/null`],

Alexandre Julliard
committed
[AC_CHECK_HEADERS([ft2build.h])
if test "$ac_cv_header_ft2build_h" = "yes"

Alexandre Julliard
committed
then

Alexandre Julliard
committed
WINE_CHECK_SONAME(freetype,FT_Init_FreeType,
[AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
AC_CHECK_TYPES(FT_TrueTypeEngineType,,,[#include <ft2build.h>
#include FT_MODULE_H])],
[FREETYPE_LIBS=""],[$FREETYPE_LIBS])

Alexandre Julliard
committed
FREETYPE_CFLAGS=""
FREETYPE_LIBS=""

Alexandre Julliard
committed
fi])

Alexandre Julliard
committed
WINE_ERROR_WITH(freetype,[test "x$ac_cv_lib_soname_freetype" = x],

Alexandre Julliard
committed
[FreeType ${notice_platform}development files not found. Fonts will not be built.],
[enable_fonts])
dnl **** Check for parport (currently Linux only) ****
AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#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
AC_DEFINE(HAVE_PPDEV, 1, [Define if we can use ppdev.h for parallel port access])
dnl **** Check for pthread functions ****
WINE_CHECK_LIB_FUNCS(\

Alexandre Julliard
committed
[$PTHREAD_LIBS])
dnl **** Check for zlib ****
if test "x$with_zlib" != "xno"
WINE_PACKAGE_FLAGS(Z,[libz],[-lz],,,
[AC_CHECK_HEADERS(zlib.h,
[AC_CHECK_LIB(z,inflate,
[AC_DEFINE(HAVE_ZLIB,1,[Define to 1 if you have the `z' library (-lz).])],
[Z_LIBS=""],[$Z_LIBS])],
[Z_LIBS=""])])

Alexandre Julliard
committed
WINE_NOTICE_WITH(zlib,[test "x$Z_LIBS" = "x"],[libz ${notice_platform}development files not found, data compression won't be supported.])
dnl **** Check for gettextpo ****
if test "x$enable_tools" != xno -a "x$with_gettextpo" = xyes
then
if test "$ac_cv_header_gettext_po_h" = "yes"
then
AC_CHECK_LIB(gettextpo,po_message_msgctxt,
[AC_DEFINE(HAVE_LIBGETTEXTPO,1,[Define to 1 if you have the `gettextpo' library (-lgettextpo).])

Alexandre Julliard
committed
AC_SUBST(GETTEXTPO_LIBS,"-lgettextpo")])
WINE_NOTICE_WITH(gettextpo,[test "x$GETTEXTPO_LIBS" = "x"],
[GetText ${notice_platform}development files not found (or too old), po files can't be rebuilt.])
WINE_NOTICE_WITH(gettextpo,[test "$srcdir" != .],
[Rebuilding po files is not supported for out of tree builds.])
dnl **** Check for PulseAudio ****
if test "x$with_pulse" != "xno";
then
WINE_PACKAGE_FLAGS(PULSE,[libpulse],,,,
[AC_CHECK_HEADERS(pulse/pulseaudio.h,

Alexandre Julliard
committed
[AC_CHECK_LIB(pulse, pa_stream_is_corked,[:],[PULSE_LIBS=""],[$PULSE_LIBS])],
[PULSE_LIBS=""])])

Alexandre Julliard
committed
WINE_NOTICE_WITH(pulse, [test -z "$PULSE_LIBS"],

Alexandre Julliard
committed
[libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.],
[enable_winepulse_drv])
dnl **** Check for gstreamer ****
if test "x$with_gstreamer" != "xno"
then
WINE_PACKAGE_FLAGS(GSTREAMER,[gstreamer-1.0 gstreamer-video-1.0 gstreamer-audio-1.0],,,,

Alexandre Julliard
committed
[ac_gst_incl=""
for i in $GSTREAMER_CFLAGS
do
case "$i" in
-I*) ac_gst_incl="$ac_gst_incl $i";;
esac
done
GSTREAMER_CFLAGS=$ac_gst_incl
CPPFLAGS="$ac_save_CPPFLAGS $GSTREAMER_CFLAGS"
AC_CHECK_HEADER([gst/gst.h],
[AC_MSG_CHECKING([whether gint64 defined by gst/gst.h is indeed 64-bit])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gst/gst.h>]],
[[static int a[sizeof(gint64) > 4 ? 1 : -1]; if (a[0]) return 0;]])],
[AC_MSG_RESULT([yes])
AC_CHECK_LIB(gstreamer-1.0,gst_pad_new,[:],,[$GSTREAMER_LIBS])],
[AC_MSG_RESULT([no])
ac_glib2_broken=yes
WINE_NOTICE([glib-2.0 pkgconfig configuration is for the wrong architecture, winegstreamer won't be built.])])])])
WINE_NOTICE_WITH(gstreamer,[test "x$ac_glib2_broken" != xyes -a "x$ac_cv_lib_gstreamer_1_0_gst_pad_new" != xyes -a "x$ac_cv_header_QuickTime_ImageCompression_h" != xyes ],
[gstreamer-1.0 base plugins ${notice_platform}development files not found, GStreamer won't be supported.])
test "x$ac_cv_lib_gstreamer_1_0_gst_pad_new" = xyes || enable_winegstreamer=${enable_winegstreamer:-no}

Alexandre Julliard
committed
AC_SUBST(ALSA_LIBS,"")
if test "x$with_alsa" != "xno"
Austin English
committed
AC_CHECK_LIB(asound,snd_pcm_hw_params_get_access_mask,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alsa/asoundlib.h>]], [[snd_pcm_hw_params_get_access_mask(NULL, NULL)]])],

Alexandre Julliard
committed
[ALSA_LIBS="-lasound"])])
test -n "$ALSA_LIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no}
if test "x$with_oss" != xno
ac_save_CPPFLAGS="$CPPFLAGS"
if test -f /etc/oss.conf
then
. /etc/oss.conf
fi
ac_oss_incl="-I${OSSLIBDIR:-/usr/lib/oss}/include"
CPPFLAGS="$CPPFLAGS $ac_oss_incl"
AC_CHECK_HEADER([sys/soundcard.h],
[AC_CHECK_MEMBERS([oss_sysinfo.numaudioengines],
[AC_SUBST(OSS4_CFLAGS,"$ac_oss_incl")
AC_CHECK_LIB(ossaudio,_oss_ioctl,
[AC_SUBST(OSS4_LIBS,"-lossaudio")])],,
[#include <sys/soundcard.h>])])
CPPFLAGS="$ac_save_CPPFLAGS"

Alexandre Julliard
committed
WINE_NOTICE_WITH(oss,[test "x$ac_cv_member_oss_sysinfo_numaudioengines" != xyes],
[OSS sound system found but too old (OSSv4 needed), OSS won't be supported.],
[enable_wineoss_drv])
dnl **** Check for libudev ****
if test "x$with_udev" != "xno"
then
WINE_PACKAGE_FLAGS(UDEV,[libudev],[-ludev],,,
[AC_CHECK_HEADERS(libudev.h,
[AC_CHECK_LIB(udev,udev_new,
AC_DEFINE(HAVE_UDEV,1,[Define to 1 if you have the `udev' library (-ludev).]),
[UDEV_LIBS=""],[$UDEV_LIBS])],
[UDEV_LIBS=""])])
fi
WINE_NOTICE_WITH(udev,[test "x$UDEV_LIBS" = "x"],
[libudev ${notice_platform}development files not found, plug and play won't be supported.])
dnl **** Check for libuwind ****
if test "x$with_unwind" != xno
then
WINE_PACKAGE_FLAGS(UNWIND,[libunwind],[-lunwind],,,
[AC_CACHE_CHECK([for unw_step],wine_cv_have_unw_step,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define UNW_LOCAL_ONLY
#include <libunwind.h>]],
[[unw_cursor_t cursor; unw_step( &cursor );]])],
[wine_cv_have_unw_step="yes"],[wine_cv_have_unw_step="no"])])
if test "$wine_cv_have_unw_step" = no -a -n "$UNWIND_LIBS"
then
save_libs=$LIBS
LIBS="$UNWIND_LIBS $LIBS"
AC_CACHE_CHECK([for unw_step in libunwind],wine_cv_have_libunwind_unw_step,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define UNW_LOCAL_ONLY
#include <libunwind.h>]],
[[unw_cursor_t cursor; unw_step( &cursor );]])],
[wine_cv_have_libunwind_unw_step="yes"],
[wine_cv_have_libunwind_unw_step="no"])])
LIBS=$save_libs
fi
test "$wine_cv_have_libunwind_unw_step" = yes || UNWIND_LIBS=""
if test "x$wine_cv_have_unw_step$wine_cv_have_libunwind_unw_step" != xnono
then
AC_DEFINE(HAVE_LIBUNWIND,1,[Define to 1 if you have the `unwind' library (-lunwind).])
fi])
fi
case $host in
aarch64*|*-darwin*)
WINE_NOTICE_WITH(unwind,[test "x$wine_cv_have_unw_step$wine_cv_have_libunwind_unw_step" != xnono],
[libunwind ${notice_platform}development files not found, stack unwinding won't work.]) ;;
esac
dnl **** Check for libSDL2 ****
if test "x$with_sdl" != "xno"
then
WINE_PACKAGE_FLAGS(SDL2,[sdl2],[-lSDL2],,,
[AC_CHECK_HEADERS([SDL2/SDL.h],
[WINE_CHECK_SONAME(SDL2,SDL_Init,,,[$SDL2_LIBS],[[libSDL2-2.0*]])])])
WINE_NOTICE_WITH(sdl,[test "x$ac_cv_lib_soname_SDL2" = "x"],
[libSDL2 ${notice_platform}development files not found, SDL2 won't be supported.])
dnl **** Check for FAudio ****
if test "x$with_faudio" != "xno"
then
WINE_PACKAGE_FLAGS(FAUDIO,[faudio],[-lFAudio],,,
[AC_CHECK_HEADERS([FAudio.h],
[WINE_CHECK_SONAME(FAudio,FAudioCreate,,,[$FAUDIO_LIBS],[[libFAudio*]])])
WINE_CHECK_LIB_FUNCS([FAudio_CommitOperationSet \
F3DAudioInitialize8], [$FAUDIO_LIBS])
])
fi
WINE_NOTICE_WITH(faudio,[test "x$ac_cv_lib_soname_FAudio" = "x"],
[libFAudio ${notice_platform}development files not found, XAudio2 won't be supported.])
dnl **** Check for capi4linux ****
if test "x$with_capi" != "xno"
then
WINE_PACKAGE_FLAGS(CAPI20,[capi20],,,,
dnl Check for broken kernel header that doesn't define __user
[AC_CHECK_HEADERS([capi20.h linux/capi.h],,,[#define __user])
if test "$ac_cv_header_capi20_h" = "yes" -a "$ac_cv_header_linux_capi_h" = "yes"
then
WINE_CHECK_SONAME(capi20,capi20_register,,,[$CAPI20_LIBS])
fi])
fi
WINE_NOTICE_WITH(capi,[test "x$ac_cv_lib_soname_capi20" = "x"],

Alexandre Julliard
committed
[libcapi20 ${notice_platform}development files not found, ISDN won't be supported.])
dnl **** Check for cups ****
if test "x$with_cups" != "xno"
then
WINE_PACKAGE_FLAGS(CUPS,[cups],[-lcups],
[`${CUPS_CONFIG:-cups-config} --cflags 2>/dev/null`],
[`${CUPS_CONFIG:-cups-config} --libs 2>/dev/null`],
[AC_CHECK_HEADERS(cups/cups.h cups/ppd.h)
if test "$ac_cv_header_cups_cups_h" = "yes"
then
WINE_CHECK_SONAME(cups,cupsGetDefault,,[CUPS_LIBS=""],[$CUPS_LIBS])
else
CUPS_CFLAGS=""
CUPS_LIBS=""
fi])
fi
WINE_NOTICE_WITH(cups,[test "x$ac_cv_lib_soname_cups" = "x"],

Alexandre Julliard
committed
[libcups ${notice_platform}development files not found, CUPS won't be supported.])

Alexandre Julliard
committed
dnl **** Check for fontconfig ****
if test "x$with_fontconfig" != "xno"

Alexandre Julliard
committed
then
WINE_PACKAGE_FLAGS(FONTCONFIG,[fontconfig],,[$X_CFLAGS],[$X_LIBS],
[AC_CHECK_HEADERS([fontconfig/fontconfig.h])
if test "$ac_cv_header_fontconfig_fontconfig_h" = "yes"
then
WINE_CHECK_SONAME(fontconfig,FcInit,,[FONTCONFIG_CFLAGS=""],[$FONTCONFIG_LIBS])
else
FONTCONFIG_CFLAGS=""
fi])

Alexandre Julliard
committed
fi
WINE_NOTICE_WITH(fontconfig,[test "x$ac_cv_lib_soname_fontconfig" = "x"],

Alexandre Julliard
committed
[fontconfig ${notice_platform}development files not found, fontconfig won't be supported.])

Alexandre Julliard
committed
dnl **** Check for gsm codec ****
if test "$ac_cv_header_gsm_h" = "yes" -o "$ac_cv_header_gsm_gsm_h" = "yes"
then
WINE_CHECK_SONAME(gsm,gsm_create)
fi

Alexandre Julliard
committed
WINE_NOTICE_WITH(gsm,[test "x$ac_cv_lib_soname_gsm" = "x"],
[libgsm ${notice_platform}development files not found, gsm 06.10 codec won't be supported.])
dnl **** Check for krb5 ****
if test "x$with_krb5" != "xno"
then
WINE_PACKAGE_FLAGS(KRB5,[krb5],,
[`${KRB5_CONFIG:-krb5-config} --cflags 2>/dev/null`],
[`${KRB5_CONFIG:-krb5-config} --libs 2>/dev/null`],
[AC_CHECK_HEADERS([krb5/krb5.h])
if test "$ac_cv_header_krb5_krb5_h" = "yes"
then
WINE_CHECK_SONAME(krb5,krb5_is_config_principal,,[KRB5_CFLAGS=""],[$KRB5_LIBS])
else
KRB5_CFLAGS=""
fi])
else
with_gssapi=${with_gssapi:-no}
fi
WINE_NOTICE_WITH(krb5,[test "x$ac_cv_lib_soname_krb5" = "x"],
[libkrb5 ${notice_platform}development files not found (or too old), Kerberos won't be supported.])
dnl **** Check for gssapi ****
if test "x$with_gssapi" != "xno"
then
WINE_PACKAGE_FLAGS(GSSAPI,[krb5-gssapi],,
[`${KRB5_CONFIG:-krb5-config} --cflags gssapi 2>/dev/null`],
[`${KRB5_CONFIG:-krb5-config} --libs gssapi 2>/dev/null`],
[AC_CHECK_HEADERS([gssapi/gssapi.h gssapi/gssapi_ext.h])
if test "$ac_cv_header_gssapi_gssapi_h" = "yes" -a "$ac_cv_header_gssapi_gssapi_ext_h" = "yes"
then
WINE_CHECK_SONAME(gssapi_krb5, gss_init_sec_context,,[GSSAPI_CFLAGS=""],[$GSSAPI_LIBS])
else
GSSAPI_CFLAGS=""
fi])
fi
WINE_NOTICE_WITH(gssapi,[test "x$ac_cv_lib_soname_gssapi_krb5" = "x"],
[libgssapi_krb5 ${notice_platform}development files not found (or too old), no Kerberos SSP support.])
dnl **** Check for libjpeg ****
if test "x$with_jpeg" != "xno"
then
WINE_PACKAGE_FLAGS(JPEG,[libjpeg],,,,
[AC_CHECK_HEADERS([jpeglib.h])
if test "$ac_cv_header_jpeglib_h" = "yes"
then
WINE_CHECK_SONAME(jpeg,jpeg_start_decompress,,[JPEG_CFLAGS=""],[$JPEG_LIBS])
else
JPEG_CFLAGS=""
fi])
fi
WINE_WARNING_WITH(jpeg,[test "x$ac_cv_lib_soname_jpeg" = "x"],

Alexandre Julliard
committed
[libjpeg ${notice_platform}development files not found, JPEG won't be supported.])
dnl **** Check for libpng ****
if test "x$with_png" != "xno"

Alexandre Julliard
committed
WINE_PACKAGE_FLAGS(PNG,[libpng],,[$X_CFLAGS],[$X_LIBS],
[AC_CHECK_HEADERS([png.h])
if test "$ac_cv_header_png_h" = "yes"
then
WINE_CHECK_SONAME(png,png_create_read_struct,,

Alexandre Julliard
committed
[PNG_CFLAGS=""],[$PNG_LIBS -lm -lz],[[libpng[[0-9]]*]])
else
PNG_CFLAGS=""
fi])
WINE_WARNING_WITH(png,[test "x$ac_cv_lib_soname_png" = "x"],

Alexandre Julliard
committed
[libpng ${notice_platform}development files not found, PNG won't be supported.])
if test "x$with_tiff" != "xno"
WINE_PACKAGE_FLAGS(TIFF,[libtiff-4],,,,
[AC_CHECK_HEADERS([tiffio.h])
if test "$ac_cv_header_tiffio_h" = "yes"
then
WINE_CHECK_SONAME(tiff,TIFFClientOpen,,,[$TIFF_LIBS])
fi])
fi
WINE_NOTICE_WITH(tiff,[test "x$ac_cv_lib_soname_tiff" = "x"],
[libtiff ${notice_platform}development files not found, TIFF won't be supported.])
dnl **** Check for mpg123 ****
if test "x$with_mpg123" != "xno"
WINE_PACKAGE_FLAGS(MPG123,[libmpg123],[-lmpg123],,,
[AC_CHECK_HEADERS([mpg123.h])
if test "$ac_cv_header_mpg123_h" = "yes"
then
AC_CHECK_LIB(mpg123,mpg123_feed,[:],[MPG123_LIBS=""],[$MPG123_LIBS])
else
MPG123_CFLAGS=""
MPG123_LIBS=""
fi])
WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_cv_header_CoreAudio_CoreAudio_h" != xyes],

Alexandre Julliard
committed
[libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported.],
test "x$ac_cv_lib_mpg123_mpg123_feed" = xyes || enable_mp3dmod=${enable_mp3dmod:-no}
dnl **** Check for OpenAL 1.1 ****
if test "$ac_cv_header_AL_al_h" = "yes"
then

Alexandre Julliard
committed
WINE_CHECK_SONAME(openal,alGetSource3i,[AC_SUBST(OPENAL_LIBS,"-lopenal")
ac_cv_lib_openal=yes
AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])],,)
WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal" != xyes],
[libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported.],

Alexandre Julliard
committed
[enable_openal32])
enable_x3daudio1_0=${enable_x3daudio1_0:-no}
enable_x3daudio1_1=${enable_x3daudio1_1:-no}
enable_x3daudio1_2=${enable_x3daudio1_2:-no}
enable_x3daudio1_3=${enable_x3daudio1_3:-no}
enable_x3daudio1_4=${enable_x3daudio1_4:-no}
enable_x3daudio1_5=${enable_x3daudio1_5:-no}
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
enable_xaudio2_7=${enable_xaudio2_7:-no}
dnl **** Check for libkstat ****
if test "$ac_cv_header_kstat_h" = "yes"
then
AC_CHECK_LIB(kstat,kstat_open,
[AC_DEFINE(HAVE_LIBKSTAT, 1, [Define to 1 if you have the `kstat' library (-lkstat).])

Alexandre Julliard
committed
AC_SUBST(KSTAT_LIBS,"-lkstat")])
dnl **** Check for libprocstat ****
if test "$ac_cv_header_libprocstat_h" = "yes"
then
AC_CHECK_LIB(procstat,procstat_open_sysctl,
[AC_DEFINE(HAVE_LIBPROCSTAT, 1, [Define to 1 if you have the `procstat' library (-lprocstat).])

Alexandre Julliard
committed
AC_SUBST(PROCSTAT_LIBS,"-lprocstat")])
dnl **** Check for libodbc ****
WINE_CHECK_SONAME(odbc,SQLConnect,,[AC_DEFINE_UNQUOTED(SONAME_LIBODBC,["libodbc.$LIBEXT"])])
dnl **** Check for libnetapi ****
if test "x$with_netapi" != "xno"
then
WINE_PACKAGE_FLAGS(NETAPI,[netapi],,,,
[WINE_CHECK_SONAME(netapi,libnetapi_init,,[AC_DEFINE_UNQUOTED(SONAME_LIBNETAPI,["libnetapi.$LIBEXT"])],[$NETAPI_LIBS])])
fi

Alexandre Julliard
committed
dnl **** Check for any sound system ****
if test "x$enable_winealsa_drv$enable_winecoreaudio_drv$enable_winepulse_drv$enable_wineoss_drv$enable_wineandroid_drv" = xnonononono -a \
"x$with_alsa$with_coreaudio$with_oss$with_pulse" != xnononono
then
WINE_WARNING([No sound system was found. Windows applications will be silent.])
fi

Alexandre Julliard
committed
dnl *** Check for Vulkan ***
if test "x$with_vulkan" != "xno"
then
WINE_CHECK_SONAME(vulkan, vkGetInstanceProcAddr)
if test "x$ac_cv_lib_soname_vulkan" = "x"
then
WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr)
fi
WINE_NOTICE_WITH(vulkan,[test "x$ac_cv_lib_soname_vulkan" = "x" -a "x$ac_cv_lib_soname_MoltenVK" = "x"],
[libvulkan and libMoltenVK ${notice_platform}development files not found, Vulkan won't be supported.])
dnl **** Check for vkd3d ****
if test "x$with_vkd3d" != "xno"
then
WINE_PACKAGE_FLAGS(VKD3D,[libvkd3d],,,,
[WINE_CHECK_SONAME(vkd3d,vkd3d_get_dxgi_format,,,[$VKD3D_LIBS])])
fi
WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
[vkd3d ${notice_platform}development files not found (or too old), Direct3D 12 won't be supported.])
test "x$ac_cv_lib_soname_vkd3d" != "x" || enable_d3d12=${enable_d3d12:-no}
dnl **** Check for gcc specific options ****
AC_SUBST(EXTRACFLAGS,"")
EXTRACFLAGS="-Wall -pipe"