On Saturday 2012-01-07 02:22, Kay Sievers wrote: > >> Furthermore, >> it overrides per_target_CFLAGS, which is also undesired. > >Guess, we need a cleaner solution, this patch looks even more like a hack.
>From the rather sparse comment I suppose you wanted something like this instead. diff --git a/Makefile.am b/Makefile.am index f5cef3f..7372a12 100644 --- a/Makefile.am +++ b/Makefile.am @@ -157,6 +157,8 @@ endif endif endif +AM_CFLAGS = ${ac_extra_CFLAGS} + rootbin_PROGRAMS = \ systemd \ systemctl \ diff --git a/configure.ac b/configure.ac index a223b80..03bfb86 100644 --- a/configure.ac +++ b/configure.ac @@ -110,6 +110,7 @@ CC_CHECK_CFLAGS_APPEND([ \ -fdata-sections \ -Wl,--as-needed \ -Wl,--gc-sections]) +AC_SUBST([ac_extra_CFLAGS]) LT_PREREQ(2.2) LT_INIT diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 9d561c2..bb260d2 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -71,7 +71,7 @@ AC_DEFUN([CC_CHECK_CFLAG_APPEND], [ ) AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], - [CFLAGS="$CFLAGS $1"; DEBUG_CFLAGS="$DEBUG_CFLAGS $1"; $2], [$3]) + [ac_extra_CFLAGS="$ac_extra_CFLAGS $1"; DEBUG_CFLAGS="$DEBUG_CFLAGS $1"; $2], [$3]) ]) dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not]) _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel