<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 14-03-08 09:03 AM, Hans de Goede
wrote:<br>
</div>
<blockquote cite="mid:531B233C.7000102@redhat.com" type="cite">So
I've just been looking into using AC_USE_SYSTEM_EXTENSIONS but
that seem pretty
<br>
useless, it only adds the relevant defines to confdefs.h, not into
cflags,
<br>
and in libxtrans we want to add them to the .pc file, so we need
them in a variable.
<br>
<br>
I'm open to different suggestions, but I think my initial patch
might be the best
<br>
way to fix this.
<br>
<br>
</blockquote>
Check the pattern in other modules such as libX11. The source code
includes the content of the generated config.h (see config.h.in).<br>
<blockquote>#ifdef HAVE_CONFIG_H<br>
#include <config.h><br>
#endif<br>
</blockquote>
which contains definitions such as:<br>
<blockquote>/* Enable GNU extensions on systems that have them. */<br>
#ifndef _GNU_SOURCE<br>
# define _GNU_SOURCE 1<br>
#endif<br>
/* Enable threading extensions on Solaris. */<br>
#ifndef _POSIX_PTHREAD_SEMANTICS<br>
# define _POSIX_PTHREAD_SEMANTICS 1<br>
#endif<br>
/* Enable extensions on HP NonStop. */<br>
#ifndef _TANDEM_SOURCE<br>
# define _TANDEM_SOURCE 1<br>
#endif<br>
/* Enable general extensions on Solaris. */<br>
#ifndef __EXTENSIONS__<br>
# define __EXTENSIONS__ 1<br>
#endif<br>
</blockquote>
and so on...<br>
<br>
When a module is configured (running ./configure), the appropriate
values are filled-in based on what the platform is. If hard coded in
the C code, all this work has to be done all over again. In
addition, this mechanism was put in place because the gcc command
might be lengthy on some platforms.<br>
<br>
Check it out, it should solve the problem.<br>
<br>
<br>
<br>
<br>
</body>
</html>