[PATCH] autoconf & warn CFLAGS clean up

Doug Goldstein cardoe at gentoo.org
Thu Apr 26 10:25:21 PDT 2007


Guillem Jover wrote:
> On Thu, 2007-04-26 at 02:17:20 -0400, Doug Goldstein wrote:
>   
>> Index: b/m4/try_flag.m4
>> ===================================================================
>> --- /dev/null	1970-01-01 00:00:00.000000000 +0000
>> +++ b/m4/try_flag.m4	2007-04-26 02:15:05.000000000 -0400
>> @@ -0,0 +1,23 @@
>>     
>
>   
>> +AC_DEFUN([AC_CC_TRY_FLAG], [
>> +	  AC_MSG_CHECKING([whether $CC supports $1])
>> +
>> +	ac_save_CFLAGS="$CFLAGS"
>> +	CFLAGS="$CFLAGS $1"
>> +	AC_COMPILE_IFELSE([ ], [ac_cc_flag=yes], [ac_cc_flag=no])
>> +	CFLAGS="$ac_save_CFLAGS"
>> +
>> +	if test "x$ac_cc_flag" = "xyes"; then
>> +		ifelse([$2], , :, [$2])
>> +	else
>> +		ifelse([$3], , :, [$3])
>> +	fi
>> +
>> +	AC_MSG_RESULT([$ac_cc_flag])
>> +])
>>     
>
> I don't think it's a good idea to use the AC_ namespace there.
>
> regards,
> guillem
>   
How about ACX like the Autoconf Archive people use?


More information about the hal mailing list