emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115773: Port xcrun configuration to GNU/Linux.


From: Paul Eggert
Subject: [Emacs-diffs] trunk r115773: Port xcrun configuration to GNU/Linux.
Date: Fri, 27 Dec 2013 19:14:13 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115773
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Fri 2013-12-27 11:14:10 -0800
message:
  Port xcrun configuration to GNU/Linux.
  
  * configure.ac (xcsdkdir): Default to empty.
  (XCRUN): Don't require Darwin for xcrun.  Move xcrun checking to
  just before AM_INIT_AUTOMAKE, to make the dependency between it
  and automake clearer.
  (CC): Don't use AC_PROG_CC twice; only the first use expands to the
  shell code that is wanted, which breaks 'configure' on non-Darwin
  platforms.  Instead, fix CC by hand if it's not found.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-12-27 16:57:52 +0000
+++ b/ChangeLog 2013-12-27 19:14:10 +0000
@@ -1,3 +1,14 @@
+2013-12-27  Paul Eggert  <address@hidden>
+
+       Port xcrun configuration to GNU/Linux.
+       * configure.ac (xcsdkdir): Default to empty.
+       (XCRUN): Don't require Darwin for xcrun.  Move xcrun checking to
+       just before AM_INIT_AUTOMAKE, to make the dependency between it
+       and automake clearer.
+       (CC): Don't use AC_PROG_CC twice; only the first use expands to the
+       shell code that is wanted, which breaks 'configure' on non-Darwin
+       platforms.  Instead, fix CC by hand if it's not found.
+
 2013-12-27  Jan Djärv  <address@hidden>
 
        * configure.ac: Detect xcrun on OSX and use it for make, gcc and

=== modified file 'configure.ac'
--- a/configure.ac      2013-12-27 16:57:52 +0000
+++ b/configure.ac      2013-12-27 19:14:10 +0000
@@ -39,18 +39,6 @@
   esac
 fi
 
-case "`uname 2>/dev/null`" in
- *Darwin*)
-  xcsdkdir=
-  AC_CHECK_PROGS(XCRUN, [xcrun])
-  if test x"$XCRUN" != x; then
-    AC_CHECK_PROGS(MAKE, [make "$XCRUN make"])
-    export MAKE
-    xcsdkdir="`$XCRUN --show-sdk-path 2>/dev/null`"
-  fi
-  ;;
-esac
-
 dnl Set emacs_config_options to the options of 'configure', quoted for the 
shell,
 dnl and then quoted again for a C string.  Separate options with spaces.
 dnl Add some environment variables, if they were passed via the environment
@@ -93,6 +81,15 @@
 AC_CONFIG_HEADERS(src/config.h:src/config.in)
 AC_CONFIG_SRCDIR(src/lisp.h)
 AC_CONFIG_AUX_DIR(build-aux)
+
+xcsdkdir=
+AC_CHECK_PROGS(XCRUN, [xcrun])
+if test -n "$XCRUN"; then
+  AC_CHECK_PROGS(MAKE, [make "$XCRUN make"])
+  test -n "$MAKE" && export MAKE
+  xcsdkdir=`$XCRUN --show-sdk-path 2>/dev/null`
+fi
+
 dnl Fairly arbitrary, older versions might work too.
 AM_INIT_AUTOMAKE(1.11)
 
@@ -650,12 +647,17 @@
 #### Choose a compiler.
 
 dnl Sets GCC=yes if using gcc.
-if test x$opsys = xdarwin && test x"$XCRUN" != x; then
-  AC_PROG_CC([gcc cc cl clang "$XCRUN gcc" "$XCRUN clang"])
+AC_PROG_CC
+if test -n "$XCRUN"; then
+  if test -z "$CC"; then
+    if $XCRUN gcc --version >/dev/null 2>&1; then
+      CC="$XCRUN gcc"
+    elif $XCRUN clang --version >/dev/null 2>&1; then
+      CC="$XCRUN clang"
+    fi
+  fi
   AC_CHECK_PROGS(AR, [ar "$XCRUN ar"])
-  test x"$AR" != x && export AR
-else
-  AC_PROG_CC
+  test -n "$AR" && export AR
 fi
 AM_PROG_CC_C_O
 
@@ -3293,7 +3295,7 @@
   # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
   if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
     SAVE_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS -I$xcsdkdir/usr/include/libxml2"
+    CPPFLAGS="$CPPFLAGS -I'$xcsdkdir/usr/include/libxml2'"
     AC_CHECK_HEADER(libxml/HTMLparser.h,
       [AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, ,
                     [#include <libxml/HTMLparser.h>])])


reply via email to

[Prev in Thread] Current Thread [Next in Thread]