diff options
| author | Jan Djärv | 2013-12-27 17:57:52 +0100 |
|---|---|---|
| committer | Jan Djärv | 2013-12-27 17:57:52 +0100 |
| commit | 7c8114cb5f85f2dd3eebe12ba7a8951f24c8a8b8 (patch) | |
| tree | 368d10e0ab0e984e54d2fe998e317c1a977fd0f9 | |
| parent | e572a7d8000768b45d005e30b1869dd7ef469200 (diff) | |
| download | emacs-7c8114cb5f85f2dd3eebe12ba7a8951f24c8a8b8.tar.gz emacs-7c8114cb5f85f2dd3eebe12ba7a8951f24c8a8b8.zip | |
* configure.ac: Detect xcrun on OSX and use it for make, gcc and libxml.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | configure.ac | 24 |
2 files changed, 26 insertions, 3 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-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 | |||
| 1 | 2013-12-26 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-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 |
| 40 | fi | 40 | fi |
| 41 | 41 | ||
| 42 | case "`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 | ;; | ||
| 52 | esac | ||
| 53 | |||
| 42 | dnl Set emacs_config_options to the options of 'configure', quoted for the shell, | 54 | dnl Set emacs_config_options to the options of 'configure', quoted for the shell, |
| 43 | dnl and then quoted again for a C string. Separate options with spaces. | 55 | dnl and then quoted again for a C string. Separate options with spaces. |
| 44 | dnl Add some environment variables, if they were passed via the environment | 56 | dnl 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 | ||
| 640 | dnl Sets GCC=yes if using gcc. | 652 | dnl Sets GCC=yes if using gcc. |
| 641 | AC_PROG_CC | 653 | if 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 | ||
| 657 | else | ||
| 658 | AC_PROG_CC | ||
| 659 | fi | ||
| 642 | AM_PROG_CC_C_O | 660 | AM_PROG_CC_C_O |
| 643 | 661 | ||
| 644 | if test x$GCC = xyes; then | 662 | if 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 |