case $opsys in
darwin | gnu | hpux* | *bsd )
AC_DEFINE(NO_TERMIO, 1, [Define if termio.h should not be included.])
- ;;
+ ;;
+
+ irix6-5 | sol2* | unixware )
+ dnl Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
+ dnl instead, there's a system variable _sys_nsig. Unfortunately, we
+ dnl need the constant to dimension an array. So wire in the appropriate
+ dnl value here.
+ AC_DEFINE(NSIG_MINIMUM, 32, [Minimum value of NSIG.])
+ ;;
esac
;;
sol2* )
- dnl This change means that we don't loop through allocate_pty too
- dnl many times in the (rare) event of a failure.
- AC_DEFINE(FIRST_PTY_LETTER, ['z'])
- AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] )
dnl Uses sigblock/sigunblock rather than sighold/sigrelse,
dnl which appear to be BSD4.1 specific. It may also be appropriate
dnl for SVR4.x (x<2) but I'm not sure. fnf@cygnus.com
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }] )
;;
- dnl Comments are as per sol2*.
unixware )
+ dnl Comments are as per sol2*.
+ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal("could not grant slave pty"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, sizeof pty_name, "%s", ptyname); }] )
+ ;;
+esac
+
+
+case $opsys in
+ sol2* | unixware )
+ dnl This change means that we don't loop through allocate_pty too
+ dnl many times in the (rare) event of a failure.
AC_DEFINE(FIRST_PTY_LETTER, ['z'])
AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] )
- AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal("could not grant slave pty"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, sizeof pty_name, "%s", ptyname); }] )
+ dnl Push various streams modules onto a PTY channel. Used in process.c.
+ AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (xforkin, I_PUSH, "ptem") == -1) fatal ("ioctl I_PUSH ptem"); if (ioctl (xforkin, I_PUSH, "ldterm") == -1) fatal ("ioctl I_PUSH ldterm"); if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) fatal ("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
;;
esac
gnu | gnu-linux | gnu-kfreebsd )
AC_MSG_CHECKING([for style of pending output formalism])
- dnl In autoconf 2.67 (?) and later, we could use a single test
+ dnl In autoconf 2.67 and later, we could use a single test
dnl since the preprocessed output is accessible in "conftest.i".
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
esac
+AH_TEMPLATE(ULIMIT_BREAK_VALUE, [Undocumented.])
AH_TEMPLATE(TAB3, [Undocumented.])
case $opsys in
AC_DEFINE(TAB3, OXTABS)
;;
+ gnu-linux | gnu-kfreebsd )
+ dnl libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared
+ dnl library, we cannot get the maximum address for brk.
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#ifndef __i386__
+# error "not i386"
+#endif
+ ]], [[]])], AC_DEFINE(ULIMIT_BREAK_VALUE, [(32*1024*1024)]), [])
+
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#ifndef __ia64__
+# error "not ia64"
+#endif
+ ]], [[]])], AC_DEFINE(GC_MARK_SECONDARY_STACK(),
+ [do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)],
+ [Mark a secondary stack, like the register stack on the ia64.]), [])
+ ;;
+
hpux*)
AC_DEFINE(RUN_TIME_REMAP, 1, [Define if emacs.c needs to call
run_time_remap; for HPUX.])
;;
+
+ irix6-5)
+ dnl Ulimit(UL_GMEMLIM) is busted...
+ AC_DEFINE(ULIMIT_BREAK_VALUE, [0x14000000])
+ ;;
esac
esac
+dnl Define symbols to identify the version of Unix this is.
+dnl Define all the symbols that apply correctly.
+AH_TEMPLATE(BSD4_2, [Define if the system is compatible with BSD 4.2.])
+AH_TEMPLATE(BSD_SYSTEM, [Define if the system is compatible with BSD 4.2.])
+AH_TEMPLATE(USG, [Define if the system is compatible with System III.])
+AH_TEMPLATE(USG5, [Define if the system is compatible with System V.])
+
+case $opsys in
+ aix4-2)
+ AC_DEFINE(USG, [])
+ AC_DEFINE(USG5, [])
+ dnl This symbol should be defined on AIX Version 3 ???????
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#ifndef _AIX
+# error "_AIX not defined"
+#endif
+ ]], [[]])], [], AC_DEFINE(_AIX, [], [Define if the system is AIX.]))
+ ;;
+
+ cygwin)
+ opsysfile=
+ AC_DEFINE(CYGWIN, 1, [Define if the system is Cygwin.])
+ ;;
+
+ darwin)
+ dnl BSD4_3 and BSD4_4 are already defined in sys/param.h.
+ AC_DEFINE(BSD4_2, [])
+ AC_DEFINE(BSD_SYSTEM, [])
+ dnl More specific than the above two. We cannot use __APPLE__ as this
+ dnl may not be defined on non-OSX Darwin, and we cannot define DARWIN
+ dnl here because Panther and lower CoreFoundation.h uses DARWIN to
+ dnl distinguish OS X from pure Darwin.
+ AC_DEFINE(DARWIN_OS, [], [Define if the system is Darwin.])
+ ;;
+
+ freebsd)
+ AC_DEFINE(BSD4_2, [])
+ dnl Hack to avoid calling AC_PREPROC_IFELSE multiple times.
+ dnl Would not be needed with autoconf >= 2.67, where the
+ dnl preprocessed output is accessible in "conftest.i".
+ AC_DEFINE(BSD_SYSTEM_AHB, 1, [Define if AH_BOTTOM should change BSD_SYSTEM.])
+ ;;
+
+ gnu | netbsd | openbsd )
+ AC_DEFINE(BSD4_2, [])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#ifndef BSD_SYSTEM
+# error "BSD_SYSTEM not defined"
+#endif
+ ]], [[]])], [], AC_DEFINE(BSD_SYSTEM, 43) )
+ ;;
+
+ gnu-linux | gnu-kfreebsd )
+ AC_DEFINE(USG, [])
+ AC_DEFINE(GNU_LINUX, [], [Define if ths system is compatible with GNU/Linux.])
+ ;;
+
+ hpux*)
+ AC_DEFINE(USG, [])
+ AC_DEFINE(USG5, [])
+ AC_DEFINE(HPUX, [], [Define if the system is HPUX.])
+ ;;
+
+ irix6-5)
+ AC_DEFINE(USG, [])
+ AC_DEFINE(USG5, [])
+ AC_DEFINE(IRIX6_5, [], [Define if the system is IRIX.])
+ ;;
+
+ sol2*)
+ AC_DEFINE(USG, [])
+ AC_DEFINE(USG5, [])
+ AC_DEFINE(SOLARIS2, [], [Define if the system is Solaris.])
+ ;;
+
+ unixware)
+ AC_DEFINE(USG, [])
+ AC_DEFINE(USG5, [])
+ ;;
+esac
+
+
case $opsys in
dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls
dnl memalign and on Cygwin, that becomes the Cygwin-supplied memalign.
using GTK.])
;;
- gnu) opsysfile="s/bsd-common.h" ;;
+ gnu) opsysfile= ;;
gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
# error "alloca not available on this machine"
#endif
+/* This silences a few compilation warnings on FreeBSD. */
+#ifdef BSD_SYSTEM_AHB
+#undef BSD_SYSTEM_AHB
+#undef BSD_SYSTEM
+#if __FreeBSD__ == 1
+#define BSD_SYSTEM 199103
+#elif __FreeBSD__ == 2
+#define BSD_SYSTEM 199306
+#elif __FreeBSD__ >= 3
+#define BSD_SYSTEM 199506
+#endif
+#endif
+
/* Define AMPERSAND_FULL_NAME if you use the convention
that & in the full name stands for the login id. */
/* Turned on June 1996 supposing nobody will mind it. */