[vlc-devel] [PATCH 4/7] configure: Consistently quote AM_CONDITIONAL
Filip Roséen
filip at atch.se
Sun Jul 15 07:19:44 CEST 2018
Hi Marvin,
For starters I must say that I like all of these changes, consistancy
is key and every little step in that direction is always nice.
On 2018-07-15 01:28, Marvin Scholz wrote:
> ---
> configure.ac | 74 ++++++++++++++++++++++++++++++------------------------------
> 1 file changed, 37 insertions(+), 37 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 615774221f..d9cd471e71 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -311,19 +311,19 @@ AS_IF([test "${SYS}" = "mingw32"],[
> ])
> AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
>
> -AM_CONDITIONAL(HAVE_LINUX, test "${SYS}" = "linux")
> -AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2")
> +AM_CONDITIONAL([HAVE_LINUX], [test "${SYS}" = "linux"])
> +AM_CONDITIONAL([HAVE_OS2], [test "${SYS}" = "os2"])
>
> -AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
> -AM_CONDITIONAL(HAVE_IOS, test "${HAVE_IOS}" = "1")
> -AM_CONDITIONAL(HAVE_OSX, test "${HAVE_OSX}" = "1")
> -AM_CONDITIONAL(HAVE_TVOS, test "${HAVE_TVOS}" = "1")
> +AM_CONDITIONAL([HAVE_DARWIN], [test "${SYS}" = "darwin"])
> +AM_CONDITIONAL([HAVE_IOS], [test "${HAVE_IOS}" = "1"])
> +AM_CONDITIONAL([HAVE_OSX], [test "${HAVE_OSX}" = "1"])
> +AM_CONDITIONAL([HAVE_TVOS], [test "${HAVE_TVOS}" = "1"])
While you're changing lines like the above, one could take the
opportunity to remove the "internal indentation" between arguments.
They might look pretty (highly subjective) as of now, but as soon as
one removes a line having a long first section, or if someone adds a
line with even longer first section, it will become a mess.
If the relevant author decides to re-indent the other lines we loose
info of the true origin of a line, as well as it resulting in bigger
diffs than necessary (1 line vs `N`).
>
> -AM_CONDITIONAL(HAVE_NACL, test "${SYS}" = "nacl")
> -AM_CONDITIONAL(HAVE_LIBANL, test "${HAVE_LIBANL}" = "1")
> +AM_CONDITIONAL([HAVE_NACL], [test "${SYS}" = "nacl"])
> +AM_CONDITIONAL([HAVE_LIBANL], [test "${HAVE_LIBANL}" = "1"])
>
> -AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
> -AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1") dnl Only used for the packaging
> +AM_CONDITIONAL([HAVE_WIN32], [test "${SYS}" = "mingw32"])
> +AM_CONDITIONAL([HAVE_WIN64], [test "${HAVE_WIN64}" = "1"]) dnl Only used for the packaging
> AM_CONDITIONAL([HAVE_WINSTORE], [test "$vlc_winstore_app" = "1"])
> AM_CONDITIONAL([HAVE_WIN32_DESKTOP], [test "${SYS}" = "mingw32" -a "$vlc_winstore_app" = "0"])
This is a good example of what I wrote in my previous section.
>
> @@ -358,7 +358,7 @@ AS_IF([test "$SYS" = linux],[
> AC_MSG_RESULT([no])
> ])
> ])
> -AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1")
> +AM_CONDITIONAL([HAVE_ANDROID], [test "${HAVE_ANDROID}" = "1"])
>
> dnl Tizen (minimum SDK version: 2.3)
> AS_IF([test "$SYS" = linux],[
> @@ -374,7 +374,7 @@ AS_IF([test "$SYS" = linux],[
> AC_MSG_RESULT([no])
> ])
> ])
> -AM_CONDITIONAL(HAVE_TIZEN, test "${HAVE_TIZEN}" = "1")
> +AM_CONDITIONAL([HAVE_TIZEN], [test "${HAVE_TIZEN}" = "1"])
>
> dnl
> dnl Check for the contrib directory
> @@ -784,12 +784,12 @@ AS_VAR_IF(with_libfuzzer, no, [], [
> enable_static=yes
> enable_vlc=no
> ])
> -AM_CONDITIONAL(HAVE_LIBFUZZER, [test "${with_libfuzzer}" != "no"])
> +AM_CONDITIONAL([HAVE_LIBFUZZER], [test "${with_libfuzzer}" != "no"])
>
> AS_IF([test "${enable_shared}" = "no"], [
> have_dynamic_objects=no
> ])
> -AM_CONDITIONAL(HAVE_DYNAMIC_PLUGINS, [test "${have_dynamic_objects}" != "no"])
> +AM_CONDITIONAL([HAVE_DYNAMIC_PLUGINS], [test "${have_dynamic_objects}" != "no"])
>
> AC_SUBST(LIBDL)
>
> @@ -867,7 +867,7 @@ dnl
> dnl Check for zlib.h and -lz if available
> dnl
> AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ])
> -AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ])
> +AM_CONDITIONAL([HAVE_ZLIB], [ test "${have_zlib}" = "yes" ])
> if test "${have_zlib}" = "yes"
> then
> VLC_ADD_LIBS([sap],[-lz])
> @@ -1483,7 +1483,7 @@ asm volatile("vqmovun.s64 d0, q1":::"d0");
> ])
> VLC_RESTORE_FLAGS
> ])
> -AM_CONDITIONAL(HAVE_NEON, [test "${ac_cv_arm_neon}" = "yes"])
> +AM_CONDITIONAL([HAVE_NEON], [test "${ac_cv_arm_neon}" = "yes"])
>
> AC_ARG_ENABLE([arm64],
> AS_HELP_STRING([--disable-arm64],
> @@ -1503,7 +1503,7 @@ asm volatile("uhadd v0.8b, v0.8b, v1.8b":::"v0");
> ])
> ])
> ])
> -AM_CONDITIONAL(HAVE_ARM64, [test "${ac_cv_arm64}" = "yes"])
> +AM_CONDITIONAL([HAVE_ARM64], [test "${ac_cv_arm64}" = "yes"])
>
>
> AC_ARG_ENABLE([altivec],
> @@ -1603,7 +1603,7 @@ AC_ARG_ENABLE([sout],
> AS_IF([test "${enable_sout}" != "no"], [
> AC_DEFINE(ENABLE_SOUT, 1, [Define to 1 for stream output support.])
> ])
> -AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"])
> +AM_CONDITIONAL([ENABLE_SOUT], [test "${enable_sout}" != "no"])
>
> dnl Lua modules
> AC_ARG_ENABLE([lua],
> @@ -1656,7 +1656,7 @@ then
> AC_MSG_ERROR([You need 32-bits luac when using lua from contrib.])
> ])
> fi
> -AM_CONDITIONAL(BUILD_LUA, [test "${have_lua}" = "yes"])
> +AM_CONDITIONAL([BUILD_LUA], [test "${have_lua}" = "yes"])
>
>
> dnl
> @@ -1845,7 +1845,7 @@ PKG_ENABLE_MODULES_VLC([SMBCLIENT], [smbc], [smbclient], (SMB/CIFS support), [au
> dnl
> dnl liBDSM access module
> dnl
> -AM_CONDITIONAL(HAVE_DSM, [test "$AS_TR_SH(with_dsm)" = "yes"])
> +AM_CONDITIONAL([HAVE_DSM], [test "$AS_TR_SH(with_dsm)" = "yes"])
> PKG_WITH_MODULES([DSM], [libdsm >= 0.2.0], [
> VLC_ADD_PLUGIN([dsm])
> VLC_ADD_CFLAGS([dsm], [$DSM_CFLAGS])
> @@ -1880,7 +1880,7 @@ AS_IF([test "$enable_v4l2" != "no"], [
> have_v4l2="yes"
> ])
> ])
> -AM_CONDITIONAL(HAVE_V4L2, [test "${have_v4l2}" != "no"])
> +AM_CONDITIONAL([HAVE_V4L2], [test "${have_v4l2}" != "no"])
>
> dnl
> dnl special access module for Blackmagic SDI cards
> @@ -1909,7 +1909,7 @@ then
> AC_LANG_POP(C++)
> VLC_RESTORE_FLAGS
> fi
> -AM_CONDITIONAL(HAVE_DECKLINK, [ test "${have_decklink}" != "no" ])
> +AM_CONDITIONAL([HAVE_DECKLINK], [ test "${have_decklink}" != "no" ])
>
>
> dnl
> @@ -2000,7 +2000,7 @@ if test "${enable_screen}" != "no"; then
> ])
> fi
> fi
> -AM_CONDITIONAL(HAVE_MAC_SCREEN, [test "${SYS}" = "darwin" -a "x${enable_screen}" != "xno"])
> +AM_CONDITIONAL([HAVE_MAC_SCREEN], [test "${SYS}" = "darwin" -a "x${enable_screen}" != "xno"])
>
> dnl
> dnl VNC/RFB access module
> @@ -2040,13 +2040,13 @@ then
> VLC_ADD_PLUGIN([avcapture])
> fi
> fi
> -AM_CONDITIONAL(HAVE_AVFOUNDATION, [test "${have_avfoundation}" != "no"])
> +AM_CONDITIONAL([HAVE_AVFOUNDATION], [test "${have_avfoundation}" != "no"])
>
> dnl
> dnl DCP plugin (using asdcplib)
> dnl
> PKG_WITH_MODULES([ASDCP], [asdcplib], [have_asdcp="yes"])
> -AM_CONDITIONAL(HAVE_ASDCP, [test "${have_asdcp}" = "yes"])
> +AM_CONDITIONAL([HAVE_ASDCP], [test "${have_asdcp}" = "yes"])
>
> dnl
> dnl Demux plugins
> @@ -2059,7 +2059,7 @@ dnl libdvbpsi check for ts mux/demux
> dnl
> have_dvbpsi="no"
> PKG_WITH_MODULES([DVBPSI], [libdvbpsi >= 1.2.0], [have_dvbpsi="yes"])
> -AM_CONDITIONAL(HAVE_DVBPSI, [test "${have_dvbpsi}" = "yes"])
> +AM_CONDITIONAL([HAVE_DVBPSI], [test "${have_dvbpsi}" = "yes"])
>
>
> dnl
> @@ -3708,7 +3708,7 @@ AS_IF([test "${enable_qt}" != "no"], [
> ALIASES="${ALIASES} qvlc"
> ])
> AC_SUBST(QT_VERSION)
> -AM_CONDITIONAL(ENABLE_QT, [test "$enable_qt" != "no"])
> +AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" != "no"])
> AM_CONDITIONAL([HAVE_QT5_X11], [test "${have_qt5_x11}" = "yes"])
>
> dnl
> @@ -3773,7 +3773,7 @@ AS_IF([test "${enable_skins2}" != "no"], [
> enable_skins2="yes"
> ])
> ])
> -AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
> +AM_CONDITIONAL([BUILD_SKINS], [test "${enable_skins2}" = "yes"])
>
> AC_ARG_ENABLE([libtar],
> AS_HELP_STRING([--enable-libtar], [libtar support for skins2 (default auto)]))
> @@ -3811,7 +3811,7 @@ then
> ])
> ])
> fi
> -AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "no" -a "${SYS}" = "darwin"])
> +AM_CONDITIONAL([ENABLE_MACOSX_UI], [test "$enable_macosx" != "no" -a "${SYS}" = "darwin"])
>
> dnl
> dnl MacOS X sparkle update support
> @@ -3827,7 +3827,7 @@ then
>
> AC_DEFINE([HAVE_SPARKLE], [1], [Define to 1 if sparkle is enabled.])
> fi
> -AM_CONDITIONAL(HAVE_SPARKLE, [test "$enable_sparkle" != "no"])
> +AM_CONDITIONAL([HAVE_SPARKLE], [test "$enable_sparkle" != "no"])
>
> dnl
> dnl MacOS X breakpad creash reporter support
> @@ -3860,7 +3860,7 @@ AS_IF([test "$with_breakpad" != "no"], [
> ])
> ])
>
> -AM_CONDITIONAL(HAVE_BREAKPAD, [test "$with_breakpad" != "no"])
> +AM_CONDITIONAL([HAVE_BREAKPAD], [test "$with_breakpad" != "no"])
> AS_IF([test "$with_breakpad" != "no"], [
> AC_SUBST(BREAKPAD_URL, ["${with_breakpad}"])
> ])
> @@ -3885,7 +3885,7 @@ then
> AC_MSG_WARN([dmgbuild not found -- unable to build fancy DMGs])
> ])
> fi
> -AM_CONDITIONAL(HAVE_DMGBUILD, [test "x$DMGBUILD" != "xno" -a "${HAVE_OSX}" = "1"])
> +AM_CONDITIONAL([HAVE_DMGBUILD], [test "x$DMGBUILD" != "xno" -a "${HAVE_OSX}" = "1"])
>
> dnl
> dnl VideoToolbox plugins
> @@ -4106,7 +4106,7 @@ then
> AS_IF([test "${ac_cv_lib_gcrypt}" != "yes"],[
> AC_MSG_ERROR([libgcrypt is required for update checking system]) ])
> fi
> -AM_CONDITIONAL(UPDATE_CHECK, [test "${enable_update_check}" = "yes"])
> +AM_CONDITIONAL([UPDATE_CHECK], [test "${enable_update_check}" = "yes"])
>
> dnl
> dnl OS X notification plugin
> @@ -4141,7 +4141,7 @@ AS_IF([test "$enable_libplacebo" != "no"], [
> enable_libplacebo="no"
> ])
> ])
> -AM_CONDITIONAL(HAVE_LIBPLACEBO, [test "$enable_libplacebo" != "no"])
> +AM_CONDITIONAL([HAVE_LIBPLACEBO], [test "$enable_libplacebo" != "no"])
>
>
> dnl
> @@ -4177,7 +4177,7 @@ AS_IF([test "${with_kde_solid}" != "no"], [
> ])
> ])
> AC_SUBST(soliddatadir)
> -AM_CONDITIONAL(KDE_SOLID, [test "x${soliddatadir}" != "x"])
> +AM_CONDITIONAL([KDE_SOLID], [test "x${soliddatadir}" != "x"])
>
> dnl
> dnl Find tools for win32 packaging
> @@ -4213,7 +4213,7 @@ AS_IF([test "${SYS}" = "mingw32"], [
> dnl
> AC_PATH_PROG([SEVENZIP], [7z], [7z])
> ])
> -AM_CONDITIONAL(HAVE_MAKENSIS, [test "x$MAKENSIS" != "xno" && test "$nsis_version_ok" = "yes"])
> +AM_CONDITIONAL([HAVE_MAKENSIS], [test "x$MAKENSIS" != "xno" && test "$nsis_version_ok" = "yes"])
>
> dnl
> dnl Check wether we have the PROCESS_MITIGATION_IMAGE_LOAD_POLICY
> @@ -4230,7 +4230,7 @@ dnl the VLC binary
> dnl
> AC_ARG_ENABLE([vlc],
> AS_HELP_STRING([--enable-vlc], [build the VLC media player (default enabled)]))
> -AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"])
> +AM_CONDITIONAL([BUILD_VLC], [test "${enable_vlc}" != "no"])
>
> dnl
> dnl Fuzzer (at the end in order to don't mess dependencies FLAGS)
> --
> 2.15.1 (Apple Git-101)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180715/31fe7b69/attachment.html>
More information about the vlc-devel
mailing list