autoconf
[Top][All Lists]
Advanced

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

Re: autoconfiscating getopt_long()...


From: Alexandre Duret-Lutz
Subject: Re: autoconfiscating getopt_long()...
Date: 06 Dec 2000 11:04:35 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

>>> "Matthew" == Matthew Whitworth <address@hidden> writes:

 Matthew> What I have done so far (and it seems to work), is to
 Matthew> copy getopt.c and getopt.h to getopt_long.c and
 Matthew> getopt_long.h, and then to use the following snippets:

 Matthew> configure.in:
 Matthew> AC_REPLACE_FUNCS(getopt_long)

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)])])

 Matthew> Makefile.am:
 Matthew> useless_SOURCES=useless.c getopt_long.h tailor.h
 Matthew> dnl This condionally links getopt_long.o
 Matthew> address@hidden@

 Matthew> useless.c:
 Matthew> #ifndef HAVE_GETOPT_LONG
 Matthew> #  include "getopt_long.h"
 Matthew> #else
 Matthew> #  include <getopt.h>
 Matthew> #endif

 Matthew> I have no idea what tailor.h does yet, but getopt.h
 Matthew> #includes it.

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

[...]

PS: http://sources.redhat.com/ml/automake/2000-09/msg00036.html
-- 
Alexandre Duret-Lutz



reply via email to

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