[vlc-commits] Rework breakpad detection to enable it on windows as well

Hugo Beauzée-Luyssen git at videolan.org
Sat Dec 23 23:15:09 CET 2017


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Dec 18 12:46:53 2017 +0100| [7a4d1c130b993e6d7efed60d864ec2587778ce05] | committer: Hugo Beauzée-Luyssen

Rework breakpad detection to enable it on windows as well

(cherry picked from commit 34d52c7081abeb437aecf992a6d0123f204fa448)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=7a4d1c130b993e6d7efed60d864ec2587778ce05
---

 bin/Makefile.am |  2 ++
 configure.ac    | 31 +++++++++++++++++--------------
 2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/bin/Makefile.am b/bin/Makefile.am
index d464b08959..a1ae4ef0d7 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -41,6 +41,7 @@ vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/plugins/"
 if HAVE_BREAKPAD
 vlc_osx_LDFLAGS += -Wl,-framework,Breakpad
 vlc_osx_OBJCFLAGS = -F$(CONTRIB_DIR)/Frameworks
+vlc_osx_CPPFLAGS = -DHAVE_BREAKPAD
 endif
 vlc_osx_LDADD = ../lib/libvlc.la
 
@@ -56,6 +57,7 @@ vlc_osx_static_LDADD = $(vlc_osx_LDADD)
 if HAVE_BREAKPAD
 vlc_osx_static_LDFLAGS += -Wl,-framework,Breakpad
 vlc_osx_static_OBJCFLAGS += -F$(CONTRIB_DIR)/Frameworks
+vlc_osx_static_CPPFLAGS = -DHAVE_BREAKPAD
 endif
 
 
diff --git a/configure.ac b/configure.ac
index a310b0d635..482d815bd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3839,24 +3839,27 @@ AS_IF([test "$with_breakpad" != "no"], [
     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}])
-  ], [
-    AC_MSG_RESULT([yes])
-    AC_DEFINE([HAVE_BREAKPAD], [1], [Define to 1 if breakpad is enabled.])
-    AC_SUBST(BREAKPAD_URL, ["${with_breakpad}"])
+  AS_IF([test "$HAVE_OSX" = "1"], [
+    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])
+      with_breakpad="no"
+      AC_MSG_ERROR([Breakpad framework is required and was not found in ${CONTRIB_DIR}])
+    ], [
+      AC_MSG_RESULT([yes])
+    ])
+  ],[
+    PKG_CHECK_MODULES([BREAKPAD], [breakpad-client],, [
+      AC_MSG_ERROR(["breakpad not found"])
+    ])
   ])
-
 ])
 
 AM_CONDITIONAL(HAVE_BREAKPAD, [test "$with_breakpad" != "no"])
+AS_IF([test "$with_breakpad" != "no"], [
+  AC_SUBST(BREAKPAD_URL, ["${with_breakpad}"])
+])
 
 dnl
 dnl  Minimal Mac OS X module



More information about the vlc-commits mailing list