beta-0.89.2
[luatex.git] / source / libs / zziplib / zziplib-0.13.62 / m4 / ax_not_enable_frame_pointer.m4
blob7499962f07c17c836e8df137e758994e7b2838cf
1 dnl /usr/share/aclocal/guidod-cvs/ax_not_enable_frame_pointer.m4
2 dnl @synopsis AX_NOT_ENABLE_FRAME_POINTER ([shellvar])
3 dnl
4 dnl add --enable-frame-pointer option, the default will add the gcc
5 dnl --fomit-frame-pointer option to the shellvar (per default CFLAGS)
6 dnl and remove the " -g " debuginfo option from it. In other words, the
7 dnl default is "--disable-frame-pointer"
8 dnl
9 dnl @category C
10 dnl @author Guido U. Draheim <guidod@gmx.de>
11 dnl @version 2005-01-22
12 dnl @license GPLWithACException
14 AC_DEFUN([AX_NOT_ENABLE_FRAME_POINTER],[dnl
15 AS_VAR_PUSHDEF([VAR],[enable_frame_pointer])dnl
16 AC_MSG_CHECKING([m4_ifval($1,$1,CFLAGS) frame-pointer])
17 AC_ARG_ENABLE([frame-pointer], AC_HELP_STRING(
18   [--enable-frame-pointer],[enable callframe generation for debugging]))
19 case ".$VAR" in
20   .|.no|.no,*) test ".$VAR" = "." && VAR="no"
21      m4_ifval($1,$1,CFLAGS)=`echo dnl
22   " $m4_ifval($1,$1,CFLAGS) " | sed -e 's/ -g / /'`
23      if test ".$GCC" = ".yes" ; then
24         m4_ifval($1,$1,CFLAGS)="$m4_ifval($1,$1,CFLAGS) -fomit-frame-pointer"
25         AC_MSG_RESULT([$VAR, -fomit-frame-pointer added])
26      else
27         AC_MSG_RESULT([$VAR, -g removed])
28      fi  ;;
29    *)  AC_MSG_RESULT([$VAR, kept]) ;;
30 esac
31 AS_VAR_POPDEF([VAR])dnl