This patch changes configure.in so that it uses a CFLAGS specified on the 
command line, even when --enable-debug is passed in.  If no CFLAGS or 
--enable-debug is given, -g -O2 appears as normal.  Prior to this, 
--enable-debug led to a CFLAGS="-g -O2 -g -O0 ...".

Signed-off-by: Kent Yoder <[email protected]>

 configure.in |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure.in b/configure.in
index 12b06a3..d13cc2d 100644
--- a/configure.in
+++ b/configure.in
@@ -198,6 +198,12 @@ dnl ---
 dnl --- Now that we have all the options, let's check for a valid build
 dnl ---
 
+dnl --- enable_debug
+AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = "xyes"])
+if test "x$enable_debug" = "xyes"; then
+       CFLAGS="$cmdline_CFLAGS -g -O0"
+fi
+
 dnl --- first, check what external software is present or specified
 dnl --- with --with-package=DIR
 
@@ -478,12 +484,6 @@ dnl --- Now check enabled features, while making sure 
every required
 dnl --- package is available
 dnl ---
 
-dnl --- enable_debug
-AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = "xyes"])
-if test "x$enable_debug" = "xyes"; then
-       DEBUG_CFLAGS="-g -O0"
-fi
-
 dnl --- enable_testcases
 if test "x$enable_testcases" = "xyes"; then
        AC_CHECK_PROG([HAVE_EXPECT], [expect], [yes], [no])
@@ -628,7 +628,7 @@ fi
 AM_CONDITIONAL([ENABLE_PKCSCCA_MIGRATE], [test "x$enable_pkcscca_migrate" = 
"xyes"])
 
 
-CFLAGS="$CFLAGS $DEBUG_CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500"
+CFLAGS="$CFLAGS -DPKCS64 -D_XOPEN_SOURCE=500"
 
 CFLAGS+=' -DCONFIG_PATH=\"$(localstatedir)/lib/opencryptoki\" 
-DSBIN_PATH=\"$(sbindir)\" -DLIB_PATH=\"$(libdir)\"'
 

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to