Re: configure patch for building with Solaris

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi,

we definitely need C99, this is configure that checks for gnu99...
I think this is a bug in solaris and kannel has nothing todo with it.

Thanks,
Alex


Nikos Balkanas schrieb:
> Hi list,
>  
> A couple of changes in configure so that it builds in Solaris. It checks 
> if os = solaris and CC = gcc and releaves the requirement for gnu99 
> compiler (gcc after all is). Definition of gnu99 clashes with Sun's 
> definition of HUGE_VAL in /usr/include/iso/math_c99.h
>  
> Can someone explain me why the sudden interest for gnu99 compiler? It 
> didn't used to be so in 1.4.1 and kannel was compiling fine back then.
>  
> BR,
> Nikos
>  
> *** configure.orig Tue Nov 18 02:36:50 2008
> --- configure Tue Nov 18 02:38:13 2008
> ***************
> *** 3210,3215 ****
> --- 3210,3221 ----
>     return 0;
>   }
>   _ACEOF
> + *os=${host##*-}
> + os=${os%%.*}
> + if [ "$os" == "solaris2" ] && [ "$CC" == "gcc" ]; then
> +   $as_echo "$as_me: failed program was:" >&5
> +   sed 's/^/| /' conftest.$ac_ext >&5
> + else
> *    for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all 
> -qlanglvl=extc99
>     do
>       CC="$ac_save_CC $ac_arg"
> ***************
> *** 3235,3247 ****
>   else
>     $as_echo "$as_me: failed program was:" >&5
>   sed 's/^/| /' conftest.$ac_ext >&5
> -
> -
>   fi
> -
>   rm -f core conftest.err conftest.$ac_objext
>     test "x$ac_cv_prog_cc_c99" != "xno" && break
>   done
>   rm -f conftest.$ac_ext
>   CC=$ac_save_CC
>  
> --- 3241,3251 ----
>   else
>     $as_echo "$as_me: failed program was:" >&5
>     sed 's/^/| /' conftest.$ac_ext >&5
>   fi
>   rm -f core conftest.err conftest.$ac_objext
>   test "x$ac_cv_prog_cc_c99" != "xno" && break
>   done
> + *fi
> *  rm -f conftest.$ac_ext
>   CC=$ac_save_CC
> 
> ***************
> *** 3262,3268 ****
>  
>  
>  
> ! *if test "$ac_cv_prog_cc_c99" = "no"; then
> *      { { $as_echo "$as_me:$LINENO: error: \"Kannel requires a C 
> compiler that supports ISO C99.\"" >&5
>   $as_echo "$as_me: error: \"Kannel requires a C compiler that supports 
> ISO C99.\"" >&2;}
>      { (exit 1); exit 1; }; }
> --- 3266,3272 ----
>  
>  
>  
> ! *if [ "$ac_cv_prog_cc_c99" == "no" ] && !([ "$os" == "solaris2" ] && [ 
> "$CC" = "gcc" ]); then
> *      { { $as_echo "$as_me:$LINENO: error: \"Kannel requires a C 
> compiler that supports ISO C99.\"" >&5
>   $as_echo "$as_me: error: \"Kannel requires a C compiler that supports 
> ISO C99.\"" >&2;}
>      { (exit 1); exit 1; }; }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.