[vlc-devel] [PATCH] configure: Improve detection of ibtool
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Thu Apr 27 11:51:17 CEST 2017
Hi,
On Tue, Apr 25, 2017, at 03:29 PM, Marvin Scholz wrote:
> Previously there was no error handling if ibtool was not found
> and xcrun was not used to find it, but the path that xcrun provides
> should be preferred, as on some systems and earlier macOS versions
> it might not be in the PATH.
> ---
> configure.ac | 22 +++++++++++++++++++++-
> 1 file changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index cc54fad48c..cb57987fb3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3803,8 +3803,28 @@ AC_ARG_ENABLE(macosx,
> [ --enable-macosx Mac OS X gui support (default enabled on
> Mac OS X)])
> if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
> then
> +
> + dnl
> + dnl If possible, use xcrun to find the right tools
> + dnl
> +
> + AC_PATH_PROG([XCRUN], [xcrun], [no])
> + AS_IF([test ! "x${XCRUN}" = "xno"], [
AFAIK the "x" isn't required provided you're quoting your strings
> + AC_MSG_CHECKING([for ibtool (using xcrun)])
> + XIB="$(eval $XCRUN -f ibtool 2>/dev/null || echo no)"
> + AC_MSG_RESULT([${XIB}])
> + ], [
> + AC_MSG_WARN([Looking for tools without using xcrun])
I guess you meant "looking for ibtools"?
> + ])
> +
> + AS_IF([test "x${XIB}" = "xno"], [
> + AC_PATH_PROG(XIB, [ibtool], [no])
> + AS_IF([test "x${XIB}" = "xno"], [
> + AC_MSG_ERROR([ibtool was not found, but is required for
> --enable-macosx])
> + ])
> + ])
> +
> VLC_ADD_PLUGIN([macosx])
> - AC_PATH_PROGS(XIB, [ibtool], ibtool, ["/usr/bin"])
> fi
> AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "no" -a
> "${SYS}" = "darwin"])
>
LGTM otherwise (not that I know much about macOS buildsystem though
O:-))
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list