Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=gfpm/.git;a=commitdiff;h=4a445baf06a5312f218cdd7c8a91faa52a252f4d
commit 4a445baf06a5312f218cdd7c8a91faa52a252f4d
Author: Christian Hamar alias krix <[EMAIL PROTECTED]>
Date: Mon Aug 6 18:50:46 2007 +0200
Initial support for debug enable
* Well. ./configure --enable debug ships CFLAGS like :
-ggdb3 -Wall -Werror -DGFPM_DEBUG
* Use can use #if GFPM_DEBUG writefooo because debug stuffs
diff --git a/configure.ac b/configure.ac
index 83bdf5b..d75d1ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,15 +10,31 @@ AC_PROG_INTLTOOL([0.21])
AC_PROG_LIBTOOL
AM_INIT_AUTOMAKE
-AC_PROG_CC
+AC_PROG_CC(GCC)
AC_HEADER_STDC
AC_CHECK_HEADERS([locale.h stdlib.h string.h sys/ioctl.h unistd.h alpm.h])
-if test "${GCC}" = "yes"
-then
- CFLAGS="${CFLAGS} -pipe -Wall"
+if test "${GCC}" = "yes" ; then
+ CFLAGS="${ENV_CFLAGS} -pipe"
fi
+AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging support],
debug="yes")
+dnl Check for debug enabled or not
+AC_MSG_CHECKING(for debug request)
+if test "x$debug" = "xyes" ; then
+ AC_DEFINE(GFPM_DEBUG, 1, [Debug support: enabled])
+ CFLAGS="${CFLAGS} -ggdb3 -Wall -Werror -DGFPM_DEBUG"
+ debug=yes
+ AC_MSG_RESULT(yes)
+else
+ AC_DEFINE(GFPM_DEBUG, 0, [Debug support: disabled])
+ CFLAGS="${CFLAGS} -Wall"
+ debug=no
+ AC_MSG_RESULT(no)
+fi
+
+AC_SUBST([GFPM_DEBUG])
+
ALL_LINGUAS=""
GETTEXT_PACKAGE=gfpm
AC_SUBST(GETTEXT_PACKAGE)
@@ -52,4 +68,5 @@ Gfpm $VERSION configuration summary:
source code location : ${srcdir}
compiler : ${CC}
compiler flags : ${CFLAGS}
+ debug support : ${debug}
"
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git