diff --git a/configure.ac b/configure.ac index 574024af965..5f822fe9510 100644 --- a/configure.ac +++ b/configure.ac @@ -3291,7 +3291,12 @@ fi # Check for XRender HAVE_XRENDER=no if test "${HAVE_X11}" = "yes"; then - AC_CHECK_HEADER([X11/extensions/Xrender.h], + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + ]], + [[return !XRenderQueryExtension;]])], [AC_CHECK_LIB([Xrender], [XRenderQueryExtension], [HAVE_XRENDER=yes])]) if test $HAVE_XRENDER = yes; then XRENDER_LIBS="-lXrender" @@ -4926,7 +4931,7 @@ case $opsys in AC_DEFINE(FIRST_PTY_LETTER, ['z']) AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");]) dnl Push various streams modules onto a PTY channel. Used in process.c. - AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (forkin, I_PUSH, "ptem") == -1) fatal ("ioctl I_PUSH ptem"); if (ioctl (forkin, I_PUSH, "ldterm") == -1) fatal ("ioctl I_PUSH ldterm"); if (ioctl (forkin, I_PUSH, "ttcompat") == -1) fatal ("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.]) + AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (std_in, I_PUSH, "ptem") == -1) fatal ("ioctl I_PUSH ptem"); if (ioctl (std_in, I_PUSH, "ldterm") == -1) fatal ("ioctl I_PUSH ldterm"); if (ioctl (std_in, I_PUSH, "ttcompat") == -1) fatal ("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.]) ;; esac diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 064342b4d3b..0a6dd826c10 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -204,14 +204,19 @@ LIBRESOLV=@LIBRESOLV@ LIBS_MAIL=@LIBS_MAIL@ ## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +## empty or -lbcrypt or -ladvapi32 +LIB_GETRANDOM = @LIB_GETRANDOM@ ## Whatever libraries are needed for euidaccess LIB_EACCESS=@LIB_EACCESS@ ## empty or -lwsock2 for MinGW LIB_WSOCK32=@LIB_WSOCK32@ +## Extra libraries for etags +LIBS_ETAGS = $(LIB_CLOCK_GETTIME) $(LIB_GETRANDOM) + ## Extra libraries to use when linking movemail. LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ - $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) $(LIB_WSOCK32) + $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) $(LIB_WSOCK32) $(LIBS_ETAGS) ## Extra libraries when linking emacsclient ## (empty or -lcomctl32 for MinGW) @@ -360,7 +365,7 @@ TAGS: etags${EXEEXT} ${tagsfiles} $(MAKE) -C ../lib all etags_deps = ${srcdir}/etags.c $(NTLIB) $(config_h) -etags_libs = $(NTLIB) $(LOADLIBES) +etags_libs = $(NTLIB) $(LOADLIBES) $(LIBS_ETAGS) etags${EXEEXT}: ${etags_deps} $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} -o $@ $< $(etags_libs) diff --git a/src/callproc.c b/src/callproc.c index 7c5863e6ade..8d2a5619eb8 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -30,6 +30,11 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" +#ifdef SETUP_SLAVE_PTY +# include +# include +#endif + #ifdef WINDOWSNT #include /* for fcntl */ #include diff --git a/src/process.c b/src/process.c index eaa7fa14651..06d750d3368 100644 --- a/src/process.c +++ b/src/process.c @@ -80,15 +80,6 @@ static struct rlimit nofile_limit; #endif -#ifdef NEED_BSDTTY -#include -#endif - -#ifdef USG5_4 -# include -# include -#endif - #ifdef HAVE_UTIL_H #include #endif