aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2013-12-27 17:57:52 +0100
committerJan Djärv2013-12-27 17:57:52 +0100
commit7c8114cb5f85f2dd3eebe12ba7a8951f24c8a8b8 (patch)
tree368d10e0ab0e984e54d2fe998e317c1a977fd0f9
parente572a7d8000768b45d005e30b1869dd7ef469200 (diff)
downloademacs-7c8114cb5f85f2dd3eebe12ba7a8951f24c8a8b8.tar.gz
emacs-7c8114cb5f85f2dd3eebe12ba7a8951f24c8a8b8.zip
* configure.ac: Detect xcrun on OSX and use it for make, gcc and libxml.
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac24
2 files changed, 26 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ddf7d92ac14..107c28ca074 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12013-12-27 Jan Djärv <jan.h.d@swipnet.se>
2
3 * configure.ac: Detect xcrun on OSX and use it for make, gcc and
4 libxml.
5
12013-12-26 Paul Eggert <eggert@cs.ucla.edu> 62013-12-26 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Fix core dumps with gcc -fsanitize=address and GNU/Linux. 8 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
diff --git a/configure.ac b/configure.ac
index 8aaf2c6a8ac..ca37219f1b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,18 @@ then
39 esac 39 esac
40fi 40fi
41 41
42case "`uname 2>/dev/null`" in
43 *Darwin*)
44 xcsdkdir=
45 AC_CHECK_PROGS(XCRUN, [xcrun])
46 if test x"$XCRUN" != x; then
47 AC_CHECK_PROGS(MAKE, [make "$XCRUN make"])
48 export MAKE
49 xcsdkdir="`$XCRUN --show-sdk-path 2>/dev/null`"
50 fi
51 ;;
52esac
53
42dnl Set emacs_config_options to the options of 'configure', quoted for the shell, 54dnl Set emacs_config_options to the options of 'configure', quoted for the shell,
43dnl and then quoted again for a C string. Separate options with spaces. 55dnl and then quoted again for a C string. Separate options with spaces.
44dnl Add some environment variables, if they were passed via the environment 56dnl Add some environment variables, if they were passed via the environment
@@ -638,7 +650,13 @@ fi
638#### Choose a compiler. 650#### Choose a compiler.
639 651
640dnl Sets GCC=yes if using gcc. 652dnl Sets GCC=yes if using gcc.
641AC_PROG_CC 653if test x$opsys = xdarwin && test x"$XCRUN" != x; then
654 AC_PROG_CC([gcc cc cl clang "$XCRUN gcc" "$XCRUN clang"])
655 AC_CHECK_PROGS(AR, [ar "$XCRUN ar"])
656 test x"$AR" != x && export AR
657else
658 AC_PROG_CC
659fi
642AM_PROG_CC_C_O 660AM_PROG_CC_C_O
643 661
644if test x$GCC = xyes; then 662if test x$GCC = xyes; then
@@ -3275,14 +3293,14 @@ if test "${with_xml2}" != "no"; then
3275 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc. 3293 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
3276 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then 3294 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
3277 SAVE_CPPFLAGS="$CPPFLAGS" 3295 SAVE_CPPFLAGS="$CPPFLAGS"
3278 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2" 3296 CPPFLAGS="$CPPFLAGS -I$xcsdkdir/usr/include/libxml2"
3279 AC_CHECK_HEADER(libxml/HTMLparser.h, 3297 AC_CHECK_HEADER(libxml/HTMLparser.h,
3280 [AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, , 3298 [AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, ,
3281 [#include <libxml/HTMLparser.h>])]) 3299 [#include <libxml/HTMLparser.h>])])
3282 CPPFLAGS="$SAVE_CPPFLAGS" 3300 CPPFLAGS="$SAVE_CPPFLAGS"
3283 if test "${HAVE_LIBXML2}" = "yes"; then 3301 if test "${HAVE_LIBXML2}" = "yes"; then
3302 LIBXML2_CFLAGS="-I'$xcsdkdir/usr/include/libxml2'"
3284 LIBXML2_LIBS="-lxml2" 3303 LIBXML2_LIBS="-lxml2"
3285 LIBXML2_CFLAGS="-I/usr/include/libxml2"
3286 fi 3304 fi
3287 fi 3305 fi
3288 if test "${HAVE_LIBXML2}" = "yes"; then 3306 if test "${HAVE_LIBXML2}" = "yes"; then