aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h.in5
-rw-r--r--configure.in25
-rw-r--r--m4/ac_glibc.m42
-rw-r--r--m4/ac_gnuc.m42
-rw-r--r--src/espik_global.h3
5 files changed, 31 insertions, 6 deletions
diff --git a/config.h.in b/config.h.in
index 3201e66..681ecaa 100644
--- a/config.h.in
+++ b/config.h.in
@@ -28,7 +28,10 @@
#undef VERSION
/* Define to 1 if your platform is ok for debug */
-#undef _ESPIK_DEBUG_
+#undef ___GLIBC__
+
+/* Define to 1 if your platform is ok for debug */
+#undef ___GNUC__
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff --git a/configure.in b/configure.in
index 44086ca..1e9ec7f 100644
--- a/configure.in
+++ b/configure.in
@@ -20,6 +20,31 @@ AC_C___ATTRIBUTE__
AC___GNUC__
AC___GLIBC__
+dnl Debug mode
+AC_ARG_ENABLE(
+ [debug],
+ AC_HELP_STRING(
+ [--enable-debug],
+ [Enable debug mode (default=no)]),
+ [if test "$enable_debug" = "no" ; then
+ enable_debug="no"
+ else
+ if test "$enable_debug" = "yes" ; then
+ enable_debug="yes"
+ fi
+ fi],
+ [enable_debug="no"])
+
+dnl Check debug mode
+if test "$enable_debug" = "yes" ; then
+ DEBUG_MODE_CFLAGS="-g -D_ESPIK_DEBUG_"
+ our_cxxflags_defaults="-Wall -W"
+else
+ SPECIFIC_LDFLAGS="-s ${SPECIFIC_LDFLAGS}"
+fi
+
+AC_SUBST(DEBUG_MODE_CFLAGS)
+
AC_ARG_WITH(ecore-config,
[ --with-ecore-config=ECORE_CONFIG use ecore-config specified ],
[
diff --git a/m4/ac_glibc.m4 b/m4/ac_glibc.m4
index aeb9c17..342401c 100644
--- a/m4/ac_glibc.m4
+++ b/m4/ac_glibc.m4
@@ -8,7 +8,7 @@ AC_DEFUN([AC___GLIBC__],
#endif],
ac_cv___glibc__=yes, ac_cv___glibc__=no)])
if test "$ac_cv___glibc__" = "yes"; then
- AC_DEFINE(_ESPIK_DEBUG_, 1, [Define to 1 if your platform is ok for debug])
+ AC_DEFINE(___GLIBC__, 1, [Define to 1 if your platform is ok for debug])
fi
AC_MSG_RESULT($ac_cv___glibc__)
])
diff --git a/m4/ac_gnuc.m4 b/m4/ac_gnuc.m4
index 76e80ae..4786bbb 100644
--- a/m4/ac_gnuc.m4
+++ b/m4/ac_gnuc.m4
@@ -16,7 +16,7 @@ AC_DEFUN([AC___GNUC__],
#endif],
ac_cv___gnuc__=yes, ac_cv___gnuc__=no)])
if test "$ac_cv___gnuc__" = "yes"; then
- AC_DEFINE(_ESPIK_DEBUG_, 1, [Define to 1 if your platform is ok for debug])
+ AC_DEFINE(___GNUC__, 1, [Define to 1 if your platform is ok for debug])
fi
AC_MSG_RESULT($ac_cv___gnuc__)
])
diff --git a/src/espik_global.h b/src/espik_global.h
index e800418..79b16fd 100644
--- a/src/espik_global.h
+++ b/src/espik_global.h
@@ -8,9 +8,6 @@
#define MAX_LEN 512
-#define _ESPIK_DEBUG_ 1
-
-
#if HAVE___ATTRIBUTE__
# define __UNUSED__ __attribute__((unused))
#else