lilypond-devel
[Top][All Lists]
Advanced

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

Re: configure: readlink problem


From: Karl Hammar
Subject: Re: configure: readlink problem
Date: Mon, 05 Jun 2006 23:38:42 +0200

address@hidden:
> > Karl Hammar schreef:
> > > 
> > > Since configure does not test for readlink it is perhaps a bad choise, 
> > > the alternative would be to use a shell or python script or if someone 
> > > comes up with a good way to find the afm files.
> > 
> > we rely on python anyway, so I'm all for a Python based solution.
> > Patch?
...
> 
> Ack, later this week.
...

Attached (diff) is a possible patch:

        * configure.in: readlink -f is system dependent, replaced with 
        python version

1. One could maybe write it as an one-liner:

  $ ls -l /usr/bin/emacs
  lrwxrwxrwx  1 root root 23 Nov 12  2005 /usr/bin/emacs -> 
/etc/alternatives/emacs
  $ ls -l /etc/alternatives/emacs
  lrwxrwxrwx  1 root root 18 Nov 24  2005 /etc/alternatives/emacs -> 
/usr/bin/emacs21-x
  $ python  -c 'import os.path, sys;  print os.path.realpath(sys.argv.pop(1))' 
/usr/bin/emacs
  /usr/bin/emacs21-x
  $

2. It requires python >= 2.2. One could put the python version check 
   elsewhere.

3. the manual doesn't indicate wheter sys.argv is ro or rw --- so
   sys.argv.pop(1) could fail for others, the alternative is to use
   changeqoute's and sys.argv[1] instead, as in diff2

4. one could put the python code in a seperate file, as in diff3, and 
   put readlink.py in python/ or elsewhere

Regards,
/Karl

Attachment: readlink.py
Description: readlink.py

Attachment: diff3
Description: diff3

Attachment: diff2
Description: diff2

Attachment: diff
Description: diff


reply via email to

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