Keith MARSHALL wrote:
Thank you very much everybody!
It fits perfectly my needs for my

If you are using this in an autoconf script, you might find my
actual autoconf macro even more useful; (I put it in aclocal.m4,
for each of my projects, so it gets distributed -- it could just
as well go in acsite.m4, for local only use):

# ---------------------------------------
# Set VAR to the canonically resolved absolute equivalent of PATHNAME,
# (which may be a relative path, and need not refer to any existing 
# On Win32-MSYS build hosts, the returned path is resolved to its true
# native Win32 path name, (but with slashes, not backslashes).
# On any other system, it is simply the result which would be obtained
# if PATHNAME represented an existing directory, and the pwd command was
# executed in that directory.
 pwd -W >/dev/null 2>&1 && ac_pwd_w="pwd -W" || ac_pwd_w=pwd
 until ac_val=`exec 2>/dev/null; cd "$ac_dir" && $ac_pwd_w`
 ac_dir=`echo "$ac_dir" | sed 's?^[[./]]*??'`
 ac_val=`echo "$ac_val" | sed 's?/*$[]??'`
 $1=`echo "$2" | sed "s?^[[./]]*$ac_dir/*?$ac_val/?"'

Again, take care of the quoting -- the SourceForge archive doesn't
show it correctly!

  -  Backquotes are correct, as shown.
  -  All sed substitutions should be in SINGLE quotes, EXCEPT
     for the first of the pair in the final sed command, which
     MUST be in DOUBLE quotes;  the archive replaces all single
     quotes with double, which breaks the script.
  -  Other than these, DOUBLE quotes are correct.



SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement *
Mingw-msys mailing list
Thank you again.
I'm not very familiar with m4 macros.
I'll read soon the m4 documentation :)



Thierry Gourdin, AnimatLab
Laboratoire d'Informatique de Paris 6
8, rue du capitaine Scott
75015 PARIS