To: vim-dev@vim.org Subject: patch 5.4.13 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.4.13 Problem: New SGI C compilers need another option for optimisation. Solution: Add a check in configure for "-OPT:Olimit". (Chin A Young) Files: src/configure.in, src/configure *** ../vim-5.4/src/configure.in Sun Jul 25 22:02:06 1999 --- src/configure.in Thu Aug 5 11:19:55 1999 *************** *** 35,56 **** AC_MSG_ERROR([cannot compile a simple program, check CC and CFLAGS]) fi ! dnl See if the compiler accepts "-Olimit 2000" or "-FOlimit,2000, needed for ! dnl some systems, because Vim uses very big case statements. if test "$GCC" != yes; then - AC_MSG_CHECKING(if compiler accepts -Olimit) save_cflags=$CFLAGS ! CFLAGS="$CFLAGS -Olimit 2000" AC_TRY_LINK(, , AC_MSG_RESULT(yes), ! [AC_MSG_RESULT(no); CFLAGS="$save_cflags" ! AC_MSG_CHECKING(if compiler accepts -FOlimit) ! CFLAGS="$CFLAGS -FOlimit,2000" ! AC_TRY_LINK(, , ! AC_MSG_RESULT(yes), ! [AC_MSG_RESULT(no); CFLAGS="$save_cflags"]) ! ]) fi dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies --- 35,65 ---- AC_MSG_ERROR([cannot compile a simple program, check CC and CFLAGS]) fi ! dnl Check if the compiler accepts "-OPT:Olimit=2600", "-Olimit 2000" or ! dnl "-FOlimit,2000". Needed for some systems, because Vim uses very big case ! dnl statements. The order is significant, because "-FOlimit,2000 and ! dnl "-Olimit 2000" may only generate a warning. if test "$GCC" != yes; then save_cflags=$CFLAGS ! AC_MSG_CHECKING(if compiler accepts -OPT:Olimit) ! CFLAGS="$CFLAGS -OPT:Olimit=2600" AC_TRY_LINK(, , + AC_MSG_RESULT(yes), + [AC_MSG_RESULT(no); CFLAGS="$save_cflags" + AC_MSG_CHECKING(if compiler accepts -Olimit) + CFLAGS="$CFLAGS -Olimit 2000" + AC_TRY_LINK(, , AC_MSG_RESULT(yes), ! [AC_MSG_RESULT(no); CFLAGS="$save_cflags" ! AC_MSG_CHECKING(if compiler accepts -FOlimit) ! CFLAGS="$CFLAGS -FOlimit,2000" ! AC_TRY_LINK(, , ! AC_MSG_RESULT(yes), ! [AC_MSG_RESULT(no); CFLAGS="$save_cflags" ! ]) ! ]) ! ]) fi dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies *** ../vim-5.4/src/configure Sun Jul 25 22:02:06 1999 --- src/configure Thu Aug 5 11:19:58 1999 *************** *** 999,1008 **** if test "$GCC" != yes; then - echo $ac_n "checking if compiler accepts -Olimit""... $ac_c" 1>&6 - echo "configure:1004: checking if compiler accepts -Olimit" >&5 save_cflags=$CFLAGS ! CFLAGS="$CFLAGS -Olimit 2000" cat > conftest.$ac_ext <&6 ! echo "configure:1005: checking if compiler accepts -OPT:Olimit" >&5 ! CFLAGS="$CFLAGS -OPT:Olimit=2600" cat > conftest.$ac_ext <&5 rm -rf conftest* echo "$ac_t""no" 1>&6; CFLAGS="$save_cflags" ! echo $ac_n "checking if compiler accepts -FOlimit""... $ac_c" 1>&6 ! echo "configure:1024: checking if compiler accepts -FOlimit" >&5 ! CFLAGS="$CFLAGS -FOlimit,2000" ! cat > conftest.$ac_ext <&5 rm -rf conftest* echo "$ac_t""no" 1>&6; CFLAGS="$save_cflags" ! echo $ac_n "checking if compiler accepts -Olimit""... $ac_c" 1>&6 ! echo "configure:1024: checking if compiler accepts -Olimit" >&5 ! CFLAGS="$CFLAGS -Olimit 2000" ! cat > conftest.$ac_ext <&5 rm -rf conftest* echo "$ac_t""no" 1>&6; CFLAGS="$save_cflags" fi rm -f conftest* ! fi rm -f conftest* fi --- 1038,1069 ---- cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6; CFLAGS="$save_cflags" + echo $ac_n "checking if compiler accepts -FOlimit""... $ac_c" 1>&6 + echo "configure:1043: checking if compiler accepts -FOlimit" >&5 + CFLAGS="$CFLAGS -FOlimit,2000" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6; CFLAGS="$save_cflags" + fi rm -f conftest* ! ! fi ! rm -f conftest* ! fi rm -f conftest* fi *** ../vim-5.4/src/version.h Tue Aug 3 13:19:47 1999 --- src/version.h Thu Aug 5 11:23:48 1999 *************** *** 19,26 **** #define VIM_VERSION_MINOR_STR "4" #define VIM_VERSION_BUILD 57 #define VIM_VERSION_BUILD_STR "57" ! #define VIM_VERSION_PATCHLEVEL 12 ! #define VIM_VERSION_PATCHLEVEL_STR "12" /* * VIM_VERSION_NODOT is used for the runtime directory name. --- 19,26 ---- #define VIM_VERSION_MINOR_STR "4" #define VIM_VERSION_BUILD 57 #define VIM_VERSION_BUILD_STR "57" ! #define VIM_VERSION_PATCHLEVEL 13 ! #define VIM_VERSION_PATCHLEVEL_STR "13" /* * VIM_VERSION_NODOT is used for the runtime directory name. *************** *** 30,35 **** */ #define VIM_VERSION_NODOT "vim54" #define VIM_VERSION_SHORT "5.4" ! #define VIM_VERSION_MEDIUM "5.4.12" ! #define VIM_VERSION_LONG "VIM - Vi IMproved 5.4.12 (1999 Aug 3)" ! #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 5.4.12 (1999 Aug 3, compiled " --- 30,35 ---- */ #define VIM_VERSION_NODOT "vim54" #define VIM_VERSION_SHORT "5.4" ! #define VIM_VERSION_MEDIUM "5.4.13" ! #define VIM_VERSION_LONG "VIM - Vi IMproved 5.4.13 (1999 Aug 5)" ! #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 5.4.13 (1999 Aug 5, compiled " -- Living on Earth includes an annual free trip around the Sun. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /