From df18737f96d8180179e9c406adf0cc17107a222a Mon Sep 17 00:00:00 2001 From: Boram Park Date: Sun, 26 Oct 2014 19:57:38 +0900 Subject: [PATCH] add --enable-normal-log Change-Id: Iab7e1e08d72048059d2d9b4c2c1502dd88c967f7 --- configure.ac | 10 ++++++++++ lib/xdbg_log.h | 4 ++++ packaging/xf86-module-xdbg.spec | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7843f1e..78d7758 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,11 @@ AC_ARG_ENABLE(secure-log, [Enable secure log (default: disabled)]), [SECURELOG=$enableval], [SECURELOG=no]) +AC_ARG_ENABLE(normal-log, + AS_HELP_STRING([--enable-normal-log], + [Enable normal log instead of secure log (default: disabled)]), + [NORMALLOG=$enableval], [NORMALLOG=no]) + # Checks for pkg-config packages PKG_CHECK_MODULES(XDBG, dlog xorg-server x11 xdamage xext dbus-1 bigreqsproto compositeproto damageproto dri2proto fixesproto fontsproto gestureproto inputproto kbproto randrproto recordproto renderproto resourceproto videoproto xcmiscproto xextproto xf86vidmodeproto xproto libdrm xcomposite libdri2 xgesture xtst xrandr xi xv) @@ -91,6 +96,10 @@ if test "x$SECURELOG" = xyes; then AC_SUBST([TIZEN_ENGINEER_MODE]) fi +if test "x$NORMALLOG" = xyes; then + AC_DEFINE(USE_NORMAL_LOG, 1, [Use normal log]) +fi + AC_OUTPUT([Makefile common/Makefile bin/Makefile @@ -103,6 +112,7 @@ AC_OUTPUT([Makefile echo "CFLAGS : $CFLAGS" echo "LDFLAGS : $LDFLAGS" +echo "LOG : secure($SECURELOG) normal($NORMALLOG)" echo "XDBG_CFLAGS: $XDBG_CFLAGS" echo "XDBG_LIBS : $XDBG_LIBS" echo "XDBG_CLIENT_CFLAGS: $XDBG_CLIENT_CFLAGS" diff --git a/lib/xdbg_log.h b/lib/xdbg_log.h index 5829221..00d7dfa 100644 --- a/lib/xdbg_log.h +++ b/lib/xdbg_log.h @@ -109,8 +109,12 @@ void* xDbgLog (unsigned int module, int logoption, const char *file, #if TIZEN_ENGINEER_MODE #define XDBG_SECURE(mod, fmt, ARG...) XLOG_SECURE(mod, "[%s] "fmt, __FUNCTION__, ##ARG) #else +#if USE_NORMAL_LOG +#define XDBG_SECURE(mod, fmt, ARG...) XLOG_INFO(mod, "[%s] "fmt, __FUNCTION__, ##ARG) +#else #define XDBG_SECURE(mod, fmt, ARG...) do { } while(0) #endif +#endif #define XDBG_NEVER_GET_HERE(mod) XLOG_ERROR(mod, "[%s:%d] ** NEVER GET HERE **\n", __FUNCTION__,__LINE__) diff --git a/packaging/xf86-module-xdbg.spec b/packaging/xf86-module-xdbg.spec index 9536e80..598c22b 100644 --- a/packaging/xf86-module-xdbg.spec +++ b/packaging/xf86-module-xdbg.spec @@ -70,7 +70,7 @@ X server runtime debug library development package %setup -q %build -%reconfigure --disable-static --prefix=/usr \ +%reconfigure --disable-static --prefix=/usr --enable-normal-log \ CFLAGS="$CFLAGS -Wall -Werror" \ LDFLAGS="$LDFLAGS -Wl,--hash-style=both -Wl,--as-needed" make %{?jobs:-j%jobs} -- 2.7.4