[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getopt question
Gary V. Vaughan
Re: getopt question
Tue, 21 Nov 2000 21:18:17 +0000
On Tue, Nov 21, 2000 at 08:53:46AM -0500, Matthew R. MacIntyre wrote:
> Hello again Gary,
> I think I follow everything, after going through the documentation again,
> but I have a couple of followup questions.
> On Mon, 20 Nov 2000, Gary V. Vaughan wrote:
> > You also need the AC_REPLACE_GNU_GETOPT macro definition... but I
> > don't know where you might find that -- at the autoconf macro
> > repository perhaps?
> Well, I couldn't find it there, but I found one taken from a mailing list
Wow! You were determined, huh? Actually if you follow the recipe
I outlined in the last mail, you don't need that macro. I should have
been clearer that it was an either/or. Sorry.
> After following the directions in the file, that seems to work fine.
> > configure.in:
> > ...
> > Xsed="sed -e s/^X//"
> > LTLIBOBJS=`echo "$LIBOBJS | \
> > [$Xsed -e "s,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,"]
> > AC_SUBST(LTLIBOBJS)
> This piece wasn't working for me, causing configure to bomb, until I added
> a "`" at the end.
Oops. Careless cut and paste. You do indeed need that "`" at the end.
I also missed a double quote from tyhe first line, and the X in the
echo command. Try this instead (I have double checked for correctness
Xsed="sed -e s/^X//"
LTLIBOBJS=`echo X"$LIBOBJS" | \
[$Xsed -e "s,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,"]`
> Then, configure at least gets through it, but the
> substitution that it makes for me in the replace/Makefile when I'm trying
> this out on FreeBSD is:
> LTLIBOBJS = getopt.o getopt1.o getopt.o getopt1. | sed -s s/^X// -e s,.[^.]*
> ,.lo ,g
> which doesn't seem right.
It isn't. You should end up with something along the lines of:
LTLIBOBJS = getopt.lo getopt1.lo
> Any thoughts on why this is coming out in the manner it is?
Probably the stuff I misquoted from the book. If it still doesn;t
work, try it by hand from your shell prompt. For example, this is
what I get:
$ echo X"getopt.o getopt1.o" |
> sed -e s/^X// -e "s,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,"
___ _ ___ __ _ mailto: address@hidden
/ __|__ _ _ ___ _| | / / | / /_ _ _ _ __ _| |_ __ _ ___ address@hidden
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
\___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page: /___/ /___/ gpg public key: