To: vim-dev@vim.org Subject: Patch 6.2f.035 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2f.035 Problem: The configure check for the netbeans interface doesn't work if the socket and nsl libraries are required. Solution: Check for the socket and nsl libraries before the netbeans check. Files: src/auto/configure, src/configure.in *** ../vim-6.2f.034/src/auto/configure Sat May 31 12:03:18 2003 --- src/auto/configure Sat May 31 16:38:17 2003 *************** *** 2118,2127 **** if test "$enable_netbeans" = "yes"; then echo "$ac_t""no" 1>&6 echo $ac_n "checking whether compiling netbeans integration is possible""... $ac_c" 1>&6 ! echo "configure:2123: checking whether compiling netbeans integration is possible" >&5 cat > conftest.$ac_ext < --- 2118,2221 ---- if test "$enable_netbeans" = "yes"; then echo "$ac_t""no" 1>&6 + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 + echo "configure:2123: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 + fi + + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 + echo "configure:2170: checking for gethostbyname in -lnsl" >&5 + ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" + fi + rm -f conftest* + LIBS="$ac_save_LIBS" + + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 + fi + echo $ac_n "checking whether compiling netbeans integration is possible""... $ac_c" 1>&6 ! echo "configure:2217: checking whether compiling netbeans integration is possible" >&5 cat > conftest.$ac_ext < *** ../vim-6.2f.034/src/configure.in Sat May 31 12:03:18 2003 --- src/configure.in Sat May 31 16:38:14 2003 *************** *** 630,635 **** --- 630,638 ---- , [enable_netbeans="yes"]) if test "$enable_netbeans" = "yes"; then AC_MSG_RESULT(no) + dnl On Solaris we need the socket and nsl library. + AC_CHECK_LIB(socket, socket) + AC_CHECK_LIB(nsl, gethostbyname) AC_MSG_CHECKING(whether compiling netbeans integration is possible) AC_TRY_LINK([ #include *** ../vim-6.2f.034/src/version.c Sat May 31 12:03:18 2003 --- src/version.c Sat May 31 16:43:15 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 35, /**/ -- He who laughs last, thinks slowest. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///