Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

configure fixes



-----BEGIN PGP SIGNED MESSAGE-----

Some configuration fixes:

* In Makefile, $(srcdir) was used inappropriately in the stamp-h{,.in}
  dependencies, causing config.h{,.in} not to be rebuilt.

* HAVE_SC_OPEN_MAX (from patch 2389) should have appeared in acconfig.h.

* HAVE_FIFOS can be made into an automatic check.  The code I wrote
  does a cursory check that it's possible to create a FIFO and pass data
  through it; if anything is likely to fail more subtly then we should
  add more checks.

* SH_USE_BSD_ECHO should be cached.

* DEBUG should be defined in config.h, along with ZSH_MEM etc.  This
  makes it possible to override CFLAGS without accidentally clobbering
  the -DDEBUG.

* Some of the tests for lack of dynamic linking facilities can cause
  errors if configure is run without --enable-dynamic and there is no
  pre-existing cache.  (This is the only part that is 3.1-specific.)

 -zefram

      Index: Makefile.in
      ===================================================================
      RCS file: /home/zefram/usr/cvsroot/zsh/Makefile.in,v
      retrieving revision 1.1.1.16
      diff -c -r1.1.1.16 Makefile.in
      *** Makefile.in	1996/11/03 00:43:56	1.1.1.16
      --- Makefile.in	1996/11/15 04:19:08
      ***************
      *** 141,153 ****
        	cd $(srcdir) && autoconf
        
        config.h: stamp-h
      ! stamp-h: $(srcdir)/config.h.in config.status
        	CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
        
        config.h.in: stamp-h.in
        stamp-h.in: configure.in acconfig.h aclocal.m4
        	cd $(srcdir) && autoheader
      ! 	echo > $(srcdir)/$@
        
        # create tag files for vi and emacs
        tags:
      --- 141,153 ----
        	cd $(srcdir) && autoconf
        
        config.h: stamp-h
      ! stamp-h: config.h.in config.status
        	CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
        
        config.h.in: stamp-h.in
        stamp-h.in: configure.in acconfig.h aclocal.m4
        	cd $(srcdir) && autoheader
      ! 	echo > $@
        
        # create tag files for vi and emacs
        tags:
      Index: acconfig.h
      ===================================================================
      RCS file: /home/zefram/usr/cvsroot/zsh/acconfig.h,v
      retrieving revision 1.8
      diff -c -r1.8 acconfig.h
      *** acconfig.h	1996/11/08 01:22:56	1.8
      --- acconfig.h	1996/11/15 04:20:56
      ***************
      *** 14,22 ****
        /* Define to 1 if system supports job control */
        #define JOB_CONTROL 1
        
      - /* Define to 1 if system has working FIFO's */
      - #define HAVE_FIFOS 1
      - 
        /* Define this if you use "suspended" instead of "stopped" */
        #define USE_SUSPENDED 1
         
      --- 14,19 ----
      ***************
      *** 105,110 ****
      --- 102,110 ----
         * WTMPX_FILE, or _PATH_WTMP are not defined in an include file.              */
        #undef WTMP_FILE_CONFIG
        
      + /* Define to 1 if you want to debug zsh */
      + #undef DEBUG
      + 
        /* Define to 1 if you want to use zsh's own memory allocation routines */
        #undef ZSH_MEM
        
      ***************
      *** 161,166 ****
      --- 161,172 ----
        
        /* Define to 1 if there is a prototype defined for ioctl() on your system */
        #undef HAVE_IOCTL_PROTO
      + 
      + /* Define to 1 if sysconf(_SC_OPEN_MAX) gives max no of fd's */
      + #undef HAVE_SC_OPEN_MAX
      + 
      + /* Define to 1 if system has working FIFO's */
      + #undef HAVE_FIFOS
        
        /* Define to 1 if /bin/sh does not interpret \ escape sequences */
        #undef SH_USE_BSD_ECHO
      Index: configure.in
      ===================================================================
      RCS file: /home/zefram/usr/cvsroot/zsh/configure.in,v
      retrieving revision 1.21
      diff -c -r1.21 configure.in
      *** configure.in	1996/11/15 00:40:08	1.21
      --- configure.in	1996/11/15 04:12:19
      ***************
      *** 50,56 ****
        dnl Do you want to debug zsh?
        undefine([zsh-debug])dnl
        AC_ARG_ENABLE(zsh-debug,
      ! [  --enable-zsh-debug         use it if you want to debug zsh])
        
        dnl Do you want zsh memory allocation routines.
        undefine([zsh-mem])dnl
      --- 50,59 ----
        dnl Do you want to debug zsh?
        undefine([zsh-debug])dnl
        AC_ARG_ENABLE(zsh-debug,
      ! [  --enable-zsh-debug         use it if you want to debug zsh],
      ! [if test x$enableval = xyes; then
      !   AC_DEFINE(DEBUG)
      ! fi])
        
        dnl Do you want zsh memory allocation routines.
        undefine([zsh-mem])dnl
      ***************
      *** 193,201 ****
        if test -n "$auto_cflags"; then
          if test "${enable_zsh_debug}" = yes; then
            if test -n "$GCC"; then
      !       CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -DDEBUG -g"
            else
      !       CFLAGS="$CFLAGS -DDEBUG -g"
            fi
          else
            if test -n "$GCC"; then
      --- 196,204 ----
        if test -n "$auto_cflags"; then
          if test "${enable_zsh_debug}" = yes; then
            if test -n "$GCC"; then
      !       CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -g"
            else
      !       CFLAGS="$CFLAGS -g"
            fi
          else
            if test -n "$GCC"; then
      ***************
      *** 641,665 ****
          AC_DEFINE(HAVE_SC_OPEN_MAX)
        fi
        
        dnl ---------------------
        dnl echo style of /bin/sh
        dnl ---------------------
      ! AC_MSG_CHECKING([if echo in /bin/sh interprets escape sequences])
      ! if test "`/bin/sh -c \"echo '\\n'\"`" = "\\n"; then
      !   AC_DEFINE(SH_USE_BSD_ECHO)
      !   AC_MSG_RESULT(no)
        else
      !   AC_MSG_RESULT(yes)
        fi
        
        dnl ---------------
        dnl dynamic loading
        dnl ---------------
      ! if test $ac_cv_func_dlopen != yes; then
          dynamic=no
      ! elif test $ac_cv_func_dlsym != yes; then
          dynamic=no
      ! elif test $ac_cv_func_dlerror != yes; then
          dynamic=no
        fi
        if test "x$dynamic" = xyes; then
      --- 644,711 ----
          AC_DEFINE(HAVE_SC_OPEN_MAX)
        fi
        
      + dnl -----------
      + dnl named FIFOs
      + dnl -----------
      + AC_CACHE_CHECK(if named FIFOs work,
      + zsh_cv_sys_fifo,
      + [AC_TRY_RUN([
      + #include <fcntl.h>
      + #include <signal.h>
      + main()
      + {
      +     char c;
      +     int fd;
      +     int pid;
      +     unlink("conftestfifo");
      + #ifdef HAVE_MKFIFO
      +     if(mkfifo("conftestfifo", 0600) < 0)
      + #else
      +     if(mknod("conftestfifo", 0010600, 0) < 0)
      + #endif
      + 	exit(1);
      +     pid = fork();
      +     if(pid < 0)
      + 	exit(1);
      +     if(pid) {
      + 	fd = open("conftestfifo", O_RDONLY);
      + 	exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x');
      +     }
      +     fd = open("conftestfifo", O_WRONLY);
      +     if(fd < 0 || write(fd, "x", 1) < 1)
      + 	kill(getppid(), SIGTERM);
      +     exit(0);
      + }
      + ],
      +   zsh_cv_sys_fifo=yes,
      +   zsh_cv_sys_fifo=no,
      +   zsh_cv_sys_fifo=yes)])
      + if test $zsh_cv_sys_fifo = yes; then
      +   AC_DEFINE(HAVE_FIFOS)
      + fi
      + 
        dnl ---------------------
        dnl echo style of /bin/sh
        dnl ---------------------
      ! AC_CACHE_CHECK(if echo in /bin/sh interprets escape sequences,
      ! zsh_cv_prog_sh_echo_escape,
      ! [if test "`/bin/sh -c \"echo '\\n'\"`" = "\\n"; then
      !   zsh_cv_prog_sh_echo_escape=no
        else
      !   zsh_cv_prog_sh_echo_escape=yes
      ! fi])
      ! if test $zsh_cv_prog_sh_echo_escape = no; then
      !   AC_DEFINE(SH_USE_BSD_ECHO)
        fi
        
        dnl ---------------
        dnl dynamic loading
        dnl ---------------
      ! if test "$ac_cv_func_dlopen" != yes; then
          dynamic=no
      ! elif test "$ac_cv_func_dlsym" != yes; then
          dynamic=no
      ! elif test "$ac_cv_func_dlerror" != yes; then
          dynamic=no
        fi
        if test "x$dynamic" = xyes; then

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMovyrnD/+HJTpU/hAQFgSQP/ZRBBhBMKQJ9Tlhr+xsWMiOCyDytbhF/q
VHQA0/D2R2R8OB5isGdyu0jcbA2XeUipG/szVwBHivHWJNk6upIL/1WTLG2Y7FLH
ByaQbgN2ya3Jqh4QIwaZkLsFrCMYiL4ReiDnIo0NQFoFqKy/dDY0Sz1gbieW5dHu
tuKxhkt0XTE=
=VK4s
-----END PGP SIGNATURE-----



Messages sorted by: Reverse Date, Date, Thread, Author