[Box Backup-dev] Re: [Box Backup] readline support on OS X

Johan Allard boxbackup-dev at fluffy.co.uk
Fri Feb 17 01:09:16 GMT 2006


--Apple-Mail-6-770083298
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

On 17/02/2006, at 10:41 AM, Martin Ebourne wrote:

> On Fri, 2006-02-17 at 00:39 +1100, Johan Allard wrote:
>> Hi,
>>
>> After some fiddling around I managed to build readline support into
>> the default Mac OS 10.4.5 distribution. The patch to get it to work
>> is as follows (against trunk):
>>
>> Index: infrastructure/m4/vl_lib_readline.m4
>> ===================================================================
>> --- infrastructure/m4/vl_lib_readline.m4        (revision 463)
>> +++ infrastructure/m4/vl_lib_readline.m4        (working copy)
>> @@ -70,6 +70,7 @@
>>     if test "x$vl_cv_lib_readline_compat_found" = "xno"; then
>>       VL_LIB_READLINE_CHECK([editline],
>>                             [edit editline],
>> +                          [readline/readline.h],
>>                            [editline/readline.h],
>>                            [editline/readline.h])
>>     fi
>
> Johan,
>
> This cannot be right. You've added another parameter to a macro that
> only takes four parameters. This will break something else.
>
> Also I find it odd that an editline header should be installed in
> readline/readline.h. Is it possible you have both readline and  
> editline
> available, and have managed to mix one set of headers with different
> libraries?
>
> Please follow up to boxbackup-dev at fluffy.co.uk since this doesn't  
> belong
> on the main list. Also patches as attachments please, it is impossible
> to apply them from inline due to whitespace getting munged.
>
> Cheers,
>
> Martin.


Here is the diff as an attachment.


--Apple-Mail-6-770083298
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="readline.diff"
Content-Disposition: attachment;
	filename=readline.diff

Index: infrastructure/m4/vl_lib_readline.m4
===================================================================
--- infrastructure/m4/vl_lib_readline.m4	(revision 463)
+++ infrastructure/m4/vl_lib_readline.m4	(working copy)
@@ -70,6 +70,7 @@
   if test "x$vl_cv_lib_readline_compat_found" = "xno"; then
     VL_LIB_READLINE_CHECK([editline],
                           [edit editline],
+                          [readline/readline.h],  
 	  		  [editline/readline.h],
 			  [editline/readline.h])
   fi

--Apple-Mail-6-770083298
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


What happens is that Apple has actually a pretty dodgy default  
configuration, look at this:

allard at borgcube ~ % ls -l /usr/lib/libreadline.dylib
lrwxr-xr-x   1 root  wheel  13 Jan 24 18:33 /usr/lib/ 
libreadline.dylib@ -> libedit.dylib

allard at borgcube ~ % ls -l /usr/include/editline*
zsh: no matches found: /usr/include/editline*

allard at borgcube ~ % ls -l /usr/include/readline
total 12
lrwxr-xr-x   1 root  wheel    10 Jan 25 07:06 history.h@ -> readline.h
-r--r--r--   1 root  wheel  6435 Mar 21  2005 readline.h


So what happens is that on the Mac Apple has actually only editline  
installed and it symlinks to make believe that it has readline, and  
it doesn't have the include files in the right place to use editline  
properly. Box Backup the detects libedit just fine but it doesn't  
pickup editline/readline.h because that's not where Apple has stored  
it. To get the Mac to do it properly we could: ln -s /usr/include/ 
readline /usr/include/editline (and that's what I did when testing  
it), but of course we can't get everyone to do that to get readline/ 
editline support so we'll have to update the configure script  
instead. Or does anyone have any other idea?

Cheers

//johan
--Apple-Mail-6-770083298--



More information about the Boxbackup-dev mailing list