diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/Makefile.in perlmacs-0.13/Makefile.in
*** emacs-20.3/Makefile.in	Sat Aug  1 20:21:22 1998
--- perlmacs-0.13/Makefile.in	Fri Mar 19 21:21:20 1999
***************
*** 1,3 ****
--- 1,7 ----
+ # Modified 1 Jan 1998 by John Tobey <jtobey@channel1.com>
+ # for use with embedded Perl.
+ 
+ 
  # DIST: This is the distribution Makefile for Emacs.  configure can
  # DIST: make most of the changes to this file you might want, so try
  # DIST: that first.
***************
*** 56,61 ****
--- 60,66 ----
  ### This should be the number of the Emacs version we're building,
  ### like `18.59' or `19.0'.
  version=@version@
+ perlmacs_version=@perlmacs_version@
  
  ### This should be the name of the configuration we're building Emacs
  ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
***************
*** 170,175 ****
--- 175,186 ----
  # Where to put the docstring file.
  docdir=@docdir@
  
+ # Where to put the distributed Perlmacs header files.
+ includedir=@includedir@
+ 
+ # List of directories containing header files for Makefile.PL
+ includepath=@includepath@
+ 
  # ==================== Utility Programs for the Build ====================
  
  # Allow the user to specify the install program.
***************
*** 183,189 ****
  # ============================= Targets ==============================
  
  # What emacs should be called when installed.
! EMACS = emacs
  
  # Subdirectories to make recursively.  `lisp' is not included
  # because the compiled lisp files are part of the distribution
--- 194,201 ----
  # ============================= Targets ==============================
  
  # What emacs should be called when installed.
! PMACS = pmacs
! PERLMACS = perlmacs
  
  # Subdirectories to make recursively.  `lisp' is not included
  # because the compiled lisp files are part of the distribution
***************
*** 199,206 ****
  # When installing the info files, we need to do special things to
  # avoid nuking an existing dir file, so we don't do that here;
  # instead, we have written out explicit code in the `install' targets.
! COPYDIR = ${srcdir}/etc ${srcdir}/lisp
! COPYDESTS = ${etcdir} ${lispdir}
  
  all: ${SUBDIR}
  
--- 211,218 ----
  # When installing the info files, we need to do special things to
  # avoid nuking an existing dir file, so we don't do that here;
  # instead, we have written out explicit code in the `install' targets.
! COPYDIR = ${srcdir}/etc ${srcdir}/lisp ${srcdir}/src/m ${srcdir}/src/s
! COPYDESTS = ${etcdir} ${lispdir} ${includedir}/m ${includedir}/s
  
  all: ${SUBDIR}
  
***************
*** 219,225 ****
  	  -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";'			\
  	  -e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";'		\
  	  -e 's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \
! 	  -e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";') &&		\
  	${srcdir}/move-if-change paths.h.$$$$ src/paths.h
  
  # For parallel make, src should be build before leim.
--- 231,239 ----
  	  -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";'			\
  	  -e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";'		\
  	  -e 's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \
! 	  -e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";'			\
! 	  -e 's;\(#.*PATH_INCLUDESEARCH\).*$$;\1 "${includepath}";'	\
! 	  -e 's;\(#.*PATH_INCLUDEDIR\).*$$;\1 "${includedir}";') &&	\
  	${srcdir}/move-if-change paths.h.$$$$ src/paths.h
  
  # For parallel make, src should be build before leim.
***************
*** 286,292 ****
  install: all install-arch-indep install-arch-dep install-leim blessmail
  	@true
  
! ### Install the executables that were compiled specifically for this machine.
  ### It would be nice to do something for a parallel make
  ### to ensure that install-arch-indep finishes before this starts.
  install-arch-dep: mkdir
--- 300,307 ----
  install: all install-arch-indep install-arch-dep install-leim blessmail
  	@true
  
! ### Install the executables and headers that were created specifically
! ### for this machine.
  ### It would be nice to do something for a parallel make
  ### to ensure that install-arch-indep finishes before this starts.
  install-arch-dep: mkdir
***************
*** 295,304 ****
  	    exec_prefix=${exec_prefix} bindir=${bindir} \
  	    libexecdir=${libexecdir} archlibdir=${archlibdir} \
  	    INSTALL_STRIP=${INSTALL_STRIP})
! 	${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs ${bindir}/emacs-${version}
! 	-chmod 1755  ${bindir}/emacs-${version}
! 	rm -f ${bindir}/$(EMACS)
! 	-ln ${bindir}/emacs-${version} ${bindir}/$(EMACS)
  
  ### Install the files that are machine-independent.
  ### Most of them come straight from the distribution;
--- 310,324 ----
  	    exec_prefix=${exec_prefix} bindir=${bindir} \
  	    libexecdir=${libexecdir} archlibdir=${archlibdir} \
  	    INSTALL_STRIP=${INSTALL_STRIP})
! 	${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs \
! 	${bindir}/perlmacs-${perlmacs_version}
! 	-chmod 1755  ${bindir}/perlmacs-${perlmacs_version}
! 	rm -f ${bindir}/$(PERLMACS)
! 	-ln ${bindir}/perlmacs-${perlmacs_version} ${bindir}/$(PERLMACS)
! 	rm -f ${bindir}/$(PMACS)
! 	-ln ${bindir}/perlmacs-${perlmacs_version} ${bindir}/$(PMACS)
! 	${INSTALL_DATA} src/config.h ${archlibdir}/include/emacs/config.h
! 	${INSTALL_DATA} src/paths.h ${archlibdir}/include/emacs/paths.h
  
  ### Install the files that are machine-independent.
  ### Most of them come straight from the distribution;
***************
*** 308,320 ****
  ## Note that we copy DOC* and then delete DOC
  ## as a workaround for a bug in tar on Ultrix 4.2.
  install-arch-indep: mkdir
! 	-set ${COPYDESTS} ; \
! 	for dir in ${COPYDIR} ; do \
  	  if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
  	    rm -rf $$1 ; \
  	  fi ; \
  	  shift ; \
  	done
  	-set ${COPYDESTS} ; \
  	mkdir ${COPYDESTS} ; \
  	chmod ugo+rx ${COPYDESTS} ; \
--- 328,342 ----
  ## Note that we copy DOC* and then delete DOC
  ## as a workaround for a bug in tar on Ultrix 4.2.
  install-arch-indep: mkdir
! 	-set ${COPYDESTS} ${includedir}/emacs ; \
! 	for dir in ${COPYDIR} ${srcdir}/src ; do \
  	  if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
  	    rm -rf $$1 ; \
  	  fi ; \
  	  shift ; \
  	done
+ 	mkdir ${includedir}/emacs ; \
+ 	cp -p ${srcdir}/src/*.h ${includedir}/emacs
  	-set ${COPYDESTS} ; \
  	mkdir ${COPYDESTS} ; \
  	chmod ugo+rx ${COPYDESTS} ; \
***************
*** 424,429 ****
--- 446,452 ----
  mkdir: FRC
  	$(srcdir)/mkinstalldirs ${COPYDESTS} ${infodir} ${man1dir} \
  	  ${bindir} ${datadir} ${docdir} ${libexecdir} \
+ 	  ${archlibdir}/include/emacs ${includedir}/emacs \
  	  ${datadir}/emacs/site-lisp \
  	  ${datadir}/emacs/${version}/site-lisp \
  	  `echo ${locallisppath} | sed 's/:/ /g'`
***************
*** 438,444 ****
  	 $(MAKE) $(MFLAGS) uninstall			\
  	    prefix=${prefix} exec_prefix=${exec_prefix}	\
  	    bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir})
! 	for dir in ${lispdir} ${etcdir} ; do 		\
  	  if [ -d $${dir} ]; then			\
  	    case `(cd $${dir} ; /bin/pwd)` in		\
  	      `(cd ${srcdir} ; /bin/pwd)`* ) ;;		\
--- 461,467 ----
  	 $(MAKE) $(MFLAGS) uninstall			\
  	    prefix=${prefix} exec_prefix=${exec_prefix}	\
  	    bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir})
! 	for dir in ${lispdir} ${etcdir} ${includedir}/emacs ; do \
  	  if [ -d $${dir} ]; then			\
  	    case `(cd $${dir} ; /bin/pwd)` in		\
  	      `(cd ${srcdir} ; /bin/pwd)`* ) ;;		\
***************
*** 453,459 ****
  	done
  	(cd ${infodir} && rm -f cl* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip*)
  	(cd ${man1dir}  && rm -f emacs.1 etags.1 ctags.1)
! 	(cd ${bindir}  && rm -f emacs-${version} $(EMACS))
  
  
  FRC:
--- 476,482 ----
  	done
  	(cd ${infodir} && rm -f cl* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip*)
  	(cd ${man1dir}  && rm -f emacs.1 etags.1 ctags.1)
! 	(cd ${bindir}  && rm -f perlmacs-${perlmacs_version} $(PERLMACS) $(PMACS))
  
  
  FRC:
Only in perlmacs-0.13: TODO
Only in perlmacs-0.13: aclocal.m4
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/configure perlmacs-0.13/configure
*** emacs-20.3/configure	Mon Jul 27 04:17:07 1998
--- perlmacs-0.13/configure	Fri Mar 19 21:24:40 1999
***************
*** 24,29 ****
--- 24,31 ----
  ac_help="$ac_help
    --with-gssapi           support GSSAPI-authenticated POP"
  ac_help="$ac_help
+   --enable-perl           embed the Perl interpreter"
+ ac_help="$ac_help
    --with-x-toolkit=KIT    use an X toolkit (KIT = yes/lucid/athena/motif/no)"
  ac_help="$ac_help
    --with-x                use the X Window System"
***************
*** 541,548 ****
  '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
  lisppath='${locallisppath}:${lispdir}'
  etcdir='${datadir}/emacs/${version}/etc'
! archlibdir='${libexecdir}/emacs/${version}/${configuration}'
! docdir='${datadir}/emacs/${version}/etc'
  
  # Check whether --with-gcc or --without-gcc was given.
  if test "${with_gcc+set}" = set; then
--- 543,553 ----
  '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
  lisppath='${locallisppath}:${lispdir}'
  etcdir='${datadir}/emacs/${version}/etc'
! 
! archlibdir='${libexecdir}/perlmacs/${perlmacs_version}/${configuration}'
! docdir='${datadir}/perlmacs/${perlmacs_version}/etc'
! includedir='${datadir}/perlmacs/${perlmacs_version}/include'
! includepath='${archlibdir}/include:${includedir}'
  
  # Check whether --with-gcc or --without-gcc was given.
  if test "${with_gcc+set}" = set; then
***************
*** 604,609 ****
--- 609,620 ----
  
  fi
  
+ # Check whether --enable-perl or --disable-perl was given.
+ if test "${enable_perl+set}" = set; then
+   enableval="$enable_perl"
+   :
+ fi
+ 
  # Check whether --with-x-toolkit or --without-x-toolkit was given.
  if test "${with_x_toolkit+set}" = set; then
    withval="$with_x_toolkit"
***************
*** 696,702 ****
  fi
  
  echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:700: checking host system type" >&5
  
  host_alias=$host
  case "$host_alias" in
--- 707,713 ----
  fi
  
  echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:711: checking host system type" >&5
  
  host_alias=$host
  case "$host_alias" in
***************
*** 1613,1619 ****
    * ) # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1617: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1624,1630 ----
    * ) # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1628: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1642,1648 ****
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1646: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1653,1659 ----
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1657: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1690,1696 ****
  fi
  
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:1694: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  
  ac_ext=c
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
--- 1701,1707 ----
  fi
  
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:1705: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  
  ac_ext=c
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
***************
*** 1700,1710 ****
  cross_compiling=$ac_cv_prog_cc_cross
  
  cat > conftest.$ac_ext <<EOF
! #line 1704 "configure"
  #include "confdefs.h"
  main(){return(0);}
  EOF
! if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    ac_cv_prog_cc_works=yes
    # If we can't run a trivial program, we are probably using a cross compiler.
    if (./conftest; exit) 2>/dev/null; then
--- 1711,1721 ----
  cross_compiling=$ac_cv_prog_cc_cross
  
  cat > conftest.$ac_ext <<EOF
! #line 1715 "configure"
  #include "confdefs.h"
  main(){return(0);}
  EOF
! if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    ac_cv_prog_cc_works=yes
    # If we can't run a trivial program, we are probably using a cross compiler.
    if (./conftest; exit) 2>/dev/null; then
***************
*** 1724,1735 ****
    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:1728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  cross_compiling=$ac_cv_prog_cc_cross
  
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:1733: checking whether we are using GNU C" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1735,1746 ----
    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:1739: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  cross_compiling=$ac_cv_prog_cc_cross
  
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:1744: checking whether we are using GNU C" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1738,1744 ****
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
--- 1749,1755 ----
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
***************
*** 1753,1759 ****
    ac_save_CFLAGS="$CFLAGS"
    CFLAGS=
    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:1757: checking whether ${CC-cc} accepts -g" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1764,1770 ----
    ac_save_CFLAGS="$CFLAGS"
    CFLAGS=
    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:1768: checking whether ${CC-cc} accepts -g" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1829,1835 ****
  #### #undef clause to src/config.h.in for autoconf to modify.
  
  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:1833: checking whether ln -s works" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1840,1846 ----
  #### #undef clause to src/config.h.in for autoconf to modify.
  
  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:1844: checking whether ln -s works" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1850,1856 ****
  fi
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1854: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
--- 1861,1867 ----
  fi
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1865: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
***************
*** 1865,1877 ****
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1869 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
--- 1876,1888 ----
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1880 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
***************
*** 1882,1894 ****
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1886 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
--- 1893,1905 ----
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1897 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
***************
*** 1921,1927 ****
  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  # ./install, which can be erroneously created by make from ./install.sh.
  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:1925: checking for a BSD compatible install" >&5
  if test -z "$INSTALL"; then
  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 1932,1938 ----
  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  # ./install, which can be erroneously created by make from ./install.sh.
  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:1936: checking for a BSD compatible install" >&5
  if test -z "$INSTALL"; then
  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 1975,1981 ****
  # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1979: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1986,1992 ----
  # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1990: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2006,2014 ****
  
  
  echo $ac_n "checking for AIX""... $ac_c" 1>&6
! echo "configure:2010: checking for AIX" >&5
  cat > conftest.$ac_ext <<EOF
! #line 2012 "configure"
  #include "confdefs.h"
  #ifdef _AIX
    yes
--- 2017,2025 ----
  
  
  echo $ac_n "checking for AIX""... $ac_c" 1>&6
! echo "configure:2021: checking for AIX" >&5
  cat > conftest.$ac_ext <<EOF
! #line 2023 "configure"
  #include "confdefs.h"
  #ifdef _AIX
    yes
***************
*** 2034,2050 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2038: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2043 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2045,2061 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2049: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2054 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2071,2082 ****
  done
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:2075: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2080 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
--- 2082,2093 ----
  done
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:2086: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2091 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
***************
*** 2084,2090 ****
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2095,2101 ----
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2101,2107 ****
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2105 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 2112,2118 ----
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2116 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 2119,2125 ****
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2123 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 2130,2136 ----
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2134 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 2140,2146 ****
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 2144 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 2151,2157 ----
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 2155 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 2151,2157 ****
  exit (0); }
  
  EOF
! if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    :
  else
--- 2162,2168 ----
  exit (0); }
  
  EOF
! if { (eval echo configure:2166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    :
  else
***************
*** 2175,2186 ****
  fi
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:2179: checking whether time.h and sys/time.h may both be included" >&5
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2184 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
--- 2186,2197 ----
  fi
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:2190: checking whether time.h and sys/time.h may both be included" >&5
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2195 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
***************
*** 2189,2195 ****
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
--- 2200,2206 ----
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:2204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
***************
*** 2210,2221 ****
  fi
  
  echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
! echo "configure:2214: checking for sys_siglist declaration in signal.h or unistd.h" >&5
  if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2219 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <signal.h>
--- 2221,2232 ----
  fi
  
  echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
! echo "configure:2225: checking for sys_siglist declaration in signal.h or unistd.h" >&5
  if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2230 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <signal.h>
***************
*** 2227,2233 ****
  char *msg = *(sys_siglist + 1);
  ; return 0; }
  EOF
! if { (eval echo configure:2231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_decl_sys_siglist=yes
  else
--- 2238,2244 ----
  char *msg = *(sys_siglist + 1);
  ; return 0; }
  EOF
! if { (eval echo configure:2242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_decl_sys_siglist=yes
  else
***************
*** 2249,2260 ****
  
  
  echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
! echo "configure:2253: checking for struct utimbuf" >&5
  if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2258 "configure"
  #include "confdefs.h"
  #ifdef TIME_WITH_SYS_TIME
  #include <sys/time.h>
--- 2260,2271 ----
  
  
  echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
! echo "configure:2264: checking for struct utimbuf" >&5
  if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2269 "configure"
  #include "confdefs.h"
  #ifdef TIME_WITH_SYS_TIME
  #include <sys/time.h>
***************
*** 2273,2279 ****
  static struct utimbuf x; x.actime = x.modtime;
  ; return 0; }
  EOF
! if { (eval echo configure:2277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    emacs_cv_struct_utimbuf=yes
  else
--- 2284,2290 ----
  static struct utimbuf x; x.actime = x.modtime;
  ; return 0; }
  EOF
! if { (eval echo configure:2288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    emacs_cv_struct_utimbuf=yes
  else
***************
*** 2294,2305 ****
  fi
  
  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:2298: checking return type of signal handlers" >&5
  if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2303 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <signal.h>
--- 2305,2316 ----
  fi
  
  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:2309: checking return type of signal handlers" >&5
  if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2314 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <signal.h>
***************
*** 2316,2322 ****
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_type_signal=void
  else
--- 2327,2333 ----
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_type_signal=void
  else
***************
*** 2336,2347 ****
  
  
  echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
! echo "configure:2340: checking for struct timeval" >&5
  if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2345 "configure"
  #include "confdefs.h"
  #ifdef TIME_WITH_SYS_TIME
  #include <sys/time.h>
--- 2347,2358 ----
  
  
  echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
! echo "configure:2351: checking for struct timeval" >&5
  if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2356 "configure"
  #include "confdefs.h"
  #ifdef TIME_WITH_SYS_TIME
  #include <sys/time.h>
***************
*** 2357,2363 ****
  static struct timeval x; x.tv_sec = x.tv_usec;
  ; return 0; }
  EOF
! if { (eval echo configure:2361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    emacs_cv_struct_timeval=yes
  else
--- 2368,2374 ----
  static struct timeval x; x.tv_sec = x.tv_usec;
  ; return 0; }
  EOF
! if { (eval echo configure:2372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    emacs_cv_struct_timeval=yes
  else
***************
*** 2379,2390 ****
  fi
  
  echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
! echo "configure:2383: checking whether struct tm is in sys/time.h or time.h" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2388 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <time.h>
--- 2390,2401 ----
  fi
  
  echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
! echo "configure:2394: checking whether struct tm is in sys/time.h or time.h" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2399 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <time.h>
***************
*** 2392,2398 ****
  struct tm *tp; tp->tm_sec;
  ; return 0; }
  EOF
! if { (eval echo configure:2396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_tm=time.h
  else
--- 2403,2409 ----
  struct tm *tp; tp->tm_sec;
  ; return 0; }
  EOF
! if { (eval echo configure:2407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_tm=time.h
  else
***************
*** 2413,2424 ****
  fi
  
  echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
! echo "configure:2417: checking for tm_zone in struct tm" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2422 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <$ac_cv_struct_tm>
--- 2424,2435 ----
  fi
  
  echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
! echo "configure:2428: checking for tm_zone in struct tm" >&5
  if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2433 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <$ac_cv_struct_tm>
***************
*** 2426,2432 ****
  struct tm tm; tm.tm_zone;
  ; return 0; }
  EOF
! if { (eval echo configure:2430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_tm_zone=yes
  else
--- 2437,2443 ----
  struct tm tm; tm.tm_zone;
  ; return 0; }
  EOF
! if { (eval echo configure:2441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_struct_tm_zone=yes
  else
***************
*** 2446,2457 ****
  
  else
    echo $ac_n "checking for tzname""... $ac_c" 1>&6
! echo "configure:2450: checking for tzname" >&5
  if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2455 "configure"
  #include "confdefs.h"
  #include <time.h>
  #ifndef tzname /* For SGI.  */
--- 2457,2468 ----
  
  else
    echo $ac_n "checking for tzname""... $ac_c" 1>&6
! echo "configure:2461: checking for tzname" >&5
  if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2466 "configure"
  #include "confdefs.h"
  #include <time.h>
  #ifndef tzname /* For SGI.  */
***************
*** 2461,2467 ****
  atoi(*tzname);
  ; return 0; }
  EOF
