Commit 850df9d5 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Support setting the corresponding enable variable directly from the…

configure: Support setting the corresponding enable variable directly from the WINE_NOTICE_WITH macros. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f7a239a5
...@@ -676,9 +676,10 @@ m4_ifval([$2],[test "x$[$2]" = xno || ])wine_fn_append_file CONFIGURE_TARGETS $1 ...@@ -676,9 +676,10 @@ m4_ifval([$2],[test "x$[$2]" = xno || ])wine_fn_append_file CONFIGURE_TARGETS $1
dnl **** Add a message to the list displayed at the end **** dnl **** Add a message to the list displayed at the end ****
dnl dnl
dnl Usage: WINE_NOTICE(notice) dnl Usage: WINE_NOTICE(notice)
dnl Usage: WINE_NOTICE_WITH(with_flag, test, notice)
dnl Usage: WINE_WARNING(warning) dnl Usage: WINE_WARNING(warning)
dnl Usage: WINE_WARNING_WITH(with_flag, test, warning) dnl Usage: WINE_NOTICE_WITH(with_flag, test, notice, enable)
dnl Usage: WINE_WARNING_WITH(with_flag, test, warning, enable)
dnl Usage: WINE_ERROR_WITH(with_flag, test, error, enable)
dnl Usage: WINE_PRINT_MESSAGES dnl Usage: WINE_PRINT_MESSAGES
dnl dnl
AC_DEFUN([WINE_NOTICE],[AS_VAR_APPEND([wine_notices],["|$1"])]) AC_DEFUN([WINE_NOTICE],[AS_VAR_APPEND([wine_notices],["|$1"])])
...@@ -689,20 +690,23 @@ AC_DEFUN([WINE_NOTICE_WITH],[AS_IF([$2],[case "x$with_$1" in ...@@ -689,20 +690,23 @@ AC_DEFUN([WINE_NOTICE_WITH],[AS_IF([$2],[case "x$with_$1" in
xno) ;; xno) ;;
*) AC_MSG_ERROR([$3 *) AC_MSG_ERROR([$3
This is an error since --with-$1 was requested.]) ;; This is an error since --with-$1 was requested.]) ;;
esac])]) esac
m4_ifval([$4],[$4=${$4:-no}])])])
AC_DEFUN([WINE_WARNING_WITH],[AS_IF([$2],[case "x$with_$1" in AC_DEFUN([WINE_WARNING_WITH],[AS_IF([$2],[case "x$with_$1" in
x) WINE_WARNING([$3]) ;; x) WINE_WARNING([$3]) ;;
xno) ;; xno) ;;
*) AC_MSG_ERROR([$3 *) AC_MSG_ERROR([$3
This is an error since --with-$1 was requested.]) ;; This is an error since --with-$1 was requested.]) ;;
esac])]) esac
m4_ifval([$4],[$4=${$4:-no}])])])
AC_DEFUN([WINE_ERROR_WITH],[AS_IF([$2],[case "x$with_$1" in AC_DEFUN([WINE_ERROR_WITH],[AS_IF([$2],[case "x$with_$1" in
xno) ;; xno) ;;
*) AC_MSG_ERROR([$3 *) AC_MSG_ERROR([$3
Use the --without-$1 option if you really want this.]) ;; Use the --without-$1 option if you really want this.]) ;;
esac])]) esac
m4_ifval([$4],[$4=${$4:-no}])])])
AC_DEFUN([WINE_PRINT_MESSAGES],[ac_save_IFS="$IFS" AC_DEFUN([WINE_PRINT_MESSAGES],[ac_save_IFS="$IFS"
if test "x$wine_notices" != x; then if test "x$wine_notices" != x; then
......
...@@ -361,8 +361,8 @@ EOF ...@@ -361,8 +361,8 @@ EOF
fi fi
fi fi
WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false], WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false],
[gettext tools not found (or too old), translations won't be built.]) [gettext tools not found (or too old), translations won't be built.],
test "$MSGFMT" = false && enable_po=${enable_po:-no} [enable_po])
dnl **** Check for some libraries **** dnl **** Check for some libraries ****
...@@ -1154,11 +1154,11 @@ OpenGL and Direct3D won't be supported.]) ...@@ -1154,11 +1154,11 @@ OpenGL and Direct3D won't be supported.])
else else
X_CFLAGS="" X_CFLAGS=""
X_LIBS="" X_LIBS=""
enable_winex11_drv=${enable_winex11_drv:-no}
fi fi
WINE_ERROR_WITH(x,[test "x$X_LIBS" = "x"],[X ${notice_platform}development files not found. Wine will be built WINE_ERROR_WITH(x,[test "x$X_LIBS" = "x"],[X ${notice_platform}development files not found. Wine will be built
without X support, which probably isn't what you want. You will need without X support, which probably isn't what you want. You will need
to install ${notice_platform}development packages of Xlib/Xfree86 at the very least.]) to install ${notice_platform}development packages of Xlib/Xfree86 at the very least.],
[enable_winex11_drv])
test "x$ac_cv_lib_GLU_gluLookAt" != xyes && enable_glu32=${enable_glu32:-no} test "x$ac_cv_lib_GLU_gluLookAt" != xyes && enable_glu32=${enable_glu32:-no}
...@@ -1168,8 +1168,8 @@ then ...@@ -1168,8 +1168,8 @@ then
AC_CHECK_LIB(OpenCL,clGetPlatformInfo,[AC_SUBST(OPENCL_LIBS,["-lOpenCL"])]) AC_CHECK_LIB(OpenCL,clGetPlatformInfo,[AC_SUBST(OPENCL_LIBS,["-lOpenCL"])])
fi fi
WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes], WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes],
[OpenCL ${notice_platform}development files not found, OpenCL won't be supported.]) [OpenCL ${notice_platform}development files not found, OpenCL won't be supported.],
test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_opencl:-no} [enable_opencl])
dnl **** Check for libpcap **** dnl **** Check for libpcap ****
if test "$ac_cv_header_pcap_pcap_h" = "yes" if test "$ac_cv_header_pcap_pcap_h" = "yes"
...@@ -1177,8 +1177,8 @@ then ...@@ -1177,8 +1177,8 @@ then
AC_CHECK_LIB(pcap,pcap_create,[AC_SUBST(PCAP_LIBS,["-lpcap"])]) AC_CHECK_LIB(pcap,pcap_create,[AC_SUBST(PCAP_LIBS,["-lpcap"])])
fi fi
WINE_NOTICE_WITH(pcap,[test "x$ac_cv_lib_pcap_pcap_create" != xyes], WINE_NOTICE_WITH(pcap,[test "x$ac_cv_lib_pcap_pcap_create" != xyes],
[pcap ${notice_platform}development files not found, wpcap won't be supported.]) [pcap ${notice_platform}development files not found, wpcap won't be supported.],
test "x$ac_cv_lib_pcap_pcap_create" != xyes && enable_wpcap=${enable_wpcap:-no} [enable_wpcap])
dnl **** Check for libxml2 **** dnl **** Check for libxml2 ****
...@@ -1394,8 +1394,8 @@ then ...@@ -1394,8 +1394,8 @@ then
fi]) fi])
fi fi
WINE_ERROR_WITH(freetype,[test "x$ac_cv_lib_soname_freetype" = x], WINE_ERROR_WITH(freetype,[test "x$ac_cv_lib_soname_freetype" = x],
[FreeType ${notice_platform}development files not found. Fonts will not be built.]) [FreeType ${notice_platform}development files not found. Fonts will not be built.],
test "x$ac_cv_lib_soname_freetype" = x && enable_fonts=${enable_fonts:-no} [enable_fonts])
dnl **** Check for parport (currently Linux only) **** dnl **** Check for parport (currently Linux only) ****
AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev, AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
...@@ -1450,8 +1450,8 @@ then ...@@ -1450,8 +1450,8 @@ then
[PULSE_LIBS=""])]) [PULSE_LIBS=""])])
fi fi
WINE_NOTICE_WITH(pulse, [test -z "$PULSE_LIBS"], WINE_NOTICE_WITH(pulse, [test -z "$PULSE_LIBS"],
[libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.]) [libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.],
test -n "$PULSE_LIBS" || enable_winepulse_drv=${enable_winepulse_drv:-no} [enable_winepulse_drv])
dnl **** Check for gstreamer **** dnl **** Check for gstreamer ****
if test "x$with_gstreamer" != "xno" if test "x$with_gstreamer" != "xno"
...@@ -1509,12 +1509,10 @@ then ...@@ -1509,12 +1509,10 @@ then
[AC_SUBST(OSS4_CFLAGS,"$ac_oss_incl")],, [AC_SUBST(OSS4_CFLAGS,"$ac_oss_incl")],,
[#include <sys/soundcard.h>])]) [#include <sys/soundcard.h>])])
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS="$ac_save_CPPFLAGS"
if test "x$ac_cv_member_oss_sysinfo_numaudioengines" != xyes
then
WINE_NOTICE([OSS sound system found but too old (OSSv4 needed), OSS won't be supported.])
fi
fi fi
test "x$ac_cv_member_oss_sysinfo_numaudioengines" = xyes || enable_wineoss_drv=${enable_wineoss_drv:-no} 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 capi4linux **** dnl **** Check for capi4linux ****
if test "x$with_capi" != "xno" if test "x$with_capi" != "xno"
...@@ -1630,8 +1628,8 @@ then ...@@ -1630,8 +1628,8 @@ then
fi]) fi])
fi fi
WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_cv_header_CoreAudio_CoreAudio_h" != xyes], WINE_NOTICE_WITH(mpg123,[test "x$ac_cv_lib_mpg123_mpg123_feed" != xyes -a x"$ac_cv_header_CoreAudio_CoreAudio_h" != xyes],
[libmpg123 ${notice_platform}development files not found (or too old), mp3 codec won't be supported.]) [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 -o "x$ac_cv_header_AudioToolbox_AudioConverter_h" = xyes || enable_winemp3_acm=${enable_winemp3_acm:-no} [enable_winemp3_acm])
dnl **** Check for OpenAL 1.1 **** dnl **** Check for OpenAL 1.1 ****
if test "$ac_cv_header_AL_al_h" = "yes" if test "$ac_cv_header_AL_al_h" = "yes"
...@@ -1641,8 +1639,8 @@ then ...@@ -1641,8 +1639,8 @@ then
AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])],,) AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])],,)
fi fi
WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal" != xyes], 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]) [libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported],
test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no} [enable_openal32])
dnl **** Check for openal-soft **** dnl **** Check for openal-soft ****
if test "x$ac_cv_lib_openal" = xyes if test "x$ac_cv_lib_openal" = xyes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment