diff options
| author | Glenn Morris | 2011-09-14 19:32:55 -0700 |
|---|---|---|
| committer | Glenn Morris | 2011-09-14 19:32:55 -0700 |
| commit | 0cc87afbdb5cd4b1a368c498d7544d82ca9fb750 (patch) | |
| tree | dbe4ce2307daa2db28805c8a5cde791393a513f2 | |
| parent | 92fa95ad888e8d02a22dedbd73f7546640c3bcb9 (diff) | |
| download | emacs-0cc87afbdb5cd4b1a368c498d7544d82ca9fb750.tar.gz emacs-0cc87afbdb5cd4b1a368c498d7544d82ca9fb750.zip | |
Make the GNUstep port at least be able to configure.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00938.html
* configure.in: (_NATIVE_OBJC_EXCEPTIONS): New AC_DEFINE.
(GNU_OBJC_CFLAGS): Add -fobjc-exceptions when needed.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | configure.in | 26 |
2 files changed, 30 insertions, 2 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-09-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.in: Make configure work with recent GNUsteps. | ||
| 4 | (_NATIVE_OBJC_EXCEPTIONS): New AC_DEFINE. | ||
| 5 | (GNU_OBJC_CFLAGS): Add -fobjc-exceptions when needed. | ||
| 6 | |||
| 1 | 2011-09-11 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2011-09-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | Merge from gnulib, porting to Tru64. | 9 | Merge from gnulib, porting to Tru64. |
diff --git a/configure.in b/configure.in index 5116648c32a..cfc04137470 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1489,6 +1489,7 @@ tmp_CFLAGS="$CFLAGS" | |||
| 1489 | CPPFLAGS="$CPPFLAGS -x objective-c" | 1489 | CPPFLAGS="$CPPFLAGS -x objective-c" |
| 1490 | CFLAGS="$CFLAGS -x objective-c" | 1490 | CFLAGS="$CFLAGS -x objective-c" |
| 1491 | TEMACS_LDFLAGS2="\${LDFLAGS}" | 1491 | TEMACS_LDFLAGS2="\${LDFLAGS}" |
| 1492 | GNU_OBJC_CFLAGS= | ||
| 1492 | dnl I don't think it's especially important, but src/Makefile.in | 1493 | dnl I don't think it's especially important, but src/Makefile.in |
| 1493 | dnl (now the only user of ns_appdir) used to go to the trouble of adding a | 1494 | dnl (now the only user of ns_appdir) used to go to the trouble of adding a |
| 1494 | dnl trailing "/" to it, so now we do it here. | 1495 | dnl trailing "/" to it, so now we do it here. |
| @@ -1521,7 +1522,28 @@ if test "${with_ns}" != no; then | |||
| 1521 | LIB_STANDARD= | 1522 | LIB_STANDARD= |
| 1522 | START_FILES= | 1523 | START_FILES= |
| 1523 | TEMACS_LDFLAGS2= | 1524 | TEMACS_LDFLAGS2= |
| 1525 | dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1. | ||
| 1526 | dnl If they had chosen to either define it or not, we could have | ||
| 1527 | dnl just used AC_CHECK_DECL here. | ||
| 1528 | AC_CACHE_CHECK(if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS, | ||
| 1529 | emacs_cv_objc_exceptions, | ||
| 1530 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <GNUstepBase/GSConfig.h>]], | ||
| 1531 | [[#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 | ||
| 1532 | 1; | ||
| 1533 | #else | ||
| 1534 | fail; | ||
| 1535 | #endif]])], emacs_cv_objc_exceptions=yes, emacs_cv_objc_exceptions=no ) ) | ||
| 1536 | if test $emacs_cv_objc_exceptions = yes; then | ||
| 1537 | dnl _NATIVE_OBJC_EXCEPTIONS is used by the GNUstep headers. | ||
| 1538 | AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1, | ||
| 1539 | [Define if GNUstep uses ObjC exceptions.]) | ||
| 1540 | GNU_OBJC_CFLAGS="-fobjc-exceptions" | ||
| 1541 | fi | ||
| 1524 | fi | 1542 | fi |
| 1543 | |||
| 1544 | dnl This is only used while we test the NS headers, it gets reset below. | ||
| 1545 | CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" | ||
| 1546 | |||
| 1525 | AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], | 1547 | AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], |
| 1526 | [AC_MSG_ERROR([`--with-ns' was specified, but the include | 1548 | [AC_MSG_ERROR([`--with-ns' was specified, but the include |
| 1527 | files are missing or cannot be compiled.])]) | 1549 | files are missing or cannot be compiled.])]) |
| @@ -2555,14 +2577,14 @@ if test "${HAVE_NS}" = "yes"; then | |||
| 2555 | AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.]) | 2577 | AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.]) |
| 2556 | if test "${NS_IMPL_COCOA}" = "yes"; then | 2578 | if test "${NS_IMPL_COCOA}" = "yes"; then |
| 2557 | AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing under MacOS X.]) | 2579 | AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing under MacOS X.]) |
| 2558 | GNU_OBJC_CFLAGS= | ||
| 2559 | fi | 2580 | fi |
| 2560 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then | 2581 | if test "${NS_IMPL_GNUSTEP}" = "yes"; then |
| 2561 | AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) | 2582 | AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) |
| 2562 | # See also .m.o rule in Makefile.in */ | 2583 | # See also .m.o rule in Makefile.in */ |
| 2563 | # FIXME: are all these flags really needed? Document here why. */ | 2584 | # FIXME: are all these flags really needed? Document here why. */ |
| 2564 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" | 2585 | C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" |
| 2565 | GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | 2586 | ## Extra CFLAGS applied to src/*.m files. |
| 2587 | GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" | ||
| 2566 | fi | 2588 | fi |
| 2567 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then | 2589 | if test "${NS_HAVE_NSINTEGER}" = "yes"; then |
| 2568 | AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) | 2590 | AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) |