home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / groff-1.09-src.lha / src / amiga / groff-1.09 / configure < prev    next >
Text File  |  1994-02-21  |  33KB  |  1,413 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf.
  4. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp]
  21. #        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]]
  22. # Ignores all args except --srcdir, --prefix, --exec-prefix, and
  23. # --with-PACKAGE[=VALUE] unless this script has special code to handle it.
  24.  
  25. for arg
  26. do
  27.   # Handle --exec-prefix with a space before the argument.
  28.   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  29.   # Handle --host with a space before the argument.
  30.   elif test x$next_host = xyes; then next_host=
  31.   # Handle --prefix with a space before the argument.
  32.   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  33.   # Handle --srcdir with a space before the argument.
  34.   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  35.   else
  36.     case $arg in
  37.      # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  38.      -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  39.     exec_prefix=`/bin/echo $arg | sed 's/[-a-z_]*=//'` ;;
  40.      -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  41.     next_exec_prefix=yes ;;
  42.  
  43.      -gas | --gas | --ga | --g) ;;
  44.  
  45.      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  46.      -host | --host | --hos | --ho | --h)
  47.     next_host=yes ;;
  48.  
  49.      -nfp | --nfp | --nf) ;;
  50.  
  51.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  52.     prefix=`/bin/echo $arg | sed 's/[-a-z_]*=//'` ;;
  53.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  54.     next_prefix=yes ;;
  55.  
  56.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  57.     srcdir=`/bin/echo $arg | sed 's/[-a-z_]*=//'` ;;
  58.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  59.     next_srcdir=yes ;;
  60.  
  61.      -with-* | --with-*)
  62.        package=`/bin/echo $arg|sed -e 's/-*with-//' -e 's/=.*//'`
  63.        # Reject names that aren't valid shell variable names.
  64.        if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  65.          echo "configure: $package: invalid package name" >&2; exit 1
  66.        fi
  67.        package=`echo $package| sed 's/-/_/g'`
  68.        case "$arg" in
  69.          *=*) val="`/bin/echo $arg|sed 's/[^=]*=//'`" ;;
  70.          *) val=1 ;;
  71.        esac
  72.        eval "with_$package='$val'" ;;
  73.  
  74.      -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  75.        verbose=yes ;;
  76.  
  77.      *) ;;
  78.     esac
  79.   fi
  80. done
  81.  
  82. trap 'rm -fr conftest* confdefs* core; exit 1' 1 3 15
  83. trap 'rm -f confdefs*' 0
  84.  
  85. # NLS nuisances.
  86. # These must not be set unconditionally because not all systems understand
  87. # e.g. LANG=C (notably SCO).
  88. if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
  89. if test "${LANG+set}"   = 'set' ; then LANG=C;   export LANG;   fi
  90.  
  91. rm -f conftest* confdefs.h
  92. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  93. echo > confdefs.h
  94. compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  95.  
  96. # A filename unique to this package, relative to the directory that
  97. # configure is in, which we can look for to find out if srcdir is correct.
  98. unique_file=groff/groff.cc
  99.  
  100. # Find the source files, if location was not specified.
  101. if test -z "$srcdir"; then
  102.   srcdirdefaulted=yes
  103.   # Try the directory containing this script, then `..'.
  104.   prog=$0
  105.   confdir=`echo $prog| sed 's|/$||' | sed 's|//|/|' | sed 's|/[^/]*$||'`
  106.   test "X$confdir" = "X$prog" && confdir=.
  107.   srcdir=$confdir
  108.   if test ! -r $srcdir/$unique_file; then
  109.     srcdir=..
  110.   fi
  111. fi
  112. if test ! -r $srcdir/$unique_file; then
  113.   if test x$srcdirdefaulted = xyes; then
  114.     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  115.   else
  116.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  117.   fi
  118.   exit 1
  119. fi
  120. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  121. # But we can't avoid them for `..', to make subdirectories work.
  122. case $srcdir in
  123.   .|/*|~*) ;;
  124.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  125. esac
  126.  
  127.  
  128. # Save the original args to write them into config.status later.
  129. configure_args="$*"
  130.  
  131. # Hack so we don't have to remember to configure with 
  132. # -prefix=/gnu all the time.
  133. prefix=/gnu
  134. if test -z "$prefix"
  135. then
  136.   echo checking for grops to derive installation directory prefix
  137.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="$IFS:"
  138.   for dir in $PATH; do
  139.     test -z "$dir" && dir=.
  140.     if test $dir != . && test -f $dir/grops; then
  141.       # Not all systems have dirname.
  142.       prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
  143.       break
  144.     fi
  145.   done
  146.   IFS="$saveifs"
  147.   echo "    chose installation directory prefix ${prefix}"
  148. fi
  149. if test -z "$prefix"
  150. then
  151.   echo checking for gcc to derive installation directory prefix
  152.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="$IFS:"
  153.   for dir in $PATH; do
  154.     test -z "$dir" && dir=.
  155.     if test $dir != . && test -f $dir/gcc; then
  156.       # Not all systems have dirname.
  157.       prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
  158.       break
  159.     fi
  160.   done
  161.   IFS="$saveifs"
  162.   echo "    chose installation directory prefix ${prefix}"
  163. fi
  164.  
  165. if test -z "$CC"; then
  166.   # Extract the first word of `gcc', so it can be a program name with args.
  167.   set dummy gcc; word=$2
  168.   echo checking for $word
  169.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  170.   for dir in $PATH; do
  171.     test -z "$dir" && dir=.
  172.     if test -f $dir/$word; then
  173.       CC="gcc"
  174.       break
  175.     fi
  176.   done
  177.   IFS="$saveifs"
  178. fi
  179. test -z "$CC" && CC="cc"
  180. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  181.  
  182. # Find out if we are using GNU C, under whatever name.
  183. cat > conftest.c <<EOF
  184. #ifdef __GNUC__
  185.   yes
  186. #endif
  187. EOF
  188. ${CC-cc} -E conftest.c > conftest.out 2>&1
  189. if egrep yes conftest.out >/dev/null 2>&1; then
  190.   GCC=1 # For later tests.
  191. fi
  192. rm -f conftest*
  193.  
  194. cc_compile='$CCC conftest.cc -o conftest $CCLIBS $LIBS >/dev/null 2>&1'
  195.  
  196. if test -z "$CCC"; then
  197. # See whether the C compiler is also a C++ compiler.
  198. echo checking if C compiler is also a C++ compiler
  199. cat <<EOF > conftest.cc
  200. #ifdef __cplusplus
  201.   yes
  202. #endif
  203. EOF
  204. $CC -E conftest.cc >conftest.out 2>&1
  205. if egrep yes conftest.out >/dev/null 2>&1; then
  206.   CCC="$CC"
  207. fi
  208. fi
  209. if test -z "$CCC"; then
  210.   # Extract the first word of `g++', so it can be a program name with args.
  211.   set dummy g++; word=$2
  212.   echo checking for $word
  213.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  214.   for dir in $PATH; do
  215.     test -z "$dir" && dir=.
  216.     if test -f $dir/$word; then
  217.       CCC="g++"
  218.       break
  219.     fi
  220.   done
  221.   IFS="$saveifs"
  222. fi
  223.  
  224. test -n "$CCC" && test -n "$verbose" && echo "    setting CCC to $CCC"
  225.  
  226. if test -z "$CCC"; then
  227.   # Extract the first word of `CC', so it can be a program name with args.
  228.   set dummy CC; word=$2
  229.   echo checking for $word
  230.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  231.   for dir in $PATH; do
  232.     test -z "$dir" && dir=.
  233.     if test -f $dir/$word; then
  234.       CCC="CC"
  235.       break
  236.     fi
  237.   done
  238.   IFS="$saveifs"
  239. fi
  240.  
  241. test -n "$CCC" && test -n "$verbose" && echo "    setting CCC to $CCC"
  242.  
  243. if test -z "$CCC"; then
  244.   # Extract the first word of `cc++', so it can be a program name with args.
  245.   set dummy cc++; word=$2
  246.   echo checking for $word
  247.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  248.   for dir in $PATH; do
  249.     test -z "$dir" && dir=.
  250.     if test -f $dir/$word; then
  251.       CCC="cc++"
  252.       break
  253.     fi
  254.   done
  255.   IFS="$saveifs"
  256. fi
  257.  
  258. test -n "$CCC" && test -n "$verbose" && echo "    setting CCC to $CCC"
  259.  
  260. if test -z "$CCC"; then
  261. cat <<EOM
  262. This package requires a C++ compiler, but I couldn't find one.
  263. Set the environment variable CCC to the name of your C++ compiler.
  264. EOM
  265. rm -f conftest* core; exit 1
  266. fi
  267. echo checking that C++ compiler can compile very simple C++ program
  268. cat <<EOF > conftest.cc
  269.  
  270. int main() { return 0; }
  271.  
  272. EOF
  273. rm -f conftest
  274. eval $cc_compile
  275. if test -s conftest && (./conftest) 2>/dev/null; then
  276.   :
  277. else
  278.   cat <<EOM
  279. $CCC was unable successfully to compile a very simple C++ program
  280. (the C++ program was in a file with a suffix of .cc)
  281. EOM
  282. rm -f conftest* core; exit 1
  283.  
  284. fi
  285. rm -f conftest*
  286. echo checking that C++ static constructors and destructors are called
  287. cat <<EOF > conftest.cc
  288.  
  289. extern "C" {
  290.   void _exit(int);
  291. }
  292. int i;
  293. struct A {
  294.   char dummy;
  295.   A() { i = 1; }
  296.   ~A() { if (i == 1) _exit(0); }
  297. };
  298. A a;
  299. int main() { return 1; }
  300.  
  301. EOF
  302. rm -f conftest
  303. eval $cc_compile
  304. if test -s conftest && (./conftest) 2>/dev/null; then
  305.   :
  306. else
  307.   cat <<EOM
  308. $CCC is not installed correctly: static constructors and destructors do not work
  309. EOM
  310. rm -f conftest* core; exit 1
  311.  
  312. fi
  313. rm -f conftest*
  314. echo checking for C++ header files
  315. cat <<EOF >conftest.cc
  316. #include <stdio.h>
  317. int main() { return 0; } void t() { fopen(0, 0); }
  318. EOF
  319. if eval $cc_compile; then
  320.   :
  321. else
  322.   cat <<\EOF
  323. Your header files do not appear to support C++.
  324. I was unable to compile and link a simple C++ program that used a function
  325. declared in <stdio.h>.
  326. If you're using a version of gcc/g++ earlier than 2.5,
  327. you should install libg++.
  328. EOF
  329. rm -f conftest* core; exit 1
  330. fi
  331. rm -f conftest*
  332. if test -z "$PSPRINT"
  333. then
  334.     for p in lpr
  335. do
  336. if test -z "$LPR"; then
  337.   # Extract the first word of `$p', so it can be a program name with args.
  338.   set dummy $p; word=$2
  339.   echo checking for $word
  340.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  341.   for dir in $PATH; do
  342.     test -z "$dir" && dir=.
  343.     if test -f $dir/$word; then
  344.       LPR="$p"
  345.       break
  346.     fi
  347.   done
  348.   IFS="$saveifs"
  349. fi
  350.  
  351. test -n "$LPR" && test -n "$verbose" && echo "    setting LPR to $LPR"
  352.  
  353. test -n "$LPR" && break
  354. done
  355.  
  356.     for p in lp
  357. do
  358. if test -z "$LP"; then
  359.   # Extract the first word of `$p', so it can be a program name with args.
  360.   set dummy $p; word=$2
  361.   echo checking for $word
  362.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  363.   for dir in $PATH; do
  364.     test -z "$dir" && dir=.
  365.     if test -f $dir/$word; then
  366.       LP="$p"
  367.       break
  368.     fi
  369.   done
  370.   IFS="$saveifs"
  371. fi
  372.  
  373. test -n "$LP" && test -n "$verbose" && echo "    setting LP to $LP"
  374.  
  375. test -n "$LP" && break
  376. done
  377.  
  378.     if test -n "$LPR" && test -n "$LP"
  379.     then
  380.         # HP-UX provides an lpr command that emulates lpr using lp,
  381.         # but it doesn't have lpq; in this case we want to use lp
  382.         # rather than lpr.
  383.         for p in lpq
  384. do
  385. if test -z "$LPQ"; then
  386.   # Extract the first word of `$p', so it can be a program name with args.
  387.   set dummy $p; word=$2
  388.   echo checking for $word
  389.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  390.   for dir in $PATH; do
  391.     test -z "$dir" && dir=.
  392.     if test -f $dir/$word; then
  393.       LPQ="$p"
  394.       break
  395.     fi
  396.   done
  397.   IFS="$saveifs"
  398. fi
  399.  
  400. test -n "$LPQ" && test -n "$verbose" && echo "    setting LPQ to $LPQ"
  401.  
  402. test -n "$LPQ" && break
  403. done
  404.  
  405.         test -n "$LPQ" || LPR=
  406.     fi
  407.     if test -n "$LPR"
  408.     then
  409.         PSPRINT="$LPR"
  410.     elif test -n "$LP"
  411.     then
  412.         PSPRINT="$LP"
  413.     fi
  414. fi
  415.  
  416. # Figure out DVIPRINT from PSPRINT.
  417. if test -n "$PSPRINT" && test -z "$DVIPRINT"
  418. then
  419.     if test "X$PSPRINT" = "Xlpr"
  420.     then
  421.         DVIPRINT="lpr -d"
  422.     else
  423.         DVIPRINT="$PSPRINT"
  424.     fi
  425. fi
  426.  
  427. echo checking for perl
  428. PERLPATH=
  429. saveifs="$IFS"; IFS="${IFS}:"
  430. for dir in $PATH; do
  431.   test -z "$dir" && dir=.
  432.   if test -f $dir/perl; then
  433.      PERLPATH="$dir/perl"
  434.      break
  435.   fi
  436. done
  437. IFS="$saveifs"
  438.  
  439. if test -z "$YACC"; then
  440.   # Extract the first word of `byacc', so it can be a program name with args.
  441.   set dummy byacc; word=$2
  442.   echo checking for $word
  443.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  444.   for dir in $PATH; do
  445.     test -z "$dir" && dir=.
  446.     if test -f $dir/$word; then
  447.       YACC="byacc"
  448.       break
  449.     fi
  450.   done
  451.   IFS="$saveifs"
  452. fi
  453.  
  454. test -n "$YACC" && test -n "$verbose" && echo "    setting YACC to $YACC"
  455.  
  456. if test -z "$YACC"; then
  457.   # Extract the first word of `bison', so it can be a program name with args.
  458.   set dummy bison; word=$2
  459.   echo checking for $word
  460.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  461.   for dir in $PATH; do
  462.     test -z "$dir" && dir=.
  463.     if test -f $dir/$word; then
  464.       YACC="bison -y"
  465.       break
  466.     fi
  467.   done
  468.   IFS="$saveifs"
  469. fi
  470. test -z "$YACC" && YACC="yacc"
  471. test -n "$YACC" && test -n "$verbose" && echo "    setting YACC to $YACC"
  472.  
  473.  
  474. if test -z "$RANLIB"; then
  475.   # Extract the first word of `ranlib', so it can be a program name with args.
  476.   set dummy ranlib; word=$2
  477.   echo checking for $word
  478.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  479.   for dir in $PATH; do
  480.     test -z "$dir" && dir=.
  481.     if test -f $dir/$word; then
  482.       RANLIB="ranlib"
  483.       break
  484.     fi
  485.   done
  486.   IFS="$saveifs"
  487. fi
  488. test -z "$RANLIB" && RANLIB=":"
  489. test -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  490.  
  491. # Make sure to not get the incompatible SysV /etc/install and
  492. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  493. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  494. # or the AFS install, which mishandles nonexistent args, or
  495. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  496. # `staff'.  On most BSDish systems install is in /usr/bin, not /usr/ucb
  497. # anyway.  Sigh.
  498. if test "z${INSTALL}" = "z" ; then
  499.   echo checking for install
  500.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  501.   for dir in $PATH; do
  502.     test -z "$dir" && dir=.
  503.     case $dir in
  504.     /etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  505.     *)
  506.       if test -f $dir/installbsd; then
  507.     INSTALL="$dir/installbsd -c" # OSF1
  508.     INSTALL_PROGRAM='$(INSTALL)'
  509.     INSTALL_DATA='$(INSTALL) -m 644'
  510.     break
  511.       fi
  512.       if test -f $dir/install; then
  513.     if grep dspmsg $dir/install >/dev/null 2>&1; then
  514.       : # AIX
  515.     else
  516.       INSTALL="$dir/install -c"
  517.       INSTALL_PROGRAM='$(INSTALL)'
  518.       INSTALL_DATA='$(INSTALL) -m 644'
  519.       break
  520.     fi
  521.       fi
  522.       ;;
  523.     esac
  524.   done
  525.   IFS="$saveifs"
  526. fi
  527. INSTALL=${INSTALL-cp}
  528. test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  529. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  530. test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  531. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  532. test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  533.  
  534. echo checking for ln -s
  535. rm -f conftestdata
  536. if false 2>/dev/null
  537. then
  538.   rm -f conftestdata
  539.   LN_S="ln -s"
  540. else
  541.   LN_S=ln
  542. fi
  543.  
  544.  
  545. echo checking for etags C++ option
  546. for flag in p C
  547. do
  548.     test -z "$ETAGSCCFLAG" || break
  549.     >conftest.c
  550.     (etags -$flag -o /dev/null conftest.c >/dev/null 2>&1) 2>/dev/null &&
  551.         ETAGSCCFLAG="-$flag"
  552.     rm -f conftest.c
  553. done
  554.  
  555. echo 'checking for csh # hack'
  556. cat <<EOF >conftest.sh
  557. #!/bin/sh
  558. true || exit 0
  559. export PATH || exit 0
  560. exit 1
  561. EOF
  562. chmod +x conftest.sh
  563. if echo ./conftest.sh | (csh >/dev/null 2>&1) >/dev/null 2>&1
  564. then
  565.     :; SH_SCRIPT_SED_CMD='1s/.*/:/'
  566. else
  567.     :; SH_SCRIPT_SED_CMD=''
  568. fi
  569. rm -f conftest.sh
  570.  
  571.  
  572. for hdr in unistd.h dirent.h limits.h sys/dir.h stdlib.h
  573. do
  574. trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  575. echo checking for ${hdr}
  576. echo checking how to run the C preprocessor
  577. if test -z "$CPP"; then
  578.   # This must be in double quotes, not single quotes, because CPP may get
  579.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  580.   # make.  It must be expanded now.
  581.   CPP="${CC-cc} -E"
  582.   cat > conftest.c <<EOF
  583. #include "confdefs.h"
  584. #include <stdio.h>
  585. Syntax Error
  586. EOF
  587. err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  588. if test -z "$err"; then
  589.   :
  590. else
  591.   rm -rf conftest*
  592.   CPP=/lib/cpp
  593. fi
  594. rm -f conftest*
  595. fi
  596. test ".${verbose}" != "." && echo "    setting CPP to $CPP"
  597.  
  598. cat > conftest.c <<EOF
  599. #include "confdefs.h"
  600. #include <${hdr}>
  601. EOF
  602. err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  603. if test -z "$err"; then
  604.   rm -rf conftest*
  605.   
  606. {
  607. test -n "$verbose" && \
  608. echo "    defining ${trhdr}"
  609. echo "#define" ${trhdr} 1 >> confdefs.h
  610. DEFS="$DEFS -D${trhdr}=1"
  611. }
  612.  
  613.  
  614. fi
  615. rm -f conftest*
  616. done
  617.  
  618. echo 'checking for ISC 3.x or 4.x'
  619. if true
  620. then
  621.     
  622. {
  623. test -n "$verbose" && \
  624. echo "    defining _SYSV3"
  625. echo "#define" _SYSV3 1 >> confdefs.h
  626. DEFS="$DEFS -D_SYSV3=1"
  627. }
  628.  
  629. fi
  630. echo checking for whether -D_POSIX_SOURCE is necessary
  631. cat <<EOF >conftest.cc
  632. #include <stdio.h>
  633. int main() { return 0; } void t() { (void)fileno(stdin); }
  634. EOF
  635. if eval $cc_compile; then
  636.   :
  637. else
  638.   
  639. {
  640. test -n "$verbose" && \
  641. echo "    defining _POSIX_SOURCE"
  642. echo "#define" _POSIX_SOURCE 1 >> confdefs.h
  643. DEFS="$DEFS -D_POSIX_SOURCE=1"
  644. }
  645.  
  646. fi
  647. rm -f conftest*
  648. echo checking for 'C++ <limits.h>'
  649. cat <<EOF >conftest.cc
  650. #include <limits.h>
  651. int main() { return 0; } void t() { int x = INT_MIN; int y = INT_MAX; int z = UCHAR_MAX; }
  652. EOF
  653. if eval $cc_compile; then
  654.   
  655. {
  656. test -n "$verbose" && \
  657. echo "    defining HAVE_CC_LIMITS_H"
  658. echo "#define" HAVE_CC_LIMITS_H 1 >> confdefs.h
  659. DEFS="$DEFS -DHAVE_CC_LIMITS_H=1"
  660. }
  661.  
  662. fi
  663. rm -f conftest*
  664. echo checking for 'C++ <osfcn.h>'
  665. cat <<EOF >conftest.cc
  666. #include <osfcn.h>
  667. int main() { return 0; } void t() { read(0, 0, 0); open(0, 0); }
  668. EOF
  669. if eval $cc_compile; then
  670.   
  671. {
  672. test -n "$verbose" && \
  673. echo "    defining HAVE_CC_OSFCN_H"
  674. echo "#define" HAVE_CC_OSFCN_H 1 >> confdefs.h
  675. DEFS="$DEFS -DHAVE_CC_OSFCN_H=1"
  676. }
  677.  
  678. fi
  679. rm -f conftest*
  680. echo checking for declaration of getopt in stdlib.h
  681. cat <<EOF >conftest.cc
  682. #include <stdlib.h>
  683. extern "C" { void getopt(int); }
  684. int main() { return 0; } void t() {  }
  685. EOF
  686. if eval $cc_compile; then
  687.   :
  688. else
  689.   
  690. {
  691. test -n "$verbose" && \
  692. echo "    defining STDLIB_H_DECLARES_GETOPT"
  693. echo "#define" STDLIB_H_DECLARES_GETOPT 1 >> confdefs.h
  694. DEFS="$DEFS -DSTDLIB_H_DECLARES_GETOPT=1"
  695. }
  696.  
  697. fi
  698. rm -f conftest*
  699. echo checking for declaration of getopt in unistd.h
  700. cat <<EOF >conftest.cc
  701. #include <sys/types.h>
  702. #include <unistd.h>
  703. extern "C" { void getopt(int); }
  704. int main() { return 0; } void t() {  }
  705. EOF
  706. if eval $cc_compile; then
  707.   :
  708. else
  709.   
  710. {
  711. test -n "$verbose" && \
  712. echo "    defining UNISTD_H_DECLARES_GETOPT"
  713. echo "#define" UNISTD_H_DECLARES_GETOPT 1 >> confdefs.h
  714. DEFS="$DEFS -DUNISTD_H_DECLARES_GETOPT=1"
  715. }
  716.  
  717. fi
  718. rm -f conftest*
  719.  
  720. echo checking for declaration of putenv
  721. cat <<EOF >conftest.cc
  722. #include <stdlib.h>
  723. extern "C" { void putenv(int); }
  724. int main() { return 0; } void t() {  }
  725. EOF
  726. if eval $cc_compile; then
  727.   :
  728. else
  729.   
  730. {
  731. test -n "$verbose" && \
  732. echo "    defining STDLIB_H_DECLARES_PUTENV"
  733. echo "#define" STDLIB_H_DECLARES_PUTENV 1 >> confdefs.h
  734. DEFS="$DEFS -DSTDLIB_H_DECLARES_PUTENV=1"
  735. }
  736.  
  737. fi
  738. rm -f conftest*
  739. echo checking for declaration of popen
  740. cat <<EOF >conftest.cc
  741. #include <stdio.h>
  742. extern "C" { void popen(int); }
  743. int main() { return 0; } void t() {  }
  744. EOF
  745. if eval $cc_compile; then
  746.   :
  747. else
  748.   
  749. {
  750. test -n "$verbose" && \
  751. echo "    defining STDIO_H_DECLARES_POPEN"
  752. echo "#define" STDIO_H_DECLARES_POPEN 1 >> confdefs.h
  753. DEFS="$DEFS -DSTDIO_H_DECLARES_POPEN=1"
  754. }
  755.  
  756. fi
  757. rm -f conftest*
  758. echo checking for declaration of pclose
  759. cat <<EOF >conftest.cc
  760. #include <stdio.h>
  761. extern "C" { void pclose(int); }
  762. int main() { return 0; } void t() {  }
  763. EOF
  764. if eval $cc_compile; then
  765.   :
  766. else
  767.   
  768. {
  769. test -n "$verbose" && \
  770. echo "    defining STDIO_H_DECLARES_PCLOSE"
  771. echo "#define" STDIO_H_DECLARES_PCLOSE 1 >> confdefs.h
  772. DEFS="$DEFS -DSTDIO_H_DECLARES_PCLOSE=1"
  773. }
  774.  
  775. fi
  776. rm -f conftest*
  777. echo checking for time_t
  778. cat <<EOF >conftest.cc
  779. #include <time.h>
  780. int main() { return 0; } void t() { time_t t = time(0); struct tm *p = localtime(&t); }
  781. EOF
  782. if eval $cc_compile; then
  783.   :
  784. else
  785.   
  786. {
  787. test -n "$verbose" && \
  788. echo "    defining LONG_FOR_TIME_T"
  789. echo "#define" LONG_FOR_TIME_T 1 >> confdefs.h
  790. DEFS="$DEFS -DLONG_FOR_TIME_T=1"
  791. }
  792.  
  793. fi
  794. rm -f conftest*
  795. echo checking for return type of signal handlers
  796. cat > conftest.c <<EOF
  797. #include "confdefs.h"
  798. #include <sys/types.h>
  799. #include <signal.h>
  800. #ifdef signal
  801. #undef signal
  802. #endif
  803. extern void (*signal ()) ();
  804. int main() { exit(0); }
  805. int t() { int i; }
  806. EOF
  807. if eval $compile; then
  808.   rm -rf conftest*
  809.   
  810. {
  811. test -n "$verbose" && \
  812. echo "    defining" RETSIGTYPE to be void
  813. echo "#define" RETSIGTYPE void >> confdefs.h
  814. DEFS="$DEFS -DRETSIGTYPE=void"
  815. }
  816.  
  817.  
  818. else
  819.   rm -rf conftest*
  820.   
  821. {
  822. test -n "$verbose" && \
  823. echo "    defining" RETSIGTYPE to be int
  824. echo "#define" RETSIGTYPE int >> confdefs.h
  825. DEFS="$DEFS -DRETSIGTYPE=int"
  826. }
  827.  
  828. fi
  829. rm -f conftest*
  830.  
  831.  
  832. echo checking for struct exception
  833. cat > conftest.c <<EOF
  834. #include "confdefs.h"
  835. #include <math.h>
  836. int main() { exit(0); }
  837. int t() { struct exception e; }
  838. EOF
  839. if eval $compile; then
  840.   rm -rf conftest*
  841.   
  842. {
  843. test -n "$verbose" && \
  844. echo "    defining HAVE_STRUCT_EXCEPTION"
  845. echo "#define" HAVE_STRUCT_EXCEPTION 1 >> confdefs.h
  846. DEFS="$DEFS -DHAVE_STRUCT_EXCEPTION=1"
  847. }
  848.  
  849.  
  850. fi
  851. rm -f conftest*
  852.  
  853. echo checking for mmap
  854. cat > conftest.c <<EOF
  855. #include "confdefs.h"
  856. #include <sys/types.h>
  857. #include <sys/mman.h>
  858. int main() { exit(0); }
  859. int t() { char *p = mmap(0, 0, PROT_READ, MAP_PRIVATE, 0, 0); munmap(p, 0); }
  860. EOF
  861. if eval $compile; then
  862.   rm -rf conftest*
  863.   
  864. {
  865. test -n "$verbose" && \
  866. echo "    defining HAVE_MMAP"
  867. echo "#define" HAVE_MMAP 1 >> confdefs.h
  868. DEFS="$DEFS -DHAVE_MMAP=1"
  869. }
  870.  
  871.  
  872. fi
  873. rm -f conftest*
  874.  
  875. echo checking for pid_t in sys/types.h
  876. echo '#include "confdefs.h"
  877. #include <sys/types.h>' > conftest.c
  878. eval "$CPP conftest.c > conftest.out 2>&1"
  879. if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  880.   :
  881. else
  882.   rm -rf conftest*
  883.   
  884. {
  885. test -n "$verbose" && \
  886. echo "    defining" pid_t to be int
  887. echo "#define" pid_t int >> confdefs.h
  888. DEFS="$DEFS -Dpid_t=int"
  889. }
  890.  
  891. fi
  892. rm -f conftest*
  893.  
  894. echo checking for vfork.h
  895. cat > conftest.c <<EOF
  896. #include "confdefs.h"
  897. #include <vfork.h>
  898. EOF
  899. err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  900. if test -z "$err"; then
  901.   rm -rf conftest*
  902.   
  903. {
  904. test -n "$verbose" && \
  905. echo "    defining HAVE_VFORK_H"
  906. echo "#define" HAVE_VFORK_H 1 >> confdefs.h
  907. DEFS="$DEFS -DHAVE_VFORK_H=1"
  908. }
  909.  
  910.  
  911. fi
  912. rm -f conftest*
  913.  
  914. echo checking for working vfork
  915.  
  916. cat > conftest.c <<EOF
  917. #include "confdefs.h"
  918. /* Thanks to Paul Eggert for this test.  */
  919. #include <stdio.h>
  920. #include <sys/types.h>
  921. #include <sys/stat.h>
  922. #include <signal.h>
  923. #ifdef HAVE_UNISTD_H
  924. #include <unistd.h>
  925. #endif
  926. #ifdef HAVE_VFORK_H
  927. #include <vfork.h>
  928. #endif
  929. static int signalled;
  930. static RETSIGTYPE catch (s) int s; { signalled = 1; }
  931. main() {
  932.   pid_t parent = getpid ();
  933.   pid_t child;
  934.  
  935.   signal (SIGINT, catch);
  936.  
  937.   child = vfork ();
  938.  
  939.   if (child == 0) {
  940.     /* On sparc systems, changes by the child to local and incoming
  941.        argument registers are propagated back to the parent.
  942.        The compiler is told about this with #include <vfork.h>,
  943.        but some compilers (e.g. gcc -O) don't grok <vfork.h>.
  944.        Test for this by using lots of local variables, at least
  945.        as many local variables as main has allocated so far
  946.        including compiler temporaries.  4 locals are enough for
  947.        gcc 1.40.3 on a sparc, but we use 8 to be safe.
  948.        A buggy compiler should reuse the register of parent
  949.        for one of the local variables, since it will think that
  950.        parent can't possibly be used any more in this routine.
  951.        Assigning to the local variable will thus munge parent
  952.        in the parent process.  */
  953.     pid_t
  954.       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  955.       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  956.     /* Convince the compiler that p..p7 are live; otherwise, it might
  957.        use the same hardware register for all 8 local variables.  */
  958.     if (p != p1 || p != p2 || p != p3 || p != p4
  959.     || p != p5 || p != p6 || p != p7)
  960.       _exit(1);
  961.  
  962.     /* On some systems (e.g. SunOS 5.2), if the parent is catching
  963.        a signal, the child ignores the signal before execing,
  964.        and the parent later receives that signal, the parent dumps core.
  965.        Test for this by ignoring SIGINT in the child.  */
  966.     signal (SIGINT, SIG_IGN);
  967.  
  968.     /* On some systems (e.g. IRIX 3.3),
  969.        vfork doesn't separate parent from child file descriptors.
  970.        If the child closes a descriptor before it execs or exits,
  971.        this munges the parent's descriptor as well.
  972.        Test for this by closing stdout in the child.  */
  973.     _exit(close(fileno(stdout)) != 0);
  974.   } else {
  975.     int status;
  976.     struct stat st;
  977.  
  978.     while (wait(&status) != child)
  979.       ;
  980.     exit(
  981.      /* Was there some problem with vforking?  */
  982.      child < 0
  983.  
  984.      /* Did the child fail?  (This shouldn't happen.)  */
  985.      || status
  986.  
  987.      /* Did the vfork/compiler bug occur?  */
  988.      || parent != getpid()
  989.  
  990.      /* Did the signal handling bug occur?  */
  991.      || kill(parent, SIGINT) != 0
  992.      || signalled != 1
  993.  
  994.      /* Did the file descriptor bug occur?  */
  995.      || fstat(fileno(stdout), &st) != 0
  996.      );
  997.   }
  998. }
  999. EOF
  1000. eval $compile
  1001. if true; then
  1002.   :
  1003. else
  1004.   
  1005. {
  1006. test -n "$verbose" && \
  1007. echo "    defining" vfork to be fork
  1008. echo "#define" vfork fork >> confdefs.h
  1009. DEFS="$DEFS -Dvfork=fork"
  1010. }
  1011.  
  1012. fi
  1013. rm -fr conftest*
  1014.  
  1015. saved_libs="$LIBS"
  1016. LIBS="$LIBS -lm"
  1017. for func in fmod strtol getcwd strerror putenv
  1018. do
  1019. echo checking for ${func}
  1020. cat > conftest.c <<EOF
  1021. #include "confdefs.h"
  1022. #include <ctype.h>
  1023. int main() { exit(0); }
  1024. int t() { 
  1025. /* The GNU C library defines this for functions which it implements
  1026.     to always fail with ENOSYS.  Some functions are actually named
  1027.     something starting with __ and the normal name is an alias.  */
  1028. #if defined (__stub_${func}) || defined (__stub___${func})
  1029. choke me
  1030. #else
  1031. /* Override any gcc2 internal prototype to avoid an error.  */
  1032. extern char ${func}(); ${func}();
  1033. #endif
  1034.  }
  1035. EOF
  1036. if eval $compile; then
  1037.   :
  1038. else
  1039.   rm -rf conftest*
  1040.   LIBOBJS="$LIBOBJS ${func}.o"
  1041. test -n "$verbose" && echo "    using ${func}.o instead"
  1042. fi
  1043. rm -f conftest*
  1044.  
  1045. done
  1046.  
  1047. LIBS="$saved_libs"
  1048. for func in rename mkstemp
  1049. do
  1050. trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'`
  1051. echo checking for ${func}
  1052. cat > conftest.c <<EOF
  1053. #include "confdefs.h"
  1054. #include <ctype.h>
  1055. int main() { exit(0); }
  1056. int t() { 
  1057. /* The GNU C library defines this for functions which it implements
  1058.     to always fail with ENOSYS.  Some functions are actually named
  1059.     something starting with __ and the normal name is an alias.  */
  1060. #if defined (__stub_${func}) || defined (__stub___${func})
  1061. choke me
  1062. #else
  1063. /* Override any gcc2 internal prototype to avoid an error.  */
  1064. extern char ${func}(); ${func}();
  1065. #endif
  1066.  }
  1067. EOF
  1068. if eval $compile; then
  1069.   rm -rf conftest*
  1070.   {
  1071. test -n "$verbose" && \
  1072. echo "    defining ${trfunc}"
  1073. echo "#define" ${trfunc} 1 >> confdefs.h
  1074. DEFS="$DEFS -D${trfunc}=1"
  1075. }
  1076.  
  1077.  
  1078. fi
  1079. rm -f conftest*
  1080. done
  1081.  
  1082. echo checking for sys_siglist
  1083. cat > conftest.c <<EOF
  1084. #include "confdefs.h"
  1085.  
  1086. int main() { exit(0); }
  1087. int t() { extern char *sys_siglist[]; sys_siglist[0] = 0; }
  1088. EOF
  1089. if eval $compile; then
  1090.   rm -rf conftest*
  1091.   
  1092. {
  1093. test -n "$verbose" && \
  1094. echo "    defining HAVE_SYS_SIGLIST"
  1095. echo "#define" HAVE_SYS_SIGLIST 1 >> confdefs.h
  1096. DEFS="$DEFS -DHAVE_SYS_SIGLIST=1"
  1097. }
  1098.  
  1099.  
  1100. fi
  1101. rm -f conftest*
  1102.  
  1103. echo checking for gcc/g++ delete bug
  1104. cat <<EOF > conftest.cc
  1105.  
  1106. #include <stdlib.h>
  1107. #include <stddef.h>
  1108.  
  1109. int testit = 0;
  1110.  
  1111. int main()
  1112. {
  1113.   testit = 1;
  1114.   int *p = new int;
  1115.   delete p;
  1116.   testit = 0;
  1117.   return 1;
  1118. }
  1119.  
  1120. static unsigned dummy[3];
  1121.  
  1122. void *operator new(size_t n)
  1123. {
  1124.   if (testit) {
  1125.     dummy[1] = -(unsigned)(dummy + 2);
  1126.     return dummy + 2;
  1127.   }
  1128.   else
  1129.     return (void *)malloc(n);
  1130. }
  1131.  
  1132. void operator delete(void *p)
  1133. {
  1134.   if (testit) {
  1135.     if (p == dummy)
  1136.       exit(0);
  1137.   }
  1138.   else
  1139.     free(p);
  1140. }
  1141.  
  1142. EOF
  1143. rm -f conftest
  1144. eval $cc_compile
  1145. if test -s conftest && (./conftest) 2>/dev/null; then
  1146.   
  1147. {
  1148. test -n "$verbose" && \
  1149. echo "    defining COOKIE_BUG"
  1150. echo "#define" COOKIE_BUG 1 >> confdefs.h
  1151. DEFS="$DEFS -DCOOKIE_BUG=1"
  1152. }
  1153.  
  1154. fi
  1155. rm -f conftest*
  1156. echo checking for cfront ANSI C INT_MIN bug
  1157. cat <<EOF > conftest.cc
  1158. #include <stdlib.h>
  1159. #ifdef HAVE_CC_LIMITS_H
  1160. #include <limits.h>
  1161. #else
  1162. #define INT_MAX 2147483647
  1163. #endif
  1164.  
  1165. #undef INT_MIN
  1166. #define INT_MIN (-INT_MAX-1)
  1167.  
  1168. int main()
  1169. {
  1170.   int z = 0;
  1171.   return INT_MIN < z;
  1172. }
  1173.  
  1174. EOF
  1175. rm -f conftest
  1176. eval $cc_compile
  1177. if test -s conftest && (./conftest) 2>/dev/null; then
  1178.   
  1179. {
  1180. test -n "$verbose" && \
  1181. echo "    defining CFRONT_ANSI_BUG"
  1182. echo "#define" CFRONT_ANSI_BUG 1 >> confdefs.h
  1183. DEFS="$DEFS -DCFRONT_ANSI_BUG=1"
  1184. }
  1185.  
  1186. fi
  1187. rm -f conftest*
  1188. echo checking for new array delete syntax
  1189. cat <<EOF >conftest.cc
  1190.  
  1191. int main() { return 0; } void t() { char *p = new char[5]; delete [] p; }
  1192. EOF
  1193. if eval $cc_compile; then
  1194.   :
  1195. else
  1196.   
  1197. {
  1198. test -n "$verbose" && \
  1199. echo "    defining ARRAY_DELETE_NEEDS_SIZE"
  1200. echo "#define" ARRAY_DELETE_NEEDS_SIZE 1 >> confdefs.h
  1201. DEFS="$DEFS -DARRAY_DELETE_NEEDS_SIZE=1"
  1202. }
  1203.  
  1204. fi
  1205. rm -f conftest*
  1206. echo checking for traditional preprocessor
  1207. cat <<EOF >conftest.cc
  1208. #define name2(a,b) a/**/b
  1209. int main() { return 0; } void t() { int name2(foo,bar); }
  1210. EOF
  1211. if eval $cc_compile; then
  1212.   
  1213. {
  1214. test -n "$verbose" && \
  1215. echo "    defining TRADITIONAL_CPP"
  1216. echo "#define" TRADITIONAL_CPP 1 >> confdefs.h
  1217. DEFS="$DEFS -DTRADITIONAL_CPP=1"
  1218. }
  1219.  
  1220. fi
  1221. rm -f conftest*
  1222. echo checking for w_coredump
  1223. cat > conftest.c <<EOF
  1224. #include "confdefs.h"
  1225.  
  1226. #include <sys/types.h>
  1227. #include <sys/wait.h>
  1228. main()
  1229. {
  1230. #ifdef WCOREFLAG
  1231.   exit(1);
  1232. #else
  1233.   int i = 0;
  1234.   ((union wait *)&i)->w_coredump = 1;
  1235.   exit(i != 0200);
  1236. #endif
  1237. }
  1238.  
  1239. EOF
  1240. eval $compile
  1241. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1242.   
  1243. {
  1244. test -n "$verbose" && \
  1245. echo "    defining" WCOREFLAG to be 0200
  1246. echo "#define" WCOREFLAG 0200 >> confdefs.h
  1247. DEFS="$DEFS -DWCOREFLAG=0200"
  1248. }
  1249.  
  1250.  
  1251. fi
  1252. rm -fr conftest*
  1253. test -n "${BROKEN_SPOOLER_FLAGS}" || BROKEN_SPOOLER_FLAGS=7
  1254. echo using default value of ${BROKEN_SPOOLER_FLAGS} for grops -b option
  1255.  
  1256.  
  1257. if test -z "$PAGE" && test -r $prefix/lib/groff/font/devps/DESC
  1258. then
  1259.     if grep "^paperlength 841890" \
  1260.         $prefix/lib/groff/font/devps/DESC >/dev/null 2>&1
  1261.     then
  1262.         PAGE=A4
  1263.     else
  1264.         PAGE=letter
  1265.     fi
  1266. fi
  1267. if test -z "$PAGE"
  1268. then
  1269.     dom=`awk '($1 == "dom" || $1 == "search") { print $2; exit}' \
  1270.         /etc/resolv.conf 2>/dev/null`
  1271.  
  1272.     if test -z "$dom"
  1273.     then
  1274.         dom=`(domainname) 2>/dev/null | tr -d '+'`
  1275.         if test -z "$dom"
  1276.         then
  1277.             dom=`(hostname) 2>/dev/null | grep '\.'`
  1278.         fi
  1279.     fi
  1280.  
  1281.     # If the top-level domain is two letters and it's not `us' or `ca'
  1282.     # then they probably use A4 paper.
  1283.     case "$dom" in
  1284.     *.[Uu][Ss]|*.[Cc][Aa]) ;;
  1285.     *.[A-Za-z][A-Za-z]) PAGE=A4 ;;
  1286.     esac
  1287. fi
  1288. test -n "$PAGE" || PAGE=letter
  1289. echo guessing $PAGE size paper
  1290.  
  1291. # Set default prefixes.
  1292. if test -n "$prefix"; then
  1293.   test -z "$exec_prefix" && exec_prefix='${prefix}'
  1294.   prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  1295. fi
  1296. if test -n "$exec_prefix"; then
  1297.   prsub="$prsub
  1298. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  1299. fi
  1300. # Quote sed substitution magic chars in DEFS.
  1301. cat >conftest.def <<EOF
  1302. $DEFS
  1303. EOF
  1304. escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  1305. DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
  1306. rm -f conftest.def
  1307. # Substitute for predefined variables.
  1308.  
  1309. trap 'rm -f config.status; exit 1' 1 3 15
  1310. echo creating config.status
  1311. rm -f config.status
  1312. cat > config.status <<EOF
  1313. #!/bin/sh
  1314. # Generated automatically by configure.
  1315. # Run this file to recreate the current configuration.
  1316. # This directory was configured as follows,
  1317. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1318. #
  1319. # $0 $configure_args
  1320.  
  1321. for arg
  1322. do
  1323.   case "\$arg" in
  1324.     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1325.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args
  1326.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;;
  1327.     *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  1328.   esac
  1329. done
  1330.  
  1331. trap 'rm -f Makefile; exit 1' 1 3 15
  1332. CC='$CC'
  1333. CCLIBS='$CCLIBS'
  1334. CCC='$CCC'
  1335. LPR='$LPR'
  1336. LP='$LP'
  1337. LPQ='$LPQ'
  1338. PSPRINT='$PSPRINT'
  1339. DVIPRINT='$DVIPRINT'
  1340. PERLPATH='$PERLPATH'
  1341. YACC='$YACC'
  1342. RANLIB='$RANLIB'
  1343. INSTALL='$INSTALL'
  1344. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  1345. INSTALL_DATA='$INSTALL_DATA'
  1346. LN_S='$LN_S'
  1347. ETAGSCCFLAG='$ETAGSCCFLAG'
  1348. SH_SCRIPT_SED_CMD='$SH_SCRIPT_SED_CMD'
  1349. CPP='$CPP'
  1350. LIBOBJS='$LIBOBJS'
  1351. BROKEN_SPOOLER_FLAGS='$BROKEN_SPOOLER_FLAGS'
  1352. PAGE='$PAGE'
  1353. LIBS='$LIBS'
  1354. srcdir='$srcdir'
  1355. DEFS='$DEFS'
  1356. prefix='$prefix'
  1357. exec_prefix='$exec_prefix'
  1358. prsub='$prsub'
  1359. extrasub='$extrasub'
  1360. EOF
  1361. cat >> config.status <<\EOF
  1362.  
  1363. top_srcdir=$srcdir
  1364.  
  1365. CONFIG_FILES=${CONFIG_FILES-"Makefile"}
  1366. for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then
  1367.   srcdir=$top_srcdir
  1368.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1369.   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  1370.   if test "$dir" != "$file"; then
  1371.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  1372.     test ! -d $dir && mkdir $dir
  1373.   fi
  1374.   echo creating $file
  1375.   rm -f $file
  1376.   echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  1377.   sed -e "
  1378. $prsub
  1379. $extrasub
  1380. s%@CC@%$CC%g
  1381. s%@CCLIBS@%$CCLIBS%g
  1382. s%@CCC@%$CCC%g
  1383. s%@LPR@%$LPR%g
  1384. s%@LP@%$LP%g
  1385. s%@LPQ@%$LPQ%g
  1386. s%@PSPRINT@%$PSPRINT%g
  1387. s%@DVIPRINT@%$DVIPRINT%g
  1388. s%@PERLPATH@%$PERLPATH%g
  1389. s%@YACC@%$YACC%g
  1390. s%@RANLIB@%$RANLIB%g
  1391. s%@INSTALL@%$INSTALL%g
  1392. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1393. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1394. s%@LN_S@%$LN_S%g
  1395. s%@ETAGSCCFLAG@%$ETAGSCCFLAG%g
  1396. s%@SH_SCRIPT_SED_CMD@%$SH_SCRIPT_SED_CMD%g
  1397. s%@CPP@%$CPP%g
  1398. s%@LIBOBJS@%$LIBOBJS%g
  1399. s%@BROKEN_SPOOLER_FLAGS@%$BROKEN_SPOOLER_FLAGS%g
  1400. s%@PAGE@%$PAGE%g
  1401. s%@LIBS@%$LIBS%g
  1402. s%@srcdir@%$srcdir%g
  1403. s%@DEFS@%$DEFS%
  1404. " $top_srcdir/${file}.in >> $file
  1405. fi; done
  1406.  
  1407.  
  1408. exit 0
  1409. EOF
  1410. chmod +x config.status
  1411. ${CONFIG_SHELL-/bin/sh} config.status
  1412.  
  1413.