More about the configure problems in 0.99.0




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.

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

-Raphael



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