home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.365 < prev    next >
Encoding:
Internet Message Format  |  2004-03-15  |  12.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.365
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.365
  11. Problem:    The configure checks for Perl and Python may add compile and link
  12.         arguments that break building Vim.
  13. Solution:   Do a sanity check: try building with the arguments.
  14. Files:        src/auto/configure, src/configure.in
  15.  
  16.  
  17. *** ../vim-6.2.364/src/auto/configure    Tue Feb 24 22:17:28 2004
  18. --- src/auto/configure    Tue Mar 16 17:59:01 2004
  19. ***************
  20. *** 1599,1623 ****
  21.         
  22.               perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
  23.             -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//'`
  24. !       if test "X$perlcppflags" != "X"; then
  25. !     PERL_CFLAGS="$perlcppflags"
  26. !       fi
  27. !             PERL_LIBS=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
  28.           sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
  29.               -e 's/-bE:perl.exp//' -e 's/-lc //'`
  30. -       
  31.                     perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
  32.           -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
  33. !       if test "X$perlldflags" != "X"; then
  34. !     LDFLAGS="$perlldflags $LDFLAGS"
  35. !       fi
  36. !       PERL_SRC="auto/if_perl.c if_perlsfio.c"
  37. !       PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
  38. !       PERL_PRO="if_perl.pro if_perlsfio.pro"
  39. !       cat >> confdefs.h <<\EOF
  40.   #define FEAT_PERL 1
  41.   EOF
  42.   
  43.        fi
  44.       else
  45.         echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6
  46. --- 1599,1655 ----
  47.         
  48.               perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
  49.             -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//'`
  50. !             perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
  51.           sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
  52.               -e 's/-bE:perl.exp//' -e 's/-lc //'`
  53.                     perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
  54.           -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
  55. !                   echo $ac_n "checking if compile and link flags for Perl are sane""... $ac_c" 1>&6
  56. ! echo "configure:1610: checking if compile and link flags for Perl are sane" >&5
  57. !       cflags_save=$CFLAGS
  58. !       libs_save=$LIBS
  59. !       ldflags_save=$LDFLAGS
  60. !       CFLAGS="$CFLAGS $perlcppflags"
  61. !       LIBS="$LIBS $perllibs"
  62. !       LDFLAGS="$perlldflags $LDFLAGS"
  63. !       cat > conftest.$ac_ext <<EOF
  64. ! #line 1618 "configure"
  65. ! #include "confdefs.h"
  66. ! int main() {
  67. !  
  68. ! ; return 0; }
  69. ! EOF
  70. ! if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  71. !   rm -rf conftest*
  72. !   echo "$ac_t""yes" 1>&6; perl_ok=yes
  73. ! else
  74. !   echo "configure: failed program was:" >&5
  75. !   cat conftest.$ac_ext >&5
  76. !   rm -rf conftest*
  77. !   echo "$ac_t""no: PERL DISABLED" 1>&6; perl_ok=no
  78. ! fi
  79. ! rm -f conftest*
  80. !       CFLAGS=$cflags_save
  81. !       LIBS=$libs_save
  82. !       LDFLAGS=$ldflags_save
  83. !       if test $perl_ok = yes; then
  84. !     if test "X$perlcppflags" != "X"; then
  85. !       PERL_CFLAGS="$perlcppflags"
  86. !     fi
  87. !     if test "X$perlldflags" != "X"; then
  88. !       LDFLAGS="$perlldflags $LDFLAGS"
  89. !     fi
  90. !         PERL_LIBS=$perllibs
  91. !     PERL_SRC="auto/if_perl.c if_perlsfio.c"
  92. !     PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
  93. !     PERL_PRO="if_perl.pro if_perlsfio.pro"
  94. !     cat >> confdefs.h <<\EOF
  95.   #define FEAT_PERL 1
  96.   EOF
  97.   
  98. +       fi
  99.        fi
  100.       else
  101.         echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6
  102. ***************
  103. *** 1845,1871 ****
  104.           thread_lib="-pthread"
  105.         fi
  106.       fi
  107.       if test -n "$threadsafe_flag"; then
  108.         cflags_save=$CFLAGS
  109. -       libs_save=$LIBS
  110.         CFLAGS="$CFLAGS $threadsafe_flag"
  111.         LIBS="$LIBS $thread_lib"
  112.         cat > conftest.$ac_ext <<EOF
  113. ! #line 1716 "configure"
  114.   #include "confdefs.h"
  115.   
  116.   int main() {
  117.    
  118.   ; return 0; }
  119.   EOF
  120. ! if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  121.     rm -rf conftest*
  122.     echo "$ac_t""yes" 1>&6; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
  123.   else
  124.     echo "configure: failed program was:" >&5
  125.     cat conftest.$ac_ext >&5
  126.     rm -rf conftest*
  127. !   echo "$ac_t""no" 1>&6; LIBS=$libs_save
  128.            
  129.   fi
  130.   rm -f conftest*
  131. --- 1878,1904 ----
  132.           thread_lib="-pthread"
  133.         fi
  134.       fi
  135. +     libs_save_old=$LIBS
  136.       if test -n "$threadsafe_flag"; then
  137.         cflags_save=$CFLAGS
  138.         CFLAGS="$CFLAGS $threadsafe_flag"
  139.         LIBS="$LIBS $thread_lib"
  140.         cat > conftest.$ac_ext <<EOF
  141. ! #line 1888 "configure"
  142.   #include "confdefs.h"
  143.   
  144.   int main() {
  145.    
  146.   ; return 0; }
  147.   EOF
  148. ! if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  149.     rm -rf conftest*
  150.     echo "$ac_t""yes" 1>&6; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
  151.   else
  152.     echo "configure: failed program was:" >&5
  153.     cat conftest.$ac_ext >&5
  154.     rm -rf conftest*
  155. !   echo "$ac_t""no" 1>&6; LIBS=$libs_save_old
  156.            
  157.   fi
  158.   rm -f conftest*
  159. ***************
  160. *** 1874,1883 ****
  161.         echo "$ac_t""no" 1>&6
  162.       fi
  163.   
  164. !     cat >> confdefs.h <<\EOF
  165.   #define FEAT_PYTHON 1
  166.   EOF
  167.   
  168.   
  169.         fi
  170.       else
  171. --- 1907,1950 ----
  172.         echo "$ac_t""no" 1>&6
  173.       fi
  174.   
  175. !             echo $ac_n "checking if compile and link flags for Python are sane""... $ac_c" 1>&6
  176. ! echo "configure:1912: checking if compile and link flags for Python are sane" >&5
  177. !     cflags_save=$CFLAGS
  178. !     libs_save=$LIBS
  179. !     CFLAGS="$CFLAGS $PYTHON_CFLAGS"
  180. !     LIBS="$LIBS $PYTHON_LIBS"
  181. !     cat > conftest.$ac_ext <<EOF
  182. ! #line 1918 "configure"
  183. ! #include "confdefs.h"
  184. ! int main() {
  185. !  
  186. ! ; return 0; }
  187. ! EOF
  188. ! if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  189. !   rm -rf conftest*
  190. !   echo "$ac_t""yes" 1>&6; python_ok=yes
  191. ! else
  192. !   echo "configure: failed program was:" >&5
  193. !   cat conftest.$ac_ext >&5
  194. !   rm -rf conftest*
  195. !   echo "$ac_t""no: PYTHON DISABLED" 1>&6; python_ok=no
  196. ! fi
  197. ! rm -f conftest*
  198. !     CFLAGS=$cflags_save
  199. !     LIBS=$libs_save
  200. !     if test $python_ok = yes; then
  201. !       cat >> confdefs.h <<\EOF
  202.   #define FEAT_PYTHON 1
  203.   EOF
  204.   
  205. +     else
  206. +       LIBS=$libs_save_old
  207. +       PYTHON_SRC=
  208. +       PYTHON_OBJ=
  209. +       PYTHON_LIBS=
  210. +       PYTHON_CFLAGS=
  211. +     fi
  212.   
  213.         fi
  214.       else
  215. ***************
  216. *** 8252,8263 ****
  217.   s%@compiledby@%$compiledby%g
  218.   s%@vi_cv_path_perl@%$vi_cv_path_perl%g
  219.   s%@vi_cv_perllib@%$vi_cv_perllib%g
  220. - s%@PERL_LIBS@%$PERL_LIBS%g
  221.   s%@shrpenv@%$shrpenv%g
  222.   s%@PERL_SRC@%$PERL_SRC%g
  223.   s%@PERL_OBJ@%$PERL_OBJ%g
  224.   s%@PERL_PRO@%$PERL_PRO%g
  225.   s%@PERL_CFLAGS@%$PERL_CFLAGS%g
  226.   s%@vi_cv_path_python@%$vi_cv_path_python%g
  227.   s%@PYTHON_CONFDIR@%$PYTHON_CONFDIR%g
  228.   s%@PYTHON_LIBS@%$PYTHON_LIBS%g
  229. --- 8322,8333 ----
  230.   s%@compiledby@%$compiledby%g
  231.   s%@vi_cv_path_perl@%$vi_cv_path_perl%g
  232.   s%@vi_cv_perllib@%$vi_cv_perllib%g
  233.   s%@shrpenv@%$shrpenv%g
  234.   s%@PERL_SRC@%$PERL_SRC%g
  235.   s%@PERL_OBJ@%$PERL_OBJ%g
  236.   s%@PERL_PRO@%$PERL_PRO%g
  237.   s%@PERL_CFLAGS@%$PERL_CFLAGS%g
  238. + s%@PERL_LIBS@%$PERL_LIBS%g
  239.   s%@vi_cv_path_python@%$vi_cv_path_python%g
  240.   s%@PYTHON_CONFDIR@%$PYTHON_CONFDIR%g
  241.   s%@PYTHON_LIBS@%$PYTHON_LIBS%g
  242. *** ../vim-6.2.364/src/configure.in    Tue Feb 24 22:17:28 2004
  243. --- src/configure.in    Tue Mar 16 17:51:30 2004
  244. ***************
  245. *** 331,355 ****
  246.         dnl Remove "-fno-something", it breaks using cproto.
  247.         perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
  248.             -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//'`
  249. -       if test "X$perlcppflags" != "X"; then
  250. -     PERL_CFLAGS="$perlcppflags"
  251. -       fi
  252.         dnl Remove "-lc", it breaks on FreeBSD when using "-pthread".
  253. !       PERL_LIBS=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
  254.           sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
  255.               -e 's/-bE:perl.exp//' -e 's/-lc //'`
  256. -       AC_SUBST(PERL_LIBS)
  257.         dnl Don't add perl lib to $LIBS: if it's not in LD_LIBRARY_PATH
  258.         dnl a test in configure may fail because of that.
  259.         perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
  260.           -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
  261. !       if test "X$perlldflags" != "X"; then
  262. !     LDFLAGS="$perlldflags $LDFLAGS"
  263.         fi
  264. -       PERL_SRC="auto/if_perl.c if_perlsfio.c"
  265. -       PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
  266. -       PERL_PRO="if_perl.pro if_perlsfio.pro"
  267. -       AC_DEFINE(FEAT_PERL)
  268.        fi
  269.       else
  270.         AC_MSG_RESULT(>>> too old; need Perl version 5.003_01 or later <<<)
  271. --- 331,373 ----
  272.         dnl Remove "-fno-something", it breaks using cproto.
  273.         perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
  274.             -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//'`
  275.         dnl Remove "-lc", it breaks on FreeBSD when using "-pthread".
  276. !       perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
  277.           sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
  278.               -e 's/-bE:perl.exp//' -e 's/-lc //'`
  279.         dnl Don't add perl lib to $LIBS: if it's not in LD_LIBRARY_PATH
  280.         dnl a test in configure may fail because of that.
  281.         perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
  282.           -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
  283. !       dnl check that compiling a simple program still works with the flags
  284. !       dnl added for Perl.
  285. !       AC_MSG_CHECKING([if compile and link flags for Perl are sane])
  286. !       cflags_save=$CFLAGS
  287. !       libs_save=$LIBS
  288. !       ldflags_save=$LDFLAGS
  289. !       CFLAGS="$CFLAGS $perlcppflags"
  290. !       LIBS="$LIBS $perllibs"
  291. !       LDFLAGS="$perlldflags $LDFLAGS"
  292. !       AC_TRY_LINK(,[ ],
  293. !          AC_MSG_RESULT(yes); perl_ok=yes,
  294. !          AC_MSG_RESULT(no: PERL DISABLED); perl_ok=no)
  295. !       CFLAGS=$cflags_save
  296. !       LIBS=$libs_save
  297. !       LDFLAGS=$ldflags_save
  298. !       if test $perl_ok = yes; then
  299. !     if test "X$perlcppflags" != "X"; then
  300. !       PERL_CFLAGS="$perlcppflags"
  301. !     fi
  302. !     if test "X$perlldflags" != "X"; then
  303. !       LDFLAGS="$perlldflags $LDFLAGS"
  304. !     fi
  305. !         PERL_LIBS=$perllibs
  306. !     PERL_SRC="auto/if_perl.c if_perlsfio.c"
  307. !     PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
  308. !     PERL_PRO="if_perl.pro if_perlsfio.pro"
  309. !     AC_DEFINE(FEAT_PERL)
  310.         fi
  311.        fi
  312.       else
  313.         AC_MSG_RESULT(>>> too old; need Perl version 5.003_01 or later <<<)
  314. ***************
  315. *** 383,388 ****
  316. --- 401,407 ----
  317.   AC_SUBST(PERL_OBJ)
  318.   AC_SUBST(PERL_PRO)
  319.   AC_SUBST(PERL_CFLAGS)
  320. + AC_SUBST(PERL_LIBS)
  321.   
  322.   AC_MSG_CHECKING(--enable-pythoninterp argument)
  323.   AC_ARG_ENABLE(pythoninterp,
  324. ***************
  325. *** 517,537 ****
  326.           thread_lib="-pthread"
  327.         fi
  328.       fi
  329.       if test -n "$threadsafe_flag"; then
  330.         cflags_save=$CFLAGS
  331. -       libs_save=$LIBS
  332.         CFLAGS="$CFLAGS $threadsafe_flag"
  333.         LIBS="$LIBS $thread_lib"
  334.         AC_TRY_LINK(,[ ],
  335.            AC_MSG_RESULT(yes); PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag",
  336. !          AC_MSG_RESULT(no); LIBS=$libs_save
  337.            )
  338.         CFLAGS=$cflags_save
  339.       else
  340.         AC_MSG_RESULT(no)
  341.       fi
  342.   
  343. !     AC_DEFINE(FEAT_PYTHON)
  344.   
  345.         fi
  346.       else
  347. --- 536,576 ----
  348.           thread_lib="-pthread"
  349.         fi
  350.       fi
  351. +     libs_save_old=$LIBS
  352.       if test -n "$threadsafe_flag"; then
  353.         cflags_save=$CFLAGS
  354.         CFLAGS="$CFLAGS $threadsafe_flag"
  355.         LIBS="$LIBS $thread_lib"
  356.         AC_TRY_LINK(,[ ],
  357.            AC_MSG_RESULT(yes); PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag",
  358. !          AC_MSG_RESULT(no); LIBS=$libs_save_old
  359.            )
  360.         CFLAGS=$cflags_save
  361.       else
  362.         AC_MSG_RESULT(no)
  363.       fi
  364.   
  365. !     dnl check that compiling a simple program still works with the flags
  366. !     dnl added for Python.
  367. !     AC_MSG_CHECKING([if compile and link flags for Python are sane])
  368. !     cflags_save=$CFLAGS
  369. !     libs_save=$LIBS
  370. !     CFLAGS="$CFLAGS $PYTHON_CFLAGS"
  371. !     LIBS="$LIBS $PYTHON_LIBS"
  372. !     AC_TRY_LINK(,[ ],
  373. !            AC_MSG_RESULT(yes); python_ok=yes,
  374. !            AC_MSG_RESULT(no: PYTHON DISABLED); python_ok=no)
  375. !     CFLAGS=$cflags_save
  376. !     LIBS=$libs_save
  377. !     if test $python_ok = yes; then
  378. !       AC_DEFINE(FEAT_PYTHON)
  379. !     else
  380. !       LIBS=$libs_save_old
  381. !       PYTHON_SRC=
  382. !       PYTHON_OBJ=
  383. !       PYTHON_LIBS=
  384. !       PYTHON_CFLAGS=
  385. !     fi
  386.   
  387.         fi
  388.       else
  389. *** ../vim-6.2.364/src/version.c    Tue Mar 16 16:06:45 2004
  390. --- src/version.c    Tue Mar 16 17:58:51 2004
  391. ***************
  392. *** 639,640 ****
  393. --- 639,642 ----
  394.   {   /* Add new patch number below this line */
  395. + /**/
  396. +     365,
  397.   /**/
  398.  
  399. -- 
  400. Everyone has a photographic memory. Some don't have film.
  401.  
  402.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  403. ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  404. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  405.  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
  406.