2
dnl ______ /usr/share/aclocal/guidod/ax_not_enable_frame_pointer.m4 ______
3
dnl @synopsis AX_NOT_ENABLE_FRAME_POINTER ([shellvar])
5
dnl add --enable-frame-pointer option, the default will add the gcc
6
dnl --fomit-frame-pointer option to the shellvar (per default CFLAGS)
7
dnl and remove the " -g " debuginfo option from it. In other words,
8
dnl the default is "--disable-frame-pointer"
10
dnl @author guidod@gmx.de
11
dnl @version 2004-11-30
13
AC_DEFUN([AX_NOT_ENABLE_FRAME_POINTER],[dnl
14
AS_VAR_PUSHDEF([VAR],[enable_frame_pointer])dnl
15
AC_MSG_CHECKING([m4_ifval($1,$1,CFLAGS) frame-pointer])
16
AC_ARG_ENABLE([frame-pointer], AC_HELP_STRING(
17
[--enable-frame-pointer],[enable callframe generation for debugging]))
19
.|.no|.no,*) test ".$VAR" = "." && VAR="no"
20
m4_ifval($1,$1,CFLAGS)=`echo dnl
21
" $m4_ifval($1,$1,CFLAGS) " | sed -e 's/ -g / /'`
22
if test ".$GCC" = ".yes" ; then
23
m4_ifval($1,$1,CFLAGS)="$m4_ifval($1,$1,CFLAGS) -fomit-frame-pointer"
24
AC_MSG_RESULT([$VAR, -fomit-frame-pointer added])
26
AC_MSG_RESULT([$VAR, -g removed])
28
*) AC_MSG_RESULT([$VAR, kept]) ;;
30
AS_VAR_POPDEF([VAR])dnl