Re: [pull] require C99, add robustness and small fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 12, 2012 at 12:29:38AM +0200, Bertrand Jacquin wrote:
> # We might be on RHEL5 with a git checkout and so broken
> > > +  # autoconf. Check if CC is gcc and if it bails when given -std=gnu99.
> > > +  # If not, use that.  Yuck.
> > > +    if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
> > > +       CC="$CC -std=gnu99"
> > > +       AC_RUN_IFELSE(
> > > +          [AC_LANG_PROGRAM([],[[
> > > +  return 0;
> > > +      ]])],
> > > +      [],
> > > +      [AC_MSG_ERROR([Could not find a C99 compatible compiler])])
> > > +    else
> > > +      AC_MSG_ERROR([Could not find a C99 compatible compiler])
> > > +    fi
> > > +  fi
> > > +fi
> > 
> >  AC_PROG_CC_C99 sounds really like a better solution, although I have
> >  autoconf 2.68 on Fedora 16 :-(
> 
> This is also present in autoconf-2.68 (lib/autoconf/c.m4:1360)

 It seems that AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60.

 Anyway -- according to gnulib autoconf stuff -- there is an issue
 when AC_PROG_CC_C99 used together with AC_PROG_CC_STDC. For more
 details see gl_PROG_CC_C99 macro in coreutils or gnulib.

 I think we can exist without AC_PROG_CC_C99 for now, it seems better
 to explicitly enable some gcc warnings by UL_ADD_WARN() than add
 special workaround for AC_PROG_CC_C99, etc.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux