Hi. I'm trying to enable readline for php like this:
"./configure --with-readline=shared,/usr" But it won't work... I wonder at what point, if ever it did work? I'm getting this error (php-4.3.0RC4): [snip] configure:62897: checking for readline support configure:62983: checking for tgetent in -lncurses configure:63002: gcc -o conftest -g -O2 conftest.c -lncurses -lcrypt -lresolv -lm -ldl -lnsl -lcrypt 1>&5 configure:63265: checking for readline in -lreadline configure:63284: gcc -o conftest -g -O2 -L/usr/lib conftest.c -lreadline -lcrypt -lresolv -lm -ldl -lnsl -lcrypt 1>&5 /usr/lib/libreadline.so: undefined reference to `tgetnum' /usr/lib/libreadline.so: undefined reference to `tgoto' /usr/lib/libreadline.so: undefined reference to `tgetflag' /usr/lib/libreadline.so: undefined reference to `BC' /usr/lib/libreadline.so: undefined reference to `tputs' /usr/lib/libreadline.so: undefined reference to `PC' /usr/lib/libreadline.so: undefined reference to `tgetent' /usr/lib/libreadline.so: undefined reference to `UP' /usr/lib/libreadline.so: undefined reference to `tgetstr' collect2: ld returned 1 exit status configure: failed program was: #line 63273 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline(); int main() { readline() ; return 0; } This works (with my readline): READLINE_SHARED_LIBADD="-lhistory -lreadline -lncurses" ./configure --with-readline=shared,/usr But my full configure script does not want to work..., somewhere down the line the above gets eaten up... BTW. the attached patch should be applied to the realine package in Cooker. There is no such thing as "--with-curses=ncurses". I could not file a bug in buzilla about this because readline was not to be found in the list... warly? Chears. -- Regards // Oden Eriksson, Deserve-IT.com
--- readline.spec 2002-08-05 09:35:26.000000000 +0000 +++ readline.spec.oden 2002-12-22 17:05:19.000000000 +0000 @@ -4,7 +4,7 @@ Summary: Library for reading lines from a terminal Name: readline Version: %{pversion} -Release: 4mdk +Release: 5mdk License: GPL Group: System/Libraries Source: ftp://ftp.gnu.org/pub/gnu/readline/readline-%{version}.tar.bz2 @@ -16,6 +16,7 @@ Patch100: readline-4.3-vim-reapeat-fix.diff.bz2 Patch101: readline-4.3-segfault-fix.diff.bz2 Provides: libreadline.so.4.1 libhistory.so.4.1 libreadline.so.4.2 libhistory.so.4.2 +BuildRequires: ncurses-devel Buildroot: %{_tmppath}/%{name}-root/ %description @@ -49,8 +50,9 @@ %build export CFLAGS="$RPM_OPT_FLAGS" -%configure --with-curses=ncurses --libdir=%_libdir +%configure --with-curses --libdir=%_libdir perl -p -i -e 's|-Wl,-rpath.*||' shlib/Makefile +find -name Makefile | xargs perl -pi -e "s|^TERMCAP_LIB.*|TERMCAP_LIB = -lncurses|g" make static shared %install @@ -60,12 +62,16 @@ # before /usr is mounted install -d $RPM_BUILD_ROOT/%{_lib} mv $RPM_BUILD_ROOT%{_libdir}/*.so* $RPM_BUILD_ROOT/%{_lib} -ln -s ../../%{_lib}/lib{history,readline}.so $RPM_BUILD_ROOT%{_libdir} for i in history readline; do ln -s ../%{_lib}/lib$i.so.4 $RPM_BUILD_ROOT/%{_lib}/lib$i.so.4.1 ln -s ../%{_lib}/lib$i.so.4 $RPM_BUILD_ROOT/%{_lib}/lib$i.so.4.2 done +pushd $RPM_BUILD_ROOT/%{_lib} + for f in *so*; do + ln -s ../../%{_lib}/$f $RPM_BUILD_ROOT%{_libdir}/$f + done +popd # The make install moves the existing libs with a suffix of old. Urgh. rm -f $RPM_BUILD_ROOT/%{_lib}/*.old @@ -89,6 +95,7 @@ %files %defattr(-,root,root) /%{_lib}/lib*.so.* +%{_libdir}/lib*.so.* %files devel %defattr(-,root,root) @@ -102,6 +109,11 @@ /%{_lib}/*so %changelog +* Sun Dec 22 2002 Oden Eriksson <[EMAIL PROTECTED]> 4.3-5mdk +- fix silly softlinks to make PHP 4.3.0RC4 compile and also fix + --with-curses + perl seach and replace to enable needed missing + ncurses symbols. + * Mon Aug 05 2002 Thierry Vignaud <[EMAIL PROTECTED]> 4.3-4mdk - fix non working repeating with '.' command [P100] - fix segfault on c-arrows [P101]