This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: AC_REPLACE_GNU_GETOPT ?!?


> I have never actually come across the AC_REPLACE_GNU_GETOPT macro...
> the files getopt.c, getopt.h and getopt1.c have their own magic to
> #define away the body of their own code if the compilation environment
> provides an implementation of its own.

That would be great it if was true.  Unfortunately all the GNU
packages I've seen that have local copies of getopt.h use that copy
when compiling their files, regardless of whether or not the system or
the package supplies the actual getopt functions.  On some systems
this can cause problems if the system getopt.h (unused) needs to be
used when you are using the system supplied getopt functions.

For example, I just tested the latest available make (make-3.79.1) and
indeed, it the supplied getopt.o compiles to an empty object file, but
when main.c is compiled, it picks up the package supplied getopt.h
instead of the one from the system header directory.

-Fred


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]