Re: [gtk-list] More about the configure problems in 0.99.0




Raphael.Quinet@eed.ericsson.se writes:

> I looked at configure.in and I think I know what is causing the
> problems with -DX_LOCALE getting defined when it shouldn't.  The
> problem is that configure.in checks if <wchar.h> or <wcstr.h> exists,
> and relies on that for deciding if the wide chars functions exist or
> not.  This is a mistake.  Instead of relying on the header files for
> deciding if a given function exists or not, it should use
> AC_TRY_COMPILE or AC_CHECK_FUNCS (I don't have the autoconf docs here,
> so I don't know which one should be used, and how) and try to compile
> a program containing these functions, regardless of the headers.
> 
> It is only after having found the functions in the C library (or not)
> that the script should check which header files are needed for them.
> Under SunOS, the wide char functions are defined in <stdlib.h>.  This
> explains why the (broken) configure script failed to use them although
> they do exist in the C library.

A reasonable explaination. Actually, <stdlib.h> is the standard
location for those functions, and pretty much all systems seem
to have them. So it may not be necessary to make that check at
all. iswalnum() is more of a problem since it is:

 a) less standard 
 b) Defined either in wctype.h or wchar.h
 c) possibly defined as a macro? (Making AC_CHECK_FUNCS dubious)

But as far as I can tell, if a system has either <wchar.h> or
<wctype.h>, it should have iswalnum().
 
> By the way, I also had to modify the test for XInput in configure.in,
> which had missing quotes around its arguments.  The line should look
> like this:
> if test "x$with_xinput" = "xgxi" -o "x$with_xinput" = "xyes"; then

Thanks.

Regards,
                                        Owen



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