Commit 10bad27b authored by Marvin Scholz's avatar Marvin Scholz

configure: Require URL when using Breakpad, disable by default

Change the `--enable-breakpad` flag to `--with-breakpad=URL`, that
means in order to enable the Breakpad crash reporter, the CrashDragon
server url needs to be given to that argument.

URL should be the base URL of the crash server, without a trailing `/`.
parent 7a46fc43
......@@ -3803,19 +3803,33 @@ AM_CONDITIONAL(HAVE_SPARKLE, [test "$enable_sparkle" != "no"])
dnl
dnl MacOS X breakpad creash reporter support
dnl
AC_ARG_ENABLE(breakpad,
[ --enable-breakpad Breakpad crash reporter support for OS X (default enabled on Mac OS X)])
if test "x${enable_breakpad}" != "xno" -a "${HAVE_OSX}" = "1"
then
if test ! -d ${CONTRIB_DIR}/Breakpad.framework -a ! -d ${CONTRIB_DIR}/Frameworks/Breakpad.framework
then
AC_ARG_WITH([breakpad],
AS_HELP_STRING([--with-breakpad=URL], [Enable Breakpad reporter using given URL]), [], [with_breakpad=no])
AS_IF([test "$with_breakpad" != "no"], [
AS_IF([test "$with_breakpad" = "yes"], [
AC_MSG_ERROR([You need to supply the CrashDragon Server URL as value for --with-breakpad])
])
AS_IF([test "$HAVE_OSX" != "1"], [
AC_MSG_ERROR([Breakpad currently only works on macOS])
])
AC_MSG_CHECKING([for Breakpad framework])
AS_IF([test ! -d ${CONTRIB_DIR}/Breakpad.framework -a \
! -d ${CONTRIB_DIR}/Frameworks/Breakpad.framework], [
AC_MSG_RESULT([no])
AC_MSG_ERROR([Breakpad framework is required and was not found in ${CONTRIB_DIR}])
fi
], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_BREAKPAD], [1], [Define to 1 if breakpad is enabled.])
AC_SUBST(BREAKPAD_URL, ["${with_breakpad}"])
])
AC_DEFINE([HAVE_BREAKPAD], [1], [Define to 1 if breakpad is enabled.])
fi
AM_CONDITIONAL(HAVE_BREAKPAD, [test "$enable_breakpad" != "no"])
])
AM_CONDITIONAL(HAVE_BREAKPAD, [test "$with_breakpad" != "no"])
dnl
dnl Minimal Mac OS X module
......
......@@ -1395,7 +1395,7 @@
<key>BreakpadRequestComments</key>
<string>1</string>
<key>BreakpadURL</key>
<string>https://crashes.videolan.org/crashreports</string>
<string>@BREAKPAD_URL@/crashreports</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......
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