comparison src/configure.in @ 4952:9f7b92f232d3 v7.3.1221

updated for version 7.3.1221 Problem: When build flags change "make distclean" run into a configure error. Solution: When CFLAGS changes delete auto/config.cache. Also avoid adding duplicate text to flags.
author Bram Moolenaar <bram@vim.org>
date Tue, 18 Jun 2013 23:31:55 +0200
parents b89aa3374b7f
children 56bc3698f8c6
comparison
equal deleted inserted replaced
4951:8f2fc8c065e4 4952:9f7b92f232d3
774 cflags_save=$CFLAGS 774 cflags_save=$CFLAGS
775 libs_save=$LIBS 775 libs_save=$LIBS
776 ldflags_save=$LDFLAGS 776 ldflags_save=$LDFLAGS
777 CFLAGS="$CFLAGS $perlcppflags" 777 CFLAGS="$CFLAGS $perlcppflags"
778 LIBS="$LIBS $perllibs" 778 LIBS="$LIBS $perllibs"
779 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
779 LDFLAGS="$perlldflags $LDFLAGS" 780 LDFLAGS="$perlldflags $LDFLAGS"
780 AC_TRY_LINK(,[ ], 781 AC_TRY_LINK(,[ ],
781 AC_MSG_RESULT(yes); perl_ok=yes, 782 AC_MSG_RESULT(yes); perl_ok=yes,
782 AC_MSG_RESULT(no: PERL DISABLED); perl_ok=no) 783 AC_MSG_RESULT(no: PERL DISABLED); perl_ok=no)
783 CFLAGS=$cflags_save 784 CFLAGS=$cflags_save
787 if test "X$perlcppflags" != "X"; then 788 if test "X$perlcppflags" != "X"; then
788 dnl remove -pipe and -Wxxx, it confuses cproto 789 dnl remove -pipe and -Wxxx, it confuses cproto
789 PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'` 790 PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'`
790 fi 791 fi
791 if test "X$perlldflags" != "X"; then 792 if test "X$perlldflags" != "X"; then
792 LDFLAGS="$perlldflags $LDFLAGS" 793 if test "X`echo \"$LDFLAGS\" | grep -F -e \"$perlldflags\"`" = "X"; then
794 LDFLAGS="$perlldflags $LDFLAGS"
795 fi
793 fi 796 fi
794 PERL_LIBS=$perllibs 797 PERL_LIBS=$perllibs
795 PERL_SRC="auto/if_perl.c if_perlsfio.c" 798 PERL_SRC="auto/if_perl.c if_perlsfio.c"
796 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o" 799 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
797 PERL_PRO="if_perl.pro if_perlsfio.pro" 800 PERL_PRO="if_perl.pro if_perlsfio.pro"
1544 dnl Ruby on Mac OS X 10.5 adds "-arch" flags but these should only 1547 dnl Ruby on Mac OS X 10.5 adds "-arch" flags but these should only
1545 dnl be included if requested by passing --with-mac-arch to 1548 dnl be included if requested by passing --with-mac-arch to
1546 dnl configure, so strip these flags first (if present) 1549 dnl configure, so strip these flags first (if present)
1547 rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` 1550 rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
1548 if test "X$rubyldflags" != "X"; then 1551 if test "X$rubyldflags" != "X"; then
1549 LDFLAGS="$rubyldflags $LDFLAGS" 1552 if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then
1553 LDFLAGS="$rubyldflags $LDFLAGS"
1554 fi
1550 fi 1555 fi
1551 fi 1556 fi
1552 RUBY_SRC="if_ruby.c" 1557 RUBY_SRC="if_ruby.c"
1553 RUBY_OBJ="objects/if_ruby.o" 1558 RUBY_OBJ="objects/if_ruby.o"
1554 RUBY_PRO="if_ruby.pro" 1559 RUBY_PRO="if_ruby.pro"
3717 dnl declared as char x[1] but actually longer. Introduced in gcc 4.0. 3722 dnl declared as char x[1] but actually longer. Introduced in gcc 4.0.
3718 dnl Also remove duplicate _FORTIFY_SOURCE arguments. 3723 dnl Also remove duplicate _FORTIFY_SOURCE arguments.
3719 dnl And undefine it first to avoid a warning. 3724 dnl And undefine it first to avoid a warning.
3720 AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1) 3725 AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
3721 if test "$gccmajor" -gt "3"; then 3726 if test "$gccmajor" -gt "3"; then
3722 CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/-D_FORTIFY_SOURCE=.//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` 3727 CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
3723 AC_MSG_RESULT(yes) 3728 AC_MSG_RESULT(yes)
3724 else 3729 else
3725 AC_MSG_RESULT(no) 3730 AC_MSG_RESULT(no)
3726 fi 3731 fi
3727 fi 3732 fi
3732 dnl at linker level. Let's use it. 3737 dnl at linker level. Let's use it.
3733 AC_MSG_CHECKING(linker --as-needed support) 3738 AC_MSG_CHECKING(linker --as-needed support)
3734 LINK_AS_NEEDED= 3739 LINK_AS_NEEDED=
3735 # Check if linker supports --as-needed and --no-as-needed options 3740 # Check if linker supports --as-needed and --no-as-needed options
3736 if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then 3741 if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
3737 LDFLAGS="$LDFLAGS -Wl,--as-needed" 3742 LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-Wl,--as-needed//g' | sed -e 's/$/ -Wl,--as-needed/'`
3738 LINK_AS_NEEDED=yes 3743 LINK_AS_NEEDED=yes
3739 fi 3744 fi
3740 if test "$LINK_AS_NEEDED" = yes; then 3745 if test "$LINK_AS_NEEDED" = yes; then
3741 AC_MSG_RESULT(yes) 3746 AC_MSG_RESULT(yes)
3742 else 3747 else