autoconf
[Top][All Lists]
Advanced

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

Re: autoconfiscating getopt_long()...


From: Matthew Whitworth
Subject: Re: autoconfiscating getopt_long()...
Date: Wed, 6 Dec 2000 09:57:34 -0800

On 2000.12.06 02:04:35 -0800 Alexandre Duret-Lutz wrote:
> Does someone here handle the FreeBSD case in some way?  What about:
> 
> AC_CHECK_FUNCS([getopt_long],,
> [#FreeBSD has a gnugetopt library for this:
>   AC_CHECK_LIB([gnugetopt],[getopt_long],
> [AC_DEFINE([HAVE_GETOPT_LONG])],
> [# use the gnu replacement
> AC_LIBOBJ(getopt)
> AC_LIBOBJ(getopt1)])])

This is great!  That's exactly what I was looking for.

> I don't see any use of getopt.h in the version of getopt I use.

I snagged my versions of getopt.c and getopt1.c out of the libiberty source
tree in the binutils package:

address@hidden:~/libiberty$ grep "getopt.h" getopt*.c
getopt.c:#include "getopt.h"
getopt1.c:#include "getopt.h"

Plus, the source file calling getopt_long() needs prototypes and all those
structure definitions.

I didn't see any RCS or CVS version numbers in either file, but the
copyright dates go to '97.  If there's a standard version for including in
other projects, please let me know!

> PS: http://sources.redhat.com/ml/automake/2000-09/msg00036.html

Thanks for including this link -- I had searched the autoconf archive
pretty hard before I posted, but hadn't thought about searching the
automake archive as well.

Cheers!

Matthew

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
matthew whitworth
address@hidden

Between here and there is better than either here or there!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]