summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.2.393
blob: 796f654871fce7ba55089fce91151469c6c91043 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
To: vim-dev@vim.org
Subject: Patch 7.2.393
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.393
Problem:    Mac: Can't build with different Xcode developer tools directory.
Solution:   make "Developer" directory name configurable. (Rainer Muller)
Files:	    src/configure.in, src/auto/configure


*** ../vim-7.2.392/src/configure.in	2010-02-24 14:46:58.000000000 +0100
--- src/configure.in	2010-03-10 16:16:48.000000000 +0100
***************
*** 116,121 ****
--- 116,137 ----
  	MACARCH="$withval"; AC_MSG_RESULT($MACARCH),
  	MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH))
  
+   AC_MSG_CHECKING(--with-developer-dir argument)
+   AC_ARG_WITH(developer-dir, [  --with-developer-dir=PATH    use PATH as location for Xcode developer tools],
+ 	DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR),
+         DEVELOPER_DIR=""; AC_MSG_RESULT(not present))
+   
+   if test "x$DEVELOPER_DIR" = "x"; then
+     AC_PATH_PROG(XCODE_SELECT, xcode-select)
+     if test "x$XCODE_SELECT" != "x"; then
+       AC_MSG_CHECKING(for developer dir using xcode-select)
+       DEVELOPER_DIR=`$XCODE_SELECT -print-path`
+       AC_MSG_RESULT([$DEVELOPER_DIR])
+     else
+       DEVELOPER_DIR=/Developer
+     fi
+   fi
+ 
    if test "x$MACARCH" = "xboth"; then
      AC_MSG_CHECKING(for 10.4 universal SDK)
      dnl There is a terrible inconsistency (but we appear to get away with it):
***************
*** 127,133 ****
      save_cppflags="$CPPFLAGS"
      save_cflags="$CFLAGS"
      save_ldflags="$LDFLAGS"
!     CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
      AC_TRY_LINK([ ], [ ],
  	AC_MSG_RESULT(found, will make universal binary),
  
--- 143,149 ----
      save_cppflags="$CPPFLAGS"
      save_cflags="$CFLAGS"
      save_ldflags="$LDFLAGS"
!     CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
      AC_TRY_LINK([ ], [ ],
  	AC_MSG_RESULT(found, will make universal binary),
  
***************
*** 157,165 ****
      dnl TODO: use -arch i386 on Intel machines
      CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
      if test "x$MACARCH" = "xboth"; then
!       CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
      else
!       CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
      fi
  
      dnl If Carbon is found, assume we don't want X11
--- 173,181 ----
      dnl TODO: use -arch i386 on Intel machines
      CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
      if test "x$MACARCH" = "xboth"; then
!       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
      else
!       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
      fi
  
      dnl If Carbon is found, assume we don't want X11
***************
*** 3233,3239 ****
    fi
  fi
  if test "x$MACARCH" = "xboth"; then
!   LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
  fi
  
  dnl gcc 3.1 changed the meaning of -MM.  The only solution appears to be to
--- 3249,3255 ----
    fi
  fi
  if test "x$MACARCH" = "xboth"; then
!   LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
  fi
  
  dnl gcc 3.1 changed the meaning of -MM.  The only solution appears to be to
*** ../vim-7.2.392/src/auto/configure	2010-02-24 14:46:58.000000000 +0100
--- src/auto/configure	2010-03-10 16:19:47.000000000 +0100
***************
*** 718,723 ****
--- 718,724 ----
  VIMNAME
  OS_EXTRA_OBJ
  OS_EXTRA_SRC
+ XCODE_SELECT
  CPP_MM
  STRIP
  AWK
***************
*** 774,779 ****
--- 775,781 ----
  enable_option_checking
  enable_darwin
  with_mac_arch
+ with_developer_dir
  with_local_dir
  with_vim_name
  with_ex_name
***************
*** 1492,1497 ****
--- 1494,1500 ----
    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    --with-mac-arch=ARCH    current, intel, ppc or both
+   --with-developer-dir=PATH    use PATH as location for Xcode developer tools
    --with-local-dir=PATH   search PATH instead of /usr/local for local libraries.
    --without-local-dir     do not search /usr/local for local libraries.
    --with-vim-name=NAME    what to call the Vim executable
***************
*** 3833,3845 ****
  fi
  
  
    if test "x$MACARCH" = "xboth"; then
      { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5
  $as_echo_n "checking for 10.4 universal SDK... " >&6; }
                              save_cppflags="$CPPFLAGS"
      save_cflags="$CFLAGS"
      save_ldflags="$LDFLAGS"
!     CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
      cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
--- 3836,3913 ----
  fi
  
  
+   { $as_echo "$as_me:$LINENO: checking --with-developer-dir argument" >&5
+ $as_echo_n "checking --with-developer-dir argument... " >&6; }
+ 
+ # Check whether --with-developer-dir was given.
+ if test "${with_developer_dir+set}" = set; then
+   withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
+ $as_echo "$DEVELOPER_DIR" >&6; }
+ else
+   DEVELOPER_DIR=""; { $as_echo "$as_me:$LINENO: result: not present" >&5
+ $as_echo "not present" >&6; }
+ fi
+ 
+ 
+   if test "x$DEVELOPER_DIR" = "x"; then
+     # Extract the first word of "xcode-select", so it can be a program name with args.
+ set dummy xcode-select; ac_word=$2
+ { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if test "${ac_cv_path_XCODE_SELECT+set}" = set; then
+   $as_echo_n "(cached) " >&6
+ else
+   case $XCODE_SELECT in
+   [\\/]* | ?:[\\/]*)
+   ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+   for ac_exec_ext in '' $ac_executable_extensions; do
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
+     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+ done
+ IFS=$as_save_IFS
+ 
+   ;;
+ esac
+ fi
+ XCODE_SELECT=$ac_cv_path_XCODE_SELECT
+ if test -n "$XCODE_SELECT"; then
+   { $as_echo "$as_me:$LINENO: result: $XCODE_SELECT" >&5
+ $as_echo "$XCODE_SELECT" >&6; }
+ else
+   { $as_echo "$as_me:$LINENO: result: no" >&5
+ $as_echo "no" >&6; }
+ fi
+ 
+ 
+     if test "x$XCODE_SELECT" != "x"; then
+       { $as_echo "$as_me:$LINENO: checking for developer dir using xcode-select" >&5
+ $as_echo_n "checking for developer dir using xcode-select... " >&6; }
+       DEVELOPER_DIR=`$XCODE_SELECT -print-path`
+       { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
+ $as_echo "$DEVELOPER_DIR" >&6; }
+     else
+       DEVELOPER_DIR=/Developer
+     fi
+   fi
+ 
    if test "x$MACARCH" = "xboth"; then
      { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5
  $as_echo_n "checking for 10.4 universal SDK... " >&6; }
                              save_cppflags="$CPPFLAGS"
      save_cflags="$CFLAGS"
      save_ldflags="$LDFLAGS"
!     CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
      cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
***************
*** 3960,3968 ****
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
          CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
      if test "x$MACARCH" = "xboth"; then
!       CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
      else
!       CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
      fi
  
                  # On IRIX 5.3, sys/types and inttypes.h are conflicting.
--- 4028,4036 ----
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
          CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
      if test "x$MACARCH" = "xboth"; then
!       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
      else
!       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
      fi
  
                  # On IRIX 5.3, sys/types and inttypes.h are conflicting.
***************
*** 17319,17325 ****
    fi
  fi
  if test "x$MACARCH" = "xboth"; then
!   LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
  fi
  
  DEPEND_CFLAGS_FILTER=
--- 17387,17393 ----
    fi
  fi
  if test "x$MACARCH" = "xboth"; then
!   LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
  fi
  
  DEPEND_CFLAGS_FILTER=
*** ../vim-7.2.392/src/version.c	2010-03-10 16:11:57.000000000 +0100
--- src/version.c	2010-03-10 16:26:00.000000000 +0100
***************
*** 683,684 ****
--- 683,686 ----
  {   /* Add new patch number below this line */
+ /**/
+     393,
  /**/

-- 
There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU,
Linux, etc, and those who know COBOL.  It gets very difficult for me at
parties, not knowing which group to socialise with :-)
						Sitaram Chamarty

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///