To: vim-dev@vim.org Subject: patch 5.5.051 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.5.051 Problem: Several Unix systems have a problem with the optimization limits check in configure. Solution: Removed the configure check, let the user add it manually in Makefile or the enviroment. Files: src/configure.in, src/configure, src/Makefile *** ../vim-5.5.50/src/configure.in Sat Dec 4 14:12:47 1999 --- src/configure.in Sat Dec 4 14:58:55 1999 *************** *** 35,67 **** 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 test "$GCC" = yes && CPP_MM=M; AC_SUBST(CPP_MM) --- 35,40 ---- *** ../vim-5.5.50/src/configure Sat Dec 4 14:12:48 1999 --- src/configure Sat Dec 4 14:59:04 1999 *************** *** 999,1085 **** { echo "configure: error: cannot compile a simple program, check CC and CFLAGS" 1>&2; exit 1; } fi - - if test "$GCC" != yes; then - save_cflags=$CFLAGS - echo $ac_n "checking if compiler accepts -OPT:Olimit""... $ac_c" 1>&6 - echo "configure:1007: checking if compiler accepts -OPT:Olimit" >&5 - CFLAGS="$CFLAGS -OPT:Olimit=2600" - 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" - echo $ac_n "checking if compiler accepts -Olimit""... $ac_c" 1>&6 - echo "configure:1026: checking if compiler accepts -Olimit" >&5 - CFLAGS="$CFLAGS -Olimit 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" - echo $ac_n "checking if compiler accepts -FOlimit""... $ac_c" 1>&6 - echo "configure:1045: 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 - test "$GCC" = yes && CPP_MM=M; if test -f ./toolcheck; then echo "checking for buggy tools" 1>&6 ! echo "configure:1078: checking for buggy tools" >&5 sh ./toolcheck 1>&6 fi echo $ac_n "checking for BeOS""... $ac_c" 1>&6 ! echo "configure:1083: checking for BeOS" >&5 case `uname` in BeOS) OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=os_beos.o BEOS=yes; echo "$ac_t""yes" 1>&6;; --- 999,1014 ---- { echo "configure: error: cannot compile a simple program, check CC and CFLAGS" 1>&2; exit 1; } fi test "$GCC" = yes && CPP_MM=M; if test -f ./toolcheck; then echo "checking for buggy tools" 1>&6 ! echo "configure:1007: checking for buggy tools" >&5 sh ./toolcheck 1>&6 fi echo $ac_n "checking for BeOS""... $ac_c" 1>&6 ! echo "configure:1012: checking for BeOS" >&5 case `uname` in BeOS) OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=os_beos.o BEOS=yes; echo "$ac_t""yes" 1>&6;; *** ../vim-5.5.50/src/Makefile Sat Dec 4 14:46:03 1999 --- src/Makefile Sat Dec 4 15:03:53 1999 *************** *** 406,411 **** --- 410,422 ---- # When not defined, configure will try to use -O2 -g for gcc and -O for cc. #CFLAGS = -g #CFLAGS = -O + + # Optimization limits - depends on the compiler. Automatic check in configure + # doesn't work very well, because many compilers only give a warning for + # unrecognized arguments. + #CFLAGS = -O -OPT:Olimit=2600 + #CFLAGS = -O -Olimit 2000 + #CFLAGS = -O -FOlimit,2000 # Often used for GCC: mixed optimizing, lot of optimizing, debugging #CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes *** ../vim-5.5.50/src/version.c Sat Dec 4 14:51:43 1999 --- src/version.c Sat Dec 4 15:01:36 1999 *************** *** 420,420 **** --- 420,421 ---- { /* Add new patch number below this line */ + 51, -- hundred-and-one symptoms of being an internet addict: 236. You start saving URL's in your digital watch. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /