components/vim/vim72-patches/7.2.393
changeset 198 172fc01ce997
equal deleted inserted replaced
197:fd801ec0737c 198:172fc01ce997
       
     1 To: [email protected]
       
     2 Subject: Patch 7.2.393
       
     3 Fcc: outbox
       
     4 From: Bram Moolenaar <[email protected]>
       
     5 Mime-Version: 1.0
       
     6 Content-Type: text/plain; charset=UTF-8
       
     7 Content-Transfer-Encoding: 8bit
       
     8 ------------
       
     9 
       
    10 Patch 7.2.393
       
    11 Problem:    Mac: Can't build with different Xcode developer tools directory.
       
    12 Solution:   make "Developer" directory name configurable. (Rainer Muller)
       
    13 Files:	    src/configure.in, src/auto/configure
       
    14 
       
    15 
       
    16 *** ../vim-7.2.392/src/configure.in	2010-02-24 14:46:58.000000000 +0100
       
    17 --- src/configure.in	2010-03-10 16:16:48.000000000 +0100
       
    18 ***************
       
    19 *** 116,121 ****
       
    20 --- 116,137 ----
       
    21   	MACARCH="$withval"; AC_MSG_RESULT($MACARCH),
       
    22   	MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH))
       
    23   
       
    24 +   AC_MSG_CHECKING(--with-developer-dir argument)
       
    25 +   AC_ARG_WITH(developer-dir, [  --with-developer-dir=PATH    use PATH as location for Xcode developer tools],
       
    26 + 	DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR),
       
    27 +         DEVELOPER_DIR=""; AC_MSG_RESULT(not present))
       
    28 +   
       
    29 +   if test "x$DEVELOPER_DIR" = "x"; then
       
    30 +     AC_PATH_PROG(XCODE_SELECT, xcode-select)
       
    31 +     if test "x$XCODE_SELECT" != "x"; then
       
    32 +       AC_MSG_CHECKING(for developer dir using xcode-select)
       
    33 +       DEVELOPER_DIR=`$XCODE_SELECT -print-path`
       
    34 +       AC_MSG_RESULT([$DEVELOPER_DIR])
       
    35 +     else
       
    36 +       DEVELOPER_DIR=/Developer
       
    37 +     fi
       
    38 +   fi
       
    39 + 
       
    40     if test "x$MACARCH" = "xboth"; then
       
    41       AC_MSG_CHECKING(for 10.4 universal SDK)
       
    42       dnl There is a terrible inconsistency (but we appear to get away with it):
       
    43 ***************
       
    44 *** 127,133 ****
       
    45       save_cppflags="$CPPFLAGS"
       
    46       save_cflags="$CFLAGS"
       
    47       save_ldflags="$LDFLAGS"
       
    48 !     CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
       
    49       AC_TRY_LINK([ ], [ ],
       
    50   	AC_MSG_RESULT(found, will make universal binary),
       
    51   
       
    52 --- 143,149 ----
       
    53       save_cppflags="$CPPFLAGS"
       
    54       save_cflags="$CFLAGS"
       
    55       save_ldflags="$LDFLAGS"
       
    56 !     CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
       
    57       AC_TRY_LINK([ ], [ ],
       
    58   	AC_MSG_RESULT(found, will make universal binary),
       
    59   
       
    60 ***************
       
    61 *** 157,165 ****
       
    62       dnl TODO: use -arch i386 on Intel machines
       
    63       CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
       
    64       if test "x$MACARCH" = "xboth"; then
       
    65 !       CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
       
    66       else
       
    67 !       CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
       
    68       fi
       
    69   
       
    70       dnl If Carbon is found, assume we don't want X11
       
    71 --- 173,181 ----
       
    72       dnl TODO: use -arch i386 on Intel machines
       
    73       CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
       
    74       if test "x$MACARCH" = "xboth"; then
       
    75 !       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
       
    76       else
       
    77 !       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
       
    78       fi
       
    79   
       
    80       dnl If Carbon is found, assume we don't want X11
       
    81 ***************
       
    82 *** 3233,3239 ****
       
    83     fi
       
    84   fi
       
    85   if test "x$MACARCH" = "xboth"; then
       
    86 !   LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
       
    87   fi
       
    88   
       
    89   dnl gcc 3.1 changed the meaning of -MM.  The only solution appears to be to
       
    90 --- 3249,3255 ----
       
    91     fi
       
    92   fi
       
    93   if test "x$MACARCH" = "xboth"; then
       
    94 !   LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
       
    95   fi
       
    96   
       
    97   dnl gcc 3.1 changed the meaning of -MM.  The only solution appears to be to
       
    98 *** ../vim-7.2.392/src/auto/configure	2010-02-24 14:46:58.000000000 +0100
       
    99 --- src/auto/configure	2010-03-10 16:19:47.000000000 +0100
       
   100 ***************
       
   101 *** 718,723 ****
       
   102 --- 718,724 ----
       
   103   VIMNAME
       
   104   OS_EXTRA_OBJ
       
   105   OS_EXTRA_SRC
       
   106 + XCODE_SELECT
       
   107   CPP_MM
       
   108   STRIP
       
   109   AWK
       
   110 ***************
       
   111 *** 774,779 ****
       
   112 --- 775,781 ----
       
   113   enable_option_checking
       
   114   enable_darwin
       
   115   with_mac_arch
       
   116 + with_developer_dir
       
   117   with_local_dir
       
   118   with_vim_name
       
   119   with_ex_name
       
   120 ***************
       
   121 *** 1492,1497 ****
       
   122 --- 1494,1500 ----
       
   123     --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
       
   124     --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
       
   125     --with-mac-arch=ARCH    current, intel, ppc or both
       
   126 +   --with-developer-dir=PATH    use PATH as location for Xcode developer tools
       
   127     --with-local-dir=PATH   search PATH instead of /usr/local for local libraries.
       
   128     --without-local-dir     do not search /usr/local for local libraries.
       
   129     --with-vim-name=NAME    what to call the Vim executable
       
   130 ***************
       
   131 *** 3833,3845 ****
       
   132   fi
       
   133   
       
   134   
       
   135     if test "x$MACARCH" = "xboth"; then
       
   136       { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5
       
   137   $as_echo_n "checking for 10.4 universal SDK... " >&6; }
       
   138                               save_cppflags="$CPPFLAGS"
       
   139       save_cflags="$CFLAGS"
       
   140       save_ldflags="$LDFLAGS"
       
   141 !     CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
       
   142       cat >conftest.$ac_ext <<_ACEOF
       
   143   /* confdefs.h.  */
       
   144   _ACEOF
       
   145 --- 3836,3913 ----
       
   146   fi
       
   147   
       
   148   
       
   149 +   { $as_echo "$as_me:$LINENO: checking --with-developer-dir argument" >&5
       
   150 + $as_echo_n "checking --with-developer-dir argument... " >&6; }
       
   151 + 
       
   152 + # Check whether --with-developer-dir was given.
       
   153 + if test "${with_developer_dir+set}" = set; then
       
   154 +   withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
       
   155 + $as_echo "$DEVELOPER_DIR" >&6; }
       
   156 + else
       
   157 +   DEVELOPER_DIR=""; { $as_echo "$as_me:$LINENO: result: not present" >&5
       
   158 + $as_echo "not present" >&6; }
       
   159 + fi
       
   160 + 
       
   161 + 
       
   162 +   if test "x$DEVELOPER_DIR" = "x"; then
       
   163 +     # Extract the first word of "xcode-select", so it can be a program name with args.
       
   164 + set dummy xcode-select; ac_word=$2
       
   165 + { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
       
   166 + $as_echo_n "checking for $ac_word... " >&6; }
       
   167 + if test "${ac_cv_path_XCODE_SELECT+set}" = set; then
       
   168 +   $as_echo_n "(cached) " >&6
       
   169 + else
       
   170 +   case $XCODE_SELECT in
       
   171 +   [\\/]* | ?:[\\/]*)
       
   172 +   ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
       
   173 +   ;;
       
   174 +   *)
       
   175 +   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
       
   176 + for as_dir in $PATH
       
   177 + do
       
   178 +   IFS=$as_save_IFS
       
   179 +   test -z "$as_dir" && as_dir=.
       
   180 +   for ac_exec_ext in '' $ac_executable_extensions; do
       
   181 +   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
       
   182 +     ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
       
   183 +     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
       
   184 +     break 2
       
   185 +   fi
       
   186 + done
       
   187 + done
       
   188 + IFS=$as_save_IFS
       
   189 + 
       
   190 +   ;;
       
   191 + esac
       
   192 + fi
       
   193 + XCODE_SELECT=$ac_cv_path_XCODE_SELECT
       
   194 + if test -n "$XCODE_SELECT"; then
       
   195 +   { $as_echo "$as_me:$LINENO: result: $XCODE_SELECT" >&5
       
   196 + $as_echo "$XCODE_SELECT" >&6; }
       
   197 + else
       
   198 +   { $as_echo "$as_me:$LINENO: result: no" >&5
       
   199 + $as_echo "no" >&6; }
       
   200 + fi
       
   201 + 
       
   202 + 
       
   203 +     if test "x$XCODE_SELECT" != "x"; then
       
   204 +       { $as_echo "$as_me:$LINENO: checking for developer dir using xcode-select" >&5
       
   205 + $as_echo_n "checking for developer dir using xcode-select... " >&6; }
       
   206 +       DEVELOPER_DIR=`$XCODE_SELECT -print-path`
       
   207 +       { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
       
   208 + $as_echo "$DEVELOPER_DIR" >&6; }
       
   209 +     else
       
   210 +       DEVELOPER_DIR=/Developer
       
   211 +     fi
       
   212 +   fi
       
   213 + 
       
   214     if test "x$MACARCH" = "xboth"; then
       
   215       { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5
       
   216   $as_echo_n "checking for 10.4 universal SDK... " >&6; }
       
   217                               save_cppflags="$CPPFLAGS"
       
   218       save_cflags="$CFLAGS"
       
   219       save_ldflags="$LDFLAGS"
       
   220 !     CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
       
   221       cat >conftest.$ac_ext <<_ACEOF
       
   222   /* confdefs.h.  */
       
   223   _ACEOF
       
   224 ***************
       
   225 *** 3960,3968 ****
       
   226       OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
       
   227           CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
       
   228       if test "x$MACARCH" = "xboth"; then
       
   229 !       CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
       
   230       else
       
   231 !       CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
       
   232       fi
       
   233   
       
   234                   # On IRIX 5.3, sys/types and inttypes.h are conflicting.
       
   235 --- 4028,4036 ----
       
   236       OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
       
   237           CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
       
   238       if test "x$MACARCH" = "xboth"; then
       
   239 !       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
       
   240       else
       
   241 !       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
       
   242       fi
       
   243   
       
   244                   # On IRIX 5.3, sys/types and inttypes.h are conflicting.
       
   245 ***************
       
   246 *** 17319,17325 ****
       
   247     fi
       
   248   fi
       
   249   if test "x$MACARCH" = "xboth"; then
       
   250 !   LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
       
   251   fi
       
   252   
       
   253   DEPEND_CFLAGS_FILTER=
       
   254 --- 17387,17393 ----
       
   255     fi
       
   256   fi
       
   257   if test "x$MACARCH" = "xboth"; then
       
   258 !   LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
       
   259   fi
       
   260   
       
   261   DEPEND_CFLAGS_FILTER=
       
   262 *** ../vim-7.2.392/src/version.c	2010-03-10 16:11:57.000000000 +0100
       
   263 --- src/version.c	2010-03-10 16:26:00.000000000 +0100
       
   264 ***************
       
   265 *** 683,684 ****
       
   266 --- 683,686 ----
       
   267   {   /* Add new patch number below this line */
       
   268 + /**/
       
   269 +     393,
       
   270   /**/
       
   271 
       
   272 -- 
       
   273 There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU,
       
   274 Linux, etc, and those who know COBOL.  It gets very difficult for me at
       
   275 parties, not knowing which group to socialise with :-)
       
   276 						Sitaram Chamarty
       
   277 
       
   278  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
   279 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
   280 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
   281  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///