Hi,

when one has a program that does something like

  if(strcmp(argv[0], "gunzip") == 0)
    uncompress();
  else
    compress();

and this program also uses a libtool library, then the - lets use this 
example - just-built "gzip" file will be around 4 kilobytes only, it is 
a libtool wrapper scripts for .libs/gzip. "gunzip" would then be a 
symlink to "gzip", but calling gunzip results in the libtool script 
calling gzip instead, thereby leading to the wrong mode of operation.

This makes it hard to run libtooled programs from within the compilation 
directory. A possible workaround is that the libtool wrapper script 
honors $0 a little more:

  if [[ "$0" != %program_name% ]]; then
    t=$(mktemp -d);
    ln -s %program_name% "$t/${0##*/}";
    [...do libtool setup like LD_LIBRARY_PATH etc...]
    exec "$t/${0##*/}";

Could something like this be implemented? My current libtool version is 
2.2.6.

Jan


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to