(Change Log): Mention next-error is available.
[bpt/emacs.git] / configure.in
index 94c30e5..e6b5ea3 100644 (file)
@@ -153,12 +153,12 @@ OPTION_DEFAULT_ON([makeinfo],[don't require makeinfo for building manuals])
 
 dnl Can remove these in Emacs 24.
 AC_ARG_WITH([gtk],,
-  AC_MSG_ERROR([--with-gtk has been removed.  Use --with-x-toolkit to
-specify a toolkit.]),,)
+  [AC_MSG_ERROR([--with-gtk has been removed.  Use --with-x-toolkit to
+specify a toolkit.])],,)
 
 AC_ARG_WITH([gcc],,
-  AC_MSG_ERROR([--with-gcc has been removed.  Set the `CC' environment
-  variable to specify a compiler.]),,)
+  [AC_MSG_ERROR([--with-gcc has been removed.  Set the `CC' environment
+variable to specify a compiler.])],,)
 
 AC_ARG_WITH([pkg-config-prog],dnl
 [AS_HELP_STRING([--with-pkg-config-prog=PATH],
@@ -170,13 +170,15 @@ if test "X${with_pkg_config_prog}" != X; then
 fi
 
 AC_ARG_ENABLE(cocoa-experimental-ctrl-g,
-[  --enable-cocoa-experimental-ctrl-g        enable experimental improved ctrl-g recognition],
-   EN_COCOA_EXPERIMENTAL_CTRL_G=yes,
+[AS_HELP_STRING([--enable-cocoa-experimental-ctrl-g],
+                [enable experimental improved ctrl-g recognition])],
+   EN_COCOA_EXPERIMENTAL_CTRL_G=$enableval,
    EN_COCOA_EXPERIMENTAL_CTRL_G=no)
 
 AC_ARG_ENABLE(ns-self-contained,
-[  --disable-ns-self-contained        disable self contained build under NS],
-   EN_NS_SELF_CONTAINED=no,
+[AS_HELP_STRING([--disable-ns-self-contained],
+                [disable self contained build under NeXTstep])],
+   EN_NS_SELF_CONTAINED=$enableval,
    EN_NS_SELF_CONTAINED=yes)
 
 AC_ARG_ENABLE(asserts,
@@ -1236,6 +1238,14 @@ if test "${with_ns}" != no; then
      LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
   fi
   AC_CHECK_HEADER(AppKit/AppKit.h, HAVE_NS=yes)
+  NS_HAVE_NSINTEGER=yes
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>],
+                                     [NSInteger i;])],
+                   ns_have_nsinteger=yes,
+                   ns_have_nsinteger=no)
+  if test $ns_have_nsinteger = no; then
+    NS_HAVE_NSINTEGER=no
+  fi
 fi
 if test "${HAVE_NS}" = yes; then
   window_system=nextstep
@@ -2039,12 +2049,18 @@ if test "${HAVE_NS}" = "yes"; then
   AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.])
   if test "${NS_IMPL_COCOA}" = "yes"; then
     AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing under MacOS X.])
+    GNU_OBJC_CFLAGS=
+    LIB_SRC_EXTRA_INSTALLABLES=mac-fix-env
   fi
   if test "${EN_COCOA_EXPERIMENTAL_CTRL_G}" = "yes"; then
     AC_DEFINE(COCOA_EXPERIMENTAL_CTRL_G, 1, [Define to 1 if you are trying experimental enhanced Ctrl-g support using NS windowing under MacOS X.])
   fi
   if test "${NS_IMPL_GNUSTEP}" = "yes"; then
     AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.])
+    GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
+  fi
+  if test "${NS_HAVE_NSINTEGER}" = "yes"; then
+    AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
   fi
   # We also have mouse menus.
   HAVE_MENUS=yes
@@ -2224,7 +2240,9 @@ if test "${with_kerberos}" != no; then
   fi
 
   if test "${with_kerberos5}" != no; then
-    AC_CHECK_HEADERS(krb5.h)
+    AC_CHECK_HEADERS(krb5.h,
+      [AC_CHECK_MEMBERS([krb5_error.text, krb5_error.e_text],,,
+                       [#include <krb5.h>])])
   else
     AC_CHECK_HEADERS(des.h,,
                     [AC_CHECK_HEADERS(kerberosIV/des.h,,
@@ -2449,6 +2467,8 @@ AC_SUBST(ns_appbindir)
 AC_SUBST(ns_appresdir)
 AC_SUBST(ns_appsrc)
 AC_SUBST(GNUSTEP_MAKEFILES)
+AC_SUBST(GNU_OBJC_CFLAGS)
+AC_SUBST(LIB_SRC_EXTRA_INSTALLABLES)
 
 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION,  "${canonical}",
                   [Define to the canonical Emacs configuration name.])
@@ -2541,16 +2561,9 @@ AH_BOTTOM([
 /* If we're using X11/Carbon/GNUstep, define some consequences.  */
 #if defined(HAVE_X_WINDOWS) || defined(HAVE_NS)
 #define HAVE_WINDOW_SYSTEM
-#define MULTI_KBOARD
 #define HAVE_MOUSE
 #endif
 
-/* Multi-tty support relies on MULTI_KBOARD.  It seems safe to turn it
-   on unconditionally. */
-#ifndef MULTI_KBOARD
-#define MULTI_KBOARD
-#endif
-
 /* Sadly for now, GNUstep dump does not work.  */
 #ifdef NS_IMPL_GNUSTEP
 #define CANNOT_DUMP
@@ -2599,21 +2612,14 @@ AH_BOTTOM([
    side does this in s/darwin.h and we cannot
    parallel this exactly since GNUstep is multi-OS. */
 #ifdef HAVE_NS
-# ifdef C_SWITCH_SYSTEM
-# undef C_SWITCH_SYSTEM
-# endif
+#define OTHER_FILES ns-app
 # ifdef NS_IMPL_GNUSTEP
 /* See also .m.o rule in Makefile.in */
-#  define C_SWITCH_X_SYSTEM -MMD -MP -D_REENTRANT -fPIC -fno-strict-aliasing
-#  define GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE
-#  define OTHER_FILES ns-app
-# else /* NS_IMPL_COCOA */
-#  define C_SWITCH_X_SYSTEM
-#  define GNU_OBJC_CFLAGS
-# endif /* NS_IMPL_COCOA */
+#  define C_SWITCH_X_SYSTEM -D_REENTRANT -fPIC -fno-strict-aliasing
+# endif /* NS_IMPL_GNUSTEP */
 #endif /* HAVE_NS */
 
-/* Define `subprocesses' should be defined if you want to
+/* `subprocesses' should be defined if you want to
    have code for asynchronous subprocesses
    (as used in M-x compile and M-x shell).
    Only MSDOS does not support this.  */