Not yet working stack checking (symbol STACKCHECK)
[gnokii.git] / do
diff --git a/do b/do
index ec3e051..1923407 100755 (executable)
--- a/do
+++ b/do
@@ -2,6 +2,7 @@
 
 #target_m68k=1
 enable_debug=1
+#stack_check=1
 cfg_port="ttyS0"
 
 exec 2>&1
@@ -15,7 +16,14 @@ if [ -n "$target_m68k" ];then
        test -n "$AR"       || export AR="m68k-pic-coff-ar"
        test -n "$CFLAGS"   || export CFLAGS="-O2 -Wall -fPIC"
        test -n "$CPPFLAGS" || export CPPFLAGS="-DUCCOMPAT=1 $CPPFLAGS"
+       if [ -n "$stack_check" -a -n "$enable_debug" ];then
+               export CPPFLAGS="-DSTACKCHECK=1 $CPPFLAGS"
+       fi
        test -n "$LDFLAGS"  || export LDFLAGS="gnokii/cleanup.c"
+#      if [ -n "$enable_debug" ];then
+#              export CFLAGS="-pg $CFLAGS"
+#              export LDFLAGS="gnokii/mcount.c $LDFLAGS"
+#      fi
 fi
 export CPPFLAGS="-DUCLINUX=1 $CPPFLAGS"
 ./configure --with-cfg-model=5110 --with-cfg-port=/dev/"$cfg_port" --without-x \