Karsten Hopp fdbb17
To: vim-dev@vim.org
Karsten Hopp fdbb17
Subject: Patch 7.2.393
Karsten Hopp fdbb17
Fcc: outbox
Karsten Hopp fdbb17
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp fdbb17
Mime-Version: 1.0
Karsten Hopp fdbb17
Content-Type: text/plain; charset=UTF-8
Karsten Hopp fdbb17
Content-Transfer-Encoding: 8bit
Karsten Hopp fdbb17
------------
Karsten Hopp fdbb17
Karsten Hopp fdbb17
Patch 7.2.393
Karsten Hopp fdbb17
Problem:    Mac: Can't build with different Xcode developer tools directory.
Karsten Hopp fdbb17
Solution:   make "Developer" directory name configurable. (Rainer Muller)
Karsten Hopp fdbb17
Files:	    src/configure.in, src/auto/configure
Karsten Hopp fdbb17
Karsten Hopp fdbb17
Karsten Hopp fdbb17
*** ../vim-7.2.392/src/configure.in	2010-02-24 14:46:58.000000000 +0100
Karsten Hopp fdbb17
--- src/configure.in	2010-03-10 16:16:48.000000000 +0100
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 116,121 ****
Karsten Hopp fdbb17
--- 116,137 ----
Karsten Hopp fdbb17
  	MACARCH="$withval"; AC_MSG_RESULT($MACARCH),
Karsten Hopp fdbb17
  	MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH))
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
+   AC_MSG_CHECKING(--with-developer-dir argument)
Karsten Hopp fdbb17
+   AC_ARG_WITH(developer-dir, [  --with-developer-dir=PATH    use PATH as location for Xcode developer tools],
Karsten Hopp fdbb17
+ 	DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR),
Karsten Hopp fdbb17
+         DEVELOPER_DIR=""; AC_MSG_RESULT(not present))
Karsten Hopp fdbb17
+   
Karsten Hopp fdbb17
+   if test "x$DEVELOPER_DIR" = "x"; then
Karsten Hopp fdbb17
+     AC_PATH_PROG(XCODE_SELECT, xcode-select)
Karsten Hopp fdbb17
+     if test "x$XCODE_SELECT" != "x"; then
Karsten Hopp fdbb17
+       AC_MSG_CHECKING(for developer dir using xcode-select)
Karsten Hopp fdbb17
+       DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Karsten Hopp fdbb17
+       AC_MSG_RESULT([$DEVELOPER_DIR])
Karsten Hopp fdbb17
+     else
Karsten Hopp fdbb17
+       DEVELOPER_DIR=/Developer
Karsten Hopp fdbb17
+     fi
Karsten Hopp fdbb17
+   fi
Karsten Hopp fdbb17
+ 
Karsten Hopp fdbb17
    if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
      AC_MSG_CHECKING(for 10.4 universal SDK)
Karsten Hopp fdbb17
      dnl There is a terrible inconsistency (but we appear to get away with it):
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 127,133 ****
Karsten Hopp fdbb17
      save_cppflags="$CPPFLAGS"
Karsten Hopp fdbb17
      save_cflags="$CFLAGS"
Karsten Hopp fdbb17
      save_ldflags="$LDFLAGS"
Karsten Hopp fdbb17
!     CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Karsten Hopp fdbb17
      AC_TRY_LINK([ ], [ ],
Karsten Hopp fdbb17
  	AC_MSG_RESULT(found, will make universal binary),
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
--- 143,149 ----
Karsten Hopp fdbb17
      save_cppflags="$CPPFLAGS"
Karsten Hopp fdbb17
      save_cflags="$CFLAGS"
Karsten Hopp fdbb17
      save_ldflags="$LDFLAGS"
Karsten Hopp fdbb17
!     CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Karsten Hopp fdbb17
      AC_TRY_LINK([ ], [ ],
Karsten Hopp fdbb17
  	AC_MSG_RESULT(found, will make universal binary),
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 157,165 ****
Karsten Hopp fdbb17
      dnl TODO: use -arch i386 on Intel machines
Karsten Hopp fdbb17
      CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
Karsten Hopp fdbb17
      if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
!       CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
Karsten Hopp fdbb17
      else
Karsten Hopp fdbb17
!       CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
Karsten Hopp fdbb17
      fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
      dnl If Carbon is found, assume we don't want X11
Karsten Hopp fdbb17
--- 173,181 ----
Karsten Hopp fdbb17
      dnl TODO: use -arch i386 on Intel machines
Karsten Hopp fdbb17
      CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
Karsten Hopp fdbb17
      if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
!       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
Karsten Hopp fdbb17
      else
Karsten Hopp fdbb17
!       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
Karsten Hopp fdbb17
      fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
      dnl If Carbon is found, assume we don't want X11
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 3233,3239 ****
Karsten Hopp fdbb17
    fi
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
!   LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
  dnl gcc 3.1 changed the meaning of -MM.  The only solution appears to be to
Karsten Hopp fdbb17
--- 3249,3255 ----
Karsten Hopp fdbb17
    fi
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
!   LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
  dnl gcc 3.1 changed the meaning of -MM.  The only solution appears to be to
Karsten Hopp fdbb17
*** ../vim-7.2.392/src/auto/configure	2010-02-24 14:46:58.000000000 +0100
Karsten Hopp fdbb17
--- src/auto/configure	2010-03-10 16:19:47.000000000 +0100
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 718,723 ****
Karsten Hopp fdbb17
--- 718,724 ----
Karsten Hopp fdbb17
  VIMNAME
Karsten Hopp fdbb17
  OS_EXTRA_OBJ
Karsten Hopp fdbb17
  OS_EXTRA_SRC
Karsten Hopp fdbb17
+ XCODE_SELECT
Karsten Hopp fdbb17
  CPP_MM
Karsten Hopp fdbb17
  STRIP
Karsten Hopp fdbb17
  AWK
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 774,779 ****
Karsten Hopp fdbb17
--- 775,781 ----
Karsten Hopp fdbb17
  enable_option_checking
Karsten Hopp fdbb17
  enable_darwin
Karsten Hopp fdbb17
  with_mac_arch
Karsten Hopp fdbb17
+ with_developer_dir
Karsten Hopp fdbb17
  with_local_dir
Karsten Hopp fdbb17
  with_vim_name
Karsten Hopp fdbb17
  with_ex_name
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 1492,1497 ****
Karsten Hopp fdbb17
--- 1494,1500 ----
Karsten Hopp fdbb17
    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
Karsten Hopp fdbb17
    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
Karsten Hopp fdbb17
    --with-mac-arch=ARCH    current, intel, ppc or both
Karsten Hopp fdbb17
+   --with-developer-dir=PATH    use PATH as location for Xcode developer tools
Karsten Hopp fdbb17
    --with-local-dir=PATH   search PATH instead of /usr/local for local libraries.
Karsten Hopp fdbb17
    --without-local-dir     do not search /usr/local for local libraries.
Karsten Hopp fdbb17
    --with-vim-name=NAME    what to call the Vim executable
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 3833,3845 ****
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
    if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
      { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5
Karsten Hopp fdbb17
  $as_echo_n "checking for 10.4 universal SDK... " >&6; }
Karsten Hopp fdbb17
                              save_cppflags="$CPPFLAGS"
Karsten Hopp fdbb17
      save_cflags="$CFLAGS"
Karsten Hopp fdbb17
      save_ldflags="$LDFLAGS"
Karsten Hopp fdbb17
!     CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Karsten Hopp fdbb17
      cat >conftest.$ac_ext <<_ACEOF
Karsten Hopp fdbb17
  /* confdefs.h.  */
Karsten Hopp fdbb17
  _ACEOF
Karsten Hopp fdbb17
--- 3836,3913 ----
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
+   { $as_echo "$as_me:$LINENO: checking --with-developer-dir argument" >&5
Karsten Hopp fdbb17
+ $as_echo_n "checking --with-developer-dir argument... " >&6; }
Karsten Hopp fdbb17
+ 
Karsten Hopp fdbb17
+ # Check whether --with-developer-dir was given.
Karsten Hopp fdbb17
+ if test "${with_developer_dir+set}" = set; then
Karsten Hopp fdbb17
+   withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
Karsten Hopp fdbb17
+ $as_echo "$DEVELOPER_DIR" >&6; }
Karsten Hopp fdbb17
+ else
Karsten Hopp fdbb17
+   DEVELOPER_DIR=""; { $as_echo "$as_me:$LINENO: result: not present" >&5
Karsten Hopp fdbb17
+ $as_echo "not present" >&6; }
Karsten Hopp fdbb17
+ fi
Karsten Hopp fdbb17
+ 
Karsten Hopp fdbb17
+ 
Karsten Hopp fdbb17
+   if test "x$DEVELOPER_DIR" = "x"; then
Karsten Hopp fdbb17
+     # Extract the first word of "xcode-select", so it can be a program name with args.
Karsten Hopp fdbb17
+ set dummy xcode-select; ac_word=$2
Karsten Hopp fdbb17
+ { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
Karsten Hopp fdbb17
+ $as_echo_n "checking for $ac_word... " >&6; }
Karsten Hopp fdbb17
+ if test "${ac_cv_path_XCODE_SELECT+set}" = set; then
Karsten Hopp fdbb17
+   $as_echo_n "(cached) " >&6
Karsten Hopp fdbb17
+ else
Karsten Hopp fdbb17
+   case $XCODE_SELECT in
Karsten Hopp fdbb17
+   [\\/]* | ?:[\\/]*)
Karsten Hopp fdbb17
+   ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
Karsten Hopp fdbb17
+   ;;
Karsten Hopp fdbb17
+   *)
Karsten Hopp fdbb17
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Karsten Hopp fdbb17
+ for as_dir in $PATH
Karsten Hopp fdbb17
+ do
Karsten Hopp fdbb17
+   IFS=$as_save_IFS
Karsten Hopp fdbb17
+   test -z "$as_dir" && as_dir=.
Karsten Hopp fdbb17
+   for ac_exec_ext in '' $ac_executable_extensions; do
Karsten Hopp fdbb17
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Karsten Hopp fdbb17
+     ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
Karsten Hopp fdbb17
+     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Karsten Hopp fdbb17
+     break 2
Karsten Hopp fdbb17
+   fi
Karsten Hopp fdbb17
+ done
Karsten Hopp fdbb17
+ done
Karsten Hopp fdbb17
+ IFS=$as_save_IFS
Karsten Hopp fdbb17
+ 
Karsten Hopp fdbb17
+   ;;
Karsten Hopp fdbb17
+ esac
Karsten Hopp fdbb17
+ fi
Karsten Hopp fdbb17
+ XCODE_SELECT=$ac_cv_path_XCODE_SELECT
Karsten Hopp fdbb17
+ if test -n "$XCODE_SELECT"; then
Karsten Hopp fdbb17
+   { $as_echo "$as_me:$LINENO: result: $XCODE_SELECT" >&5
Karsten Hopp fdbb17
+ $as_echo "$XCODE_SELECT" >&6; }
Karsten Hopp fdbb17
+ else
Karsten Hopp fdbb17
+   { $as_echo "$as_me:$LINENO: result: no" >&5
Karsten Hopp fdbb17
+ $as_echo "no" >&6; }
Karsten Hopp fdbb17
+ fi
Karsten Hopp fdbb17
+ 
Karsten Hopp fdbb17
+ 
Karsten Hopp fdbb17
+     if test "x$XCODE_SELECT" != "x"; then
Karsten Hopp fdbb17
+       { $as_echo "$as_me:$LINENO: checking for developer dir using xcode-select" >&5
Karsten Hopp fdbb17
+ $as_echo_n "checking for developer dir using xcode-select... " >&6; }
Karsten Hopp fdbb17
+       DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Karsten Hopp fdbb17
+       { $as_echo "$as_me:$LINENO: result: $DEVELOPER_DIR" >&5
Karsten Hopp fdbb17
+ $as_echo "$DEVELOPER_DIR" >&6; }
Karsten Hopp fdbb17
+     else
Karsten Hopp fdbb17
+       DEVELOPER_DIR=/Developer
Karsten Hopp fdbb17
+     fi
Karsten Hopp fdbb17
+   fi
Karsten Hopp fdbb17
+ 
Karsten Hopp fdbb17
    if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
      { $as_echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5
Karsten Hopp fdbb17
  $as_echo_n "checking for 10.4 universal SDK... " >&6; }
Karsten Hopp fdbb17
                              save_cppflags="$CPPFLAGS"
Karsten Hopp fdbb17
      save_cflags="$CFLAGS"
Karsten Hopp fdbb17
      save_ldflags="$LDFLAGS"
Karsten Hopp fdbb17
!     CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Karsten Hopp fdbb17
      cat >conftest.$ac_ext <<_ACEOF
Karsten Hopp fdbb17
  /* confdefs.h.  */
Karsten Hopp fdbb17
  _ACEOF
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 3960,3968 ****
Karsten Hopp fdbb17
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Karsten Hopp fdbb17
          CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
Karsten Hopp fdbb17
      if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
!       CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
Karsten Hopp fdbb17
      else
Karsten Hopp fdbb17
!       CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
Karsten Hopp fdbb17
      fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
                  # On IRIX 5.3, sys/types and inttypes.h are conflicting.
Karsten Hopp fdbb17
--- 4028,4036 ----
Karsten Hopp fdbb17
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Karsten Hopp fdbb17
          CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
Karsten Hopp fdbb17
      if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
!       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
Karsten Hopp fdbb17
      else
Karsten Hopp fdbb17
!       CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
Karsten Hopp fdbb17
      fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
                  # On IRIX 5.3, sys/types and inttypes.h are conflicting.
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 17319,17325 ****
Karsten Hopp fdbb17
    fi
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
!   LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
  DEPEND_CFLAGS_FILTER=
Karsten Hopp fdbb17
--- 17387,17393 ----
Karsten Hopp fdbb17
    fi
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  if test "x$MACARCH" = "xboth"; then
Karsten Hopp fdbb17
!   LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Karsten Hopp fdbb17
  fi
Karsten Hopp fdbb17
  
Karsten Hopp fdbb17
  DEPEND_CFLAGS_FILTER=
Karsten Hopp fdbb17
*** ../vim-7.2.392/src/version.c	2010-03-10 16:11:57.000000000 +0100
Karsten Hopp fdbb17
--- src/version.c	2010-03-10 16:26:00.000000000 +0100
Karsten Hopp fdbb17
***************
Karsten Hopp fdbb17
*** 683,684 ****
Karsten Hopp fdbb17
--- 683,686 ----
Karsten Hopp fdbb17
  {   /* Add new patch number below this line */
Karsten Hopp fdbb17
+ /**/
Karsten Hopp fdbb17
+     393,
Karsten Hopp fdbb17
  /**/
Karsten Hopp fdbb17
Karsten Hopp fdbb17
-- 
Karsten Hopp fdbb17
There are 2 kinds of people in my world: those who know Unix, Perl, Vim, GNU,
Karsten Hopp fdbb17
Linux, etc, and those who know COBOL.  It gets very difficult for me at
Karsten Hopp fdbb17
parties, not knowing which group to socialise with :-)
Karsten Hopp fdbb17
						Sitaram Chamarty
Karsten Hopp fdbb17
Karsten Hopp fdbb17
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp fdbb17
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp fdbb17
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp fdbb17
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///