Hi,

I apologise in advance if this is a stupid question (and would
happily accept a gentle redirect to a FAQ), but I am most
certainly a automake/autoconf newbie...

I have codes for which I use GNU getopt with long command
names.  On linux this is of course no particular effort, but
on non-linux (e.g. solaris) this still works if I keep a local
copy of the GNU getopt source (it compiles and links quite
happily with the solaris C compiler...).

My fundamental automake/autoconf issue is how to conditionally
link-in the private GNU getopt if I'm not on linux.  If anyone
has a clever solution to this problem (say by using the $target
variable) I'd appreciate hearing it.

Now the automake manual refers to an evocatively titled command
"AC_REPLACE_GNU_GETOPT" in a list at the bottom of p 10, along
with the following "description":

"Automake will ensure that the appropriate dependencies are
 generated for the objects corresponding to these macros.
 Also, Automake will verify that the appropriate source files
 are part of the distribution. Note that Automake does not
 come with any of the C sources required to use these macros,
 so automake -a will not install the sources. See section
 Building a library for more information. "

I guess I'm stupid, but I really don't understand what this
description is saying.  Just for fun I've tried adding calls to 
AC_REPLACE_GNU_GETOPT in my Makefile.am (with and without
arguments), but all that seems to do is to generate a Makefile
that make cannot parse.

So, does anyone out there have a (some) simple example(s) of
how this AC_REPLACE_GNU_GETOPT macro is intended to be used?

Thank you in advance for your time...

                                                - Andy

Reply via email to