summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-28 23:25:18 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-28 23:25:18 +0000
commit6d9b5684fdb40ec4b64ef88e03e9ba8224483266 (patch)
tree6ebbce633ab2b7f9e656ecca2c1095c61beb15cf /configure
parent7bbf1acf5eafc072a573b5caea74be0d811801b1 (diff)
downloadmpv-6d9b5684fdb40ec4b64ef88e03e9ba8224483266.tar.bz2
mpv-6d9b5684fdb40ec4b64ef88e03e9ba8224483266.tar.xz
Allow attaching gdb on crash automatically.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13795 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure b/configure
index 2c00d023b4..a1f090c89f 100755
--- a/configure
+++ b/configure
@@ -304,6 +304,7 @@ Advanced options:
--enable-debug[=1-3] compile debugging information into mplayer [disable]
--enable-profile compile profiling information into mplayer [disable]
--disable-sighandler disable sighandler for crashes [enable]
+ --enable-crash-debug enable automatic gdb attach on crash [disable]
--enable-i18n _experimental_ gnu gettext() support [autodetect]
--enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
@@ -1355,6 +1356,7 @@ _linux_devfs=no
_i18n=auto
_dynamic_plugins=no
_setlocale=auto
+_crash_debug=auto
_sighandler=yes
_libdv=auto
_cdparanoia=auto
@@ -1698,6 +1700,12 @@ for ac_option do
--disable-debug)
_debug=
;;
+ --enable-crash-debug)
+ _crash_debug=yes
+ ;;
+ --disable-crash-debug)
+ _crash_debug=no
+ ;;
--enable-sighandler)
_sighandler=yes
;;
@@ -6173,6 +6181,9 @@ elif test -z "$CFLAGS" ; then
# always compile with '-g' if .developer:
if test -f ".developer" ; then
CFLAGS="-g $CFLAGS"
+ if (test "$_crash_debug" = auto) && (not mingw32) ; then
+ _crash_debug=yes
+ fi
_stripbinaries=no
fi
else
@@ -6187,6 +6198,16 @@ To do so, execute 'CFLAGS= ./configure <options>'
EOF
fi
+
+echocheck "automatic gdb attach"
+if test "$_crash_debug" = yes ; then
+ _def_crash_debug='#define CRASH_DEBUG 1'
+else
+ _def_crash_debug='#undef CRASH_DEBUG'
+ _crash_debug=no
+fi
+echores "$_crash_debug"
+
if darwin ; then
CFLAGS="$CFLAGS -DSYS_DARWIN"
if [ "$_cc_major" = 3 ] && [ "$_cc_minor" -lt 1 ]; then
@@ -6581,6 +6602,9 @@ $_def_dynamic_plugins
/* enable/disable SIGHANDLER */
$_def_sighandler
+/* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
+$_def_crash_debug
+
/* Toggles debugging informations */
$_def_debug