Debian Codegraph @

libs/zziplib/zziplib-src/m4/ax_not_enable_frame_pointer.m4

raw
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 <[email protected]>
11 dnl @version 2018-02-22
12 dnl @license GPLWithACException
13
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 if test ".$VAR" = "."; then
20 case ".$enable_debug" in .|.no|.no,*) : ;; *) VAR="$enable_debug" ;; esac
21 case ".$with_debug" in .|.no|.no,*) : ;; *) VAR="$with_debug" ;; esac
22 fi
23 case ".$VAR" in
24 .|.no|.no,*) test ".$VAR" = "." && VAR="no"
25 m4_ifval($1,$1,CFLAGS)=`echo dnl
26 " $m4_ifval($1,$1,CFLAGS) " | sed -e 's/ -g / /'`
27 if test ".$GCC" = ".yes" ; then
28 m4_ifval($1,$1,CFLAGS)="$m4_ifval($1,$1,CFLAGS) -fomit-frame-pointer"
29 AC_MSG_RESULT([$VAR, -fomit-frame-pointer added])
30 else
31 AC_MSG_RESULT([$VAR, -g removed])
32 fi ;;
33 *) AC_MSG_RESULT([$VAR, kept]) ;;
34 esac
35 AS_VAR_POPDEF([VAR])dnl
36 ])
37