Re: /bzr/squid3/trunk/ r10322: Bug 2873: undefined symbol rint

2010-03-12 Thread Kinkie
I am currently also doing this as part of the autoconf-refactor branch.
I believe it's ready for an interim merge to trunk, but I'd like a
second pair of eyes to check it before it's done.

On 3/12/10, Henrik Nordstrom  wrote:
> Every AC_CHECK_LIB where we look for main needs to be redone to look for
> some sane function. See bug for details.
>
>
> ons 2010-03-10 klockan 20:59 +1300 skrev Amos Jeffries:
>> 
>> revno: 10322
>> committer: Amos Jeffries 
>> branch nick: trunk
>> timestamp: Wed 2010-03-10 20:59:21 +1300
>> message:
>>   Bug 2873: undefined symbol rint
>>
>>   Detect math library properly based on rint synbol we need.
>>   On Solaris at least "main" symbol does not exist.
>> modified:
>>   configure.in
>>   src/Common.am
>> vanligt textdokument-bilaga (r10322.diff)
>> === modified file 'configure.in'
>> --- a/configure.in   2010-02-03 12:36:21 +
>> +++ b/configure.in   2010-03-10 07:59:21 +
>> @@ -2973,14 +2973,22 @@
>>fi
>>
>>  AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"])
>> +MATHLIB=""
>>  case "$host_os" in
>>  mingw|mingw32)
>>  AC_MSG_NOTICE([Use MSVCRT for math functions.])
>>  ;;
>>  *)
>> -AC_CHECK_LIB(m, main)
>> +AC_SEARCH_LIBS([rint],[m],[
>> +case "$ac_cv_search_rint" in
>> +no*)
>> +;;
>> +*)
>> +MATHLIB="$ac_cv_search_rint"
>> +esac ])
>>  ;;
>>  esac
>> +AC_SUBST(MATHLIB)
>>
>>  dnl Enable IPv6 support
>>  AC_MSG_CHECKING([whether to enable IPv6])
>>
>> === modified file 'src/Common.am'
>> --- a/src/Common.am  2009-11-21 05:29:45 +
>> +++ b/src/Common.am  2010-03-10 07:59:21 +
>> @@ -29,6 +29,8 @@
>>  $(OBJS): $(top_srcdir)/include/version.h
>> $(top_builddir)/include/autoconf.h
>>
>>  ## Because compatibility is almost universal. And the link order is
>> important.
>> +## NP: libmisc util.cc depends on rint from math library
>>  COMPAT_LIB = \
>>  -L$(top_builddir)/lib -lmiscutil \
>> -$(top_builddir)/compat/libcompat.la
>> +$(top_builddir)/compat/libcompat.la \
>> +$(MATHLIB)
>>
>
>
>


-- 
/kinkie


Re: /bzr/squid3/trunk/ r10322: Bug 2873: undefined symbol rint

2010-03-12 Thread Henrik Nordstrom
Every AC_CHECK_LIB where we look for main needs to be redone to look for
some sane function. See bug for details.


ons 2010-03-10 klockan 20:59 +1300 skrev Amos Jeffries:
> 
> revno: 10322
> committer: Amos Jeffries 
> branch nick: trunk
> timestamp: Wed 2010-03-10 20:59:21 +1300
> message:
>   Bug 2873: undefined symbol rint
>   
>   Detect math library properly based on rint synbol we need.
>   On Solaris at least "main" symbol does not exist.
> modified:
>   configure.in
>   src/Common.am
> vanligt textdokument-bilaga (r10322.diff)
> === modified file 'configure.in'
> --- a/configure.in2010-02-03 12:36:21 +
> +++ b/configure.in2010-03-10 07:59:21 +
> @@ -2973,14 +2973,22 @@
>fi
>  
>  AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"])
> +MATHLIB=""
>  case "$host_os" in
>  mingw|mingw32)
>   AC_MSG_NOTICE([Use MSVCRT for math functions.])
>   ;;
>   *)
> - AC_CHECK_LIB(m, main)
> + AC_SEARCH_LIBS([rint],[m],[
> + case "$ac_cv_search_rint" in
> + no*)
> + ;;
> + *)
> + MATHLIB="$ac_cv_search_rint"
> + esac ])
>   ;;
>  esac
> +AC_SUBST(MATHLIB)
>  
>  dnl Enable IPv6 support
>  AC_MSG_CHECKING([whether to enable IPv6])
> 
> === modified file 'src/Common.am'
> --- a/src/Common.am   2009-11-21 05:29:45 +
> +++ b/src/Common.am   2010-03-10 07:59:21 +
> @@ -29,6 +29,8 @@
>  $(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h
>  
>  ## Because compatibility is almost universal. And the link order is 
> important.
> +## NP: libmisc util.cc depends on rint from math library
>  COMPAT_LIB = \
>   -L$(top_builddir)/lib -lmiscutil \
> - $(top_builddir)/compat/libcompat.la
> + $(top_builddir)/compat/libcompat.la \
> + $(MATHLIB)
>