! if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_var_tzname=yes
  else
--- 2472,2478 ----
  atoi(*tzname);
  ; return 0; }
  EOF
! if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_var_tzname=yes
  else
***************
*** 2484,2495 ****
  
  
  echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:2488: checking for working const" >&5
  if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2493 "configure"
  #include "confdefs.h"
  
  int main() {
--- 2495,2506 ----
  
  
  echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:2499: checking for working const" >&5
  if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2504 "configure"
  #include "confdefs.h"
  
  int main() {
***************
*** 2538,2544 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_const=yes
  else
--- 2549,2555 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_const=yes
  else
***************
*** 2560,2566 ****
  
  
  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
! echo "configure:2564: checking whether ${MAKE-make} sets \${MAKE}" >&5
  set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2571,2577 ----
  
  
  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
! echo "configure:2575: checking whether ${MAKE-make} sets \${MAKE}" >&5
  set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2588,2594 ****
  
  
  echo $ac_n "checking for long file names""... $ac_c" 1>&6
! echo "configure:2592: checking for long file names" >&5
  if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2599,2605 ----
  
  
  echo $ac_n "checking for long file names""... $ac_c" 1>&6
! echo "configure:2603: checking for long file names" >&5
  if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2632,2637 ****
--- 2643,2770 ----
  fi
  
  
+ # Extract the first word of "perl", so it can be a program name with args.
+ set dummy perl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:2650: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   if test -n "$PERL"; then
+   ac_cv_prog_PERL="$PERL" # Let the user override the test.
+ else
+   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+   for ac_dir in $PATH; do
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+       ac_cv_prog_PERL="perl"
+       break
+     fi
+   done
+   IFS="$ac_save_ifs"
+ fi
+ fi
+ PERL="$ac_cv_prog_PERL"
+ if test -n "$PERL"; then
+   echo "$ac_t""$PERL" 1>&6
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ 
+ if test -n "$PERL"; then
+   echo $ac_n "checking whether ${PERL-perl} works and knows its version number""... $ac_c" 1>&6
+ echo "configure:2677: checking whether ${PERL-perl} works and knows its version number" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_perl_version'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_cv_prog_perl_version=no
+ # Make perl print its version number.
+ ac_l_bracket="[" ac_r_bracket="]"  # trying to outsmart Autoconf here.
+ if { ac_try='${PERL-perl} -e "print \$$ac_r_bracket" > conftest'; { (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+   ac_cv_prog_perl_version=`cat conftest`
+ fi
+ rm -f conftest
+ 
+ fi
+ 
+ echo "$ac_t""$ac_cv_prog_perl_version" 1>&6
+ fi
+ 
+ 
+ #### Decide whether to embed Perl.
+ 
+ perl_version="$ac_cv_prog_perl_version"
+ if test "x$enable_perl" = xyes || \
+     ( test -n "$perl_version" && \
+ 	${PERL} -e 'use 5.005;' 2>/dev/null ); then
+   echo $ac_n "checking for embeddable Perl""... $ac_c" 1>&6
+ echo "configure:2702: checking for embeddable Perl" >&5
+ if test "x$enable_perl" = xno; then
+   # The user explicitly disabled Perl.
+   ac_embed_perl=disabled
+ else
+   if eval "test \"`echo '$''{'ac_cv_embed_perl'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   PERL_CCOPTS=`${PERL-perl} -MExtUtils::Embed -e ccopts 2>/dev/null`
+     PERL_LDOPTS=`${PERL-perl} -MExtUtils::Embed -e ldopts 2>/dev/null`
+     ac_save_CFLAGS="$CFLAGS"
+     CFLAGS="$PERL_CCOPTS"
+     ac_save_LIBS="$LIBS"
+     LIBS="$PERL_LDOPTS"
+     cat > conftest.$ac_ext <<EOF
+ #line 2717 "configure"
+ #include "confdefs.h"
+ #define main bad2proto
+ #include <EXTERN.h>
+ #include <perl.h>
+ #undef main
+ int main() {
+ PerlInterpreter *i = perl_alloc()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+   rm -rf conftest*
+         ac_cv_embed_perl="ac_embed_perl=yes \
+ 			 PERL_CCOPTS=\"$PERL_CCOPTS\" \
+ 			 PERL_LDOPTS=\"$PERL_LDOPTS\""
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   ac_cv_embed_perl="ac_embed_perl=no PERL_CCOPTS= PERL_LDOPTS="
+ fi
+ rm -f conftest*
+     CFLAGS="$ac_save_CFLAGS"
+     LIBS="$ac_save_LIBS"
+   
+ fi
+ 
+   eval "$ac_cv_embed_perl"
+ fi
+ echo "$ac_t""$ac_embed_perl" 1>&6
+ 
+   if test "x$ac_embed_perl" = xyes; then
+     cat >> confdefs.h <<\EOF
+ #define EMBED_PERL 1
+ EOF
+ 
+     if ${PERL} -MConfig -e 'exit ($Config{usemymalloc} eq "y" ? 0 : 1)';
+     then
+       perl_malloc=yes
+       cat >> confdefs.h <<\EOF
+ #define PERL_MALLOC 1
+ EOF
+ 
+     else
+       perl_malloc=no
+     fi
+   fi
+ fi
+ 
+ 
+ 
+ 
  #### Choose a window system.
  
  # If we find X, set shell vars x_includes and x_libraries to the
***************
*** 2639,2645 ****
  # Uses ac_ vars as temps to allow command line to override cache and checks.
  # --without-x overrides everything else, but does not touch the cache.
  echo $ac_n "checking for X""... $ac_c" 1>&6
! echo "configure:2643: checking for X" >&5
  
  # Check whether --with-x or --without-x was given.
  if test "${with_x+set}" = set; then
--- 2772,2778 ----
  # Uses ac_ vars as temps to allow command line to override cache and checks.
  # --without-x overrides everything else, but does not touch the cache.
  echo $ac_n "checking for X""... $ac_c" 1>&6
! echo "configure:2776: checking for X" >&5
  
  # Check whether --with-x or --without-x was given.
  if test "${with_x+set}" = set; then
***************
*** 2701,2712 ****
  
    # First, try using that file with no special directory specified.
  cat > conftest.$ac_ext <<EOF
! #line 2705 "configure"
  #include "confdefs.h"
  #include <$x_direct_test_include>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2834,2845 ----
  
    # First, try using that file with no special directory specified.
  cat > conftest.$ac_ext <<EOF
! #line 2838 "configure"
  #include "confdefs.h"
  #include <$x_direct_test_include>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2775,2788 ****
    ac_save_LIBS="$LIBS"
    LIBS="-l$x_direct_test_library $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2779 "configure"
  #include "confdefs.h"
  
  int main() {
  ${x_direct_test_function}()
  ; return 0; }
  EOF
! if { (eval echo configure:2786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    LIBS="$ac_save_LIBS"
  # We can link X programs with no special library path.
--- 2908,2921 ----
    ac_save_LIBS="$LIBS"
    LIBS="-l$x_direct_test_library $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2912 "configure"
  #include "confdefs.h"
  
  int main() {
  ${x_direct_test_function}()
  ; return 0; }
  EOF
! if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    LIBS="$ac_save_LIBS"
  # We can link X programs with no special library path.
***************
*** 2956,2962 ****
  echo "checking the machine- and system-dependent files to find out
   - which libraries the lib-src programs will want, and
   - whether the GNU malloc routines are usable" 1>&6
! echo "configure:2960: checking the machine- and system-dependent files to find out
   - which libraries the lib-src programs will want, and
   - whether the GNU malloc routines are usable" >&5
  
--- 3089,3095 ----
  echo "checking the machine- and system-dependent files to find out
   - which libraries the lib-src programs will want, and
   - whether the GNU malloc routines are usable" 1>&6
! echo "configure:3093: checking the machine- and system-dependent files to find out
   - which libraries the lib-src programs will want, and
   - whether the GNU malloc routines are usable" >&5
  
***************
*** 3085,3097 ****
  # Assume not, until told otherwise.
  GNU_MALLOC=yes
  doug_lea_malloc=yes
  echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
! echo "configure:3090: checking for malloc_get_state" >&5
  if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3095 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char malloc_get_state(); below.  */
--- 3218,3238 ----
  # Assume not, until told otherwise.
  GNU_MALLOC=yes
  doug_lea_malloc=yes
+ 
+ if test "x$perl_malloc" = xyes; then
+   GNU_MALLOC=no
+   GNU_MALLOC_reason="
+     (Perl's malloc will be linked in.)"
+   doug_lea_malloc=no
+ fi
+ 
  echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
! echo "configure:3231: checking for malloc_get_state" >&5
  if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3236 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char malloc_get_state(); below.  */
***************
*** 3114,3120 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_malloc_get_state=yes"
  else
--- 3255,3261 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_malloc_get_state=yes"
  else
***************
*** 3135,3146 ****
  fi
  
  echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
! echo "configure:3139: checking for malloc_set_state" >&5
  if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3144 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char malloc_set_state(); below.  */
--- 3276,3287 ----
  fi
  
  echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
! echo "configure:3280: checking for malloc_set_state" >&5
  if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3285 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char malloc_set_state(); below.  */
***************
*** 3163,3169 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_malloc_set_state=yes"
  else
--- 3304,3310 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_malloc_set_state=yes"
  else
***************
*** 3184,3202 ****
  fi
  
  echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
! echo "configure:3188: checking whether __after_morecore_hook exists" >&5
  if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3193 "configure"
  #include "confdefs.h"
  extern void (* __after_morecore_hook)();
  int main() {
  __after_morecore_hook = 0
  ; return 0; }
  EOF
! if { (eval echo configure:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_var___after_morecore_hook=yes
  else
--- 3325,3343 ----
  fi
  
  echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
! echo "configure:3329: checking whether __after_morecore_hook exists" >&5
  if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3334 "configure"
  #include "confdefs.h"
  extern void (* __after_morecore_hook)();
  int main() {
  __after_morecore_hook = 0
  ; return 0; }
  EOF
! if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_var___after_morecore_hook=yes
  else
***************
*** 3246,3252 ****
  LIBS="$libsrc_libs $LIBS"
  
  echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
! echo "configure:3250: checking for dnet_ntoa in -ldnet" >&5
  ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 3387,3393 ----
  LIBS="$libsrc_libs $LIBS"
  
  echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
! echo "configure:3391: checking for dnet_ntoa in -ldnet" >&5
  ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3254,3260 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldnet  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3258 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 3395,3401 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldnet  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3399 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 3265,3271 ****
  dnet_ntoa()
  ; return 0; }
  EOF
! if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 3406,3412 ----
  dnet_ntoa()
  ; return 0; }
  EOF
! if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 3294,3300 ****
  
  
  echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
! echo "configure:3298: checking for main in -lXbsd" >&5
  ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 3435,3441 ----
  
  
  echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
! echo "configure:3439: checking for main in -lXbsd" >&5
  ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3302,3315 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lXbsd  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3306 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 3443,3456 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lXbsd  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3447 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 3331,3337 ****
  
  
  echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
! echo "configure:3335: checking for cma_open in -lpthreads" >&5
  ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 3472,3478 ----
  
  
  echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
! echo "configure:3476: checking for cma_open in -lpthreads" >&5
  ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3339,3345 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lpthreads  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3343 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 3480,3486 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lpthreads  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3484 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 3350,3356 ****
  cma_open()
  ; return 0; }
  EOF
! if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 3491,3497 ----
  cma_open()
  ; return 0; }
  EOF
! if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 3379,3385 ****
  
  
  echo $ac_n "checking for XFree86""... $ac_c" 1>&6
! echo "configure:3383: checking for XFree86" >&5
  if test -d /usr/X386/include; then
    HAVE_XFREE386=yes
    : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
--- 3520,3526 ----
  
  
  echo $ac_n "checking for XFree86""... $ac_c" 1>&6
! echo "configure:3524: checking for XFree86" >&5
  if test -d /usr/X386/include; then
    HAVE_XFREE386=yes
    : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
***************
*** 3408,3423 ****
  
    if test "${opsys}" = "gnu-linux"; then
      echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
! echo "configure:3412: checking whether X on GNU/Linux needs -b to link" >&5
      cat > conftest.$ac_ext <<EOF
! #line 3414 "configure"
  #include "confdefs.h"
  
  int main() {
  XOpenDisplay ("foo");
  ; return 0; }
  EOF
! if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    xlinux_first_failure=no
  else
--- 3549,3564 ----
  
    if test "${opsys}" = "gnu-linux"; then
      echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
! echo "configure:3553: checking whether X on GNU/Linux needs -b to link" >&5
      cat > conftest.$ac_ext <<EOF
! #line 3555 "configure"
  #include "confdefs.h"
  
  int main() {
  XOpenDisplay ("foo");
  ; return 0; }
  EOF
! if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    xlinux_first_failure=no
  else
***************
*** 3437,3450 ****
        CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
        LIBS="$LIBS -b i486-linuxaout"
        cat > conftest.$ac_ext <<EOF
! #line 3441 "configure"
  #include "confdefs.h"
  
  int main() {
  XOpenDisplay ("foo");
  ; return 0; }
  EOF
! if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    xlinux_second_failure=no
  else
--- 3578,3591 ----
        CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
        LIBS="$LIBS -b i486-linuxaout"
        cat > conftest.$ac_ext <<EOF
! #line 3582 "configure"
  #include "confdefs.h"
  
  int main() {
  XOpenDisplay ("foo");
  ; return 0; }
  EOF
! if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    xlinux_second_failure=no
  else
***************
*** 3474,3485 ****
  XScreenNumberOfScreen XSetWMProtocols
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:3478: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3483 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 3615,3626 ----
  XScreenNumberOfScreen XSetWMProtocols
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:3619: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3624 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 3502,3508 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 3643,3649 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 3530,3541 ****
  
  if test "${window_system}" = "x11"; then
    echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
! echo "configure:3534: checking X11 version 6" >&5
    if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3539 "configure"
  #include "confdefs.h"
  #include <X11/Xlib.h>
  int main() {
--- 3671,3682 ----
  
  if test "${window_system}" = "x11"; then
    echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
! echo "configure:3675: checking X11 version 6" >&5
    if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3680 "configure"
  #include "confdefs.h"
  #include <X11/Xlib.h>
  int main() {
***************
*** 3545,3551 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_x11_version_6=yes
  else
--- 3686,3692 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_x11_version_6=yes
  else
***************
*** 3570,3581 ****
  
  if test "${window_system}" = "x11"; then
    echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
! echo "configure:3574: checking X11 version 5" >&5
    if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3579 "configure"
  #include "confdefs.h"
  #include <X11/Xlib.h>
  int main() {
--- 3711,3722 ----
  
  if test "${window_system}" = "x11"; then
    echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
! echo "configure:3715: checking X11 version 5" >&5
    if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3720 "configure"
  #include "confdefs.h"
  #include <X11/Xlib.h>
  int main() {
***************
*** 3585,3591 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_x11_version_5=yes
  else
--- 3726,3732 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_x11_version_5=yes
  else
***************
*** 3613,3624 ****
  if test x"${USE_X_TOOLKIT}" = xmaybe; then
    if test x"${HAVE_X11R5}" = xyes; then
      echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
! echo "configure:3617: checking X11 version 5 with Xaw" >&5
      if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3622 "configure"
  #include "confdefs.h"
  
  #include <X11/Intrinsic.h>
--- 3754,3765 ----
  if test x"${USE_X_TOOLKIT}" = xmaybe; then
    if test x"${HAVE_X11R5}" = xyes; then
      echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
! echo "configure:3758: checking X11 version 5 with Xaw" >&5
      if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3763 "configure"
  #include "confdefs.h"
  
  #include <X11/Intrinsic.h>
***************
*** 3627,3633 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_x11_version_5_with_xaw=yes
  else
--- 3768,3774 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_x11_version_5_with_xaw=yes
  else
***************
*** 3655,3666 ****
  
  if test "${USE_X_TOOLKIT}" != "none"; then
    echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
! echo "configure:3659: checking X11 toolkit version" >&5
    if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3664 "configure"
  #include "confdefs.h"
  #include <X11/Intrinsic.h>
  int main() {
--- 3796,3807 ----
  
  if test "${USE_X_TOOLKIT}" != "none"; then
    echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
! echo "configure:3800: checking X11 toolkit version" >&5
    if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3805 "configure"
  #include "confdefs.h"
  #include <X11/Intrinsic.h>
  int main() {
***************
*** 3670,3676 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_x11_toolkit_version_6=yes
  else
--- 3811,3817 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_x11_toolkit_version_6=yes
  else
***************
*** 3700,3706 ****
      LIBS="-lXt $LIBS"
    fi
    echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
! echo "configure:3704: checking for XmuConvertStandardSelection in -lXmu" >&5
  ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 3841,3847 ----
      LIBS="-lXt $LIBS"
    fi
    echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
! echo "configure:3845: checking for XmuConvertStandardSelection in -lXmu" >&5
  ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3708,3714 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lXmu  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3712 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 3849,3855 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lXmu  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3853 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 3719,3725 ****
  XmuConvertStandardSelection()
  ; return 0; }
  EOF
! if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 3860,3866 ----
  XmuConvertStandardSelection()
  ; return 0; }
  EOF
! if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 3751,3762 ****
  
  if test "${USE_X_TOOLKIT}" = "MOTIF"; then
    echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
! echo "configure:3755: checking for Motif version 2.1" >&5
  if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3760 "configure"
  #include "confdefs.h"
  #include <Xm/Xm.h>
  int main() {
--- 3892,3903 ----
  
  if test "${USE_X_TOOLKIT}" = "MOTIF"; then
    echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
! echo "configure:3896: checking for Motif version 2.1" >&5
  if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3901 "configure"
  #include "confdefs.h"
  #include <Xm/Xm.h>
  int main() {
***************
*** 3767,3773 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:3771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    emacs_cv_motif_version_2_1=yes
  else
--- 3908,3914 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:3912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    emacs_cv_motif_version_2_1=yes
  else
***************
*** 3791,3809 ****
  
  # If netdb.h doesn't declare h_errno, we must declare it by hand.
  echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
! echo "configure:3795: checking whether netdb declares h_errno" >&5
  if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3800 "configure"
  #include "confdefs.h"
  #include <netdb.h>
  int main() {
  return h_errno;
  ; return 0; }
  EOF
! if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_netdb_declares_h_errno=yes
  else
--- 3932,3950 ----
  
  # If netdb.h doesn't declare h_errno, we must declare it by hand.
  echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
! echo "configure:3936: checking whether netdb declares h_errno" >&5
  if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3941 "configure"
  #include "confdefs.h"
  #include <netdb.h>
  int main() {
  return h_errno;
  ; return 0; }
  EOF
! if { (eval echo configure:3948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_netdb_declares_h_errno=yes
  else
***************
*** 3826,3844 ****
  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  # for constant arguments.  Useless!
  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:3830: checking for working alloca.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3835 "configure"
  #include "confdefs.h"
  #include <alloca.h>
  int main() {
  char *p = alloca(2 * sizeof(int));
  ; return 0; }
  EOF
! if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_header_alloca_h=yes
  else
--- 3967,3985 ----
  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  # for constant arguments.  Useless!
  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
! echo "configure:3971: checking for working alloca.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3976 "configure"
  #include "confdefs.h"
  #include <alloca.h>
  int main() {
  char *p = alloca(2 * sizeof(int));
  ; return 0; }
  EOF
! if { (eval echo configure:3983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_header_alloca_h=yes
  else
***************
*** 3859,3870 ****
  fi
  
  echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:3863: checking for alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3868 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
--- 4000,4011 ----
  fi
  
  echo $ac_n "checking for alloca""... $ac_c" 1>&6
! echo "configure:4004: checking for alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4009 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
***************
*** 3887,3893 ****
  char *p = (char *) alloca(1);
  ; return 0; }
  EOF
! if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_func_alloca_works=yes
  else
--- 4028,4034 ----
  char *p = (char *) alloca(1);
  ; return 0; }
  EOF
! if { (eval echo configure:4032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    ac_cv_func_alloca_works=yes
  else
***************
*** 3919,3930 ****
  
  
  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:3923: checking whether alloca needs Cray hooks" >&5
  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3928 "configure"
  #include "confdefs.h"
  #if defined(CRAY) && ! defined(CRAY2)
  webecray
--- 4060,4071 ----
  
  
  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
! echo "configure:4064: checking whether alloca needs Cray hooks" >&5
  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4069 "configure"
  #include "confdefs.h"
  #if defined(CRAY) && ! defined(CRAY2)
  webecray
***************
*** 3949,3960 ****
  if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:3953: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3958 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 4090,4101 ----
  if test $ac_cv_os_cray = yes; then
  for ac_func in _getb67 GETB67 getb67; do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4094: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4099 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 3977,3983 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 4118,4124 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 4004,4010 ****
  fi
  
  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:4008: checking stack direction for C alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 4145,4151 ----
  fi
  
  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
! echo "configure:4149: checking stack direction for C alloca" >&5
  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 4012,4018 ****
    ac_cv_c_stack_direction=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 4016 "configure"
  #include "confdefs.h"
  find_stack_direction ()
  {
--- 4153,4159 ----
    ac_cv_c_stack_direction=0
  else
    cat > conftest.$ac_ext <<EOF
! #line 4157 "configure"
  #include "confdefs.h"
  find_stack_direction ()
  {
***************
*** 4031,4037 ****
    exit (find_stack_direction() < 0);
  }
  EOF
! if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_stack_direction=1
  else
--- 4172,4178 ----
    exit (find_stack_direction() < 0);
  }
  EOF
! if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_stack_direction=1
  else
***************
*** 4056,4062 ****
  # fmod, logb, and frexp are found in -lm on most systems.
  # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
  echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
! echo "configure:4060: checking for sqrt in -lm" >&5
  ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4197,4203 ----
  # fmod, logb, and frexp are found in -lm on most systems.
  # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
  echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
! echo "configure:4201: checking for sqrt in -lm" >&5
  ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4064,4070 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4068 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4205,4211 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4209 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4075,4081 ****
  sqrt()
  ; return 0; }
  EOF
! if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4216,4222 ----
  sqrt()
  ; return 0; }
  EOF
! if { (eval echo configure:4220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4105,4111 ****
  
  # Check for mail-locking functions in a "mail" library
  echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
! echo "configure:4109: checking for maillock in -lmail" >&5
  ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4246,4252 ----
  
  # Check for mail-locking functions in a "mail" library
  echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
! echo "configure:4250: checking for maillock in -lmail" >&5
  ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4113,4119 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lmail  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4117 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4254,4260 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lmail  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4258 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4124,4130 ****
  maillock()
  ; return 0; }
  EOF
! if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4265,4271 ----
  maillock()
  ; return 0; }
  EOF
! if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4146,4157 ****
  	     for ac_func in touchlock
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4150: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4155 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 4287,4298 ----
  	     for ac_func in touchlock
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4291: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4296 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 4174,4180 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 4315,4321 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 4202,4218 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4206: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4211 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4343,4359 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4347: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4352 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4250,4261 ****
  utimes setrlimit setpgid getcwd shutdown strftime
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4254: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4259 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 4391,4402 ----
  utimes setrlimit setpgid getcwd shutdown strftime
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:4395: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4400 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 4278,4284 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 4419,4425 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 4308,4314 ****
  # It's better to believe a function is not available
  # than to expect to find it in ncurses.
  echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
! echo "configure:4312: checking for tparm in -lncurses" >&5
  ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4449,4455 ----
  # It's better to believe a function is not available
  # than to expect to find it in ncurses.
  echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
! echo "configure:4453: checking for tparm in -lncurses" >&5
  ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4316,4322 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lncurses  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4320 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4457,4463 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lncurses  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4461 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4327,4333 ****
  tparm()
  ; return 0; }
  EOF
! if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4468,4474 ----
  tparm()
  ; return 0; }
  EOF
! if { (eval echo configure:4472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4358,4364 ****
  # These tell us which Kerberos-related libraries to use.
  if test "${with_kerberos+set}" = set; then
    echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
! echo "configure:4362: checking for com_err in -lcom_err" >&5
  ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4499,4505 ----
  # These tell us which Kerberos-related libraries to use.
  if test "${with_kerberos+set}" = set; then
    echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
! echo "configure:4503: checking for com_err in -lcom_err" >&5
  ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4366,4372 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lcom_err  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4370 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4507,4513 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lcom_err  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4511 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4377,4383 ****
  com_err()
  ; return 0; }
  EOF
! if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4518,4524 ----
  com_err()
  ; return 0; }
  EOF
! if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4405,4411 ****
  fi
  
    echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
! echo "configure:4409: checking for mit_des_cbc_encrypt in -lcrypto" >&5
  ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4546,4552 ----
  fi
  
    echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
! echo "configure:4550: checking for mit_des_cbc_encrypt in -lcrypto" >&5
  ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4413,4419 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lcrypto  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4417 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4554,4560 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lcrypto  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4558 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4424,4430 ****
  mit_des_cbc_encrypt()
  ; return 0; }
  EOF
! if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4565,4571 ----
  mit_des_cbc_encrypt()
  ; return 0; }
  EOF
! if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4452,4458 ****
  fi
  
    echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
! echo "configure:4456: checking for krb5_init_context in -lkrb5" >&5
  ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4593,4599 ----
  fi
  
    echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
! echo "configure:4597: checking for krb5_init_context in -lkrb5" >&5
  ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4460,4466 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lkrb5  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4464 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4601,4607 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lkrb5  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4605 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4471,4477 ****
  krb5_init_context()
  ; return 0; }
  EOF
! if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4612,4618 ----
  krb5_init_context()
  ; return 0; }
  EOF
! if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4501,4507 ****
    if test "${with_kerberos5+set}" = set; then
      if test "${with_gssapi+set}" = set; then
        echo $ac_n "checking for gss_init_sec_context in -lgssapi_krb5""... $ac_c" 1>&6
! echo "configure:4505: checking for gss_init_sec_context in -lgssapi_krb5" >&5
  ac_lib_var=`echo gssapi_krb5'_'gss_init_sec_context | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4642,4648 ----
    if test "${with_kerberos5+set}" = set; then
      if test "${with_gssapi+set}" = set; then
        echo $ac_n "checking for gss_init_sec_context in -lgssapi_krb5""... $ac_c" 1>&6
! echo "configure:4646: checking for gss_init_sec_context in -lgssapi_krb5" >&5
  ac_lib_var=`echo gssapi_krb5'_'gss_init_sec_context | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4509,4515 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lgssapi_krb5  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4513 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4650,4656 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lgssapi_krb5  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4654 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4520,4526 ****
  gss_init_sec_context()
  ; return 0; }
  EOF
! if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4661,4667 ----
  gss_init_sec_context()
  ; return 0; }
  EOF
! if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4550,4556 ****
      fi
    else
      echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
! echo "configure:4554: checking for des_cbc_encrypt in -ldes" >&5
  ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4691,4697 ----
      fi
    else
      echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
! echo "configure:4695: checking for des_cbc_encrypt in -ldes" >&5
  ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4558,4564 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldes  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4562 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4699,4705 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldes  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4703 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4569,4575 ****
  des_cbc_encrypt()
  ; return 0; }
  EOF
! if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4710,4716 ----
  des_cbc_encrypt()
  ; return 0; }
  EOF
! if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4595,4601 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
! echo "configure:4599: checking for des_cbc_encrypt in -ldes425" >&5
  ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4736,4742 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
! echo "configure:4740: checking for des_cbc_encrypt in -ldes425" >&5
  ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4603,4609 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldes425  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4607 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4744,4750 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldes425  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4748 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4614,4620 ****
  des_cbc_encrypt()
  ; return 0; }
  EOF
! if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4755,4761 ----
  des_cbc_encrypt()
  ; return 0; }
  EOF
! if { (eval echo configure:4759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4644,4650 ****
  fi
  
      echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
! echo "configure:4648: checking for krb_get_cred in -lkrb" >&5
  ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4785,4791 ----
  fi
  
      echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
! echo "configure:4789: checking for krb_get_cred in -lkrb" >&5
  ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4652,4658 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lkrb  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4656 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4793,4799 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lkrb  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4797 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4663,4669 ****
  krb_get_cred()
  ; return 0; }
  EOF
! if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4804,4810 ----
  krb_get_cred()
  ; return 0; }
  EOF
! if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4689,4695 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
! echo "configure:4693: checking for krb_get_cred in -lkrb4" >&5
  ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 4830,4836 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
! echo "configure:4834: checking for krb_get_cred in -lkrb4" >&5
  ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 4697,4703 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lkrb4  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4701 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 4838,4844 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lkrb4  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 4842 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 4708,4714 ****
  krb_get_cred()
  ; return 0; }
  EOF
! if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 4849,4855 ----
  krb_get_cred()
  ; return 0; }
  EOF
! if { (eval echo configure:4853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 4744,4760 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4748: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4753 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4885,4901 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4889: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4894 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4785,4801 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4789: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4794 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4926,4942 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4930: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4935 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4822,4838 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4826: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4831 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 4963,4979 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4967: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4972 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4859,4875 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4863: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4868 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5000,5016 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5004: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5009 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4905,4921 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4909: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4914 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5046,5062 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5050: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5055 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4942,4958 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4946: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4951 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5083,5099 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5087: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5092 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 4979,4995 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:4983: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 4988 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:4993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5120,5136 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5124: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5129 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 5026,5042 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5030: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5035 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5167,5183 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5171: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5176 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 5066,5072 ****
  
  if test "${with_gssapi+set}" = set; then
    echo $ac_n "checking for gss_init_sec_context in -lgssapi""... $ac_c" 1>&6
! echo "configure:5070: checking for gss_init_sec_context in -lgssapi" >&5
  ac_lib_var=`echo gssapi'_'gss_init_sec_context | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 5207,5213 ----
  
  if test "${with_gssapi+set}" = set; then
    echo $ac_n "checking for gss_init_sec_context in -lgssapi""... $ac_c" 1>&6
! echo "configure:5211: checking for gss_init_sec_context in -lgssapi" >&5
  ac_lib_var=`echo gssapi'_'gss_init_sec_context | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 5074,5080 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lgssapi  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 5078 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 5215,5221 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lgssapi  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 5219 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 5085,5091 ****
  gss_init_sec_context()
  ; return 0; }
  EOF
! if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 5226,5232 ----
  gss_init_sec_context()
  ; return 0; }
  EOF
! if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 5116,5132 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5120: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5125 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5257,5273 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:5261: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5266 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 5157,5163 ****
  # Solaris requires -lintl if you want strerror (which calls dgettext)
  # to return localized messages.
  echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
! echo "configure:5161: checking for dgettext in -lintl" >&5
  ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 5298,5304 ----
  # Solaris requires -lintl if you want strerror (which calls dgettext)
  # to return localized messages.
  echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
! echo "configure:5302: checking for dgettext in -lintl" >&5
  ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 5165,5171 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lintl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 5169 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 5306,5312 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lintl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 5310 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 5176,5182 ****
  dgettext()
  ; return 0; }
  EOF
! if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 5317,5323 ----
  dgettext()
  ; return 0; }
  EOF
! if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 5205,5211 ****
  
  
  echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
! echo "configure:5209: checking whether localtime caches TZ" >&5
  if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 5346,5352 ----
  
  
  echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
! echo "configure:5350: checking whether localtime caches TZ" >&5
  if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 5215,5221 ****
  emacs_cv_localtime_cache=yes
  else
    cat > conftest.$ac_ext <<EOF
! #line 5219 "configure"
  #include "confdefs.h"
  #include <time.h>
  #if STDC_HEADERS
--- 5356,5362 ----
  emacs_cv_localtime_cache=yes
  else
    cat > conftest.$ac_ext <<EOF
! #line 5360 "configure"
  #include "confdefs.h"
  #include <time.h>
  #if STDC_HEADERS
***************
*** 5250,5256 ****
    exit (0);
  }
  EOF
! if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    emacs_cv_localtime_cache=no
  else
--- 5391,5397 ----
    exit (0);
  }
  EOF
! if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    emacs_cv_localtime_cache=no
  else
***************
*** 5278,5289 ****
  
  if test "x$HAVE_TIMEVAL" = xyes; then
  echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
! echo "configure:5282: checking whether gettimeofday can accept two arguments" >&5
  if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5287 "configure"
  #include "confdefs.h"
  
  #ifdef TIME_WITH_SYS_TIME
--- 5419,5430 ----
  
  if test "x$HAVE_TIMEVAL" = xyes; then
  echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
! echo "configure:5423: checking whether gettimeofday can accept two arguments" >&5
  if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5428 "configure"
  #include "confdefs.h"
  
  #ifdef TIME_WITH_SYS_TIME
***************
*** 5305,5311 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:5309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_gettimeofday_two_arguments=yes
  else
--- 5446,5452 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    emacs_cv_gettimeofday_two_arguments=yes
  else
***************
*** 5328,5339 ****
  
  ok_so_far=yes
  echo $ac_n "checking for socket""... $ac_c" 1>&6
! echo "configure:5332: checking for socket" >&5
  if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5337 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char socket(); below.  */
--- 5469,5480 ----
  
  ok_so_far=yes
  echo $ac_n "checking for socket""... $ac_c" 1>&6
! echo "configure:5473: checking for socket" >&5
  if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5478 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char socket(); below.  */
***************
*** 5356,5362 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_socket=yes"
  else
--- 5497,5503 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    rm -rf conftest*
    eval "ac_cv_func_socket=yes"
  else
***************
*** 5379,5395 ****
  if test $ok_so_far = yes; then
    ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
! echo "configure:5383: checking for netinet/in.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5388 "configure"
  #include "confdefs.h"
  #include <netinet/in.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5520,5536 ----
  if test $ok_so_far = yes; then
    ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
! echo "configure:5524: checking for netinet/in.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5529 "configure"
  #include "confdefs.h"
  #include <netinet/in.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 5415,5431 ****
  if test $ok_so_far = yes; then
    ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
! echo "configure:5419: checking for arpa/inet.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5424 "configure"
  #include "confdefs.h"
  #include <arpa/inet.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 5556,5572 ----
  if test $ok_so_far = yes; then
    ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
! echo "configure:5560: checking for arpa/inet.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 5565 "configure"
  #include "confdefs.h"
  #include <arpa/inet.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:5570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 5465,5473 ****
  # Set up the CFLAGS for real compilation, so we can substitute it.
  CFLAGS="$REAL_CFLAGS"
  
! #### Find out which version of Emacs this is.
  version=`grep 'defconst[	 ]*emacs-version' ${srcdir}/lisp/version.el \
  	 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
  if test x"${version}" = x; then
    { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
  fi
--- 5606,5616 ----
  # Set up the CFLAGS for real compilation, so we can substitute it.
  CFLAGS="$REAL_CFLAGS"
  
! #### Find out which version of Emacs and which version of Perlmacs this is.
  version=`grep 'defconst[	 ]*emacs-version' ${srcdir}/lisp/version.el \
  	 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
+ perlmacs_version=`grep 'defconst[	 ]*perlmacs-version' ${srcdir}/lisp/version.el \
+ 	 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
  if test x"${version}" = x; then
    { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
  fi
***************
*** 5505,5510 ****
--- 5648,5656 ----
  
  
  
+ 
+ 
+ 
  cat >> confdefs.h <<EOF
  #define EMACS_CONFIGURATION "${canonical}"
  EOF
***************
*** 5537,5542 ****
--- 5683,5692 ----
  #define UNEXEC_SRC ${UNEXEC_SRC}
  EOF
  
+ cat >> confdefs.h <<EOF
+ #define PERLMACS_VERSION "${perlmacs_version}"
+ EOF
+ 
  
  if test "${HAVE_X_WINDOWS}" = "yes" ; then
    cat >> confdefs.h <<\EOF
***************
*** 5592,5604 ****
  Configured for \`${canonical}'.
  
    Where should the build process find the source code?    ${srcdir}
!   What operating system and machine description files should Emacs use?
          \`${opsysfile}' and \`${machfile}'
!   What compiler should emacs be built with?               ${CC} ${CFLAGS}
!   Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
!   Should Emacs use the relocating allocator for buffers?  ${REL_ALLOC}
!   What window system should Emacs use?                    ${window_system}
!   What toolkit should Emacs use?                          ${USE_X_TOOLKIT}"
  
  if test -n "${x_includes}"; then
  echo "  Where do we find X Windows header files?                ${x_includes}"
--- 5742,5755 ----
  Configured for \`${canonical}'.
  
    Where should the build process find the source code?    ${srcdir}
!   What operating system and machine description files should Perlmacs use?
          \`${opsysfile}' and \`${machfile}'
!   What compiler should perlmacs be built with?            ${CC} ${CFLAGS}
!   Should Perlmacs use the GNU version of malloc?          ${GNU_MALLOC}${GNU_MALLOC_reason}
!   Should Perlmacs use the relocating allocator for buffers?  ${REL_ALLOC}
!   Should the Perl interpreter be embedded?                ${ac_embed_perl}
!   What window system should Perlmacs use?                 ${window_system}
!   What toolkit should Perlmacs use?                       ${USE_X_TOOLKIT}"
  
  if test -n "${x_includes}"; then
  echo "  Where do we find X Windows header files?                ${x_includes}"
***************
*** 5642,5648 ****
  # Ultrix sh set writes to stderr and can't be redirected directly,
  # and sets the high bit in the cache file unless we assign to the vars.
  (set) 2>&1 |
!   case `(ac_space=' '; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      # `set' does not quote correctly, so add quotes (double-quote substitution
      # turns \\\\ into \\, and sed turns \\ into \).
--- 5793,5799 ----
  # Ultrix sh set writes to stderr and can't be redirected directly,
  # and sets the high bit in the cache file unless we assign to the vars.
  (set) 2>&1 |
!   case `(ac_space=' '; set) 2>&1` in
    *ac_space=\ *)
      # `set' does not quote correctly, so add quotes (double-quote substitution
      # turns \\\\ into \\, and sed turns \\ into \).
***************
*** 5764,5771 ****
--- 5915,5926 ----
  s%@INSTALL_DATA@%$INSTALL_DATA%g
  s%@YACC@%$YACC%g
  s%@SET_MAKE@%$SET_MAKE%g
+ s%@PERL@%$PERL%g
+ s%@PERL_CCOPTS@%$PERL_CCOPTS%g
+ s%@PERL_LDOPTS@%$PERL_LDOPTS%g
  s%@ALLOCA@%$ALLOCA%g
  s%@version@%$version%g
+ s%@perlmacs_version@%$perlmacs_version%g
  s%@configuration@%$configuration%g
  s%@canonical@%$canonical%g
  s%@srcdir@%$srcdir%g
***************
*** 5776,5781 ****
--- 5931,5937 ----
  s%@etcdir@%$etcdir%g
  s%@archlibdir@%$archlibdir%g
  s%@docdir@%$docdir%g
+ s%@includepath@%$includepath%g
  s%@bitmapdir@%$bitmapdir%g
  s%@c_switch_system@%$c_switch_system%g
  s%@c_switch_machine@%$c_switch_machine%g
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/configure.in perlmacs-0.13/configure.in
*** emacs-20.3/configure.in	Tue Jun 30 18:15:05 1998
--- perlmacs-0.13/configure.in	Fri Mar 19 20:58:34 1999
***************
*** 26,38 ****
  AC_INIT(src/lisp.h)
  AC_CONFIG_HEADER(src/config.h:src/config.in)
  
  lispdir='${datadir}/emacs/${version}/lisp'
  locallisppath='${datadir}/emacs/${version}/site-lisp:'\
  '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
  lisppath='${locallisppath}:${lispdir}'
  etcdir='${datadir}/emacs/${version}/etc'
! archlibdir='${libexecdir}/emacs/${version}/${configuration}'
! docdir='${datadir}/emacs/${version}/etc'
  
  AC_ARG_WITH(gcc,
  [  --with-gcc              use GCC to compile Emacs])
--- 26,48 ----
  AC_INIT(src/lisp.h)
  AC_CONFIG_HEADER(src/config.h:src/config.in)
  
+ dnl  All Lisp files except for a couple of predump files (version.el,
+ dnl  startup.elc), are the same in Perlmacs as in Emacs, so install
+ dnl  them in the same place.  The same goes for distributed files in
+ dnl  etc/ (all but DOC*).
+ dnl  (hmmm, maybe ought to rename version and startup)
  lispdir='${datadir}/emacs/${version}/lisp'
  locallisppath='${datadir}/emacs/${version}/site-lisp:'\
  '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
  lisppath='${locallisppath}:${lispdir}'
  etcdir='${datadir}/emacs/${version}/etc'
! 
! dnl  The rest of the installed files should not stomp on their Emacs
! dnl  counterparts.
! archlibdir='${libexecdir}/perlmacs/${perlmacs_version}/${configuration}'
! docdir='${datadir}/perlmacs/${perlmacs_version}/etc'
! includedir='${datadir}/perlmacs/${perlmacs_version}/include'
! includepath='${archlibdir}/include:${includedir}'
  
  AC_ARG_WITH(gcc,
  [  --with-gcc              use GCC to compile Emacs])
***************
*** 57,62 ****
--- 67,74 ----
  AC_ARG_WITH(gssapi,
  [  --with-gssapi           support GSSAPI-authenticated POP],
  [AC_DEFINE(GSSAPI)])
+ AC_ARG_ENABLE(perl,
+ [  --enable-perl           embed the Perl interpreter])
  dnl This should be the last --with option, because --with-x is
  dnl added later on when we find the path of X, and it's best to
  dnl keep them together visually.
***************
*** 1144,1149 ****
--- 1156,1186 ----
  dnl checks for operating system services
  AC_SYS_LONG_FILE_NAMES
  
+ dnl check for Perl and its version in the build environment
+ AC_PROG_PERL
+ 
+ #### Decide whether to embed Perl.
+ 
+ perl_version="$ac_cv_prog_perl_version"
+ if test "x$enable_perl" = xyes || \
+     ( test -n "$perl_version" && \
+ 	${PERL} -e 'use 5.005;' 2>/dev/null ); then
+   AC_EMBED_PERL
+   if test "x$ac_embed_perl" = xyes; then
+     AC_DEFINE(EMBED_PERL)
+     if ${PERL} -MConfig -e 'exit ($Config{usemymalloc} eq "y" ? 0 : 1)';
+     then
+       perl_malloc=yes
+       AC_DEFINE(PERL_MALLOC)
+     else
+       perl_malloc=no
+     fi
+   fi
+ fi
+ 
+ AC_SUBST(PERL_CCOPTS)
+ AC_SUBST(PERL_LDOPTS)
+ 
  #### Choose a window system.
  
  AC_PATH_X
***************
*** 1366,1371 ****
--- 1403,1416 ----
  # Assume not, until told otherwise.
  GNU_MALLOC=yes
  doug_lea_malloc=yes
+ 
+ if test "x$perl_malloc" = xyes; then
+   GNU_MALLOC=no
+   GNU_MALLOC_reason="
+     (Perl's malloc will be linked in.)"
+   doug_lea_malloc=no
+ fi
+ 
  AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no)
  AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
  AC_CACHE_CHECK(whether __after_morecore_hook exists,
***************
*** 1753,1761 ****
  CFLAGS="$REAL_CFLAGS"
  
  changequote(, )dnl
! #### Find out which version of Emacs this is.
  version=`grep 'defconst[	 ]*emacs-version' ${srcdir}/lisp/version.el \
  	 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
  changequote([, ])dnl
  if test x"${version}" = x; then
    AC_MSG_ERROR(can't find current emacs version in \`${srcdir}/lisp/version.el'.)
--- 1798,1808 ----
  CFLAGS="$REAL_CFLAGS"
  
  changequote(, )dnl
! #### Find out which version of Emacs and which version of Perlmacs this is.
  version=`grep 'defconst[	 ]*emacs-version' ${srcdir}/lisp/version.el \
  	 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
+ perlmacs_version=`grep 'defconst[	 ]*perlmacs-version' ${srcdir}/lisp/version.el \
+ 	 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
  changequote([, ])dnl
  if test x"${version}" = x; then
    AC_MSG_ERROR(can't find current emacs version in \`${srcdir}/lisp/version.el'.)
***************
*** 1764,1769 ****
--- 1811,1817 ----
  ### Specify what sort of things we'll be editing into Makefile and config.h.
  ### Use configuration here uncanonicalized to avoid exceeding size limits.
  AC_SUBST(version)
+ AC_SUBST(perlmacs_version)
  AC_SUBST(configuration)
  AC_SUBST(canonical)
  AC_SUBST(srcdir)
***************
*** 1782,1787 ****
--- 1830,1837 ----
  AC_SUBST(etcdir)
  AC_SUBST(archlibdir)
  AC_SUBST(docdir)
+ AC_SUBST(includepath)
+ AC_SUBST(includedir)
  AC_SUBST(bitmapdir)
  AC_SUBST(c_switch_system)
  AC_SUBST(c_switch_machine)
***************
*** 1802,1807 ****
--- 1852,1858 ----
  AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX})
  AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE,  ${C_SWITCH_X_SITE})
  AC_DEFINE_UNQUOTED(UNEXEC_SRC,       ${UNEXEC_SRC})
+ AC_DEFINE_UNQUOTED(PERLMACS_VERSION, "${perlmacs_version}")
  
  if test "${HAVE_X_WINDOWS}" = "yes" ; then
    AC_DEFINE(HAVE_X_WINDOWS)
***************
*** 1833,1845 ****
  Configured for \`${canonical}'.
  
    Where should the build process find the source code?    ${srcdir}
!   What operating system and machine description files should Emacs use?
          \`${opsysfile}' and \`${machfile}'
!   What compiler should emacs be built with?               ${CC} ${CFLAGS}
!   Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
!   Should Emacs use the relocating allocator for buffers?  ${REL_ALLOC}
!   What window system should Emacs use?                    ${window_system}
!   What toolkit should Emacs use?                          ${USE_X_TOOLKIT}"
  
  if test -n "${x_includes}"; then
  echo "  Where do we find X Windows header files?                ${x_includes}"
--- 1884,1897 ----
  Configured for \`${canonical}'.
  
    Where should the build process find the source code?    ${srcdir}
!   What operating system and machine description files should Perlmacs use?
          \`${opsysfile}' and \`${machfile}'
!   What compiler should perlmacs be built with?            ${CC} ${CFLAGS}
!   Should Perlmacs use the GNU version of malloc?          ${GNU_MALLOC}${GNU_MALLOC_reason}
!   Should Perlmacs use the relocating allocator for buffers?  ${REL_ALLOC}
!   Should the Perl interpreter be embedded?                ${ac_embed_perl}
!   What window system should Perlmacs use?                 ${window_system}
!   What toolkit should Perlmacs use?                       ${USE_X_TOOLKIT}"
  
  if test -n "${x_includes}"; then
  echo "  Where do we find X Windows header files?                ${x_includes}"
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/lisp/loadup.el perlmacs-0.13/lisp/loadup.el
*** emacs-20.3/lisp/loadup.el	Thu Aug 13 19:00:19 1998
--- perlmacs-0.13/lisp/loadup.el	Sat Apr  3 17:47:54 1999
***************
*** 118,123 ****
--- 118,126 ----
  (load "textmodes/fill")
  (message "%s" (garbage-collect))
  
+ (if (featurep 'perl-core)
+     (load "perl"))
+ 
  (load "replace")
  (if (eq system-type 'vax-vms)
      (progn
Only in perlmacs-0.13/lisp: perl-data.el
Only in perlmacs-0.13/lisp: perl-regex.el
Only in perlmacs-0.13/lisp: perl.el
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/lisp/startup.el perlmacs-0.13/lisp/startup.el
*** emacs-20.3/lisp/startup.el	Fri Aug  7 19:18:30 1998
--- perlmacs-0.13/lisp/startup.el	Sun Mar 28 17:20:32 1999
***************
*** 1,3 ****
--- 1,6 ----
+ ;;; Modified 28 March 1999 by John Tobey for Perlmacs.
+ ;;; Copyright (C) 1998-1999 John Tobey.
+ 
  ;;; startup.el --- process Emacs shell arguments
  
  ;; Copyright (C) 1985, 86, 92, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
***************
*** 822,831 ****
  		       ;; The convention for this piece of code is that
  		       ;; each piece of output starts with one or two newlines
  		       ;; and does not end with any newlines.
! 		       (insert "Welcome to GNU Emacs")
! 		       (if (eq system-type 'gnu/linux)
! 			   (insert ", one component of a Linux-based GNU system."))
! 		       (insert "\n")
  		       (if (assq 'display (frame-parameters))
  			   (progn
  			     (insert "\
--- 825,831 ----
  		       ;; The convention for this piece of code is that
  		       ;; each piece of output starts with one or two newlines
  		       ;; and does not end with any newlines.
! 		       (insert "Welcome to Perlmacs, a derivative of GNU Emacs.\n")
  		       (if (assq 'display (frame-parameters))
  			   (progn
  			     (insert "\
***************
*** 837,848 ****
  
  Important Help menu items:
  Emacs Tutorial		Learn-by-doing tutorial for using Emacs efficiently.
! \(Non)Warranty		GNU Emacs comes with ABSOLUTELY NO WARRANTY
! Copying Conditions	Conditions for redistributing and changing Emacs.
! Getting New Versions	How to obtain the latest version of Emacs.
  ")
  			     (insert "\n\n" (emacs-version)
  				     "
  Copyright (C) 1998 Free Software Foundation, Inc."))
  			 ;; If keys have their default meanings,
  			 ;; use precomputed string to save lots of time.
--- 837,848 ----
  
  Important Help menu items:
  Emacs Tutorial		Learn-by-doing tutorial for using Emacs efficiently.
! \(Non)Warranty		Perlmacs comes with ABSOLUTELY NO WARRANTY
! Copying Conditions	Conditions for redistributing and changing Perlmacs.
  ")
  			     (insert "\n\n" (emacs-version)
  				     "
+ Copyright (C) 1998-1999 John Tobey
  Copyright (C) 1998 Free Software Foundation, Inc."))
  			 ;; If keys have their default meanings,
  			 ;; use precomputed string to save lots of time.
***************
*** 854,860 ****
  				  (eq (key-binding "\C-h\C-n") 'view-emacs-news))
  			     (insert "
  Get help	   C-h  (Hold down CTRL and press h)
! Undo changes	   C-x u       Exit Emacs		C-x C-c
  Get a tutorial	   C-h t       Use Info to read docs	C-h i")
  			   (insert (substitute-command-keys
  				    (format "\n
--- 854,860 ----
  				  (eq (key-binding "\C-h\C-n") 'view-emacs-news))
  			     (insert "
  Get help	   C-h  (Hold down CTRL and press h)
! Undo changes	   C-x u       Exit Perlmacs		C-x C-c
  Get a tutorial	   C-h t       Use Info to read docs	C-h i")
  			   (insert (substitute-command-keys
  				    (format "\n
***************
*** 900,919 ****
  
  			 (insert "\n\n" (emacs-version)
  				 "
  Copyright (C) 1998 Free Software Foundation, Inc.")
  			 (if (and (eq (key-binding "\C-h\C-c") 'describe-copying)
  				  (eq (key-binding "\C-h\C-d") 'describe-distribution)
  				  (eq (key-binding "\C-h\C-w") 'describe-no-warranty))
  			     (insert 
  			      "\n
! GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details.
! You may give out copies of Emacs; type C-h C-c to see the conditions.
! Type C-h C-d for information on getting the latest version.")
  			   (insert (substitute-command-keys
  				    "\n
! GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for full details.
! You may give out copies of Emacs; type \\[describe-copying] to see the conditions.
! Type \\[describe-distribution] for information on getting the latest version."))))
  		       (goto-char (point-min))
  
  		       (set-buffer-modified-p nil)
--- 900,918 ----
  
  			 (insert "\n\n" (emacs-version)
  				 "
+ Copyright (C) 1998-1999 John Tobey
  Copyright (C) 1998 Free Software Foundation, Inc.")
  			 (if (and (eq (key-binding "\C-h\C-c") 'describe-copying)
  				  (eq (key-binding "\C-h\C-d") 'describe-distribution)
  				  (eq (key-binding "\C-h\C-w") 'describe-no-warranty))
  			     (insert 
  			      "\n
! Perlmacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details.
! You may give out copies of Perlmacs; type C-h C-c to see the conditions.")
  			   (insert (substitute-command-keys
  				    "\n
! Perlmacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for full details.
! You may give out copies of Perlmacs; type \\[describe-copying] to see the conditions."))))
  		       (goto-char (point-min))
  
  		       (set-buffer-modified-p nil)
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/lwlib/Makefile.in perlmacs-0.13/lwlib/Makefile.in
*** emacs-20.3/lwlib/Makefile.in	Sat Aug  1 20:27:59 1998
--- perlmacs-0.13/lwlib/Makefile.in	Sat Mar  6 16:06:04 1999
***************
*** 50,57 ****
  #If running ranlib fails, probably there is none.
  #That's ok.  So don't stop the build.
  
! # Depend on Makefile so that we recompile if TOOLKIT_DEFINES changes.
! lwlib.o:  $(srcdir)/lwlib.c  Makefile
  	$(CC) -c $(TOOLKIT_DEFINES) $(ALL_CFLAGS) $(srcdir)/lwlib.c
  
  xrdb-cpp.o:  $(srcdir)/xrdb-cpp.c
--- 50,62 ----
  #If running ranlib fails, probably there is none.
  #That's ok.  So don't stop the build.
  
! # FIXME: lwlib.o used to depend on Makefile.  The explanation was:
! #
! ### Depend on Makefile so that we recompile if TOOLKIT_DEFINES changes.
! #
! # This broke incremental builds by forcing emacs to be linked and dumped
! # whenever config.status changed (e.g. after an edit to any Makefile.in).
! lwlib.o:  $(srcdir)/lwlib.c
  	$(CC) -c $(TOOLKIT_DEFINES) $(ALL_CFLAGS) $(srcdir)/lwlib.c
  
  xrdb-cpp.o:  $(srcdir)/xrdb-cpp.c
Only in perlmacs-0.13: noperl-build
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/.gdbinit perlmacs-0.13/src/.gdbinit
*** emacs-20.3/src/.gdbinit	Sat May  9 21:04:51 1998
--- perlmacs-0.13/src/.gdbinit	Sun Feb  7 20:25:45 1999
***************
*** 291,296 ****
--- 291,305 ----
  Print $ as a scrollbar pointer.
  end
  
+ define xforeign
+ print (struct Lisp_Foreign_Object *) (($ & $valmask) | gdb_data_seg_bits)
+ output/x *$
+ echo \n
+ end
+ document xforeign
+ Print $ assuming it is a lisp foreign object.
+ end
+ 
  set print pretty on
  set print sevenbit-strings
  
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/Makefile.in perlmacs-0.13/src/Makefile.in
*** emacs-20.3/src/Makefile.in	Sat Aug  1 20:29:21 1998
--- perlmacs-0.13/src/Makefile.in	Sun Mar  7 16:54:09 1999
***************
*** 1,3 ****
--- 1,7 ----
+ # Modified 1 Jan 1998 by John Tobey <jtobey@channel1.com>
+ # for use with embedded Perl.
+ 
+ 
  # Makefile for GNU Emacs.
  # Copyright (C) 1985, 87, 88, 93, 94, 95 Free Software Foundation, Inc.
  
***************
*** 18,23 ****
--- 22,29 ----
  # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  # Boston, MA 02111-1307, USA.
  
+ default: all
+ 
  # Here are the things that we expect ../configure to edit.
  # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
  srcdir=@srcdir@
***************
*** 28,33 ****
--- 34,42 ----
  CPPFLAGS=@CPPFLAGS@
  LDFLAGS=@LDFLAGS@
  LN_S=@LN_S@
+ PERL=@PERL@
+ PERL_CCOPTS=@PERL_CCOPTS@
+ PERL_LDOPTS=@PERL_LDOPTS@
  # Substitute an assignment for the MAKE variable, because
  # BSD doesn't have it as a default.
  @SET_MAKE@
***************
*** 277,282 ****
--- 286,300 ----
  .c.o:
  	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
  
+ /* Perl has a header named config.h.  So do we.  Don't look in the Perl
+    include dir, except when necessary.  */
+ perlmacs.o: perlmacs.c perlmacs.h eval.h $(config_h)
+ 	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PERL_CCOPTS) ${srcdir}/perlmacs.c
+ perlxsi.o: perlxsi.c
+ 	$(CC) -c $(PERL_CCOPTS) perlxsi.c
+ perlxsi.c:
+ 	$(PERL) -MExtUtils::Embed -e xsinit -- -o $@
+ 
  #ifndef LIBX10_MACHINE
  #define LIBX10_MACHINE
  #endif
***************
*** 382,387 ****
--- 400,409 ----
  #endif /* not HAVE_X11 */
  #endif /* not HAVE_X_WINDOWS */
  
+ #ifdef EMBED_PERL
+ PERLOBJ= perlmacs.o perlxsi.o
+ #endif /* EMBED_PERL */
+ 
  #ifndef ORDINARY_LINK
  /* Fix linking if compiled with GCC.  */
  #ifdef __GNUC__
***************
*** 521,527 ****
  	abbrev.o syntax.o UNEXEC mocklisp.o bytecode.o \
  	process.o callproc.o \
  	region-cache.o \
! 	doprnt.o strftime.o MKTIME_OBJ GETLOADAVG_OBJ MSDOS_OBJ
  
  /* Object files used on some machine or other.
     These go in the DOC file on all machines
--- 543,550 ----
  	abbrev.o syntax.o UNEXEC mocklisp.o bytecode.o \
  	process.o callproc.o \
  	region-cache.o \
! 	doprnt.o strftime.o $(PERLOBJ) \
! 	MKTIME_OBJ GETLOADAVG_OBJ MSDOS_OBJ
  
  /* Object files used on some machine or other.
     These go in the DOC file on all machines
***************
*** 628,633 ****
--- 651,662 ----
  #define WINNT_SUPPORT
  #endif
  
+ #ifdef EMBED_PERL
+ #define PERL_SUPPORT ${lispsource}perl.elc
+ #else
+ #define PERL_SUPPORT
+ #endif
+ 
  /* List of Lisp files loaded into the dumped Emacs.  It's arranged
     like this because it's easier to generate it semi-mechanically from
     loadup.el this way.
***************
*** 705,710 ****
--- 734,740 ----
  	WINNT_SUPPORT \
  	${lispsource}widget.elc \
  	${lispsource}window.elc \
+ 	PERL_SUPPORT \
  	${lispsource}version.el
  
  /* These are relative file names for the Lisp files
***************
*** 780,792 ****
    ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
    ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
    ${dotdot}/lisp/ls-lisp.elc ${dotdot}/lisp/dos-fns.elc \
!   ${dotdot}/lisp/w32-fns.elc ${dotdot}/lisp/dos-w32.elc
  
  /* Construct full set of libraries to be linked.
     Note that SunOS needs -lm to come before -lc; otherwise, you get
     duplicated symbols.  If the standard libraries were compiled
     with GCC, we might need gnulib again after them.  */
! LIBES = $(LOADLIBES) $(LDLIBS) $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
     LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
  
  /* Enable recompilation of certain other files depending on system type.  */
--- 810,824 ----
    ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
    ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
    ${dotdot}/lisp/ls-lisp.elc ${dotdot}/lisp/dos-fns.elc \
!   ${dotdot}/lisp/w32-fns.elc ${dotdot}/lisp/dos-w32.elc \
!   ${dotdot}/lisp/perl.elc
  
  /* Construct full set of libraries to be linked.
     Note that SunOS needs -lm to come before -lc; otherwise, you get
     duplicated symbols.  If the standard libraries were compiled
     with GCC, we might need gnulib again after them.  */
! LIBES = $(LOADLIBES) $(LDLIBS) $(LIBX) $(PERL_LDOPTS) \
!    LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
     LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
  
  /* Enable recompilation of certain other files depending on system type.  */
***************
*** 1108,1114 ****
   blockinput.h charset.h $(config_h) INTERVAL_SRC
  bytecode.o: bytecode.c buffer.h syntax.h $(config_h)
  data.o: data.c buffer.h puresize.h charset.h syssignal.h keyboard.h $(config_h)
! eval.o: eval.c commands.h keyboard.h blockinput.h $(config_h)
  floatfns.o: floatfns.c $(config_h)
  fns.o: fns.c commands.h $(config_h) frame.h buffer.h keyboard.h \
   frame.h window.h INTERVAL_SRC
--- 1140,1146 ----
   blockinput.h charset.h $(config_h) INTERVAL_SRC
  bytecode.o: bytecode.c buffer.h syntax.h $(config_h)
  data.o: data.c buffer.h puresize.h charset.h syssignal.h keyboard.h $(config_h)
! eval.o: eval.c eval.h commands.h keyboard.h blockinput.h $(config_h)
  floatfns.o: floatfns.c $(config_h)
  fns.o: fns.c commands.h $(config_h) frame.h buffer.h keyboard.h \
   frame.h window.h INTERVAL_SRC
***************
*** 1130,1136 ****
  ${libsrc}emacstool: ${libsrc}emacstool.c
  	cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
  mostlyclean:
! 	rm -f temacs prefix-args core \#* *.o libXMenu11.a liblw.a
  	rm -f ../etc/DOC
  clean: mostlyclean
  	rm -f emacs-* emacs
--- 1162,1168 ----
  ${libsrc}emacstool: ${libsrc}emacstool.c
  	cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
  mostlyclean:
! 	rm -f temacs prefix-args core \#* *.o libXMenu11.a liblw.a perlxsi.c
  	rm -f ../etc/DOC
  clean: mostlyclean
  	rm -f emacs-* emacs
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/alloc.c perlmacs-0.13/src/alloc.c
*** emacs-20.3/src/alloc.c	Sun Jun  7 17:48:08 1998
--- perlmacs-0.13/src/alloc.c	Sun Mar 21 22:00:51 1999
***************
*** 1,3 ****
--- 1,6 ----
+ /* Modified 1 Jan 1998 by John Tobey <jtobey@channel1.com>
+    for use with embedded Perl. */
+ 
  /* Storage allocation and gc for GNU Emacs Lisp interpreter.
     Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 1998
        Free Software Foundation, Inc.
***************
*** 98,103 ****
--- 101,112 ----
  /* Nonzero means display messages at beginning and end of GC.  */
  int garbage_collection_messages;
  
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ /* Recording which objects' destructors must be called after sweep.  */
+ static Lisp_Object *condemned_list;
+ static int condemned_max, condemned_ix;
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
+ 
  #ifndef VIRT_ADDR_VARIES
  extern
  #endif /* VIRT_ADDR_VARIES */
***************
*** 186,193 ****
  
  Lisp_Object Qgc_cons_threshold, Qchar_table_extra_slots;
  
! static void mark_object (), mark_buffer (), mark_kboards ();
! static void clear_marks (), gc_sweep ();
  static void compact_strings ();
  
  extern int message_enable_multibyte;
--- 195,203 ----
  
  Lisp_Object Qgc_cons_threshold, Qchar_table_extra_slots;
  
! static void mark_buffer (), mark_kboards ();
! static void clear_marks ();
! void gc_sweep ();
  static void compact_strings ();
  
  extern int message_enable_multibyte;
***************
*** 1033,1038 ****
--- 1043,1054 ----
    bzero ((char *) marker_block->markers, sizeof marker_block->markers);
    marker_block_index = 0;
    marker_free_list = 0;
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+   condemned_max = 50;
+   condemned_list = (Lisp_Object *) xmalloc (condemned_max
+ 					    * sizeof (Lisp_Object));
+   condemned_ix = 0;
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
  }
  
  /* Return a newly allocated Lisp_Misc object, with no substructure.  */
***************
*** 1066,1071 ****
--- 1082,1104 ----
    return val;
  }
  
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ Lisp_Object
+ new_foreign_object (vptr, data, lisp_data)
+      struct Lisp_Foreign_Object_VTable *vptr;
+      void *data;
+      Lisp_Object lisp_data;
+ {
+   Lisp_Object val = allocate_misc ();
+ 
+   XMISCTYPE (val) = Lisp_Misc_Foreign_Object;
+   XFOREIGN_OBJECT (val)->vptr = vptr;
+   XFOREIGN_OBJECT (val)->data = data;
+   XFOREIGN_OBJECT (val)->lisp_data = lisp_data;
+   return val;
+ }
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
+ 
  DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0,
    "Return a newly allocated marker which does not point at any place.")
    ()
***************
*** 1640,1645 ****
--- 1673,1679 ----
      abort ();
  }
  
+ /* FIXME: These struct defs should be #included from eval.h  */
  struct catchtag
    {
      Lisp_Object tag;
***************
*** 1678,1683 ****
--- 1712,1738 ----
    return count;
  }
  
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ int
+ call_destructors ()
+ {
+   if (! condemned_ix)
+     return 0;
+   while (condemned_ix)
+     {
+       Lisp_Object obj = condemned_list [--condemned_ix];
+       void (*destroy) () = XFOREIGN_OBJECT (obj)->vptr->destroy;
+ 
+       (*destroy) (obj);
+       XMISC (obj)->u_marker.type = Lisp_Misc_Free;
+       XMISC (obj)->u_free.chain = marker_free_list;
+       marker_free_list = XMISC (obj);
+       total_free_markers++;
+     }
+   return 1;
+ }
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
+ 
  DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "",
    "Reclaim storage for Lisp objects no longer needed.\n\
  Returns info on amount of space in use:\n\
***************
*** 1700,1705 ****
--- 1755,1765 ----
    char stack_top_variable;
    register int i;
  
+ #ifdef DO_GLOBAL_DESTRUCTION
+   if (EQ (emacs_phase, Qdestructing))
+     return Qnil;
+ #endif
+ 
    /* In case user calls debug_print during GC,
       don't let that cause a recursive GC.  */
    consing_since_gc = 0;
***************
*** 1880,1885 ****
--- 1940,1949 ----
    if (gc_cons_threshold < 10000)
      gc_cons_threshold = 10000;
  
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+   call_destructors ();
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
+ 
    if (garbage_collection_messages)
      {
        if (omessage || minibuf_level > 0)
***************
*** 1913,1977 ****
  		       Qnil)))))));
  }
  
- #if 0
- static void
- clear_marks ()
- {
-   /* Clear marks on all conses */
-   {
-     register struct cons_block *cblk;
-     register int lim = cons_block_index;
-   
-     for (cblk = cons_block; cblk; cblk = cblk->next)
-       {
- 	register int i;
- 	for (i = 0; i < lim; i++)
- 	  XUNMARK (cblk->conses[i].car);
- 	lim = CONS_BLOCK_SIZE;
-       }
-   }
-   /* Clear marks on all symbols */
-   {
-     register struct symbol_block *sblk;
-     register int lim = symbol_block_index;
-   
-     for (sblk = symbol_block; sblk; sblk = sblk->next)
-       {
- 	register int i;
- 	for (i = 0; i < lim; i++)
- 	  {
- 	    XUNMARK (sblk->symbols[i].plist);
- 	  }
- 	lim = SYMBOL_BLOCK_SIZE;
-       }
-   }
-   /* Clear marks on all markers */
-   {
-     register struct marker_block *sblk;
-     register int lim = marker_block_index;
-   
-     for (sblk = marker_block; sblk; sblk = sblk->next)
-       {
- 	register int i;
- 	for (i = 0; i < lim; i++)
- 	  if (sblk->markers[i].u_marker.type == Lisp_Misc_Marker)
- 	    XUNMARK (sblk->markers[i].u_marker.chain);
- 	lim = MARKER_BLOCK_SIZE;
-       }
-   }
-   /* Clear mark bits on all buffers */
-   {
-     register struct buffer *nextb = all_buffers;
- 
-     while (nextb)
-       {
- 	XUNMARK (nextb->name);
- 	nextb = nextb->next;
-       }
-   }
- }
- #endif
- 
  /* Mark reference to a Lisp_Object.
    If the object referred to has not been seen yet, recursively mark
    all the references contained in it.
--- 1977,1982 ----
***************
*** 1986,1992 ****
  Lisp_Object *last_marked[LAST_MARKED_SIZE];
  int last_marked_index;
  
! static void
  mark_object (argptr)
       Lisp_Object *argptr;
  {
--- 1991,1997 ----
  Lisp_Object *last_marked[LAST_MARKED_SIZE];
  int last_marked_index;
  
! void
  mark_object (argptr)
       Lisp_Object *argptr;
  {
***************
*** 2213,2218 ****
--- 2218,2240 ----
  	  }
  	  break;
  
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ 	case Lisp_Misc_Foreign_Object:
+ 	  {
+ 	    struct Lisp_Foreign_Object *ptr = XFOREIGN_OBJECT (obj);
+ 	    if (!XMARKBIT (ptr->lisp_data))
+ 	      {
+ 		void (*mark) () = ptr->vptr->mark;
+ 		XMARK (ptr->lisp_data);
+ 		if (mark)
+ 		  (*mark) (obj);
+ 		objptr = &ptr->lisp_data;
+ 		goto loop;
+ 	      }
+ 	  }
+ 	  break;
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
+ 
  	default:
  	  abort ();
  	}
***************
*** 2358,2364 ****
  
  /* Sweep: find all structures not marked, and free them. */
  
! static void
  gc_sweep ()
  {
    total_string_size = 0;
--- 2380,2386 ----
  
  /* Sweep: find all structures not marked, and free them. */
  
! void
  gc_sweep ()
  {
    total_string_size = 0;
***************
*** 2589,2594 ****
--- 2611,2621 ----
  	      case Lisp_Misc_Overlay:
  		markword = &mblk->markers[i].u_overlay.plist;
  		break;
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ 	      case Lisp_Misc_Foreign_Object:
+ 		markword = &mblk->markers[i].u_foreign_object.lisp_data;
+ 		break;
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
  	      case Lisp_Misc_Free:
  		/* If the object was already free, keep it
  		   on the free list.  */
***************
*** 2608,2613 ****
--- 2635,2663 ----
  		    XSETMARKER (tem, tem1);
  		    unchain_marker (tem);
  		  }
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ 		else if (mblk->markers[i].u_marker.type
+ 			 == Lisp_Misc_Foreign_Object)
+ 		  {
+ 		    struct Lisp_Foreign_Object *ptr
+ 		      = &mblk->markers[i].u_foreign_object;
+ 
+ 		    XSETFOREIGN_OBJECT (tem, ptr);
+ 
+ 		    if (ptr->vptr->destroy)
+ 		      {
+ 			/* Condemn object to destruction following sweep.  */
+ 			if (condemned_ix == condemned_max)
+ 			  {
+ 			    condemned_list = (Lisp_Object *)
+ 			      xrealloc (condemned_list, (condemned_max *= 2)
+ 					* sizeof (Lisp_Object));
+ 			  }
+ 			condemned_list [condemned_ix++] = tem;
+ 			continue;
+ 		      }
+ 		  }
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
  		/* Set the type of the freed object to Lisp_Misc_Free.
  		   We could leave the type alone, since nobody checks it,
  		   but this might catch bugs faster.  */
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/callproc.c perlmacs-0.13/src/callproc.c
*** emacs-20.3/src/callproc.c	Wed Aug 19 13:33:54 1998
--- perlmacs-0.13/src/callproc.c	Fri Mar 19 21:18:37 1999
***************
*** 1,3 ****
--- 1,6 ----
+ /* Modified 3 Mar 1999 by John Tobey <jtobey@channel1.com>
+    for use with embedded Perl.  Added include-directory.  */
+ 
  /* Synchronous subprocess invocation for GNU Emacs.
     Copyright (C) 1985, 86, 87, 88, 93, 94, 95 Free Software Foundation, Inc.
  
***************
*** 90,96 ****
  #define max(a, b) ((a) > (b) ? (a) : (b))
  
  Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory;
! Lisp_Object Vconfigure_info_directory;
  Lisp_Object Vtemp_file_name_pattern;
  
  Lisp_Object Vshell_file_name;
--- 93,99 ----
  #define max(a, b) ((a) > (b) ? (a) : (b))
  
  Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory;
! Lisp_Object Vinclude_directory, Vinclude_path, Vconfigure_info_directory;
  Lisp_Object Vtemp_file_name_pattern;
  
  Lisp_Object Vshell_file_name;
***************
*** 1235,1240 ****
--- 1238,1251 ----
    Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC);
    Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path));
    Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
+ 
+   /* Don't bother with environment variables, since include-directory
+      is not used when running interactively.
+      In fact, this variable might be purifiable.  Hmmm.  */
+   Vinclude_path = build_string (PATH_INCLUDESEARCH);
+ 
+   /* This is for backward compatibility and will go away.  */
+   Vinclude_directory = build_string (PATH_INCLUDEDIR);
  }
  
  /* This is run after init_cmdargs, when Vinstallation_directory is valid.  */
***************
*** 1363,1379 ****
  Each element is a string (directory name) or nil (try default directory).");
  
    DEFVAR_LISP ("exec-directory", &Vexec_directory,
!     "Directory for executables for Emacs to invoke.\n\
  More generally, this includes any architecture-dependent files\n\
  that are built and installed from the Emacs distribution.");
  
    DEFVAR_LISP ("data-directory", &Vdata_directory,
!     "Directory of machine-independent files that come with GNU Emacs.\n\
  These are files intended for Emacs to use while it runs.");
  
    DEFVAR_LISP ("doc-directory", &Vdoc_directory,
!     "Directory containing the DOC file that comes with GNU Emacs.\n\
  This is usually the same as data-directory.");
  
    DEFVAR_LISP ("configure-info-directory", &Vconfigure_info_directory,
      "For internal use by the build procedure only.\n\
--- 1374,1400 ----
  Each element is a string (directory name) or nil (try default directory).");
  
    DEFVAR_LISP ("exec-directory", &Vexec_directory,
!     "Directory for executables for Perlmacs to invoke.\n\
  More generally, this includes any architecture-dependent files\n\
  that are built and installed from the Emacs distribution.");
  
    DEFVAR_LISP ("data-directory", &Vdata_directory,
!     "Directory of machine-independent files that come with Perlmacs.\n\
  These are files intended for Emacs to use while it runs.");
  
    DEFVAR_LISP ("doc-directory", &Vdoc_directory,
!     "Directory containing the DOC file that comes with Perlmacs.\n\
  This is usually the same as data-directory.");
+ 
+   DEFVAR_LISP ("include-directory", &Vinclude_directory,
+     "Deprecated in favor of `include-path'.\n\
+ For internal use by Makefile.PL only.  Directory containing the C\n\
+ header files that come with Perlmacs.");
+ 
+   DEFVAR_LISP ("include-path", &Vinclude_path,
+     "For internal use by Makefile.PL only.\n\
+ Colon-separated list of directories containing C header files for\n\
+ compiling external modules.");
  
    DEFVAR_LISP ("configure-info-directory", &Vconfigure_info_directory,
      "For internal use by the build procedure only.\n\
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/config.in perlmacs-0.13/src/config.in
*** emacs-20.3/src/config.in	Mon May 25 00:07:33 1998
--- perlmacs-0.13/src/config.in	Fri Mar 19 19:50:01 1999
***************
*** 41,47 ****
  /* Define REL_ALLOC if you want to use the relocating allocator for
     buffer space. */
  #undef REL_ALLOC
!   
  /* Define HAVE_X_WINDOWS if you want to use the X window system.  */
  #undef HAVE_X_WINDOWS
  
--- 41,68 ----
  /* Define REL_ALLOC if you want to use the relocating allocator for
     buffer space. */
  #undef REL_ALLOC
! 
! /* Define EMBED_PERL to embed the Perl interpreter in Emacs.  */
! #undef EMBED_PERL
! 
! /* Consequences of Perl embedding.  */
! #ifdef EMBED_PERL
! #define LISP_FOREIGN_OBJECT_TYPE 1
! #define DO_GLOBAL_DESTRUCTION 1
! #undef PERLMACS_VERSION
! #endif
! 
! /* Define PERL_MALLOC when embedding a version of Perl with its own
!    malloc routines.  */
! #undef PERL_MALLOC
! 
! /* Perl's malloc looks like a system malloc to Emacs.  */
! #ifdef PERL_MALLOC
! #ifndef SYSTEM_MALLOC
! #define SYSTEM_MALLOC
! #endif
! #endif
! 
  /* Define HAVE_X_WINDOWS if you want to use the X window system.  */
  #undef HAVE_X_WINDOWS
  
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/data.c perlmacs-0.13/src/data.c
*** emacs-20.3/src/data.c	Thu May  7 16:39:17 1998
--- perlmacs-0.13/src/data.c	Sun Feb  7 18:40:08 1999
***************
*** 1,3 ****
--- 1,6 ----
+ /* Modified 1 Jan 1998 by John Tobey <jtobey@channel1.com>
+    for use with embedded Perl. */
+ 
  /* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter.
     Copyright (C) 1985,86,88,93,94,95,97, 1998 Free Software Foundation, Inc.
  
***************
*** 103,108 ****
--- 106,114 ----
  Lisp_Object Qprocess;
  static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector;
  static Lisp_Object Qchar_table, Qbool_vector;
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ static Lisp_Object Qforeign_object;
+ #endif  /* LISP_FOREIGN_OBJECT_TYPE */
  
  static Lisp_Object swap_in_symval_forwarding ();
  
***************
*** 226,231 ****
--- 232,246 ----
  	  return Qoverlay;
  	case Lisp_Misc_Float:
  	  return Qfloat;
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ 	case Lisp_Misc_Foreign_Object:
+ 	  {
+ 	    Lisp_Object (*type_of)() = XFOREIGN_OBJECT (object)->vptr->type_of;
+ 	    if (type_of)
+ 	      return (*type_of) (object);
+ 	  }
+ 	  return Qforeign_object;
+ #endif  /* LISP_FOREIGN_OBJECT_TYPE */
  	}
        abort ();
  
***************
*** 499,504 ****
--- 514,531 ----
    return Qnil;
  }
  #endif /* LISP_FLOAT_TYPE */
+ 
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ DEFUN ("foreign-object-p", Fforeign_object_p, Sforeign_object_p, 1, 1, 0,
+        "Return t if OBJECT is not of a built-in Lisp type.")
+   (object)
+      Lisp_Object object;
+ {
+   if (FOREIGN_OBJECTP (object))
+     return Qt;
+   return Qnil;
+ }
+ #endif  /* LISP_FOREIGN_OBJECT_TYPE */
  
  /* Extract and set components of lists */
  
***************
*** 2833,2838 ****
--- 2860,2868 ----
    Qvector = intern ("vector");
    Qchar_table = intern ("char-table");
    Qbool_vector = intern ("bool-vector");
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+   Qforeign_object = intern ("foreign-object");
+ #endif  /* LISP_FOREIGN_OBJECT_TYPE */
  
    staticpro (&Qinteger);
    staticpro (&Qsymbol);
***************
*** 2851,2856 ****
--- 2881,2889 ----
    staticpro (&Qvector);
    staticpro (&Qchar_table);
    staticpro (&Qbool_vector);
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+   staticpro (&Qforeign_object);
+ #endif  /* LISP_FOREIGN_OBJECT_TYPE */
  
    DEFVAR_BOOL ("keyword-symbols-constant-flag", &keyword_symbols_constant_flag,
      "Non-nil means it is an error to set a keyword symbol.\n\
***************
*** 2886,2891 ****
--- 2919,2927 ----
    defsubr (&Ssubrp);
    defsubr (&Sbyte_code_function_p);
    defsubr (&Schar_or_string_p);
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+   defsubr (&Sforeign_object_p);
+ #endif  /* LISP_FOREIGN_OBJECT_TYPE */
    defsubr (&Scar);
    defsubr (&Scdr);
    defsubr (&Scar_safe);
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/emacs.c perlmacs-0.13/src/emacs.c
*** emacs-20.3/src/emacs.c	Mon Jul 20 21:39:52 1998
--- perlmacs-0.13/src/emacs.c	Sun Mar 28 15:39:12 1999
***************
*** 1,3 ****
--- 1,6 ----
+ /* Modified 1 Jan 1998 by John Tobey <jtobey@channel1.com>
+    for use with embedded Perl. */
+ 
  /* Fully extensible Emacs, running on Unix, intended for GNU.
     Copyright (C) 1985,86,87,93,94,95,97,1998 Free Software Foundation, Inc.
  
***************
*** 75,80 ****
--- 78,88 ----
     nil means get them only from PATH_LOADSEARCH.  */
  Lisp_Object Vinstallation_directory;
  
+ #ifdef DO_GLOBAL_DESTRUCTION
+ /* How to tell whether Emacs is starting, running, or shutting down.  */
+ Lisp_Object emacs_phase, Qrunning, Qdestructing;
+ #endif 
+ 
  /* Hook run by `kill-emacs' before it does really anything.  */
  Lisp_Object Vkill_emacs_hook;
  
***************
*** 280,286 ****
  
  /* Code for dealing with Lisp access to the Unix command line */
  
! static void
  init_cmdargs (argc, argv, skip_args)
       int argc;
       char **argv;
--- 288,294 ----
  
  /* Code for dealing with Lisp access to the Unix command line */
  
! void
  init_cmdargs (argc, argv, skip_args)
       int argc;
       char **argv;
***************
*** 550,564 ****
       char **argv;
       char **envp;
  {
-   char stack_bottom_variable;
-   int skip_args = 0;
-   extern int errno;
-   extern int sys_nerr;
- #ifdef HAVE_SETRLIMIT
-   struct rlimit rlim;
- #endif
-   int no_loadup = 0;
- 
  #ifdef LINUX_SBRK_BUG
    __sbrk (1);
  #endif
--- 558,563 ----
***************
*** 578,583 ****
--- 577,649 ----
      run_time_remap (argv[0]);
  #endif
  
+ #ifdef EMBED_PERL
+   {
+     /* Find out whether to behave like standard Emacs or standard Perl.
+        FIXME: Being Perl could lead to disaster if (!initialized).
+ 
+        argmatch() would be too flexible for my liking.
+        Let there be only one way to do this until all ways have been
+        well thought out.  */
+     int i;
+     int be_perl;
+     char *exe;
+ 
+     /* Check the executable file name for an occurence of the string "perl".
+        If found, default to Perl.
+        FIXME: This code assumes '/' is the path separator and the program
+        name is case-sensitive.  */
+ 
+     exe = strrchr (argv [0], '/');
+     if (! exe)
+       exe = argv [0];
+ 
+     be_perl = (strstr (exe, "perl") != 0);
+ 
+     /* Regardless of the program name, the command line can override.  */
+ 
+     for (i = 1; i < argc; i++)
+       {
+ 	if (! strcmp (argv [i], "--perl"))
+ 	  be_perl = 1;
+ 	else if (!strcmp (argv [i], "--emacs"))
+ 	  be_perl = 0;
+ 	else
+ 	  break;
+       }
+     i--;
+     if (i)
+       {
+ 	/* Both Emacs' and Perl's command line parsers
+ 	   would be confused by the --perl and --emacs arguments,
+ 	   so make it look as if they weren't there.  */
+ 	argv [i] = argv [0];
+ 	argv += i;
+ 	argc -= i;
+       }
+     if (be_perl)
+       return perlmacs_main (argc, argv, envp);
+   }
+ #endif /* EMBED_PERL */
+ 
+   return emacs_main (argc, argv, envp);
+ }
+ 
+ /* ARGSUSED */
+ int
+ emacs_main (argc, argv, envp)
+      int argc;
+      char **argv;
+      char **envp;
+ {
+   char stack_bottom_variable;
+   int skip_args = 0;
+   extern int errno;
+   extern int sys_nerr;
+ #ifdef HAVE_SETRLIMIT
+   struct rlimit rlim;
+ #endif
+ 
    sort_args (argc, argv);
    argc = 0;
    while (argv[argc]) argc++;
***************
*** 587,608 ****
           So ignore --version otherwise.  */
        && initialized)
      {
!       Lisp_Object tem;
!       tem = Fsymbol_value (intern ("emacs-version"));
!       if (!STRINGP (tem))
  	{
  	  fprintf (stderr, "Invalid value of `emacs-version'\n");
  	  exit (1);
  	}
        else
  	{
! 	  printf ("GNU Emacs %s\n", XSTRING (tem)->data);
  	  printf ("Copyright (C) 1998 Free Software Foundation, Inc.\n");
! 	  printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n");
! 	  printf ("You may redistribute copies of Emacs\n");
  	  printf ("under the terms of the GNU General Public License.\n");
  	  printf ("For more information about these matters, ");
! 	  printf ("see the file named COPYING.\n");
  	  exit (0);
  	}
      }
--- 653,694 ----
           So ignore --version otherwise.  */
        && initialized)
      {
!       Lisp_Object emv, pmv;
!       emv = Fsymbol_value (intern ("emacs-version"));
!       pmv = Fsymbol_value (intern ("perlmacs-version"));
!       if (!STRINGP (emv))
  	{
  	  fprintf (stderr, "Invalid value of `emacs-version'\n");
  	  exit (1);
  	}
+       else if (!STRINGP (pmv))
+ 	{
+ 	  fprintf (stderr, "Invalid value of `perlmacs-version'\n");
+ 	  exit (1);
+ 	}
        else
  	{
! 	  printf ("Perlmacs %s (GNU Emacs %s)\n",
! 		  XSTRING (pmv)->data, XSTRING (emv)->data);
! 	  printf ("Copyright (C) 1998-1999 John Tobey.\n");
  	  printf ("Copyright (C) 1998 Free Software Foundation, Inc.\n");
! #ifdef EMBED_PERL
! #ifdef CANNOT_DUMP
! 	  printf ("Copyright 1987-1998, Larry Wall\n");
! #else
! 	  printf ("Type `%s --perl -v' for Perl's copyright information.\n",
! 		  argv [0]);
! #endif
! #else
! 	  printf ("Perl support disabled.\n");
! #endif
! 	  printf ("Perlmacs comes with ABSOLUTELY NO WARRANTY.\n");
! 	  printf ("You may redistribute copies of Perlmacs\n");
  	  printf ("under the terms of the GNU General Public License.\n");
  	  printf ("For more information about these matters, ");
! 	  printf ("see the file named COPYING.\n\n");
! 	  printf ("For the latest version, check\n");
! 	  printf ("http://www.perl.com/CPAN/authors/id/JTOBEY/ .\n");
  	  exit (0);
  	}
      }
***************
*** 797,805 ****
        [-q] [--no-init-file]  [-u user] [--user user]  [--debug-init]\n\
        [--unibyte] [--multibyte] [--version] [--no-site-file]\n\
        [-f func] [--funcall func]  [-l file] [--load file]  [--insert file]\n\
!       [+linenum] file-to-visit  [--kill]\n\
! Report bugs to bug-gnu-emacs@gnu.org.  First, please see\n\
! the Bugs section of the Emacs manual or the file BUGS.\n", argv[0]);
        exit (0);
      }
  
--- 883,889 ----
        [-q] [--no-init-file]  [-u user] [--user user]  [--debug-init]\n\
        [--unibyte] [--multibyte] [--version] [--no-site-file]\n\
        [-f func] [--funcall func]  [-l file] [--load file]  [--insert file]\n\
!       [+linenum] file-to-visit  [--kill]\n", argv[0]);
        exit (0);
      }
  
***************
*** 922,927 ****
--- 1006,1228 ----
  
    noninteractive1 = noninteractive;
  
+ #ifdef EMBED_PERL
+   perlmacs_init_lisp (argc, argv, skip_args);
+ #else
+   init_lisp (argc, argv, skip_args);
+ #endif
+ 
+   if (!noninteractive)
+     {
+ #ifdef VMS
+       init_vms_input ();/* init_display calls get_frame_size, that needs this */
+ #endif /* VMS */
+       init_display ();	/* Determine terminal type.  init_sys_modes uses results */
+     }
+   init_keyboard ();	/* This too must precede init_sys_modes */
+ #ifdef VMS
+   init_vmsproc ();	/* And this too. */
+ #endif /* VMS */
+   init_sys_modes ();	/* Init system terminal modes (RAW or CBREAK, etc.) */
+   init_xdisp ();
+ 
+   /* Intern the names of all standard functions and variables;
+      define standard keys.  */
+ 
+   if (!initialized)
+     {
+       /* The basic levels of Lisp must come first */
+       /* And data must come first of all
+ 	 for the sake of symbols like error-message */
+       syms_of_data ();
+       syms_of_alloc ();
+       syms_of_lread ();
+       syms_of_print ();
+       syms_of_eval ();
+       syms_of_fns ();
+       syms_of_floatfns ();
+ 
+       syms_of_abbrev ();
+       syms_of_buffer ();
+       syms_of_bytecode ();
+       syms_of_callint ();
+       syms_of_casefiddle ();
+       syms_of_casetab ();
+       syms_of_callproc ();
+       syms_of_category ();
+       syms_of_ccl ();
+       syms_of_charset ();
+       syms_of_cmds ();
+ #ifndef NO_DIR_LIBRARY
+       syms_of_dired ();
+ #endif /* not NO_DIR_LIBRARY */
+       syms_of_display ();
+       syms_of_doc ();
+       syms_of_editfns ();
+       syms_of_emacs ();
+       syms_of_fileio ();
+       syms_of_coding ();	/* This should be after syms_of_fileio.  */
+ #ifdef CLASH_DETECTION
+       syms_of_filelock ();
+ #endif /* CLASH_DETECTION */
+       syms_of_indent ();
+       syms_of_insdel ();
+       syms_of_keyboard ();
+       syms_of_keymap ();
+       syms_of_macros ();
+       syms_of_marker ();
+       syms_of_minibuf ();
+       syms_of_mocklisp ();
+       syms_of_process ();
+       syms_of_search ();
+       syms_of_frame ();
+       syms_of_syntax ();
+       syms_of_term ();
+       syms_of_undo ();
+ 
+       /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
+       syms_of_textprop ();
+ #ifdef VMS
+       syms_of_vmsproc ();
+ #endif /* VMS */
+ #ifdef WINDOWSNT
+       syms_of_ntproc ();
+ #endif /* WINDOWSNT */
+       syms_of_window ();
+       syms_of_xdisp ();
+ #ifdef HAVE_X_WINDOWS
+       syms_of_xterm ();
+       syms_of_xfns ();
+       syms_of_fontset ();
+ #ifdef HAVE_X11
+       syms_of_xselect ();
+ #endif
+ #endif /* HAVE_X_WINDOWS */
+ 
+ #ifndef HAVE_NTGUI
+       syms_of_xfaces ();
+       syms_of_xmenu ();
+ #endif
+ 
+ #ifdef HAVE_NTGUI
+       syms_of_w32term ();
+       syms_of_w32fns ();
+       syms_of_w32faces ();
+       syms_of_w32select ();
+       syms_of_w32menu ();
+ #endif /* HAVE_NTGUI */
+ 
+ #ifdef EMBED_PERL
+       syms_of_perlmacs ();
+ #endif /* EMBED_PERL */
+ 
+ #ifdef SYMS_SYSTEM
+       SYMS_SYSTEM;
+ #endif
+ 
+ #ifdef SYMS_MACHINE
+       SYMS_MACHINE;
+ #endif
+ 
+       keys_of_casefiddle ();
+       keys_of_cmds ();
+       keys_of_buffer ();
+       keys_of_keyboard ();
+       keys_of_keymap ();
+       keys_of_macros ();
+       keys_of_minibuf ();
+       keys_of_window ();
+       keys_of_frame ();
+     }
+ 
+   if (!initialized)
+     {
+       char *file;
+       /* Handle -l loadup, args passed by Makefile. */
+       if (argmatch (argv, argc, "-l", "--load", 3, &file, &skip_args))
+ 	Vtop_level = Fcons (intern ("load"),
+ 			    Fcons (build_string (file), Qnil));
+ #ifdef CANNOT_DUMP
+       /* Unless next switch is -nl, load "loadup.el" first thing.  */
+       if (! no_loadup)
+ 	Vtop_level = Fcons (intern ("load"),
+ 			    Fcons (build_string ("loadup.el"), Qnil));
+ #endif /* CANNOT_DUMP */
+     }
+ 
+   if (initialized)
+     {
+ #ifdef HAVE_TZSET
+       {
+ 	/* If the execution TZ happens to be the same as the dump TZ,
+ 	   change it to some other value and then change it back,
+ 	   to force the underlying implementation to reload the TZ info.
+ 	   This is needed on implementations that load TZ info from files,
+ 	   since the TZ file contents may differ between dump and execution.  */
+ 	char *tz = getenv ("TZ");
+ 	if (tz && !strcmp (tz, dump_tz))
+ 	  {
+ 	    ++*tz;
+ 	    tzset ();
+ 	    --*tz;
+ 	  }
+       }
+ #endif
+     }
+ 
+   /* Gerd Moellmann <gerd@acm.org> says this makes profiling work on
+      FreeBSD.  It might work on some other systems too.
+      Give it a try and tell me if it works on your system.  */
+ #ifdef __FreeBSD__
+ #ifdef PROFILING
+   if (initialized)
+     {
+       extern void _mcleanup ();       
+       extern char etext;
+       extern Lisp_Object Fredraw_frame ();
+       atexit (_mcleanup);
+       /* This uses Fredraw_frame because that function
+ 	 comes first in the Emacs executable.
+ 	 It might be better to use something that gives
+ 	 the start of the text segment, but start_of_text
+ 	 is not defined on all systems now.  */
+       monstartup (Fredraw_frame, &etext);
+     }
+   else
+     moncontrol (0);
+ #endif
+ #endif
+ 
+   initialized = 1;
+ 
+ #ifdef LOCALTIME_CACHE
+   /* Some versions of localtime have a bug.  They cache the value of the time
+      zone rather than looking it up every time.  Since localtime() is
+      called to bolt the undumping time into the undumped emacs, this
+      results in localtime ignoring the TZ environment variable.
+      This flushes the new TZ value into localtime. */
+   tzset ();
+ #endif /* defined (LOCALTIME_CACHE) */
+ 
+ #ifdef DO_GLOBAL_DESTRUCTION
+   emacs_phase = Qrunning;
+ #endif
+ 
+   /* Enter editor command loop.  This never returns.  */
+   Frecursive_edit ();
+   /* NOTREACHED */
+ }
+ 
+ /* Perform basic initializations (not merely interning symbols) */
+ 
+ void
+ init_lisp (argc, argv, skip_args)
+      int argc;
+      char **argv;
+      int skip_args;
+ {
+   int no_loadup = 0;
+ 
  /* Perform basic initializations (not merely interning symbols) */
  
    if (!initialized)
***************
*** 941,946 ****
--- 1242,1251 ----
        init_window_once ();	/* Init the window system */
      }
  
+ #ifdef DO_GLOBAL_DESTRUCTION
+   emacs_phase = Qnil;
+ #endif
+ 
    init_alloc ();
    init_eval ();
    init_coding ();
***************
*** 1108,1231 ****
    init_callproc ();	/* Must follow init_cmdargs but not init_sys_modes.  */
    init_lread ();
  
-   /* Intern the names of all standard functions and variables;
-      define standard keys.  */
- 
-   if (!initialized)
-     {
-       /* The basic levels of Lisp must come first */
-       /* And data must come first of all
- 	 for the sake of symbols like error-message */
-       syms_of_data ();
-       syms_of_alloc ();
-       syms_of_lread ();
-       syms_of_print ();
-       syms_of_eval ();
-       syms_of_fns ();
-       syms_of_floatfns ();
- 
-       syms_of_abbrev ();
-       syms_of_buffer ();
-       syms_of_bytecode ();
-       syms_of_callint ();
-       syms_of_casefiddle ();
-       syms_of_casetab ();
-       syms_of_callproc ();
-       syms_of_category ();
-       syms_of_ccl ();
-       syms_of_charset ();
-       syms_of_cmds ();
- #ifndef NO_DIR_LIBRARY
-       syms_of_dired ();
- #endif /* not NO_DIR_LIBRARY */
-       syms_of_display ();
-       syms_of_doc ();
-       syms_of_editfns ();
-       syms_of_emacs ();
-       syms_of_fileio ();
-       syms_of_coding ();	/* This should be after syms_of_fileio.  */
- #ifdef CLASH_DETECTION
-       syms_of_filelock ();
- #endif /* CLASH_DETECTION */
-       syms_of_indent ();
-       syms_of_insdel ();
-       syms_of_keyboard ();
-       syms_of_keymap ();
-       syms_of_macros ();
-       syms_of_marker ();
-       syms_of_minibuf ();
-       syms_of_mocklisp ();
-       syms_of_process ();
-       syms_of_search ();
-       syms_of_frame ();
-       syms_of_syntax ();
-       syms_of_term ();
-       syms_of_undo ();
- 
-       /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
-       syms_of_textprop ();
- #ifdef VMS
-       syms_of_vmsproc ();
- #endif /* VMS */
- #ifdef WINDOWSNT
-       syms_of_ntproc ();
- #endif /* WINDOWSNT */
-       syms_of_window ();
-       syms_of_xdisp ();
- #ifdef HAVE_X_WINDOWS
-       syms_of_xterm ();
-       syms_of_xfns ();
-       syms_of_fontset ();
- #ifdef HAVE_X11
-       syms_of_xselect ();
- #endif
- #endif /* HAVE_X_WINDOWS */
- 
- #ifndef HAVE_NTGUI
-       syms_of_xfaces ();
-       syms_of_xmenu ();
- #endif
- 
- #ifdef HAVE_NTGUI
-       syms_of_w32term ();
-       syms_of_w32fns ();
-       syms_of_w32faces ();
-       syms_of_w32select ();
-       syms_of_w32menu ();
- #endif /* HAVE_NTGUI */
- 
- #ifdef SYMS_SYSTEM
-       SYMS_SYSTEM;
- #endif
- 
- #ifdef SYMS_MACHINE
-       SYMS_MACHINE;
- #endif
- 
-       keys_of_casefiddle ();
-       keys_of_cmds ();
-       keys_of_buffer ();
-       keys_of_keyboard ();
-       keys_of_keymap ();
-       keys_of_macros ();
-       keys_of_minibuf ();
-       keys_of_window ();
-       keys_of_frame ();
-     }
- 
-   if (!noninteractive)
-     {
- #ifdef VMS
-       init_vms_input ();/* init_display calls get_frame_size, that needs this */
- #endif /* VMS */
-       init_display ();	/* Determine terminal type.  init_sys_modes uses results */
-     }
-   init_keyboard ();	/* This too must precede init_sys_modes */
- #ifdef VMS
-   init_vmsproc ();	/* And this too. */
- #endif /* VMS */
-   init_sys_modes ();	/* Init system terminal modes (RAW or CBREAK, etc.) */
-   init_xdisp ();
    init_macros ();
    init_editfns ();
  #ifdef LISP_FLOAT_TYPE
--- 1413,1418 ----
***************
*** 1235,1313 ****
    init_vmsfns ();
  #endif /* VMS */
    init_process ();
- 
-   if (!initialized)
-     {
-       char *file;
-       /* Handle -l loadup, args passed by Makefile. */
-       if (argmatch (argv, argc, "-l", "--load", 3, &file, &skip_args))
- 	Vtop_level = Fcons (intern ("load"),
- 			    Fcons (build_string (file), Qnil));
- #ifdef CANNOT_DUMP
-       /* Unless next switch is -nl, load "loadup.el" first thing.  */
-       if (! no_loadup)
- 	Vtop_level = Fcons (intern ("load"),
- 			    Fcons (build_string ("loadup.el"), Qnil));
- #endif /* CANNOT_DUMP */
-     }
- 
-   if (initialized)
-     {
- #ifdef HAVE_TZSET
-       {
- 	/* If the execution TZ happens to be the same as the dump TZ,
- 	   change it to some other value and then change it back,
- 	   to force the underlying implementation to reload the TZ info.
- 	   This is needed on implementations that load TZ info from files,
- 	   since the TZ file contents may differ between dump and execution.  */
- 	char *tz = getenv ("TZ");
- 	if (tz && !strcmp (tz, dump_tz))
- 	  {
- 	    ++*tz;
- 	    tzset ();
- 	    --*tz;
- 	  }
-       }
- #endif
-     }
- 
-   /* Gerd Moellmann <gerd@acm.org> says this makes profiling work on
-      FreeBSD.  It might work on some other systems too.
-      Give it a try and tell me if it works on your system.  */
- #ifdef __FreeBSD__
- #ifdef PROFILING
-   if (initialized)
-     {
-       extern void _mcleanup ();       
-       extern char etext;
-       extern Lisp_Object Fredraw_frame ();
-       atexit (_mcleanup);
-       /* This uses Fredraw_frame because that function
- 	 comes first in the Emacs executable.
- 	 It might be better to use something that gives
- 	 the start of the text segment, but start_of_text
- 	 is not defined on all systems now.  */
-       monstartup (Fredraw_frame, &etext);
-     }
-   else
-     moncontrol (0);
- #endif
- #endif
- 
-   initialized = 1;
- 
- #ifdef LOCALTIME_CACHE
-   /* Some versions of localtime have a bug.  They cache the value of the time
-      zone rather than looking it up every time.  Since localtime() is
-      called to bolt the undumping time into the undumped emacs, this
-      results in localtime ignoring the TZ environment variable.
-      This flushes the new TZ value into localtime. */
-   tzset ();
- #endif /* defined (LOCALTIME_CACHE) */
- 
-   /* Enter editor command loop.  This never returns.  */
-   Frecursive_edit ();
-   /* NOTREACHED */
  }
  
  /* Sort the args so we can find the most important ones
--- 1422,1427 ----
***************
*** 1558,1564 ****
       Lisp_Object arg;
  {
    Lisp_Object hook, hook1;
!   int i;
    struct gcpro gcpro1;
  
    GCPRO1 (arg);
--- 1672,1678 ----
       Lisp_Object arg;
  {
    Lisp_Object hook, hook1;
!   int status;
    struct gcpro gcpro1;
  
    GCPRO1 (arg);
***************
*** 1577,1582 ****
--- 1691,1701 ----
    stop_vms_input ();
   #endif  */
  
+ #ifdef DO_GLOBAL_DESTRUCTION
+   consing_since_gc = 0;
+   shutdown_eval ();
+ #endif /* DO_GLOBAL_DESTRUCTION */
+ 
    shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil);
  
    /* If we have an auto-save list file,
***************
*** 1585,1597 ****
    if (STRINGP (Vauto_save_list_file_name))
      unlink (XSTRING (Vauto_save_list_file_name)->data);
  
!   exit (INTEGERP (arg) ? XINT (arg)
  #ifdef VMS
! 	: 1
  #else
! 	: 0
  #endif
- 	);
    /* NOTREACHED */
  }
  
--- 1704,1747 ----
    if (STRINGP (Vauto_save_list_file_name))
      unlink (XSTRING (Vauto_save_list_file_name)->data);
  
!   status = INTEGERP (arg) ? XINT (arg)
  #ifdef VMS
! 	: 1;
  #else
! 	: 0;
! #endif
! 
! #ifdef DO_GLOBAL_DESTRUCTION
!   {
!     int i;
! 
!     emacs_phase = Qdestructing;
!     for (i = 20; i; i--)
!       {
! 	consing_since_gc = 0;
! 	gc_sweep ();
! 	if (! call_destructors () && specpdl_ptr == specpdl)
! 	  break;
! 	shutdown_eval ();
!       }
! 
!     /* FIXME: More needs to be done, like freeing any remaining
!        data blocks and closing X connections.  */
! 
!     if (i == 0)
!       fprintf (stderr, "Warning: Perlmacs failed to free some data.\n\
! specpdl index: %d\n\
! total_markers: %d\n", specpdl_ptr - specpdl, total_markers);
!     else
!       emacs_phase = Qnil;
!   }
! #endif /* DO_GLOBAL_DESTRUCTION */
! 
! #ifdef EMBED_PERL
!   perlmacs_exit (status);
! #else
!   exit (status);
  #endif
    /* NOTREACHED */
  }
  
***************
*** 1648,1664 ****
    kill_vms_processes ();
  #endif
  
- #if 0 /* This triggers a bug in XCloseDisplay and is not needed.  */
- #ifdef HAVE_X_WINDOWS
-   /* It's not safe to call intern here.  Maybe we are crashing.  */
-   if (!noninteractive && SYMBOLP (Vwindow_system)
-       && XSYMBOL (Vwindow_system)->name->size == 1
-       && XSYMBOL (Vwindow_system)->name->data[0] == 'x'
-       && ! no_x)
-     Fx_close_current_connection ();
- #endif /* HAVE_X_WINDOWS */
- #endif
- 
  #ifdef SIGIO
    /* There is a tendency for a SIGIO signal to arrive within exit,
       and cause a SIGHUP because the input descriptor is already closed.  */
--- 1798,1803 ----
***************
*** 1848,1853 ****
--- 1987,1999 ----
  {
    Qfile_name_handler_alist = intern ("file-name-handler-alist");
    staticpro (&Qfile_name_handler_alist);
+ 
+ #ifdef DO_GLOBAL_DESTRUCTION
+   Qrunning = intern ("running");
+   staticpro (&Qrunning);
+   Qdestructing = intern ("destructing");
+   staticpro (&Qdestructing);
+ #endif
  
  #ifndef CANNOT_DUMP
  #ifdef HAVE_SHM
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/eval.c perlmacs-0.13/src/eval.c
*** emacs-20.3/src/eval.c	Sun Apr 26 22:34:24 1998
--- perlmacs-0.13/src/eval.c	Sun Mar 28 14:44:07 1999
***************
*** 1,3 ****
--- 1,6 ----
+ /* Modified 7 Feb 1998 by John Tobey <jtobey@channel1.com>
+    for use with embedded Perl. */
+ 
  /* Evaluator for GNU Emacs Lisp interpreter.
     Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995 Free Software Foundation, Inc.
  
***************
*** 34,92 ****
  #else
  #define INTERACTIVE 1
  #endif
- 
  #include <setjmp.h>
! 
! /* This definition is duplicated in alloc.c and keyboard.c */
! /* Putting it in lisp.h makes cc bomb out! */
! 
! struct backtrace
!   {
!     struct backtrace *next;
!     Lisp_Object *function;
!     Lisp_Object *args;	/* Points to vector of args. */
!     int nargs;		/* Length of vector.
! 			   If nargs is UNEVALLED, args points to slot holding
! 			   list of unevalled args */
!     char evalargs;
!     /* Nonzero means call value of debugger when done with this operation. */
!     char debug_on_exit;
!   };
  
  struct backtrace *backtrace_list;
  
- /* This structure helps implement the `catch' and `throw' control
-    structure.  A struct catchtag contains all the information needed
-    to restore the state of the interpreter after a non-local jump.
- 
-    Handlers for error conditions (represented by `struct handler'
-    structures) just point to a catch tag to do the cleanup required
-    for their jumps.
- 
-    catchtag structures are chained together in the C calling stack;
-    the `next' member points to the next outer catchtag.
- 
-    A call like (throw TAG VAL) searches for a catchtag whose `tag'
-    member is TAG, and then unbinds to it.  The `val' member is used to
-    hold VAL while the stack is unwound; `val' is returned as the value
-    of the catch form.
- 
-    All the other members are concerned with restoring the interpreter
-    state.  */
- struct catchtag
-   {
-     Lisp_Object tag;
-     Lisp_Object val;
-     struct catchtag *next;
-     struct gcpro *gcpro;
-     jmp_buf jmp;
-     struct backtrace *backlist;
-     struct handler *handlerlist;
-     int lisp_eval_depth;
-     int pdlcount;
-     int poll_suppress_count;
-   };
- 
  struct catchtag *catchlist;
  
  Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun;
--- 37,47 ----
  #else
  #define INTERACTIVE 1
  #endif
  #include <setjmp.h>
! #include "eval.h"
  
  struct backtrace *backtrace_list;
  
  struct catchtag *catchlist;
  
  Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun;
***************
*** 193,198 ****
--- 148,166 ----
    when_entered_debugger = -1;
  }
  
+ #ifdef DO_GLOBAL_DESTRUCTION
+ shutdown_eval ()
+ {
+   while (catchlist)
+     {
+       unbind_to (catchlist->pdlcount, Qnil);
+       handlerlist = catchlist->handlerlist;
+       catchlist = catchlist->next;
+     }
+   unbind_to (0, Qnil);
+ }
+ #endif /* DO_GLOBAL_DESTRUCTION */
+ 
  Lisp_Object
  call_debugger (arg)
       Lisp_Object arg;
***************
*** 952,958 ****
  
     This is used for correct unwinding in Fthrow and Fsignal.  */
  
! static void
  unwind_to_catch (catch, value)
       struct catchtag *catch;
       Lisp_Object value;
--- 920,926 ----
  
     This is used for correct unwinding in Fthrow and Fsignal.  */
  
! void
  unwind_to_catch (catch, value)
       struct catchtag *catch;
       Lisp_Object value;
***************
*** 1160,1166 ****
    return val;
  }
  
! /* Like internal_condition_case but call HFUN with ARG as its argument.  */
  
  Lisp_Object
  internal_condition_case_1 (bfun, arg, handlers, hfun)
--- 1128,1134 ----
    return val;
  }
  
! /* Like internal_condition_case but call BFUN with ARG as its argument.  */
  
  Lisp_Object
  internal_condition_case_1 (bfun, arg, handlers, hfun)
