diff -ur readline-6.0.orig/shlib/Makefile.in readline-6.0/shlib/Makefile.in --- readline-6.0.orig/shlib/Makefile.in 2009-01-06 18:03:22 +0100 +++ readline-6.0/shlib/Makefile.in 2009-02-26 18:48:15 +0100 @@ -50,6 +50,7 @@ SHELL = @MAKE_SHELL@ host_os = @host_os@ +host_vendor = @host_vendor@ prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -182,13 +183,13 @@ -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir) install: installdirs $(SHLIB_STATUS) - $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY) - $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE) + $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY) + $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE) @echo install: you may need to run ldconfig uninstall: - $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY) - $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE) + $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY) + $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE) @echo uninstall: you may need to run ldconfig clean mostlyclean: force diff -ur readline-6.0.orig/support/shlib-install readline-6.0/support/shlib-install --- readline-6.0.orig/support/shlib-install 2008-07-20 01:16:05 +0200 +++ readline-6.0/support/shlib-install 2009-02-26 18:40:41 +0100 @@ -3,7 +3,7 @@ # shlib-install - install a shared library and do any necessary host-specific # post-installation configuration (like ldconfig) # -# usage: shlib-install [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library +# usage: shlib-install [-D] -O host_os -V host_vendor -d installation-dir [-b bin-dir] -i install-prog [-U] library # # Chet Ramey # address@hidden @@ -15,13 +15,14 @@ LDCONFIG=ldconfig PROGNAME=`basename $0` -USAGE="$PROGNAME [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library" +USAGE="$PROGNAME [-D] -O host_os -V host_vendor -d installation-dir [-b bin-dir] -i install-prog [-U] library" # process options while [ $# -gt 0 ]; do case "$1" in -O) shift; host_os="$1"; shift ;; + -V) shift; host_vendor="$1"; shift ;; -d) shift; INSTALLDIR="$1"; shift ;; -b) shift; BINDIR="$1" ; shift ;; -i) shift; INSTALLPROG="$1" ; shift ;; @@ -115,8 +116,8 @@ # # Create symlinks to the installed library. This section is incomplete. # -case "$host_os" in -*linux*) +case "$host_os-$host_vendor" in +*linux*|freebsd*-gentoo) # libname.so.M -> libname.so.M.N ${echo} ${RM} ${INSTALLDIR}/$LINK2 if [ -z "$uninstall" ]; then @@ -130,7 +131,7 @@ fi ;; -bsdi4*|*gnu*|darwin*|macosx*|k*bsd*-gnu|netbsd*) +bsdi4*|*gnu*|darwin*|macosx*|netbsd*) # libname.so.M -> libname.so.M.N ${echo} ${RM} ${INSTALLDIR}/$LINK2 if [ -z "$uninstall" ]; then @@ -153,8 +154,8 @@ ;; -# FreeBSD 3.x and above can have either a.out or ELF shared libraries -freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*) +# FreeBSD 3.x to 6.x can have either a.out or ELF shared libraries +freebsd[3-6]*|freebsdelf[3-6]*|freebsdaout[3-9]*) if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then # libname.so -> libname.so.M ${echo} ${RM} ${INSTALLDIR}/$LINK1 @@ -176,6 +177,15 @@ fi ;; +# FreeBSD 7.x and above has only ELF shared libraries +freebsd[7-9]*|freebsdelf[7-9]*) + # libname.so -> libname.so.M + ${echo} ${RM} ${INSTALLDIR}/$LINK1 + if [ -z "$uninstall" ]; then + eval $INSTALL_LINK1 + fi + ;; + hpux1*) # libname.sl -> libname.M ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl diff -ur readline-6.0.orig/support/shobj-conf readline-6.0/support/shobj-conf --- readline-6.0.orig/support/shobj-conf 2009-01-04 20:32:42 +0100 +++ readline-6.0/support/shobj-conf 2009-02-26 18:40:11 +0100 @@ -64,7 +64,7 @@ esac done -case "${host_os}-${SHOBJ_CC}" in +case "${host_os}-${SHOBJ_CC}-${host_vendor}" in sunos4*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD=/usr/bin/ld @@ -108,8 +108,8 @@ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -# All versions of Linux or the semi-mythical GNU Hurd. -linux*-*|gnu*-*|k*bsd*-gnu-*) +# All versions of Linux, the semi-mythical GNU Hurd or Gentoo/FreeBSD. +linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' @@ -128,7 +128,7 @@ ;; # FreeBSD-3.x ELF -freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*) +freebsd[3-6]*|freebsdelf[3-6]*|freebsdaout[3-9]*|dragonfly*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' @@ -145,6 +145,16 @@ fi ;; +# FreeBSD-7.x has only ELF +freebsd[7-9]*|freebsdelf[7-9]*) + SHOBJ_CFLAGS=-fPIC + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' + + SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + ;; + # Darwin/MacOS X darwin[89]*|darwin10*) SHOBJ_STATUS=supported