summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-01-26 21:12:51 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-01-26 21:13:32 +0100
commit936d3cec490c13f2c5f7dd14f5e364fddaa6da71 (patch)
treeb261cce9c75bc32d7e951cca42273541a9b96114 /kdesktop
parent42dde50c7fad5059d63535a5342eef317827f279 (diff)
downloadtdebase-936d3cec490c13f2c5f7dd14f5e364fddaa6da71.tar.gz
tdebase-936d3cec490c13f2c5f7dd14f5e364fddaa6da71.zip
Add CMake option for backtrace in kdesktop_lock exception handler
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/ConfigureChecks.cmake7
-rw-r--r--kdesktop/lock/CMakeLists.txt9
-rw-r--r--kdesktop/lock/lockprocess.cc2
3 files changed, 16 insertions, 2 deletions
diff --git a/kdesktop/ConfigureChecks.cmake b/kdesktop/ConfigureChecks.cmake
index 87e2213ce..9e59185a4 100644
--- a/kdesktop/ConfigureChecks.cmake
+++ b/kdesktop/ConfigureChecks.cmake
@@ -14,3 +14,10 @@
if( WITH_PAM AND (NOT DEFINED KSCREENSAVER_PAM_SERVICE) )
set( KSCREENSAVER_PAM_SERVICE "kde" CACHE INTERNAL "" )
endif( )
+
+if( WITH_KDESKTOP_LOCK_BACKTRACE )
+ check_include_files( "bfd.h;demangle.h;libiberty.h" HAVE_BINUTILS_DEV )
+ if( NOT HAVE_BINUTILS_DEV )
+ tde_message_fatal( "binutils-dev are required, but not found on your system" )
+ endif( )
+endif( )
diff --git a/kdesktop/lock/CMakeLists.txt b/kdesktop/lock/CMakeLists.txt
index 6694f4315..e847cf1fc 100644
--- a/kdesktop/lock/CMakeLists.txt
+++ b/kdesktop/lock/CMakeLists.txt
@@ -32,11 +32,16 @@ set( target kdesktop_lock )
set( ${target}_SRCS
lockprocess.cc lockdlg.cc infodlg.cc querydlg.cc sakdlg.cc
- securedlg.cc autologout.cc main.cc backtrace_symbols.c
+ securedlg.cc autologout.cc main.cc
)
+if( WITH_KDESKTOP_LOCK_BACKTRACE )
+ list( APPEND ${target}_SRCS backtrace_symbols.c )
+ set( BACKTRACE_LIBRARY bfd )
+endif( )
+
tde_add_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
- LINK kdesktopsettings-static dmctl-static kio-shared Xext bfd ${GL_LIBRARY} "${LINKER_IMMEDIATE_BINDING_FLAGS}"
+ LINK kdesktopsettings-static dmctl-static kio-shared Xext ${BACKTRACE_LIBRARY} ${GL_LIBRARY} "${LINKER_IMMEDIATE_BINDING_FLAGS}"
DESTINATION ${BIN_INSTALL_DIR}
)
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index a3f5fb56f..5f01274a8 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -137,6 +137,7 @@ static Atom gXA_SCREENSAVER_VERSION;
void print_trace()
{
+#ifdef WITH_KDESKTOP_LOCK_BACKTRACE
void *array[10];
size_t size;
char **strings;
@@ -152,6 +153,7 @@ void print_trace()
}
free (strings);
+#endif
}
static void segv_handler(int)