***************
*** 1688,1693 ****
--- 1656,1662 ----
  {
    Lisp_Object fun, val, original_fun, original_args;
    Lisp_Object funcar;
+   Lisp_Object args_left, numargs, *vals;
    struct backtrace backtrace;
    struct gcpro gcpro1, gcpro2, gcpro3;
  
***************
*** 1740,1750 ****
   retry:
    fun = Findirect_function (original_fun);
  
    if (SUBRP (fun))
      {
-       Lisp_Object numargs;
        Lisp_Object argvals[8];
-       Lisp_Object args_left;
        register int i, maxargs;
  
        args_left = original_args;
--- 1709,1757 ----
   retry:
    fun = Findirect_function (original_fun);
  
+   if ((SUBRP (fun) && XSUBR (fun)->max_args == MANY)
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+       || (FOREIGN_OBJECTP (fun) && XFOREIGN_OBJECT (fun)->vptr->call)
+ #endif
+       )
+     {
+       /* Pass a vector of evaluated arguments */
+       register int argnum = 0;
+ 
+       args_left = original_args;
+       numargs = Flength (args_left);
+       vals = (Lisp_Object *) alloca (XINT (numargs) * sizeof (Lisp_Object));
+ 
+       GCPRO3 (args_left, fun, fun);
+       gcpro3.var = vals;
+       gcpro3.nvars = 0;
+ 
+       while (!NILP (args_left))
+ 	{
+ 	  vals[argnum++] = Feval (Fcar (args_left));
+ 	  args_left = Fcdr (args_left);
+ 	  gcpro3.nvars = argnum;
+ 	}
+ 
+       backtrace.args = vals;
+       backtrace.nargs = XINT (numargs);
+ 
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+       if (FOREIGN_OBJECTP (fun))
+ 	{
+ 	  Lisp_Object (*call) () = XFOREIGN_OBJECT (fun)->vptr->call;
+ 	  val = (*call) (fun, XINT (numargs), vals);
+ 	}
+       else
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
+       val = (*XSUBR (fun)->function) (XINT (numargs), vals);
+       UNGCPRO;
+       goto done;
+     }
+ 
    if (SUBRP (fun))
      {
        Lisp_Object argvals[8];
        register int i, maxargs;
  
        args_left = original_args;
***************
*** 1761,1793 ****
  	  goto done;
  	}
  
-       if (XSUBR (fun)->max_args == MANY)
- 	{
- 	  /* Pass a vector of evaluated arguments */
- 	  Lisp_Object *vals;
- 	  register int argnum = 0;
- 
- 	  vals = (Lisp_Object *) alloca (XINT (numargs) * sizeof (Lisp_Object));
- 
- 	  GCPRO3 (args_left, fun, fun);
- 	  gcpro3.var = vals;
- 	  gcpro3.nvars = 0;
- 
- 	  while (!NILP (args_left))
- 	    {
- 	      vals[argnum++] = Feval (Fcar (args_left));
- 	      args_left = Fcdr (args_left);
- 	      gcpro3.nvars = argnum;
- 	    }
- 
- 	  backtrace.args = vals;
- 	  backtrace.nargs = XINT (numargs);
- 
- 	  val = (*XSUBR (fun)->function) (XINT (numargs), vals);
- 	  UNGCPRO;
- 	  goto done;
- 	}
- 
        GCPRO3 (args_left, fun, fun);
        gcpro3.var = argvals;
        gcpro3.nvars = 0;
--- 1768,1773 ----
***************
*** 2500,2505 ****
--- 2480,2494 ----
    if (COMPILEDP (fun))
      val = funcall_lambda (fun, numargs, args + 1);
    else
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+     if (FOREIGN_OBJECTP (fun))
+       {
+ 	Lisp_Object (*call) () = XFOREIGN_OBJECT (fun)->vptr->call;
+ 	if (call)
+ 	  val = (*call) (fun, numargs, args + 1);
+       }
+   else
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
      {
        if (!CONSP (fun))
  	return Fsignal (Qinvalid_function, Fcons (fun, Qnil));
Only in perlmacs-0.13/src: eval.h
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/fns.c perlmacs-0.13/src/fns.c
*** emacs-20.3/src/fns.c	Tue Aug 18 04:13:03 1998
--- perlmacs-0.13/src/fns.c	Sun Feb  7 18:43:20 1999
***************
*** 1,3 ****
--- 1,6 ----
+ /* Modified 1 Jan 1998 by John Tobey <jtobey@channel1.com>
+    for use with embedded Perl. */
+ 
  /* Random utility Lisp functions.
     Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
  
***************
*** 62,69 ****
  
  extern Lisp_Object Qinput_method_function;
  
- static int internal_equal ();
- 
  extern long get_random ();
  extern void seed_random ();
  
--- 65,70 ----
***************
*** 1637,1647 ****
    (o1, o2)
       register Lisp_Object o1, o2;
  {
!   return internal_equal (o1, o2, 0) ? Qt : Qnil;
  }
  
! static int
! internal_equal (o1, o2, depth)
       register Lisp_Object o1, o2;
       int depth;
  {
--- 1638,1648 ----
    (o1, o2)
       register Lisp_Object o1, o2;
  {
!   return recursive_equal (o1, o2, 0) ? Qt : Qnil;
  }
  
! int
! recursive_equal (o1, o2, depth)
       register Lisp_Object o1, o2;
       int depth;
  {
***************
*** 1663,1669 ****
  #endif
  
      case Lisp_Cons:
!       if (!internal_equal (XCONS (o1)->car, XCONS (o2)->car, depth + 1))
  	return 0;
        o1 = XCONS (o1)->cdr;
        o2 = XCONS (o2)->cdr;
--- 1664,1670 ----
  #endif
  
      case Lisp_Cons:
!       if (!recursive_equal (XCONS (o1)->car, XCONS (o2)->car, depth + 1))
  	return 0;
        o1 = XCONS (o1)->cdr;
        o2 = XCONS (o2)->cdr;
***************
*** 1674,1682 ****
  	return 0;
        if (OVERLAYP (o1))
  	{
! 	  if (!internal_equal (OVERLAY_START (o1), OVERLAY_START (o1),
  			       depth + 1)
! 	      || !internal_equal (OVERLAY_END (o1), OVERLAY_END (o1),
  				  depth + 1))
  	    return 0;
  	  o1 = XOVERLAY (o1)->plist;
--- 1675,1683 ----
  	return 0;
        if (OVERLAYP (o1))
  	{
! 	  if (!recursive_equal (OVERLAY_START (o1), OVERLAY_START (o1),
  			       depth + 1)
! 	      || !recursive_equal (OVERLAY_END (o1), OVERLAY_END (o1),
  				  depth + 1))
  	    return 0;
  	  o1 = XOVERLAY (o1)->plist;
***************
*** 1689,1694 ****
--- 1690,1707 ----
  		  && (XMARKER (o1)->buffer == 0
  		      || XMARKER (o1)->bytepos == XMARKER (o2)->bytepos));
  	}
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+       if (FOREIGN_OBJECTP (o1))
+ 	{
+ 	  struct Lisp_Foreign_Object *ptr = XFOREIGN_OBJECT (o1);
+ 	  int (*equal) () = ptr->vptr->equal;
+ 
+ 	  if (!recursive_equal (Ftype_of (o1), Ftype_of (o2), depth + 1))
+ 	    return 0;
+ 	  return (ptr->data == XFOREIGN_OBJECT (o2)->data
+ 		  || (equal && (*equal) (o1, o2, depth + 1)));
+ 	}
+ #endif  /* LISP_FOREIGN_OBJECT_TYPE */
        break;
  
      case Lisp_Vectorlike:
***************
*** 1729,1735 ****
  	    Lisp_Object v1, v2;
  	    v1 = XVECTOR (o1)->contents [i];
  	    v2 = XVECTOR (o2)->contents [i];
! 	    if (!internal_equal (v1, v2, depth + 1))
  	      return 0;
  	  }
  	return 1;
--- 1742,1748 ----
  	    Lisp_Object v1, v2;
  	    v1 = XVECTOR (o1)->contents [i];
  	    v2 = XVECTOR (o2)->contents [i];
! 	    if (!recursive_equal (v1, v2, depth + 1))
  	      return 0;
  	  }
  	return 1;
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/lisp.h perlmacs-0.13/src/lisp.h
*** emacs-20.3/src/lisp.h	Tue Aug 18 04:55:40 1998
--- perlmacs-0.13/src/lisp.h	Sun Mar 28 15:46:17 1999
***************
*** 1,3 ****
--- 1,6 ----
+ /* Modified 1 Jan 1998 by John Tobey <jtobey@channel1.com>
+    for use with embedded Perl. */
+ 
  /* Fundamental definitions for GNU Emacs Lisp interpreter.
     Copyright (C) 1985,86,87,93,94,95,97,1998 Free Software Foundation, Inc.
  
***************
*** 28,33 ****
--- 31,43 ----
  #define EMACS_UINT unsigned int
  #endif
  
+ /* Declare the prototype for a general external function.  */
+ #ifdef __STDC__
+ #define P_(proto) proto
+ #else
+ #define P_(proto) ()
+ #endif
+ 
  /* Define the fundamental Lisp data structures.  */
  
  /* This is the set of Lisp data types.  */
***************
*** 85,90 ****
--- 95,101 ----
      /* Currently floats are not a misc type,
         but let's define this in case we want to change that.  */
      Lisp_Misc_Float,
+     Lisp_Misc_Foreign_Object,
      /* This is not a type code.  It is for range checking.  */
      Lisp_Misc_Limit
    };
***************
*** 404,409 ****
--- 415,421 ----
  #define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value))
  #define XOVERLAY(a) (&(XMISC(a)->u_overlay))
  #define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd))
+ #define XFOREIGN_OBJECT(a) (&(XMISC(a)->u_foreign_object))
  
  /* Pseudovector types.  */
  #define XPROCESS(a) ((struct Lisp_Process *) XPNTR(a))
***************
*** 426,431 ****
--- 438,445 ----
  /* Misc types.  */
  #define XSETMISC(a, b) XSET (a, Lisp_Misc, b)
  #define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker)
+ #define XSETFOREIGN_OBJECT(a, b) \
+   (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Foreign_Object)
  
  /* Pseudovector types.  */
  #define XSETPSEUDOVECTOR(a, b, code) \
***************
*** 893,898 ****
--- 907,971 ----
      int offset;
    };
  
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ /* struct Lisp_Foreign_Object can hold arbitrary binary data not directly
+    managed by Lisp.  The VPTR points to a table of object methods that
+    are called at various times.
+ 
+    The TYPE-OF method is called by Ftype_of() and must return the same
+    (`equal') object each time it is called with a given argument.
+ 
+    DESTROY is called after the sweep phase of garbage collection, when
+    the object is to be freed.
+ 
+    The MARK method is called during the mark phase of garbage
+    collection.  MARK must recursively call mark_object() on all
+    contained Lisp objects.
+ 
+    TO_STRING is used by the printer and must return a string.  All
+    foreign objects are printed in hash notation.
+ 
+    FIXME: should probably replace to_string with a stream-printing method.
+ 
+    EQUAL is used in the recursive equality tester.  It should pass its
+    DEPTH argument to recursive_equal() when comparing subobjects, to
+    guard against circularity.  EQUAL may assume that the `type-of' both
+    args is the same (`equal', not `eq').  (Under the current
+    implementation, the VPTRs will be the same, too.)  EQUAL must return
+    a boolean value indicating whether its first two arguments are `equal'.
+ 
+    The CALL method is called when our object appears in functional
+    position.
+ 
+    Any of the function pointers may be 0, in which case a default behavior
+    will be used.
+ 
+    Each of the methods corresponds to and is called only from within one
+    enumeration of complex Lisp data types.  (Typically a switch
+    statement in C code.)  The "foreign" object type effectively extends
+    these enumerations, and thus the typespace, ad infinitum.  */
+ 
+ struct Lisp_Foreign_Object_VTable
+   {
+     Lisp_Object (*type_of)   P_ ((Lisp_Object self));
+     void        (*destroy)   P_ ((Lisp_Object self));
+     void        (*mark)      P_ ((Lisp_Object self));
+     Lisp_Object (*to_string) P_ ((Lisp_Object self));
+     int         (*equal) P_ ((Lisp_Object self, Lisp_Object other, int depth));
+     Lisp_Object (*call) P_ ((Lisp_Object self, int nargs, Lisp_Object *args));
+   };
+ 
+ struct Lisp_Foreign_Object
+   {
+     int type : 16;	/* = Lisp_Misc_Foreign_Object */
+     int spacer : 16;
+     struct Lisp_Foreign_Object_VTable *vptr;
+     void *data;
+     Lisp_Object lisp_data;
+   };
+ 
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
+ 
  
  /* To get the type field of a union Lisp_Misc, use XMISCTYPE.
     It uses one of these struct subtypes to get the type field.  */
***************
*** 908,913 ****
--- 981,989 ----
      struct Lisp_Buffer_Local_Value u_buffer_local_value;
      struct Lisp_Overlay u_overlay;
      struct Lisp_Kboard_Objfwd u_kboard_objfwd;
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+     struct Lisp_Foreign_Object u_foreign_object;
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
    };
  
  #ifdef LISP_FLOAT_TYPE
***************
*** 1074,1079 ****
--- 1150,1157 ----
  #define GC_VECTORP(x) (GC_VECTORLIKEP (x) && !(XVECTOR (x)->size & PSEUDOVECTOR_FLAG))
  #define OVERLAYP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Overlay)
  #define GC_OVERLAYP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Overlay)
+ #define FOREIGN_OBJECTP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Foreign_Object)
+ #define GC_FOREIGN_OBJECTP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Foreign_Object)
  #define MARKERP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker)
  #define GC_MARKERP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker)
  #define INTFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Intfwd)
***************
*** 1284,1296 ****
  			 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
  #endif
  
- /* Declare the prototype for a general external function.  */
- #if defined (__STDC__) || defined (WINDOWSNT)
- #define P_(proto) proto
- #else
- #define P_(proto) ()
- #endif
- 
  /* defsubr (Sname);
   is how we define the symbol for function `name' at start-up time.  */
  extern void defsubr P_ ((struct Lisp_Subr *));
--- 1362,1367 ----
***************
*** 1746,1751 ****
--- 1817,1823 ----
  EXFUN (Fstring_equal, 2);
  EXFUN (Fcompare_strings, 7);
  EXFUN (Fstring_lessp, 2);
+ extern int recursive_equal P_ ((Lisp_Object o1, Lisp_Object o2, int depth));
  extern int char_table_translate P_ ((Lisp_Object, int));
  extern void map_char_table P_ ((void (*) (Lisp_Object, Lisp_Object, Lisp_Object),
  				Lisp_Object, Lisp_Object, Lisp_Object, int,
***************
*** 1869,1874 ****
--- 1941,1953 ----
  #ifdef LISP_FLOAT_TYPE
  extern Lisp_Object make_float P_ ((double));
  #endif /* LISP_FLOAT_TYPE */
+ extern int total_markers;
+ extern void mark_object P_ ((Lisp_Object *));
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ extern Lisp_Object new_foreign_object P_ ((struct Lisp_Foreign_Object_VTable *,
+ 					   void *, Lisp_Object));
+ extern Lisp_Object Qfree;
+ #endif /* LISP_FOREIGN_OBJECT_TYPE */
  extern void display_malloc_warning P_ ((void));
  extern int inhibit_garbage_collection P_ ((void));
  extern void free_marker P_ ((Lisp_Object));
***************
*** 1997,2002 ****
--- 2076,2082 ----
  extern void do_autoload P_ ((Lisp_Object, Lisp_Object));
  extern Lisp_Object un_autoload P_ ((Lisp_Object));
  EXFUN (Ffetch_bytecode, 1);
+ extern int lisp_eval_depth;
  extern void init_eval_once P_ ((void));
  extern void init_eval P_ ((void));
  extern void syms_of_eval P_ ((void));
***************
*** 2327,2334 ****
  
  /* defined in emacs.c */
  extern Lisp_Object decode_env_path P_ ((char *, char *));
! extern Lisp_Object Vinvocation_name, Vinvocation_directory;
! extern Lisp_Object Vinstallation_directory;
  EXFUN (Fkill_emacs, 1);
  void shut_down_emacs P_ ((int, int, Lisp_Object));
  /* Nonzero means don't do interactive redisplay and don't change tty modes */
--- 2407,2417 ----
  
  /* defined in emacs.c */
  extern Lisp_Object decode_env_path P_ ((char *, char *));
! extern Lisp_Object Vcommand_line_args, Vinvocation_name, Vinvocation_directory;
! extern Lisp_Object Vinstallation_directory, Vkill_emacs_hook;
! extern Lisp_Object emacs_phase, Qrunning, Qdestructing;
! extern void init_cmdargs P_ ((int, char **, int));
! extern void init_lisp P_ ((int, char **, int));
  EXFUN (Fkill_emacs, 1);
  void shut_down_emacs P_ ((int, int, Lisp_Object));
  /* Nonzero means don't do interactive redisplay and don't change tty modes */
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/paths.in perlmacs-0.13/src/paths.in
*** emacs-20.3/src/paths.in	Sat Aug 16 14:29:06 1997
--- perlmacs-0.13/src/paths.in	Fri Mar 19 21:18:25 1999
***************
*** 30,35 ****
--- 30,41 ----
     doc-directory is set to this value.  */
  #define PATH_DOC "/usr/local/lib/emacs/data"
  
+ /* Where Makefile.PL should look for the Emacs header files.  */
+ #define PATH_INCLUDESEARCH "/usr/local/lib/emacs/include:/usr/local/include"
+ 
+ /* Old version of PATH_INCLUDESEARCH used for Emacs::Lisp 0.83-0.87.  */
+ #define PATH_INCLUDEDIR "/usr/local/include"
+ 
  /* Where the configuration process believes the info tree lives.  The
     lisp variable configure-info-directory gets its value from this
     macro, and is then used to set the Info-default-directory-list.  */
Only in perlmacs-0.13/src: perlmacs.c
Only in perlmacs-0.13/src: perlmacs.h
diff -cr --exclude=build --exclude=*.elc --exclude=version.el --exclude=CVS --exclude=README* --exclude=BUGS emacs-20.3/src/print.c perlmacs-0.13/src/print.c
*** emacs-20.3/src/print.c	Fri Aug  7 03:21:18 1998
--- perlmacs-0.13/src/print.c	Sat Feb 20 19:59:06 1999
***************
*** 1,3 ****
--- 1,6 ----
+ /* Modified 1 Jan 1998 by John Tobey <jtobey@channel1.com>
+    for use with embedded Perl. */
+ 
  /* Lisp object printing and output streams.
     Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 1998
  	Free Software Foundation, Inc.
***************
*** 1681,1686 ****
--- 1684,1712 ----
  	    }
  	  PRINTCHAR ('>');
  	  break;
+ 
+ #ifdef LISP_FOREIGN_OBJECT_TYPE
+ 	case Lisp_Misc_Foreign_Object:
+ 	  {
+ 	    Lisp_Object (*to_string) ()
+ 	      = XFOREIGN_OBJECT (obj)->vptr->to_string;
+ 
+ 	    PRINTCHAR ('#');
+ 	    PRINTCHAR ('<');
+ 	    print (Ftype_of (obj), printcharfun, escapeflag);
+ 	    PRINTCHAR (' ');
+ 	    if (to_string)
+ 	      print ((*to_string) (obj), printcharfun, escapeflag);
+ 	    else
+ 	      {
+ 		sprintf (buf, "0x%lx",
+ 			 (unsigned long) XFOREIGN_OBJECT (obj)->data);
+ 		strout (buf, -1, -1, printcharfun);
+ 	      }
+ 	    PRINTCHAR ('>');
+ 	  }
+ 	  break;
+ #endif  /* LISP_FOREIGN_OBJECT_TYPE */
  
        /* Remaining cases shouldn't happen in normal usage, but let's print
  	 them anyway for the benefit of the debugger.  */
