[Top][All Lists]

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

Re: libtool wrapper script changes basename(argv[0])

From: Ralf Wildenhues
Subject: Re: libtool wrapper script changes basename(argv[0])
Date: Thu, 14 May 2009 21:14:49 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Brandon,

* Brandon Philips wrote on Wed, May 13, 2009 at 05:35:36PM CEST:
> acl[1] uses the libtool wrapper script for getfacl/setfacl to link
> them against an in-tree version of libacl. These tools use progname =
> basename(argv[0]); to figure out their names for help output, etc. but
> the libtool wrapper creates executable named lt-getfacl/lt-setfacl
> which changes the output of these programs for my unit tests.
> Is there a way to make the libtool wrapper create an executable with
> the same "progname" as the final executable?

To add to Charles' reply, libtool could
1) override argv[0] whenever wrapper executables are used (i.e., on w32),
2) override argv[0] with 'exec -a' whenever bash is used for wrapper
scripts, or
3) always create a wrapper or intermediate executable anyway.

Not doing (3) would create an inconsistency between systems, which in
practice often means you'd not see the test failure on your nice
development system but only when your users try out on theirs, so it
was deemed to not do (1) and (2) either.

Doing (3) would cause more overhead for several systems when executing
uninstalled programs.


reply via email to

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