Re: autoconf 2.52 broke glib on Solaris



Hi,

Please note that this will only occur if you're NOT using gcc.

This part of configure.in will cause 

	#define GLIB_HAVE_ALLOCA_H

to be added to glibconfig.h in the system has such a header. 
GLIB_HAVE_ALLOCA_H is used in glib/galloca.h to find the right
definition of alloca():

#ifdef  __GNUC__
/* GCC does the right thing */
# undef alloca
# define alloca(size)   __builtin_alloca (size)
#elif defined (GLIB_HAVE_ALLOCA_H)
/* a native and working alloca.h is there */ 
# include <alloca.h>
#else /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */
(...)

Unfortunately autoconf 2.52 will define ac_cv_working_alloca_h but
configure is looking for ac_cv_header_alloca_h so GLIB_HAVE_ALLOCA_H
won't be defined in glibconfig.h and so alloca.h is not included in
galloca.h.

Thanks,

Laca

Tim Janik wrote:
> 
> [laca, forwarding this to gtk-devel to get comments]
> 
> On Fri, 27 Jul 2001, Laszlo PETER wrote:
> 
> > Hi,
> >
> > Just upgraded to autoconf 2.52 and glib broke: alloca() remained
> > undefined. I've found that the new autoconf has a different
> > AC_FUNC_ALLOCA which sets ac_cv_working_alloca_h rather than
> > ac_cv_header_alloca_h.
> >
> > This patch should make it work with both versions.
> 
> anyone else has experience with the new autoconf and knows
> whether this is ok to commit?
> 
> >
> > Regards,
> >
> > Laca
> >
> > Index: configure.in
> > ===================================================================
> > RCS file: /sgnome/cvsroots/GNOME/glib/configure.in,v
> > retrieving revision 1.212
> > diff -u -r1.212 configure.in
> > --- configure.in      2001/07/17 19:01:11     1.212
> > +++ configure.in      2001/07/25 17:14:49
> > @@ -1808,7 +1808,14 @@
> >  # on variable expansion in case labels.  Look at the generated config.status
> >  # for a hint.
> >
> > -glib_header_alloca_h="$ac_cv_header_alloca_h"
> > +case xyes in
> > +x$ac_cv_header_alloca_h)
> > +  glib_header_alloca_h=yes
> > +  ;;
> > +x$ac_cv_working_alloca_h)
> > +  glib_header_alloca_h=yes
> > +  ;;
> > +esac
> >
> >  case xyes in
> >  x$ac_cv_header_float_h)
> >
> >
> 
> ---
> ciaoTJ




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