From: Igor Putovny Date: Fri, 21 Feb 2025 10:39:53 +0000 (+0100) Subject: Autoconf: Merge check and add compiler option to one macro X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5215efeec01abb51cdcf1097e5b4de862cf03d0;p=thirdparty%2Fbird.git Autoconf: Merge check and add compiler option to one macro --- diff --git a/aclocal.m4 b/aclocal.m4 index 1613d6803..3fdc446f9 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -201,6 +201,12 @@ AC_DEFUN([BIRD_ADD_GCC_OPTION], fi ]) +AC_DEFUN([BIRD_CHECK_AND_ADD_GCC_OPTION], +[ + BIRD_CHECK_GCC_OPTION($@) + BIRD_ADD_GCC_OPTION($1,$2) +]) + # BIRD_CHECK_PROG_FLAVOR_GNU(PROGRAM-PATH, IF-SUCCESS, [IF-FAILURE]) # copied from autoconf internal _AC_PATH_PROG_FLAVOR_GNU AC_DEFUN([BIRD_CHECK_PROG_FLAVOR_GNU], diff --git a/configure.ac b/configure.ac index 272837820..43349102a 100644 --- a/configure.ac +++ b/configure.ac @@ -400,8 +400,7 @@ if test "$enable_debug" = yes ; then LDFLAGS="$LDFLAGS -rdynamic" CFLAGS="$CFLAGS -O0 -ggdb -g3" - BIRD_CHECK_GCC_OPTION([bird_cv_c_option_dwarf4], [-gdwarf-4], []) - BIRD_ADD_GCC_OPTION([bird_cv_c_option_dwarf4], [-gdwarf-4]) + BIRD_CHECK_AND_ADD_GCC_OPTION([bird_cv_c_option_dwarf4], [-gdwarf-4], []) AC_CHECK_HEADER([execinfo.h], [