[[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;]])],
emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no))
HAVE_EXCEPTION=$emacs_cv_struct_exception
-if test $emacs_cv_struct_exception != yes; then
+dnl Define on Darwin so emacs symbols will not conflict with those
+dnl in the System framework. Otherwise -prebind will not work.
+if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then
AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.])
fi
AC_CHECK_FUNCS(gethostname \
-rename closedir mkdir rmdir getrusage get_current_dir_name \
+closedir getrusage get_current_dir_name \
lrand48 logb frexp fmod cbrt setsid \
-strerror fpathconf select euidaccess getpagesize setlocale \
+fpathconf select euidaccess getpagesize setlocale \
utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
__fpending strsignal setitimer \
sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
touchlock \
cfmakeraw cfsetspeed copysign __executable_start)
+dnl FIXME Fragile: something else may test for getwd as a dependency.
+dnl Change to defining BROKEN_xxx ?
dnl getwd appears to be buggy on SVR4.2, so we don't use it.
if test $opsys != unixware; then
AC_CHECK_FUNCS(getwd)
fi
+dnl FIXME Fragile: see above.
## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
## has a broken `rint' in some library versions including math library
## version number A.09.05.
AC_SUBST(DESLIB)
AC_SUBST(KRB4LIB)
-AC_CHECK_FUNCS(tzset)
+AC_CHECK_FUNCS_ONCE(tzset)
AC_MSG_CHECKING(whether localtime caches TZ)
AC_CACHE_VAL(emacs_cv_localtime_cache,
[if test x$ac_cv_func_tzset = xyes; then
dnl AC_DEFINE(HAVE_TCATTR, 1, [Define to 1 if you have tcgetattr and tcsetattr.])
dnl fi
+dnl Every platform that uses configure (ie every non-MS platform)
+dnl supports this. There is a create-lockfiles option you can
+dnl customize if you do not want the lock files to be written.
+dnl So it is not clear that this #define still needs to exist.
+AC_DEFINE(CLASH_DETECTION, 1, [Define if you want lock files to be written,
+ so that Emacs can tell instantly when you try to modify a file that
+ someone else has modified in his/her Emacs.])
+
+dnl Everybody supports this, except MS.
+dnl Seems like the kind of thing we should be testing for, though.
+## Note: PTYs are broken on darwin <6. Use at your own risk.
+AC_DEFINE(HAVE_PTYS, 1, [Define if the system supports pty devices.])
+
+dnl Everybody supports this, except MS-DOS.
+dnl Seems like the kind of thing we should be testing for, though.
+dnl Compare with HAVE_INET_SOCKETS (which is unused...) above.
+AC_DEFINE(HAVE_SOCKETS, 1, [Define if the system supports
+ 4.2-compatible sockets.])
+
+
case $opsys in
darwin | gnu | hpux* | *bsd )
AC_DEFINE(NO_TERMIO, 1, [Define if termio.h should not be included.])
;;
esac
-dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
-dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
+
case $opsys in
+ dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
+ dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
hpux* | irix6-5 | openbsd | sol2* | unixware )
AC_DEFINE(BROKEN_SIGIO, 1, [Define if SIGIO should not be used.])
- ;;
+ ;;
+
+ aix4-2)
+ dnl BUILD 9008 - FIONREAD problem still exists in X-Windows.
+ AC_DEFINE(BROKEN_FIONREAD, 1, [Define if FIONREAD should not be used.])
+ dnl As we define BROKEN_FIONREAD, SIGIO will be undefined in systty.h.
+ dnl But, on AIX, SIGAIO, SIGPTY, and SIGPOLL are defined as SIGIO,
+ dnl which causes compilation error at init_signals in sysdep.c.
+ dnl So, we define these macros so that syssignal.h detects them
+ dnl and undefine SIGAIO, SIGPTY and SIGPOLL.
+ AC_DEFINE(BROKEN_SIGAIO, 1, [Define if SIGAIO should not be used.])
+ AC_DEFINE(BROKEN_SIGPOLL,1, [Define if SIGPOLL should not be used.])
+ AC_DEFINE(BROKEN_SIGPTY, 1, [Define if SIGPTY should not be used.])
+
+ dnl On AIX Emacs uses the gmalloc.c malloc implementation. But given
+ dnl the way this system works, libc functions that return malloced
+ dnl memory use the libc malloc implementation. Calling xfree or
+ dnl xrealloc on the results of such functions results in a crash.
+ dnl
+ dnl One solution for this could be to define SYSTEM_MALLOC in configure,
+ dnl but that does not currently work on this system.
+ dnl
+ dnl It is possible to completely override the malloc implementation on
+ dnl AIX, but that involves putting the malloc functions in a shared
+ dnl library and setting the MALLOCTYPE environment variable to point to
+ dnl that shared library.
+ dnl
+ dnl Emacs currently calls xrealloc on the results of get_current_dir name,
+ dnl to avoid a crash just use the Emacs implementation for that function.
+ dnl
+ dnl FIXME We could change the AC_CHECK_FUNCS call near the start
+ dnl of this file, so that we do not check for get_current_dir_name
+ dnl on AIX. But that might be fragile if something else ends
+ dnl up testing for get_current_dir_name as a dependency.
+ AC_DEFINE(BROKEN_GET_CURRENT_DIR_NAME, 1, [Define if
+ get_current_dir_name should not be used.])
+ ;;
+
+ freebsd)
+ dnl Circumvent a bug in FreeBSD. In the following sequence of
+ dnl writes/reads on a PTY, read(2) returns bogus data:
+ dnl
+ dnl write(2) 1022 bytes
+ dnl write(2) 954 bytes, get EAGAIN
+ dnl read(2) 1024 bytes in process_read_output
+ dnl read(2) 11 bytes in process_read_output
+ dnl
+ dnl That is, read(2) returns more bytes than have ever been written
+ dnl successfully. The 1033 bytes read are the 1022 bytes written
+ dnl successfully after processing (for example with CRs added if the
+ dnl terminal is set up that way which it is here). The same bytes will
+ dnl be seen again in a later read(2), without the CRs.
+ AC_DEFINE(BROKEN_PTY_READ_AFTER_EAGAIN, 1, [Define on FreeBSD to
+ work around an issue when reading from a PTY.])
+ ;;
+
+ dnl Define the following so emacs symbols will not conflict with those
+ dnl in the System framework. Otherwise -prebind will not work.
+ darwin)
+ AC_DEFINE(NO_ABORT, 1, [Do not define abort in emacs.c.])
+ ;;
esac
case $opsys in
AC_DEFINE_UNQUOTED(DEFAULT_SOUND_DEVICE, "$sound_device",
[Name of the default sound device.])
-dnl Used in vm-limit.c
-AH_TEMPLATE(DATA_START, [Address of the start of the data segment.])
-dnl Used in lisp.h, emacs.c, mem-limits.h
-dnl NEWS.18 describes this as "a number which contains
-dnl the high bits to be inclusive or'ed with pointers that are unpacked."
-AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers
-stored in a Lisp_Object.])
-dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT.
+
+dnl Emacs can read input using SIGIO and buffering characters itself,
+dnl or using CBREAK mode and making C-g cause SIGINT.
+dnl The choice is controlled by the variable interrupt_input.
+dnl
+dnl Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
+dnl
+dnl Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros
+dnl to indicate whether or not signal-driven I/O is possible. It uses
+dnl INTERRUPT_INPUT to decide whether to use it by default.
+dnl
+dnl SIGIO can be used only on systems that implement it (4.2 and 4.3).
+dnl CBREAK mode has two disadvantages
+dnl 1) At least in 4.2, it is impossible to handle the Meta key properly.
+dnl I hear that in system V this problem does not exist.
+dnl 2) Control-G causes output to be discarded.
+dnl I do not know whether this can be fixed in system V.
+dnl
+dnl Another method of doing input is planned but not implemented.
+dnl It would have Emacs fork off a separate process
+dnl to read the input and send it to the true Emacs process
+dnl through a pipe.
+case $opsys in
+ darwin | gnu-linux | gnu-kfreebsd )
+ AC_DEFINE(INTERRUPT_INPUT, 1, [Define to read input using SIGIO.])
+ ;;
+esac
+
+
+dnl If the system's imake configuration file defines `NeedWidePrototypes'
+dnl as `NO', we must define NARROWPROTO manually. Such a define is
+dnl generated in the Makefile generated by `xmkmf'. If we don't define
+dnl NARROWPROTO, we will see the wrong function prototypes for X functions
+dnl taking float or double parameters.
+case $opsys in
+ cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
+ AC_DEFINE(NARROWPROTO, 1, [Define if system's imake configuration
+ file defines `NeedWidePrototypes' as `NO'.])
+ ;;
+esac
+
+
+dnl Used in process.c, this must be a loop, even if it only runs once.
+dnl (Except on SGI; see below. Take that, clarity and consistency!)
+AH_TEMPLATE(PTY_ITERATION, [How to iterate over PTYs.])
+dnl Only used if !PTY_ITERATION. Iterate from FIRST_PTY_LETTER to z,
+dnl trying suffixes 0-16.
+AH_TEMPLATE(FIRST_PTY_LETTER, [Letter to use in finding device name of
+ first PTY, if PTYs are supported.])
+AH_TEMPLATE(PTY_OPEN, [How to open a PTY, if non-standard.])
+AH_TEMPLATE(PTY_NAME_SPRINTF, [How to get the device name of the control
+ end of a PTY, if non-standard.])
+AH_TEMPLATE(PTY_TTY_NAME_SPRINTF, [How to get device name of the tty
+ end of a PTY, if non-standard.])
+
+case $opsys in
+ aix4-2 )
+ AC_DEFINE(PTY_ITERATION, [int c; for (c = 0; !c ; c++)] )
+ dnl You allocate a pty by opening /dev/ptc to get the master side.
+ dnl To get the name of the slave side, you just ttyname() the master side.
+ AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptc");] )
+ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [strcpy (pty_name, ttyname (fd));] )
+ ;;
+
+ cygwin )
+ AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] )
+ dnl multi-line AC_DEFINEs are hard. :(
+ AC_DEFINE(PTY_OPEN, [ do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0)] )
+ AC_DEFINE(PTY_NAME_SPRINTF, [] )
+ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] )
+ ;;
+
+ darwin )
+ AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] )
+ dnl Not used, because PTY_ITERATION is defined.
+ AC_DEFINE(FIRST_PTY_LETTER, ['p'])
+ dnl Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8.
+ dnl But we don't have to block SIGCHLD because it is blocked in the
+ dnl implementation of grantpt.
+ AC_DEFINE(PTY_OPEN, [ do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0)] )
+ AC_DEFINE(PTY_NAME_SPRINTF, [] )
+ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] )
+ ;;
+
+ gnu | freebsd | netbsd | openbsd )
+ AC_DEFINE(FIRST_PTY_LETTER, ['p'])
+ ;;
+
+ gnu-linux | gnu-kfreebsd )
+ dnl if HAVE_GRANTPT
+ if test "x$ac_cv_func_grantpt" = xyes; then
+ AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)] )
+ dnl Note that grantpt and unlockpt may fork. We must block SIGCHLD
+ dnl to prevent sigchld_handler from intercepting the child's death.
+ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); sigunblock (sigmask (SIGCHLD)); }] )
+ dnl if HAVE_GETPT
+ if test "x$ac_cv_func_getpt" = xyes; then
+ AC_DEFINE(PTY_OPEN, [fd = getpt ()])
+ AC_DEFINE(PTY_NAME_SPRINTF, [] )
+ else
+ AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] )
+ fi
+ else
+ AC_DEFINE(FIRST_PTY_LETTER, ['p'])
+ fi
+ ;;
+
+ hpux*)
+ AC_DEFINE(FIRST_PTY_LETTER, ['p'])
+ AC_DEFINE(PTY_NAME_SPRINTF, [sprintf (pty_name, "/dev/ptym/pty%c%x", c, i);] )
+ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [sprintf (pty_name, "/dev/pty/tty%c%x", c, i);] )
+ ;;
+
+ irix6-5 )
+ dnl It looks like this cannot be right, because it is not a loop.
+ dnl However, process.c actually does this:
+ dnl # ifndef __sgi
+ dnl continue;
+ dnl # else
+ dnl return -1;
+ dnl # endif
+ dnl which presumably makes it OK, since irix == sgi (?).
+ dnl FIXME it seems like this special treatment is unnecessary?
+ dnl Why can't irix use a single-trip loop like eg cygwin?
+ AC_DEFINE(PTY_ITERATION, [])
+ dnl Not used, because PTY_ITERATION is defined.
+ AC_DEFINE(FIRST_PTY_LETTER, ['q'])
+ AC_DEFINE(PTY_OPEN, [ { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }] )
+ dnl No need to get the pty name at all.
+ AC_DEFINE(PTY_NAME_SPRINTF, [] )
+ dnl No need to use sprintf to get the tty name--we get that from _getpty.
+ AC_DEFINE(PTY_TTY_NAME_SPRINTF, [] )
+ ;;
+
+ 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
+ dnl On SysVr4, grantpt(3) forks a subprocess, so keep sigchld_handler()
+ dnl from intercepting that death. If any child but grantpt's should die
+ dnl within, it should be caught after sigrelse(2).
+ 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 )
+ 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); }] )
+ ;;
+esac
+
+
+AH_TEMPLATE(SIGNALS_VIA_CHARACTERS, [Make process_send_signal work by
+"typing" a signal character on the pty.])
+
+case $opsys in
+ dnl Perry Smith <pedz@ddivt1.austin.ibm.com> says this is correct for AIX.
+ dnl thomas@mathematik.uni-bremen.de says this is needed for IRIX.
+ aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd )
+ AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1)
+ ;;
+
+ dnl 21 Jun 06: Eric Hanchrow <offby1@blarg.net> says this works.
+ dnl FIXME Does gnu-kfreebsd have linux/version.h? It seems unlikely...
+ gnu-linux | gnu-kfreebsd )
+
+ AC_MSG_CHECKING([for signals via characters])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < 0x20400
+# error "Linux version too old"
+#endif
+ ]], [[]])], emacs_signals_via_chars=yes, emacs_signals_via_chars=no)
+
+ AC_MSG_RESULT([$emacs_signals_via_chars])
+ test $emacs_signals_via_chars = yes && AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1)
+ ;;
+esac
+
dnl Used in dispnew.c
AH_TEMPLATE(PENDING_OUTPUT_COUNT, [Number of chars of output in the
buffer of a stdio stream.])
+dnl FIXME just PENDING_OUTPUT_COUNT should suffice.
+AH_TEMPLATE(GNU_LIBRARY_PENDING_OUTPUT_COUNT, [Value of
+PENDING_OUTPUT_COUNT if using the GNU C library.])
+
case $opsys in
cygwin | darwin | freebsd | netbsd | openbsd )
AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->_p - (FILE)->_bf._base)])
AC_DEFINE(PENDING_OUTPUT_COUNT(FILE), [((FILE)->__ptr - (FILE)->__base)])
;;
+ 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 since the preprocessed output is accessible in "conftest.i".
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
+# error "stdio definitions not found"
+#endif
+ ]], [[]])], emacs_pending_output=new, emacs_pending_output=unknown)
+
+ if test $emacs_pending_output = unknown; then
+ case $opsys in
+ gnu-linux | gnu-kfreebsd)
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+#ifndef __UCLIBC__
+# error "not using uclibc"
+#endif
+ ]], [[]])], emacs_pending_output=uclibc, emacs_pending_output=old)
+ ;;
+ esac
+ fi
+
+ AC_MSG_RESULT([$emacs_pending_output])
+
+ case $emacs_pending_output in
+ new)
+ dnl New C libio names.
+ AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE),
+ [((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)])
+ ;;
+ uclibc)
+ dnl Using the uClibc library.
+ AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE),
+ [((FILE)->__bufpos - (FILE)->__bufstart)])
+ ;;
+ old)
+ dnl Old C++ iostream names.
+ AC_DEFINE(GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE),
+ [((FILE)->_pptr - (FILE)->_pbase)])
+ ;;
+ esac
+ ;;
+esac
+
+
+dnl Used in vm-limit.c
+AH_TEMPLATE(DATA_START, [Address of the start of the data segment.])
+dnl Used in lisp.h, emacs.c, mem-limits.h
+dnl NEWS.18 describes this as "a number which contains
+dnl the high bits to be inclusive or'ed with pointers that are unpacked."
+AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers
+stored in a Lisp_Object.])
+dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT.
+
+case $opsys in
gnu)
dnl libc defines data_start.
AC_DEFINE(DATA_START, [({ extern int data_start; (char *) &data_start; })])
;;
esac
+
+AH_TEMPLATE(TAB3, [Undocumented.])
+
case $opsys in
- gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
-
- hpux11)
- dnl See comments in sysdep.c:sys_signal.
- dnl SA_RESTART resets the timeout of `select' on hpux11.
- dnl Defining BROKEN_SA_RESTART is not the same as undef'ing SA_RESTART.
- AC_DEFINE(BROKEN_SA_RESTART, 1, [Define if SA_RESTART should only
- be used in batch mode.])
- dnl It works to open the pty's tty in the parent (Emacs), then
- dnl close and reopen it in the child.
- AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it
- works to open a pty's tty in the parent process, then close and
- reopen it in the child.])
-
- opsysfile="s/hpux10-20.h"
- ;;
+ darwin) AC_DEFINE(TAB3, OXTABS) ;;
- openbsd) opsysfile="s/netbsd.h" ;;
+ gnu | freebsd | netbsd | openbsd )
+ AC_DEFINE(TABDLY, OXTABS, [Undocumented.] )
+ AC_DEFINE(TAB3, OXTABS)
+ ;;
- sol2-10)
- AC_DEFINE(_STRUCTURED_PROC, 1, [Needed for system_process_attributes
- on Solaris.])
- opsysfile="s/sol2-6.h"
- ;;
+ hpux*)
+ AC_DEFINE(RUN_TIME_REMAP, 1, [Define if emacs.c needs to call
+ run_time_remap; for HPUX.])
+ ;;
+esac
+
+
+dnl Used in xfaces.c.
+case $opsys in
+ hpux* | sol2* )
+ AC_DEFINE(XOS_NEEDS_TIME_H, 1, [Compensate for a bug in Xos.h on
+ some systems, where it requires time.h.])
+ ;;
+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.
+ dnl As malloc is not the Cygwin malloc, the Cygwin memalign always
+ dnl returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */
+ cygwin)
+ AC_DEFINE(G_SLICE_ALWAYS_MALLOC, 1, [Define to set the
+ G_SLICE environment variable to "always-malloc" at startup, if
+ using GTK.])
+ ;;
+
+ gnu) opsysfile="s/bsd-common.h" ;;
+
+ gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;;
+
+ hpux11)
+ dnl See comments in sysdep.c:sys_signal.
+ dnl SA_RESTART resets the timeout of `select' on hpux11.
+ dnl Defining BROKEN_SA_RESTART is not the same as undef'ing SA_RESTART.
+ AC_DEFINE(BROKEN_SA_RESTART, 1, [Define if SA_RESTART should only
+ be used in batch mode.])
+ dnl It works to open the pty's tty in the parent (Emacs), then
+ dnl close and reopen it in the child.
+ AC_DEFINE(USG_SUBTTY_WORKS, 1, [Define for USG systems where it
+ works to open a pty's tty in the parent process, then close and
+ reopen it in the child.])
+
+ opsysfile="s/hpux10-20.h"
+ ;;
+
+ irix6-5)
+ AC_DEFINE(PREFER_VSUSP, 1, [Define if process_send_signal should
+ use VSUSP instead of VSWTCH.])
+ AC_DEFINE(SETPGRP_RELEASES_CTTY, 1, [Define if process.c:child_setup
+ should not call setpgrp.])
+ ;;
+
+ openbsd) opsysfile="s/netbsd.h" ;;
+
+ sol2-10)
+ AC_DEFINE(_STRUCTURED_PROC, 1, [Needed for system_process_attributes
+ on Solaris.])
+ opsysfile="s/sol2-6.h"
+ ;;
esac
# Set up the CFLAGS for real compilation, so we can substitute it.