cd703d
diff -up readline-6.2/shlib/Makefile.in.shlib readline-6.2/shlib/Makefile.in
cd703d
--- readline-6.2/shlib/Makefile.in.shlib	2010-12-28 21:56:21.000000000 +0100
cd703d
+++ readline-6.2/shlib/Makefile.in	2011-02-14 17:34:38.821537496 +0100
cd703d
@@ -170,7 +170,7 @@ $(SHARED_READLINE):	$(SHARED_OBJ)
cd703d
 
cd703d
 $(SHARED_HISTORY):	$(SHARED_HISTOBJ) xmalloc.so xfree.so
cd703d
 	$(RM) $@
cd703d
-	$(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so $(SHLIB_LIBS)
cd703d
+	$(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so
cd703d
 
cd703d
 # Since tilde.c is shared between readline and bash, make sure we compile 
cd703d
 # it with the right flags when it's built as part of readline
cd703d
diff -up readline-6.2/support/shlib-install.shlib readline-6.2/support/shlib-install
cd703d
--- readline-6.2/support/shlib-install.shlib	2009-10-28 14:30:18.000000000 +0100
cd703d
+++ readline-6.2/support/shlib-install	2011-02-14 17:33:07.611768164 +0100
cd703d
@@ -72,7 +72,7 @@ fi
cd703d
 case "$host_os" in
cd703d
 hpux*|darwin*|macosx*|linux*)
cd703d
 	if [ -z "$uninstall" ]; then
cd703d
-		chmod 555 ${INSTALLDIR}/${LIBNAME}
cd703d
+		chmod 755 ${INSTALLDIR}/${LIBNAME}
cd703d
 	fi ;;
cd703d
 cygwin*|mingw*)
cd703d
 	IMPLIBNAME=`echo ${LIBNAME} \
cd703d
diff -up readline-6.2/support/shobj-conf.shlib readline-6.2/support/shobj-conf
cd703d
--- readline-6.2/support/shobj-conf.shlib	2009-10-28 14:20:21.000000000 +0100
cd703d
+++ readline-6.2/support/shobj-conf	2011-02-14 17:33:07.612767986 +0100
cd703d
@@ -112,10 +112,11 @@ sunos5*|solaris2*)
cd703d
 linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo)
cd703d
 	SHOBJ_CFLAGS=-fPIC
cd703d
 	SHOBJ_LD='${CC}'
cd703d
-	SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
cd703d
+ 	SHOBJ_LDFLAGS='$(CFLAGS) -shared -Wl,-soname,$@'
cd703d
 
cd703d
-	SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
cd703d
+	SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
cd703d
 	SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
cd703d
+ 	SHLIB_LIBS='-ltinfo'
cd703d
 	;;
cd703d
 
cd703d
 freebsd2*)