[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem importing argp
From: |
Simon Josefsson |
Subject: |
Re: problem importing argp |
Date: |
Tue, 15 Aug 2006 17:22:15 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
"Gurganus, Brant L" <address@hidden> writes:
> It seems that various AC_FUNC_{} macros in configure.ac modify the behavior of
> the gnulib Makefile on the line containing @LIBOBJS@:
>
> libgnu_a_LIBADD = @LIBOBJS@
Yes, this is a known problem with gnulib. Gnulib is incompatible with
several AC_FUNC_* functions, and AC_REPLACE_FUNCS in general.
There are some solutions:
1) Use only gnulib modules to replace broken code (in your case, there
is a memcmp in gnulib too, so import it too, and remove your own
AC_FUNC_MEMCMP stuff). If there isn't a replacement module in
gnulib, consider submitting your function.
2) Create a new configure.ac in a sub-directory of your project that
is for gnulib only. This will separate the LIBOBJS in that
directory from your own. This has been recommended in the past,
but it isn't a recommendation that I have followed in my projects
because it generates much more maintenance, so I understand if you
don't like this.
3) Fix gnulib to not have this problem. When this "feature" was
introduced, I recall that it would be possible to solve this with
modern versions of autoconf/m4/automake/?. I'm not sure if this
actually is the case now. I agree with Bruno that storing
information about filenames in M4 macros (which is how the
AC_LIBOBJ stuff works) is a bad idea. I don't know how to do this.
I suspect it should rewrite gnulib's LIBOBJS to use a different
variable, e.g., gl_LIBOBJS, somehow.
Btw, I sympathise with your problem, but for a different reason: Some
of my projects (LibIDN and GnuTLS) are separated into a LGPL part and
a GPL part. I can only use the LGPL gnulib modules in those projects,
until this problem is solved. Further, for GnuTLS, some modules I
want to use in the command-line tools (e.g., xalloc) are things that I
would not want to have linked with the library -- so I want "two"
gnulib directories in one project for this reason too.
/Simon
> Brant Gurganus
> http://www.rose-hulman.edu/~gurganbl
>
> -----Original Message-----
> From: Sergey Poznyakoff [mailto:address@hidden
> Sent: Tue 08/15/06 8:49 AM
> To: Gurganus, Brant L
> Cc: address@hidden
> Subject: RE: problem importing argp
>
> Gurganus, Brant L <address@hidden> wrote:
>
>> Why were those files added to the Makefile when I ran "{path to gnulib
>> checkout}/gnulib-tool --import argp" then and what is the resolution
>> for the problem? They cames from a line that use @ALLOCA@ in the
>> generated Makefile and when I removed AC_FUNC_MEMCMP and friends, the
>> problem went away.
>
> Trying a fresh import I did not experience any of the described
> problems. Notice also that `gnulib-tool --import argp' does not generate
> any `AC_FUNC_MEMCMP' line. Please make sure you use a fresh gnulib
> checkout.
>
> Regards,
> Sergey