home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Networking / ncftp-2.4.2-MIHS / src / configure < prev    next >
Encoding:
Text File  |  1996-10-28  |  100.2 KB  |  3,840 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.10 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --disable-ncurses       do not try to find and use the ncurses library"
  16. ac_help="$ac_help
  17.   --disable-curses        do not try to find and use the curses library"
  18. ac_help="$ac_help
  19.   --disable-readline      do not try to find and use the readline library"
  20. ac_help="$ac_help
  21.   --disable-termnet       do not try to find and use the termnet library"
  22. ac_help="$ac_help
  23.   --disable-socks         do not try to find and use the socks library"
  24. ac_help="$ac_help
  25.   --disable-socks5         do not try to find and use the socks5 library"
  26. ac_help="$ac_help
  27.   --disable-shared-libc   do not try to find and use the shared std C lib"
  28. ac_help="$ac_help
  29.   --disable-extra-dirs    do not look for additional -L and -I dirs"
  30.  
  31. # Initialize some variables set by options.
  32. # The variables have the same names as the options, with
  33. # dashes changed to underlines.
  34. build=NONE
  35. cache_file=./config.cache
  36. exec_prefix=NONE
  37. host=NONE
  38. no_create=
  39. nonopt=NONE
  40. no_recursion=
  41. prefix=NONE
  42. program_prefix=NONE
  43. program_suffix=NONE
  44. program_transform_name=s,x,x,
  45. silent=
  46. site=
  47. srcdir=
  48. target=NONE
  49. verbose=
  50. x_includes=NONE
  51. x_libraries=NONE
  52. bindir='${exec_prefix}/bin'
  53. sbindir='${exec_prefix}/sbin'
  54. libexecdir='${exec_prefix}/libexec'
  55. datadir='${prefix}/share'
  56. sysconfdir='${prefix}/etc'
  57. sharedstatedir='${prefix}/com'
  58. localstatedir='${prefix}/var'
  59. libdir='${exec_prefix}/lib'
  60. includedir='${prefix}/include'
  61. oldincludedir='/usr/include'
  62. infodir='${prefix}/info'
  63. mandir='${prefix}/man'
  64.  
  65. # Initialize some other variables.
  66. subdirs=
  67. MFLAGS= MAKEFLAGS=
  68.  
  69. ac_prev=
  70. for ac_option
  71. do
  72.  
  73.   # If the previous option needs an argument, assign it.
  74.   if test -n "$ac_prev"; then
  75.     eval "$ac_prev=\$ac_option"
  76.     ac_prev=
  77.     continue
  78.   fi
  79.  
  80.   case "$ac_option" in
  81.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  82.   *) ac_optarg= ;;
  83.   esac
  84.  
  85.   # Accept the important Cygnus configure options, so we can diagnose typos.
  86.  
  87.   case "$ac_option" in
  88.  
  89.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  90.     ac_prev=bindir ;;
  91.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  92.     bindir="$ac_optarg" ;;
  93.  
  94.   -build | --build | --buil | --bui | --bu)
  95.     ac_prev=build ;;
  96.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  97.     build="$ac_optarg" ;;
  98.  
  99.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  100.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  101.     ac_prev=cache_file ;;
  102.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  103.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  104.     cache_file="$ac_optarg" ;;
  105.  
  106.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  107.     ac_prev=datadir ;;
  108.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  109.   | --da=*)
  110.     datadir="$ac_optarg" ;;
  111.  
  112.   -disable-* | --disable-*)
  113.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  114.     # Reject names that are not valid shell variable names.
  115.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  116.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  117.     fi
  118.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  119.     eval "enable_${ac_feature}=no" ;;
  120.  
  121.   -enable-* | --enable-*)
  122.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  123.     # Reject names that are not valid shell variable names.
  124.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  125.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  126.     fi
  127.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  128.     case "$ac_option" in
  129.       *=*) ;;
  130.       *) ac_optarg=yes ;;
  131.     esac
  132.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  133.  
  134.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  135.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  136.   | --exec | --exe | --ex)
  137.     ac_prev=exec_prefix ;;
  138.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  139.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  140.   | --exec=* | --exe=* | --ex=*)
  141.     exec_prefix="$ac_optarg" ;;
  142.  
  143.   -gas | --gas | --ga | --g)
  144.     # Obsolete; use --with-gas.
  145.     with_gas=yes ;;
  146.  
  147.   -help | --help | --hel | --he)
  148.     # Omit some internal or obsolete options to make the list less imposing.
  149.     # This message is too long to be a string in the A/UX 3.1 sh.
  150.     cat << EOF
  151. Usage: configure [options] [host]
  152. Options: [defaults in brackets after descriptions]
  153. Configuration:
  154.   --cache-file=FILE       cache test results in FILE
  155.   --help                  print this message
  156.   --no-create             do not create output files
  157.   --quiet, --silent       do not print \`checking...' messages
  158.   --version               print the version of autoconf that created configure
  159. Directory and file names:
  160.   --prefix=PREFIX         install architecture-independent files in PREFIX
  161.                           [$ac_default_prefix]
  162.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  163.                           [same as prefix]
  164.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  165.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  166.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  167.   --datadir=DIR           read-only architecture-independent data in DIR
  168.                           [PREFIX/share]
  169.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  170.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  171.                           [PREFIX/com]
  172.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  173.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  174.   --includedir=DIR        C header files in DIR [PREFIX/include]
  175.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  176.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  177.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  178.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  179.   --program-prefix=PREFIX prepend PREFIX to installed program names
  180.   --program-suffix=SUFFIX append SUFFIX to installed program names
  181.   --program-transform-name=PROGRAM
  182.                           run sed PROGRAM on installed program names
  183. EOF
  184.     cat << EOF
  185. Host type:
  186.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  187.   --host=HOST             configure for HOST [guessed]
  188.   --target=TARGET         configure for TARGET [TARGET=HOST]
  189. Features and packages:
  190.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  191.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  192.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  193.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  194.   --x-includes=DIR        X include files are in DIR
  195.   --x-libraries=DIR       X library files are in DIR
  196. EOF
  197.     if test -n "$ac_help"; then
  198.       echo "--enable and --with options recognized:$ac_help"
  199.     fi
  200.     exit 0 ;;
  201.  
  202.   -host | --host | --hos | --ho)
  203.     ac_prev=host ;;
  204.   -host=* | --host=* | --hos=* | --ho=*)
  205.     host="$ac_optarg" ;;
  206.  
  207.   -includedir | --includedir | --includedi | --included | --include \
  208.   | --includ | --inclu | --incl | --inc)
  209.     ac_prev=includedir ;;
  210.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  211.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  212.     includedir="$ac_optarg" ;;
  213.  
  214.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  215.     ac_prev=infodir ;;
  216.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  217.     infodir="$ac_optarg" ;;
  218.  
  219.   -libdir | --libdir | --libdi | --libd)
  220.     ac_prev=libdir ;;
  221.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  222.     libdir="$ac_optarg" ;;
  223.  
  224.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  225.   | --libexe | --libex | --libe)
  226.     ac_prev=libexecdir ;;
  227.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  228.   | --libexe=* | --libex=* | --libe=*)
  229.     libexecdir="$ac_optarg" ;;
  230.  
  231.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  232.   | --localstate | --localstat | --localsta | --localst \
  233.   | --locals | --local | --loca | --loc | --lo)
  234.     ac_prev=localstatedir ;;
  235.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  236.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  237.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  238.     localstatedir="$ac_optarg" ;;
  239.  
  240.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  241.     ac_prev=mandir ;;
  242.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  243.     mandir="$ac_optarg" ;;
  244.  
  245.   -nfp | --nfp | --nf)
  246.     # Obsolete; use --without-fp.
  247.     with_fp=no ;;
  248.  
  249.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  250.   | --no-cr | --no-c)
  251.     no_create=yes ;;
  252.  
  253.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  254.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  255.     no_recursion=yes ;;
  256.  
  257.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  258.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  259.   | --oldin | --oldi | --old | --ol | --o)
  260.     ac_prev=oldincludedir ;;
  261.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  262.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  263.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  264.     oldincludedir="$ac_optarg" ;;
  265.  
  266.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  267.     ac_prev=prefix ;;
  268.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  269.     prefix="$ac_optarg" ;;
  270.  
  271.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  272.   | --program-pre | --program-pr | --program-p)
  273.     ac_prev=program_prefix ;;
  274.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  275.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  276.     program_prefix="$ac_optarg" ;;
  277.  
  278.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  279.   | --program-suf | --program-su | --program-s)
  280.     ac_prev=program_suffix ;;
  281.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  282.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  283.     program_suffix="$ac_optarg" ;;
  284.  
  285.   -program-transform-name | --program-transform-name \
  286.   | --program-transform-nam | --program-transform-na \
  287.   | --program-transform-n | --program-transform- \
  288.   | --program-transform | --program-transfor \
  289.   | --program-transfo | --program-transf \
  290.   | --program-trans | --program-tran \
  291.   | --progr-tra | --program-tr | --program-t)
  292.     ac_prev=program_transform_name ;;
  293.   -program-transform-name=* | --program-transform-name=* \
  294.   | --program-transform-nam=* | --program-transform-na=* \
  295.   | --program-transform-n=* | --program-transform-=* \
  296.   | --program-transform=* | --program-transfor=* \
  297.   | --program-transfo=* | --program-transf=* \
  298.   | --program-trans=* | --program-tran=* \
  299.   | --progr-tra=* | --program-tr=* | --program-t=*)
  300.     program_transform_name="$ac_optarg" ;;
  301.  
  302.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  303.   | -silent | --silent | --silen | --sile | --sil)
  304.     silent=yes ;;
  305.  
  306.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  307.     ac_prev=sbindir ;;
  308.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  309.   | --sbi=* | --sb=*)
  310.     sbindir="$ac_optarg" ;;
  311.  
  312.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  313.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  314.   | --sharedst | --shareds | --shared | --share | --shar \
  315.   | --sha | --sh)
  316.     ac_prev=sharedstatedir ;;
  317.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  318.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  319.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  320.   | --sha=* | --sh=*)
  321.     sharedstatedir="$ac_optarg" ;;
  322.  
  323.   -site | --site | --sit)
  324.     ac_prev=site ;;
  325.   -site=* | --site=* | --sit=*)
  326.     site="$ac_optarg" ;;
  327.  
  328.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  329.     ac_prev=srcdir ;;
  330.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  331.     srcdir="$ac_optarg" ;;
  332.  
  333.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  334.   | --syscon | --sysco | --sysc | --sys | --sy)
  335.     ac_prev=sysconfdir ;;
  336.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  337.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  338.     sysconfdir="$ac_optarg" ;;
  339.  
  340.   -target | --target | --targe | --targ | --tar | --ta | --t)
  341.     ac_prev=target ;;
  342.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  343.     target="$ac_optarg" ;;
  344.  
  345.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  346.     verbose=yes ;;
  347.  
  348.   -version | --version | --versio | --versi | --vers)
  349.     echo "configure generated by autoconf version 2.10"
  350.     exit 0 ;;
  351.  
  352.   -with-* | --with-*)
  353.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  354.     # Reject names that are not valid shell variable names.
  355.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  356.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  357.     fi
  358.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  359.     case "$ac_option" in
  360.       *=*) ;;
  361.       *) ac_optarg=yes ;;
  362.     esac
  363.     eval "with_${ac_package}='$ac_optarg'" ;;
  364.  
  365.   -without-* | --without-*)
  366.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  367.     # Reject names that are not valid shell variable names.
  368.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  369.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  370.     fi
  371.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  372.     eval "with_${ac_package}=no" ;;
  373.  
  374.   --x)
  375.     # Obsolete; use --with-x.
  376.     with_x=yes ;;
  377.  
  378.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  379.   | --x-incl | --x-inc | --x-in | --x-i)
  380.     ac_prev=x_includes ;;
  381.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  382.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  383.     x_includes="$ac_optarg" ;;
  384.  
  385.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  386.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  387.     ac_prev=x_libraries ;;
  388.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  389.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  390.     x_libraries="$ac_optarg" ;;
  391.  
  392.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  393.     ;;
  394.  
  395.   *)
  396.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  397.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  398.     fi
  399.     if test "x$nonopt" != xNONE; then
  400.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  401.     fi
  402.     nonopt="$ac_option"
  403.     ;;
  404.  
  405.   esac
  406. done
  407.  
  408. if test -n "$ac_prev"; then
  409.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  410. fi
  411.  
  412. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  413.  
  414. # File descriptor usage:
  415. # 0 standard input
  416. # 1 file creation
  417. # 2 errors and warnings
  418. # 3 some systems may open it to /dev/tty
  419. # 4 used on the Kubota Titan
  420. # 6 checking for... messages and results
  421. # 5 compiler messages saved in config.log
  422. if test "$silent" = yes; then
  423.   exec 6>/dev/null
  424. else
  425.   exec 6>&1
  426. fi
  427. exec 5>./config.log
  428.  
  429. echo "\
  430. This file contains any messages produced by compilers while
  431. running configure, to aid debugging if configure makes a mistake.
  432. " 1>&5
  433.  
  434. # Strip out --no-create and --no-recursion so they do not pile up.
  435. # Also quote any args containing shell metacharacters.
  436. ac_configure_args=
  437. for ac_arg
  438. do
  439.   case "$ac_arg" in
  440.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  441.   | --no-cr | --no-c) ;;
  442.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  443.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  444.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  445.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  446.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  447.   esac
  448. done
  449.  
  450. # NLS nuisances.
  451. # Only set LANG and LC_ALL to C if already set.
  452. # These must not be set unconditionally because not all systems understand
  453. # e.g. LANG=C (notably SCO).
  454. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  455. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  456.  
  457. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  458. rm -rf conftest* confdefs.h
  459. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  460. echo > confdefs.h
  461.  
  462. # A filename unique to this package, relative to the directory that
  463. # configure is in, which we can look for to find out if srcdir is correct.
  464. ac_unique_file=FTP.c
  465.  
  466. # Find the source files, if location was not specified.
  467. if test -z "$srcdir"; then
  468.   ac_srcdir_defaulted=yes
  469.   # Try the directory containing this script, then its parent.
  470.   ac_prog=$0
  471.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  472.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  473.   srcdir=$ac_confdir
  474.   if test ! -r $srcdir/$ac_unique_file; then
  475.     srcdir=..
  476.   fi
  477. else
  478.   ac_srcdir_defaulted=no
  479. fi
  480. if test ! -r $srcdir/$ac_unique_file; then
  481.   if test "$ac_srcdir_defaulted" = yes; then
  482.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  483.   else
  484.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  485.   fi
  486. fi
  487. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  488.  
  489. # Prefer explicitly selected file to automatically selected ones.
  490. if test -z "$CONFIG_SITE"; then
  491.   if test "x$prefix" != xNONE; then
  492.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  493.   else
  494.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  495.   fi
  496. fi
  497. for ac_site_file in $CONFIG_SITE; do
  498.   if test -r "$ac_site_file"; then
  499.     echo "loading site script $ac_site_file"
  500.     . "$ac_site_file"
  501.   fi
  502. done
  503.  
  504. if test -r "$cache_file"; then
  505.   echo "loading cache $cache_file"
  506.   . $cache_file
  507. else
  508.   echo "creating cache $cache_file"
  509.   > $cache_file
  510. fi
  511.  
  512. ac_ext=c
  513. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  514. ac_cpp='$CPP $CPPFLAGS'
  515. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  516. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  517.  
  518. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  519.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  520.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  521.     ac_n= ac_c='
  522. ' ac_t='    '
  523.   else
  524.     ac_n=-n ac_c= ac_t=
  525.   fi
  526. else
  527.   ac_n= ac_c='\c' ac_t=
  528. fi
  529.  
  530.  
  531.  
  532.  
  533.  
  534. nc_cv_ncurses=yes
  535. nc_cv_curses=yes
  536. nc_cv_readline=yes
  537. nc_cv_termnet=no
  538. nc_cv_socks=no
  539. nc_cv_socks5=no
  540. nc_cv_shared_libc=no
  541. nc_cv_extra_dirs=yes
  542.  
  543. # Check whether --enable-ncurses or --disable-ncurses was given.
  544. if test "${enable_ncurses+set}" = set; then
  545.   enableval="$enable_ncurses"
  546.   nc_cv_ncurses=$enableval
  547. fi
  548.  
  549. # Check whether --enable-curses or --disable-curses was given.
  550. if test "${enable_curses+set}" = set; then
  551.   enableval="$enable_curses"
  552.   nc_cv_curses=$enableval
  553. fi
  554.  
  555. # Check whether --enable-readline or --disable-readline was given.
  556. if test "${enable_readline+set}" = set; then
  557.   enableval="$enable_readline"
  558.   nc_cv_readline=$enableval
  559. fi
  560.  
  561. # Check whether --enable-termnet or --disable-termnet was given.
  562. if test "${enable_termnet+set}" = set; then
  563.   enableval="$enable_termnet"
  564.   nc_cv_termnet=$enableval
  565. fi
  566.  
  567. # Check whether --enable-socks or --disable-socks was given.
  568. if test "${enable_socks+set}" = set; then
  569.   enableval="$enable_socks"
  570.   nc_cv_socks=$enableval
  571. fi
  572.  
  573. # Check whether --enable-socks5 or --disable-socks5 was given.
  574. if test "${enable_socks5+set}" = set; then
  575.   enableval="$enable_socks5"
  576.   nc_cv_socks5=$enableval
  577. fi
  578.  
  579. # Check whether --enable-shared-libc or --disable-shared-libc was given.
  580. if test "${enable_shared_libc+set}" = set; then
  581.   enableval="$enable_shared_libc"
  582.   nc_cv_shared_libc=$enableval
  583. fi
  584.  
  585. # Check whether --enable-extra-dirs or --disable-extra-dirs was given.
  586. if test "${enable_extra_dirs+set}" = set; then
  587.   enableval="$enable_extra_dirs"
  588.   nc_cv_extra_dirs=$enableval
  589. fi
  590.  
  591.  
  592. PATH="${prefix}/bin:${PATH}"
  593.  
  594. host=`uname -n 2>/dev/null | tr '[A-Z]' '[a-z]'`
  595. os=`uname -s 2>/dev/null | tr '[A-Z]' '[a-z]'`
  596. os_v=`uname -v 2>/dev/null`
  597. os_r=`uname -r 2>/dev/null`
  598.  
  599. PROGS=ncftp
  600. PROG1=ncftp
  601. PROG2=ncftp.static
  602. SLDFLAGS='-static'
  603. Z31=''
  604. Z32=''
  605.  
  606. case "$host" in
  607.     ibmf*|ibmn*)
  608.         if test -f /usr/gleason/.profile ; then
  609.             CC=cc
  610.             CFLAGS='-O2'
  611.             LDFLAGS='-s'
  612.             SLDFLAGS=''
  613.             PROGS=ncftp
  614.             PROG1=ncftp
  615.             PROG2=ncftp.static
  616.         fi
  617.         ;;
  618.  
  619.     aux8*)
  620.         if test -f /usr/gleason/.profile ; then
  621.             CC=cc
  622.             CFLAGS='-O'
  623.             LDFLAGS='-s'
  624.             SLDFLAGS=''
  625.             PROGS=ncftp
  626.             PROG1=ncftp
  627.             PROG2=ncftp.shared
  628.             os='sco3'
  629.         fi
  630.         ;;
  631.  
  632.     xena*)
  633.         if test -f /usr/gleason/.profile ; then
  634.             CC=cc
  635.             CFLAGS='-O2 -K pentium -w3'
  636.             LDFLAGS='-s'
  637.             SLDFLAGS='-Bstatic'
  638.             PROG1=ncftp.shared
  639.             PROG2=ncftp
  640.             PROGS=ncftp
  641.         fi
  642.         ;;
  643.  
  644.     hpi*)
  645.         if test -f /usr/gleason/.profile ; then
  646.             CC=cc
  647.             CFLAGS='-O -Ae'
  648.             LDFLAGS='-s'
  649.             SLDFLAGS='-Wl,-B,immediate'
  650.             PROG1=ncftp.shared
  651.             PROG2=ncftp
  652.             PROGS=ncftp
  653.         fi
  654.         ;;
  655.  
  656.     elwood*)
  657.         if test -f /var/home/mgleason/.profile ; then
  658.             CC=cc
  659.             CFLAGS='-O -g'
  660.             SLDFLAGS='-static'
  661.             LDFLAGS='-s'
  662.             PROG1=ncftp.shared
  663.             PROG2=ncftp
  664.             PROGS=ncftp
  665.         fi
  666.         ;;
  667.  
  668.     anvil*)
  669.         if test -f /usr/gleason/.profile ; then
  670.             CC=cc
  671.             CFLAGS='-O -g'
  672.             SLDFLAGS='-static'
  673.             LDFLAGS='-s'
  674.             PROG1=ncftp.shared
  675.             PROG2=ncftp
  676.             PROGS=ncftp
  677.         fi
  678.         ;;
  679.  
  680.     redwing*)
  681.         if test -f /home/gleason/.profile ; then
  682.             CC=cc
  683.             CFLAGS='-O2 -W -Wall -Wimplicit -Wstrict-prototypes -Wmissing-prototypes -Wshadow'
  684.             LDFLAGS='-s'
  685.             SLDFLAGS='-static'
  686.             PROG1=ncftp
  687.             PROG2=ncftp.static
  688.             PROGS='ncftp ncftp.static'
  689.             Z31='    -@mv $(TGZFILE) newbin/'
  690.             Z32='    -@mv $(DTGZFILE) newbin/'
  691.         fi
  692.         ;;
  693. esac
  694.  
  695. case "$os" in
  696.     aix) OS=aix${os_v}.${os_r} ;;
  697.     hp-ux) OS=hpux ;;
  698.     netbsd) OS=netbsd ;;
  699.     scosv) OS=scosv ;;
  700.     sco3) OS=sco3 ;;
  701.     linux) OS=linux ;;
  702.     bsd/os) OS=bsdi ;;
  703.     freebsd) OS=freebsd ;;
  704.     *) OS="$os" ;;
  705. esac
  706.  
  707.  
  708. if test "$os" = freebsd ; then
  709.     rev=`uname -r | cut -c1`
  710.     if test "$rev" = 1 ; then
  711.         echo "configure: warning: Won't use the curses library on FreeBSD 1.x" 1>&2
  712.         echo "configure: warning: is missing too much of it's functionality.  Try ncurses." 1>&2
  713.         nc_cv_curses=no
  714.     fi
  715. fi
  716.  
  717. if test "$os" = ultrix ; then
  718.     echo "configure: warning: Won't use curses or cursesX on ULTRIX." 1>&2
  719.     echo "configure: warning: They don't work to my satisfaction. Try ncurses instead." 1>&2
  720.     nc_cv_curses=no
  721. fi
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. # Extract the first word of "gcc", so it can be a program name with args.
  731. set dummy gcc; ac_word=$2
  732. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  733. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  734.   echo $ac_n "(cached) $ac_c" 1>&6
  735. else
  736.   if test -n "$CC"; then
  737.   ac_cv_prog_CC="$CC" # Let the user override the test.
  738. else
  739.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  740.   for ac_dir in $PATH; do
  741.     test -z "$ac_dir" && ac_dir=.
  742.     if test -f $ac_dir/$ac_word; then
  743.       ac_cv_prog_CC="gcc"
  744.       break
  745.     fi
  746.   done
  747.   IFS="$ac_save_ifs"
  748. fi
  749. fi
  750. CC="$ac_cv_prog_CC"
  751. if test -n "$CC"; then
  752.   echo "$ac_t""$CC" 1>&6
  753. else
  754.   echo "$ac_t""no" 1>&6
  755. fi
  756.  
  757. if test -z "$CC"; then
  758.   # Extract the first word of "cc", so it can be a program name with args.
  759. set dummy cc; ac_word=$2
  760. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  761. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  762.   echo $ac_n "(cached) $ac_c" 1>&6
  763. else
  764.   if test -n "$CC"; then
  765.   ac_cv_prog_CC="$CC" # Let the user override the test.
  766. else
  767.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  768.   ac_prog_rejected=no
  769.   for ac_dir in $PATH; do
  770.     test -z "$ac_dir" && ac_dir=.
  771.     if test -f $ac_dir/$ac_word; then
  772.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  773.         ac_prog_rejected=yes
  774.     continue
  775.       fi
  776.       ac_cv_prog_CC="cc"
  777.       break
  778.     fi
  779.   done
  780.   IFS="$ac_save_ifs"
  781. if test $ac_prog_rejected = yes; then
  782.   # We found a bogon in the path, so make sure we never use it.
  783.   set dummy $ac_cv_prog_CC
  784.   shift
  785.   if test $# -gt 0; then
  786.     # We chose a different compiler from the bogus one.
  787.     # However, it has the same basename, so the bogon will be chosen
  788.     # first if we set CC to just the basename; use the full file name.
  789.     shift
  790.     set dummy "$ac_dir/$ac_word" "$@"
  791.     shift
  792.     ac_cv_prog_CC="$@"
  793.   fi
  794. fi
  795. fi
  796. fi
  797. CC="$ac_cv_prog_CC"
  798. if test -n "$CC"; then
  799.   echo "$ac_t""$CC" 1>&6
  800. else
  801.   echo "$ac_t""no" 1>&6
  802. fi
  803.  
  804.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  805. fi
  806.  
  807. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  808. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  809.   echo $ac_n "(cached) $ac_c" 1>&6
  810. else
  811.   cat > conftest.c <<EOF
  812. #ifdef __GNUC__
  813.   yes;
  814. #endif
  815. EOF
  816. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  817.   ac_cv_prog_gcc=yes
  818. else
  819.   ac_cv_prog_gcc=no
  820. fi
  821. fi
  822.  
  823. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  824. if test $ac_cv_prog_gcc = yes; then
  825.   GCC=yes
  826.   if test "${CFLAGS+set}" != set; then
  827.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  828. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  829.   echo $ac_n "(cached) $ac_c" 1>&6
  830. else
  831.   echo 'void f(){}' > conftest.c
  832. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  833.   ac_cv_prog_gcc_g=yes
  834. else
  835.   ac_cv_prog_gcc_g=no
  836. fi
  837. rm -f conftest*
  838.  
  839. fi
  840.  
  841. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  842.     if test $ac_cv_prog_gcc_g = yes; then
  843.       CFLAGS="-g -O"
  844.     else
  845.       CFLAGS="-O"
  846.     fi
  847.   fi
  848. else
  849.   GCC=
  850.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  851. fi
  852.  
  853.  
  854. echo $ac_n "checking if HP-UX ansi C compiler flags are needed""... $ac_c" 1>&6
  855.  
  856. os=`uname -s 2>/dev/null | tr '[A-Z]' '[a-z]'`
  857. ac_cv_hpux_flags=no
  858. if test "$os" = hp-ux ; then
  859.     if test "$ac_cv_prog_gcc" = yes ; then
  860.         if test "$CFLAGS" != "" ; then
  861.             # Shouldn't be in there.
  862.             CFLAGS=`echo "$CFLAGS" | sed 's/-Aae//g'`
  863.         fi
  864.     else
  865.         # If you're not using gcc, then you better have a cc/c89
  866.         # that is usable.  If you have the barebones compiler, it
  867.         # won't work.  The good compiler uses -Ae for the ANSI
  868.         # compatible stuff.
  869.         x=`echo $CFLAGS | grep 'Aae' 2>/dev/null`
  870.         if test "$x" = "" ; then
  871.             CFLAGS="$CFLAGS -Ae"
  872.         fi
  873.         ac_cv_hpux_flags=yes
  874.     fi
  875. fi
  876. echo "$ac_t""$ac_cv_hpux_flags" 1>&6
  877.  
  878.     if test "$CFLAGS" = "" ; then
  879.         CFLAGS="-g"
  880.     elif test "$ac_cv_prog_gcc" = "yes" ; then
  881.         case "$CFLAGS" in
  882.             *"-g -O"*)
  883.                 echo "using -g as default gcc CFLAGS" 1>&6
  884.                 CFLAGS=`echo $CFLAGS | sed 's/-g\ -O/-g/'`
  885.                 ;;
  886.             *"-O -g"*)
  887.                 # Leave the -g, but remove all -O options.
  888.                 echo "using -g as default gcc CFLAGS" 1>&6
  889.                 CFLAGS=`echo $CFLAGS | sed 's/-O\ -g/-g/'`
  890.                 ;;
  891.         esac
  892.     fi
  893.  
  894.  
  895. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  896. set dummy ${MAKE-make}; ac_make=$2
  897. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  898.   echo $ac_n "(cached) $ac_c" 1>&6
  899. else
  900.   cat > conftestmake <<\EOF
  901. all:
  902.     @echo 'ac_maketemp="${MAKE}"'
  903. EOF
  904. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  905. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  906. if test -n "$ac_maketemp"; then
  907.   eval ac_cv_prog_make_${ac_make}_set=yes
  908. else
  909.   eval ac_cv_prog_make_${ac_make}_set=no
  910. fi
  911. rm -f conftestmake
  912. fi
  913. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  914.   echo "$ac_t""yes" 1>&6
  915.   SET_MAKE=
  916. else
  917.   echo "$ac_t""no" 1>&6
  918.   SET_MAKE="MAKE=${MAKE-make}"
  919. fi
  920.  
  921. # Extract the first word of "more", so it can be a program name with args.
  922. set dummy more; ac_word=$2
  923. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  924. if eval "test \"`echo '$''{'ac_cv_path_MORE'+set}'`\" = set"; then
  925.   echo $ac_n "(cached) $ac_c" 1>&6
  926. else
  927.   case "$MORE" in
  928.   /*)
  929.   ac_cv_path_MORE="$MORE" # Let the user override the test with a path.
  930.   ;;
  931.   *)
  932.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  933.   for ac_dir in $PATH; do
  934.     test -z "$ac_dir" && ac_dir=.
  935.     if test -f $ac_dir/$ac_word; then
  936.       ac_cv_path_MORE="$ac_dir/$ac_word"
  937.       break
  938.     fi
  939.   done
  940.   IFS="$ac_save_ifs"
  941.   test -z "$ac_cv_path_MORE" && ac_cv_path_MORE="more"
  942.   ;;
  943. esac
  944. fi
  945. MORE="$ac_cv_path_MORE"
  946. if test -n "$MORE"; then
  947.   echo "$ac_t""$MORE" 1>&6
  948. else
  949.   echo "$ac_t""no" 1>&6
  950. fi
  951.  
  952. # Extract the first word of "ls", so it can be a program name with args.
  953. set dummy ls; ac_word=$2
  954. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  955. if eval "test \"`echo '$''{'ac_cv_path_LS'+set}'`\" = set"; then
  956.   echo $ac_n "(cached) $ac_c" 1>&6
  957. else
  958.   case "$LS" in
  959.   /*)
  960.   ac_cv_path_LS="$LS" # Let the user override the test with a path.
  961.   ;;
  962.   *)
  963.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  964.   for ac_dir in $PATH; do
  965.     test -z "$ac_dir" && ac_dir=.
  966.     if test -f $ac_dir/$ac_word; then
  967.       ac_cv_path_LS="$ac_dir/$ac_word"
  968.       break
  969.     fi
  970.   done
  971.   IFS="$ac_save_ifs"
  972.   test -z "$ac_cv_path_LS" && ac_cv_path_LS="/bin/ls"
  973.   ;;
  974. esac
  975. fi
  976. LS="$ac_cv_path_LS"
  977. if test -n "$LS"; then
  978.   echo "$ac_t""$LS" 1>&6
  979. else
  980.   echo "$ac_t""no" 1>&6
  981. fi
  982.  
  983.  
  984. # Extract the first word of "gzcat", so it can be a program name with args.
  985. set dummy gzcat; ac_word=$2
  986. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  987. if eval "test \"`echo '$''{'ac_cv_path_GZCAT'+set}'`\" = set"; then
  988.   echo $ac_n "(cached) $ac_c" 1>&6
  989. else
  990.   case "$GZCAT" in
  991.   /*)
  992.   ac_cv_path_GZCAT="$GZCAT" # Let the user override the test with a path.
  993.   ;;
  994.   *)
  995.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  996.   for ac_dir in $PATH; do
  997.     test -z "$ac_dir" && ac_dir=.
  998.     if test -f $ac_dir/$ac_word; then
  999.       ac_cv_path_GZCAT="$ac_dir/$ac_word"
  1000.       break
  1001.     fi
  1002.   done
  1003.   IFS="$ac_save_ifs"
  1004.   ;;
  1005. esac
  1006. fi
  1007. GZCAT="$ac_cv_path_GZCAT"
  1008. if test -n "$GZCAT"; then
  1009.   echo "$ac_t""$GZCAT" 1>&6
  1010. else
  1011.   echo "$ac_t""no" 1>&6
  1012. fi
  1013.  
  1014. # Extract the first word of "zcat", so it can be a program name with args.
  1015. set dummy zcat; ac_word=$2
  1016. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1017. if eval "test \"`echo '$''{'ac_cv_path_ZCAT'+set}'`\" = set"; then
  1018.   echo $ac_n "(cached) $ac_c" 1>&6
  1019. else
  1020.   case "$ZCAT" in
  1021.   /*)
  1022.   ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a path.
  1023.   ;;
  1024.   *)
  1025.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1026.   for ac_dir in $PATH; do
  1027.     test -z "$ac_dir" && ac_dir=.
  1028.     if test -f $ac_dir/$ac_word; then
  1029.       ac_cv_path_ZCAT="$ac_dir/$ac_word"
  1030.       break
  1031.     fi
  1032.   done
  1033.   IFS="$ac_save_ifs"
  1034.   ;;
  1035. esac
  1036. fi
  1037. ZCAT="$ac_cv_path_ZCAT"
  1038. if test -n "$ZCAT"; then
  1039.   echo "$ac_t""$ZCAT" 1>&6
  1040. else
  1041.   echo "$ac_t""no" 1>&6
  1042. fi
  1043.  
  1044. if test "x$GZCAT" = x ; then
  1045.     if test "x$ZCAT" != x ; then
  1046.         # See if zcat is really gzcat.  gzcat has a --version option, regular
  1047.         # zcat does not.
  1048.         echo $ac_n "checking if zcat is really gzcat in disguise""... $ac_c" 1>&6
  1049.         if $ZCAT --version 2> /dev/null ; then
  1050.             cat >> confdefs.h <<EOF
  1051. #define GZCAT "$ZCAT"
  1052. EOF
  1053.  
  1054.             echo "$ac_t""yes" 1>&6
  1055.         else
  1056.             echo "$ac_t""no" 1>&6
  1057.         fi
  1058.     fi
  1059. else
  1060.     cat >> confdefs.h <<EOF
  1061. #define GZCAT "$GZCAT"
  1062. EOF
  1063.  
  1064. fi
  1065.  
  1066. if test "x$ZCAT" != x ; then
  1067.     cat >> confdefs.h <<EOF
  1068. #define ZCAT "$ZCAT"
  1069. EOF
  1070.  
  1071. fi
  1072.  
  1073.  
  1074. # See if we should add -I/usr/local/include -L/usr/local/lib, etc.
  1075. echo "checking for extra include and lib directories..." 1>&6
  1076. b1=`cd .. ; pwd`
  1077. b2=`cd ../.. ; pwd`
  1078. exdirs="$HOME $j $b1 $b2 $prefix /usr/local /usr/ccs"
  1079.  
  1080. subexdirs="-"
  1081. if test "$subexdirs" = "" ; then
  1082.     subexdirs="-"
  1083. fi
  1084. for subexdir in $subexdirs ; do
  1085. if test "$subexdir" = "-" ; then
  1086.     subexdir=""
  1087. else
  1088.     subexdir="/$subexdir"
  1089. fi
  1090. for exdir in $exdirs ; do
  1091.     if test "$exdir" != "/usr" || test "$subexdir" != ""; then
  1092.         incdir="${exdir}/include${subexdir}"
  1093.         
  1094. incdir="$incdir"
  1095. if test -r $incdir ; then
  1096.     case "$CPPFLAGS" in
  1097.         *${incdir}*)
  1098.             # echo "   + already had $incdir" 1>&6
  1099.             ;;
  1100.         *)
  1101.             if test "$CPPFLAGS" = "" ; then
  1102.                 CPPFLAGS="-I$incdir"
  1103.             else
  1104.                 CPPFLAGS="$CPPFLAGS -I$incdir"
  1105.             fi
  1106.             echo "   + found $incdir" 1>&6
  1107.             ;;
  1108.     esac
  1109. fi
  1110.  
  1111.  
  1112.         libdir="${exdir}/lib${subexdir}"
  1113.         
  1114. libdir="$libdir"
  1115. if test -r $libdir ; then
  1116.     case "$LDFLAGS" in
  1117.         *${libdir}*)
  1118.             # echo "   + already had $libdir" 1>&6
  1119.             ;;
  1120.         *)
  1121.             if test "$LDFLAGS" = "" ; then
  1122.                 LDFLAGS="-L$libdir"
  1123.             else
  1124.                 LDFLAGS="$LDFLAGS -L$libdir"
  1125.             fi
  1126.             echo "   + found $libdir" 1>&6
  1127.             ;;
  1128.     esac
  1129. fi
  1130.  
  1131.     fi
  1132. done
  1133. done
  1134.  
  1135.  
  1136. # Look for SunOS' /usr/5lib and 5include directories, because
  1137. # we want to use those for the curses stuff.  Cheat a little and
  1138. # don't do this if it looks like we are going to use ncurses.
  1139. if test -f /usr/local/include/ncurses/unctrl.h && test "$nc_cv_ncurses" = yes ; then
  1140.     echo >/dev/null        # no op
  1141. else
  1142.  
  1143. # Use System V because their curses extensions are required.  This must
  1144. # be done early so we use the -I and -L in the library checks also.
  1145. # This is mostly a Solaris/SunOS hack.  Note that doing this will also
  1146. # use all of the other System V libraries and headers.
  1147.  
  1148. echo $ac_n "checking for alternative System V libraries""... $ac_c" 1>&6
  1149. if test -f /usr/5include/curses.h ; then
  1150.     CPPFLAGS="$CPPFLAGS -I/usr/5include"
  1151.     LDFLAGS="$LDFLAGS -L/usr/5lib"
  1152.     echo "$ac_t""yes" 1>&6
  1153. else
  1154.     echo "$ac_t""no" 1>&6
  1155. fi
  1156.  
  1157. fi
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166. # Get first 127 chars of all uname information.  Some folks have
  1167. # way too much stuff there, so grab only the first 127.
  1168. unam=`uname -a 2>/dev/null | cut -c1-127`
  1169. if test "$unam" != "" ; then
  1170.     cat >> confdefs.h <<EOF
  1171. #define UNAME "$unam"
  1172. EOF
  1173.  
  1174. fi
  1175.  
  1176. cat >> confdefs.h <<EOF
  1177. #define MORE "$MORE"
  1178. EOF
  1179.  
  1180. cat >> confdefs.h <<EOF
  1181. #define LS "$LS"
  1182. EOF
  1183.  
  1184.  
  1185. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1186. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1187.   echo $ac_n "(cached) $ac_c" 1>&6
  1188. else
  1189.   cat > conftest.$ac_ext <<EOF
  1190. #line 1191 "configure"
  1191. #include "confdefs.h"
  1192.  
  1193. int main() { return 0; }
  1194. int t() {
  1195.  
  1196. /* Ultrix mips cc rejects this.  */
  1197. typedef int charset[2]; const charset x;
  1198. /* SunOS 4.1.1 cc rejects this.  */
  1199. char const *const *ccp;
  1200. char **p;
  1201. /* NEC SVR4.0.2 mips cc rejects this.  */
  1202. struct point {int x, y;};
  1203. static struct point const zero = {0,0};
  1204. /* AIX XL C 1.02.0.0 rejects this.
  1205.    It does not let you subtract one const X* pointer from another in an arm
  1206.    of an if-expression whose if-part is not a constant expression */
  1207. const char *g = "string";
  1208. ccp = &g + (g ? g-g : 0);
  1209. /* HPUX 7.0 cc rejects these. */
  1210. ++ccp;
  1211. p = (char**) ccp;
  1212. ccp = (char const *const *) p;
  1213. { /* SCO 3.2v4 cc rejects this.  */
  1214.   char *t;
  1215.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1216.  
  1217.   *t++ = 0;
  1218. }
  1219. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1220.   int x[] = {25, 17};
  1221.   const int *foo = &x[0];
  1222.   ++foo;
  1223. }
  1224. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1225.   typedef const int *iptr;
  1226.   iptr p = 0;
  1227.   ++p;
  1228. }
  1229. { /* AIX XL C 1.02.0.0 rejects this saying
  1230.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1231.   struct s { int j; const int *ap[3]; };
  1232.   struct s *b; b->j = 5;
  1233. }
  1234. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1235.   const int foo = 10;
  1236. }
  1237.  
  1238. ; return 0; }
  1239. EOF
  1240. if { (eval echo configure:1241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1241.   rm -rf conftest*
  1242.   ac_cv_c_const=yes
  1243. else
  1244.   rm -rf conftest*
  1245.   ac_cv_c_const=no
  1246. fi
  1247. rm -f conftest*
  1248.  
  1249. fi
  1250.  
  1251. echo "$ac_t""$ac_cv_c_const" 1>&6
  1252. if test $ac_cv_c_const = no; then
  1253.   cat >> confdefs.h <<\EOF
  1254. #define const 
  1255. EOF
  1256.  
  1257. fi
  1258.  
  1259.  
  1260. echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  1261. ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
  1262. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1263.   echo $ac_n "(cached) $ac_c" 1>&6
  1264. else
  1265.   ac_save_LIBS="$LIBS"
  1266. LIBS="-lsocket  $LIBS"
  1267. cat > conftest.$ac_ext <<EOF
  1268. #line 1269 "configure"
  1269. #include "confdefs.h"
  1270. /* Override any gcc2 internal prototype to avoid an error.  */
  1271. /* We use char because int might match the return type of a gcc2
  1272.     builtin and then its argument prototype would still apply.  */
  1273. char socket();
  1274.  
  1275. int main() { return 0; }
  1276. int t() {
  1277. socket()
  1278. ; return 0; }
  1279. EOF
  1280. if { (eval echo configure:1281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1281.   rm -rf conftest*
  1282.   eval "ac_cv_lib_$ac_lib_var=yes"
  1283. else
  1284.   rm -rf conftest*
  1285.   eval "ac_cv_lib_$ac_lib_var=no"
  1286. fi
  1287. rm -f conftest*
  1288. LIBS="$ac_save_LIBS"
  1289.  
  1290. fi
  1291. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1292.   echo "$ac_t""yes" 1>&6
  1293.     ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1294.   cat >> confdefs.h <<EOF
  1295. #define $ac_tr_lib 1
  1296. EOF
  1297.  
  1298.   LIBS="-lsocket $LIBS"
  1299.  
  1300. else
  1301.   echo "$ac_t""no" 1>&6
  1302. fi
  1303.  
  1304. echo $ac_n "checking for -linet""... $ac_c" 1>&6
  1305. ac_lib_var=`echo inet'_'main | tr './+\055' '__p_'`
  1306. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1307.   echo $ac_n "(cached) $ac_c" 1>&6
  1308. else
  1309.   ac_save_LIBS="$LIBS"
  1310. LIBS="-linet  $LIBS"
  1311. cat > conftest.$ac_ext <<EOF
  1312. #line 1313 "configure"
  1313. #include "confdefs.h"
  1314.  
  1315. int main() { return 0; }
  1316. int t() {
  1317. main()
  1318. ; return 0; }
  1319. EOF
  1320. if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1321.   rm -rf conftest*
  1322.   eval "ac_cv_lib_$ac_lib_var=yes"
  1323. else
  1324.   rm -rf conftest*
  1325.   eval "ac_cv_lib_$ac_lib_var=no"
  1326. fi
  1327. rm -f conftest*
  1328. LIBS="$ac_save_LIBS"
  1329.  
  1330. fi
  1331. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1332.   echo "$ac_t""yes" 1>&6
  1333.     ac_tr_lib=HAVE_LIB`echo inet | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1334.   cat >> confdefs.h <<EOF
  1335. #define $ac_tr_lib 1
  1336. EOF
  1337.  
  1338.   LIBS="-linet $LIBS"
  1339.  
  1340. else
  1341.   echo "$ac_t""no" 1>&6
  1342. fi
  1343.  
  1344.  
  1345. # If we cannot run a trivial program, we must be cross compiling.
  1346. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1347. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1348.   echo $ac_n "(cached) $ac_c" 1>&6
  1349. else
  1350.   if test "$cross_compiling" = yes; then
  1351.   ac_cv_c_cross=yes
  1352. else
  1353. cat > conftest.$ac_ext <<EOF
  1354. #line 1355 "configure"
  1355. #include "confdefs.h"
  1356. main(){return(0);}
  1357. EOF
  1358. { (eval echo configure:1359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1359. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1360.   ac_cv_c_cross=no
  1361. else
  1362.   ac_cv_c_cross=yes
  1363. fi
  1364. fi
  1365. rm -fr conftest*
  1366. fi
  1367.  
  1368. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1369. cross_compiling=$ac_cv_c_cross
  1370.  
  1371.  
  1372. echo $ac_n "checking if we can use -lnsl""... $ac_c" 1>&6
  1373. ac_save_LIBS="$LIBS";
  1374. LIBS="$LIBS -lnsl";
  1375. if eval "test \"`echo '$''{'r_cv_use_libnsl'+set}'`\" = set"; then
  1376.   echo $ac_n "(cached) $ac_c" 1>&6
  1377. else
  1378.   
  1379. if test "$cross_compiling" = yes; then
  1380.   nc_cv_use_libnsl=no
  1381. else
  1382. cat > conftest.$ac_ext <<EOF
  1383. #line 1384 "configure"
  1384. #include "confdefs.h"
  1385. main() { if (getpwuid(getuid())) exit(0); exit(-1); }
  1386. EOF
  1387. { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1388. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1389.   nc_cv_use_libnsl=yes
  1390. else
  1391.   nc_cv_use_libnsl=no
  1392. fi
  1393. fi
  1394. rm -fr conftest*
  1395.  
  1396. fi
  1397.  
  1398. if test "$nc_cv_use_libnsl" = "no"; then LIBS="$ac_save_LIBS"; fi
  1399. echo "$ac_t""$nc_cv_use_libnsl" 1>&6
  1400.  
  1401.  
  1402. # See if we could access two well-known sites without help of any special
  1403. # libraries, like resolv.
  1404.  
  1405. if test "$cross_compiling" = yes; then
  1406.   look_for_resolv=yes
  1407. else
  1408. cat > conftest.$ac_ext <<EOF
  1409. #line 1410 "configure"
  1410. #include "confdefs.h"
  1411.  
  1412. #include <sys/types.h>
  1413. #include <sys/socket.h>
  1414. #include <netinet/in.h>
  1415. #include <netdb.h>
  1416.  
  1417. main()
  1418. {
  1419.     struct hostent *hp1, *hp2;
  1420.     int result;
  1421.  
  1422.     hp1 = gethostbyname("gatekeeper.dec.com");
  1423.     hp2 = gethostbyname("ftp.ncsa.uiuc.edu");
  1424.     result = ((hp1 != (struct hostent *) 0) && (hp2 != (struct hostent *) 0));
  1425.     exit(! result);
  1426. }
  1427. EOF
  1428. { (eval echo configure:1429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1429. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1430.   look_for_resolv=no
  1431. else
  1432.   look_for_resolv=yes
  1433. fi
  1434. fi
  1435. rm -fr conftest*
  1436.  
  1437. echo $ac_n "checking if we need to look for -lresolv""... $ac_c" 1>&6
  1438. echo "$ac_t""$look_for_resolv" 1>&6
  1439. if test "$look_for_resolv" = yes ; then
  1440. echo $ac_n "checking for -lresolv""... $ac_c" 1>&6
  1441. ac_lib_var=`echo resolv'_'main | tr './+\055' '__p_'`
  1442. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1443.   echo $ac_n "(cached) $ac_c" 1>&6
  1444. else
  1445.   ac_save_LIBS="$LIBS"
  1446. LIBS="-lresolv  $LIBS"
  1447. cat > conftest.$ac_ext <<EOF
  1448. #line 1449 "configure"
  1449. #include "confdefs.h"
  1450.  
  1451. int main() { return 0; }
  1452. int t() {
  1453. main()
  1454. ; return 0; }
  1455. EOF
  1456. if { (eval echo configure:1457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1457.   rm -rf conftest*
  1458.   eval "ac_cv_lib_$ac_lib_var=yes"
  1459. else
  1460.   rm -rf conftest*
  1461.   eval "ac_cv_lib_$ac_lib_var=no"
  1462. fi
  1463. rm -f conftest*
  1464. LIBS="$ac_save_LIBS"
  1465.  
  1466. fi
  1467. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1468.   echo "$ac_t""yes" 1>&6
  1469.     ac_tr_lib=HAVE_LIB`echo resolv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1470.   cat >> confdefs.h <<EOF
  1471. #define $ac_tr_lib 1
  1472. EOF
  1473.  
  1474.   LIBS="-lresolv $LIBS"
  1475.  
  1476. else
  1477.   echo "$ac_t""no" 1>&6
  1478. fi
  1479.  
  1480. else
  1481.     ac_cv_lib_resolv=no
  1482. fi
  1483.  
  1484.  
  1485. if test "$nc_cv_socks5" = yes ; then
  1486. # Look for the "SOCKS" library for use with Firewalls/Gateways.
  1487. savelibs="$LIBS"
  1488. echo $ac_n "checking for -ldb""... $ac_c" 1>&6
  1489. ac_lib_var=`echo db'_'main | tr './+\055' '__p_'`
  1490. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1491.   echo $ac_n "(cached) $ac_c" 1>&6
  1492. else
  1493.   ac_save_LIBS="$LIBS"
  1494. LIBS="-ldb  $LIBS"
  1495. cat > conftest.$ac_ext <<EOF
  1496. #line 1497 "configure"
  1497. #include "confdefs.h"
  1498.  
  1499. int main() { return 0; }
  1500. int t() {
  1501. main()
  1502. ; return 0; }
  1503. EOF
  1504. if { (eval echo configure:1505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1505.   rm -rf conftest*
  1506.   eval "ac_cv_lib_$ac_lib_var=yes"
  1507. else
  1508.   rm -rf conftest*
  1509.   eval "ac_cv_lib_$ac_lib_var=no"
  1510. fi
  1511. rm -f conftest*
  1512. LIBS="$ac_save_LIBS"
  1513.  
  1514. fi
  1515. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1516.   echo "$ac_t""yes" 1>&6
  1517.     ac_tr_lib=HAVE_LIB`echo db | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1518.   cat >> confdefs.h <<EOF
  1519. #define $ac_tr_lib 1
  1520. EOF
  1521.  
  1522.   LIBS="-ldb $LIBS"
  1523.  
  1524. else
  1525.   echo "$ac_t""no" 1>&6
  1526. fi
  1527.  
  1528. echo $ac_n "checking for -lisode""... $ac_c" 1>&6
  1529. ac_lib_var=`echo isode'_'main | tr './+\055' '__p_'`
  1530. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1531.   echo $ac_n "(cached) $ac_c" 1>&6
  1532. else
  1533.   ac_save_LIBS="$LIBS"
  1534. LIBS="-lisode  $LIBS"
  1535. cat > conftest.$ac_ext <<EOF
  1536. #line 1537 "configure"
  1537. #include "confdefs.h"
  1538.  
  1539. int main() { return 0; }
  1540. int t() {
  1541. main()
  1542. ; return 0; }
  1543. EOF
  1544. if { (eval echo configure:1545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1545.   rm -rf conftest*
  1546.   eval "ac_cv_lib_$ac_lib_var=yes"
  1547. else
  1548.   rm -rf conftest*
  1549.   eval "ac_cv_lib_$ac_lib_var=no"
  1550. fi
  1551. rm -f conftest*
  1552. LIBS="$ac_save_LIBS"
  1553.  
  1554. fi
  1555. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1556.   echo "$ac_t""yes" 1>&6
  1557.     ac_tr_lib=HAVE_LIB`echo isode | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1558.   cat >> confdefs.h <<EOF
  1559. #define $ac_tr_lib 1
  1560. EOF
  1561.  
  1562.   LIBS="-lisode $LIBS"
  1563.  
  1564. else
  1565.   echo "$ac_t""no" 1>&6
  1566. fi
  1567.  
  1568. echo $ac_n "checking for -lcom_err""... $ac_c" 1>&6
  1569. ac_lib_var=`echo com_err'_'main | tr './+\055' '__p_'`
  1570. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1571.   echo $ac_n "(cached) $ac_c" 1>&6
  1572. else
  1573.   ac_save_LIBS="$LIBS"
  1574. LIBS="-lcom_err  $LIBS"
  1575. cat > conftest.$ac_ext <<EOF
  1576. #line 1577 "configure"
  1577. #include "confdefs.h"
  1578.  
  1579. int main() { return 0; }
  1580. int t() {
  1581. main()
  1582. ; return 0; }
  1583. EOF
  1584. if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1585.   rm -rf conftest*
  1586.   eval "ac_cv_lib_$ac_lib_var=yes"
  1587. else
  1588.   rm -rf conftest*
  1589.   eval "ac_cv_lib_$ac_lib_var=no"
  1590. fi
  1591. rm -f conftest*
  1592. LIBS="$ac_save_LIBS"
  1593.  
  1594. fi
  1595. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1596.   echo "$ac_t""yes" 1>&6
  1597.     ac_tr_lib=HAVE_LIB`echo com_err | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1598.   cat >> confdefs.h <<EOF
  1599. #define $ac_tr_lib 1
  1600. EOF
  1601.  
  1602.   LIBS="-lcom_err $LIBS"
  1603.  
  1604. else
  1605.   echo "$ac_t""no" 1>&6
  1606. fi
  1607.  
  1608. echo $ac_n "checking for -lcrypto""... $ac_c" 1>&6
  1609. ac_lib_var=`echo crypto'_'main | tr './+\055' '__p_'`
  1610. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1611.   echo $ac_n "(cached) $ac_c" 1>&6
  1612. else
  1613.   ac_save_LIBS="$LIBS"
  1614. LIBS="-lcrypto  $LIBS"
  1615. cat > conftest.$ac_ext <<EOF
  1616. #line 1617 "configure"
  1617. #include "confdefs.h"
  1618.  
  1619. int main() { return 0; }
  1620. int t() {
  1621. main()
  1622. ; return 0; }
  1623. EOF
  1624. if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1625.   rm -rf conftest*
  1626.   eval "ac_cv_lib_$ac_lib_var=yes"
  1627. else
  1628.   rm -rf conftest*
  1629.   eval "ac_cv_lib_$ac_lib_var=no"
  1630. fi
  1631. rm -f conftest*
  1632. LIBS="$ac_save_LIBS"
  1633.  
  1634. fi
  1635. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1636.   echo "$ac_t""yes" 1>&6
  1637.     ac_tr_lib=HAVE_LIB`echo crypto | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1638.   cat >> confdefs.h <<EOF
  1639. #define $ac_tr_lib 1
  1640. EOF
  1641.  
  1642.   LIBS="-lcrypto $LIBS"
  1643.  
  1644. else
  1645.   echo "$ac_t""no" 1>&6
  1646. fi
  1647.  
  1648. echo $ac_n "checking for -lkrb5""... $ac_c" 1>&6
  1649. ac_lib_var=`echo krb5'_'main | tr './+\055' '__p_'`
  1650. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1651.   echo $ac_n "(cached) $ac_c" 1>&6
  1652. else
  1653.   ac_save_LIBS="$LIBS"
  1654. LIBS="-lkrb5  $LIBS"
  1655. cat > conftest.$ac_ext <<EOF
  1656. #line 1657 "configure"
  1657. #include "confdefs.h"
  1658.  
  1659. int main() { return 0; }
  1660. int t() {
  1661. main()
  1662. ; return 0; }
  1663. EOF
  1664. if { (eval echo configure:1665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1665.   rm -rf conftest*
  1666.   eval "ac_cv_lib_$ac_lib_var=yes"
  1667. else
  1668.   rm -rf conftest*
  1669.   eval "ac_cv_lib_$ac_lib_var=no"
  1670. fi
  1671. rm -f conftest*
  1672. LIBS="$ac_save_LIBS"
  1673.  
  1674. fi
  1675. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1676.   echo "$ac_t""yes" 1>&6
  1677.     ac_tr_lib=HAVE_LIB`echo krb5 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1678.   cat >> confdefs.h <<EOF
  1679. #define $ac_tr_lib 1
  1680. EOF
  1681.  
  1682.   LIBS="-lkrb5 $LIBS"
  1683.  
  1684. else
  1685.   echo "$ac_t""no" 1>&6
  1686. fi
  1687.  
  1688. echo $ac_n "checking for -lgssapi_krb5""... $ac_c" 1>&6
  1689. ac_lib_var=`echo gssapi_krb5'_'main | tr './+\055' '__p_'`
  1690. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1691.   echo $ac_n "(cached) $ac_c" 1>&6
  1692. else
  1693.   ac_save_LIBS="$LIBS"
  1694. LIBS="-lgssapi_krb5  $LIBS"
  1695. cat > conftest.$ac_ext <<EOF
  1696. #line 1697 "configure"
  1697. #include "confdefs.h"
  1698.  
  1699. int main() { return 0; }
  1700. int t() {
  1701. main()
  1702. ; return 0; }
  1703. EOF
  1704. if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1705.   rm -rf conftest*
  1706.   eval "ac_cv_lib_$ac_lib_var=yes"
  1707. else
  1708.   rm -rf conftest*
  1709.   eval "ac_cv_lib_$ac_lib_var=no"
  1710. fi
  1711. rm -f conftest*
  1712. LIBS="$ac_save_LIBS"
  1713.  
  1714. fi
  1715. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1716.   echo "$ac_t""yes" 1>&6
  1717.     ac_tr_lib=HAVE_LIB`echo gssapi_krb5 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1718.   cat >> confdefs.h <<EOF
  1719. #define $ac_tr_lib 1
  1720. EOF
  1721.  
  1722.   LIBS="-lgssapi_krb5 $LIBS"
  1723.  
  1724. else
  1725.   echo "$ac_t""no" 1>&6
  1726. fi
  1727.  
  1728. echo $ac_n "checking for -lsocks5""... $ac_c" 1>&6
  1729. ac_lib_var=`echo socks5'_'SOCKSinit | tr './+\055' '__p_'`
  1730. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1731.   echo $ac_n "(cached) $ac_c" 1>&6
  1732. else
  1733.   ac_save_LIBS="$LIBS"
  1734. LIBS="-lsocks5  $LIBS"
  1735. cat > conftest.$ac_ext <<EOF
  1736. #line 1737 "configure"
  1737. #include "confdefs.h"
  1738. /* Override any gcc2 internal prototype to avoid an error.  */
  1739. /* We use char because int might match the return type of a gcc2
  1740.     builtin and then its argument prototype would still apply.  */
  1741. char SOCKSinit();
  1742.  
  1743. int main() { return 0; }
  1744. int t() {
  1745. SOCKSinit()
  1746. ; return 0; }
  1747. EOF
  1748. if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1749.   rm -rf conftest*
  1750.   eval "ac_cv_lib_$ac_lib_var=yes"
  1751. else
  1752.   rm -rf conftest*
  1753.   eval "ac_cv_lib_$ac_lib_var=no"
  1754. fi
  1755. rm -f conftest*
  1756. LIBS="$ac_save_LIBS"
  1757.  
  1758. fi
  1759. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1760.   echo "$ac_t""yes" 1>&6
  1761.     ac_tr_lib=HAVE_LIB`echo socks5 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1762.   cat >> confdefs.h <<EOF
  1763. #define $ac_tr_lib 1
  1764. EOF
  1765.  
  1766.   LIBS="-lsocks5 $LIBS"
  1767.  
  1768. else
  1769.   echo "$ac_t""no" 1>&6
  1770. fi
  1771.  
  1772.       if test "$ac_cv_lib_socks5" = yes ; then
  1773.               nc_cv_socks=no
  1774.       else
  1775.               LIBS="$savelibs"
  1776.       fi
  1777. else
  1778. ac_cv_lib_socks5=no
  1779. fi
  1780.  
  1781. if test "$nc_cv_socks" = yes ; then
  1782. # Look for the "SOCKS" library for use with Firewalls/Gateways.
  1783. echo $ac_n "checking for -lsocks""... $ac_c" 1>&6
  1784. ac_lib_var=`echo socks'_'SOCKSinit | tr './+\055' '__p_'`
  1785. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1786.   echo $ac_n "(cached) $ac_c" 1>&6
  1787. else
  1788.   ac_save_LIBS="$LIBS"
  1789. LIBS="-lsocks  $LIBS"
  1790. cat > conftest.$ac_ext <<EOF
  1791. #line 1792 "configure"
  1792. #include "confdefs.h"
  1793. /* Override any gcc2 internal prototype to avoid an error.  */
  1794. /* We use char because int might match the return type of a gcc2
  1795.     builtin and then its argument prototype would still apply.  */
  1796. char SOCKSinit();
  1797.  
  1798. int main() { return 0; }
  1799. int t() {
  1800. SOCKSinit()
  1801. ; return 0; }
  1802. EOF
  1803. if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1804.   rm -rf conftest*
  1805.   eval "ac_cv_lib_$ac_lib_var=yes"
  1806. else
  1807.   rm -rf conftest*
  1808.   eval "ac_cv_lib_$ac_lib_var=no"
  1809. fi
  1810. rm -f conftest*
  1811. LIBS="$ac_save_LIBS"
  1812.  
  1813. fi
  1814. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1815.   echo "$ac_t""yes" 1>&6
  1816.     ac_tr_lib=HAVE_LIB`echo socks | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1817.   cat >> confdefs.h <<EOF
  1818. #define $ac_tr_lib 1
  1819. EOF
  1820.  
  1821.   LIBS="-lsocks $LIBS"
  1822.  
  1823. else
  1824.   echo "$ac_t""no" 1>&6
  1825. fi
  1826.  
  1827.     if test "$ac_cv_lib_socks" = yes ; then
  1828.         # Socks requires PASV.
  1829.         # Use FTP_DATA_PORT_MODE == 1 (kPassiveMode)
  1830.         cat >> confdefs.h <<\EOF
  1831. #define FTP_DATA_PORT_MODE 1
  1832. EOF
  1833.  
  1834.     fi
  1835. else
  1836. ac_cv_lib_socks=no
  1837. fi
  1838.  
  1839.  
  1840. if test "$nc_cv_termnet" = yes ; then
  1841. # Look for the "TERM" library for use with Linux, etc.
  1842. echo $ac_n "checking for -ltermnet""... $ac_c" 1>&6
  1843. ac_lib_var=`echo termnet'_'main | tr './+\055' '__p_'`
  1844. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1845.   echo $ac_n "(cached) $ac_c" 1>&6
  1846. else
  1847.   ac_save_LIBS="$LIBS"
  1848. LIBS="-ltermnet  $LIBS"
  1849. cat > conftest.$ac_ext <<EOF
  1850. #line 1851 "configure"
  1851. #include "confdefs.h"
  1852.  
  1853. int main() { return 0; }
  1854. int t() {
  1855. main()
  1856. ; return 0; }
  1857. EOF
  1858. if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1859.   rm -rf conftest*
  1860.   eval "ac_cv_lib_$ac_lib_var=yes"
  1861. else
  1862.   rm -rf conftest*
  1863.   eval "ac_cv_lib_$ac_lib_var=no"
  1864. fi
  1865. rm -f conftest*
  1866. LIBS="$ac_save_LIBS"
  1867.  
  1868. fi
  1869. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1870.   echo "$ac_t""yes" 1>&6
  1871.     ac_tr_lib=HAVE_LIB`echo termnet | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1872.   cat >> confdefs.h <<EOF
  1873. #define $ac_tr_lib 1
  1874. EOF
  1875.  
  1876.   LIBS="-ltermnet $LIBS"
  1877.  
  1878. else
  1879.   echo "$ac_t""no" 1>&6
  1880. fi
  1881.  
  1882. else
  1883. ac_cv_lib_termnet=no
  1884. fi
  1885.  
  1886. if test "$nc_cv_readline" = no; then
  1887. echo $ac_n "checking for -lgetline""... $ac_c" 1>&6
  1888. ac_lib_var=`echo getline'_'gl_histadd | tr './+\055' '__p_'`
  1889. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1890.   echo $ac_n "(cached) $ac_c" 1>&6
  1891. else
  1892.   ac_save_LIBS="$LIBS"
  1893. LIBS="-lgetline  $LIBS"
  1894. cat > conftest.$ac_ext <<EOF
  1895. #line 1896 "configure"
  1896. #include "confdefs.h"
  1897. /* Override any gcc2 internal prototype to avoid an error.  */
  1898. /* We use char because int might match the return type of a gcc2
  1899.     builtin and then its argument prototype would still apply.  */
  1900. char gl_histadd();
  1901.  
  1902. int main() { return 0; }
  1903. int t() {
  1904. gl_histadd()
  1905. ; return 0; }
  1906. EOF
  1907. if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1908.   rm -rf conftest*
  1909.   eval "ac_cv_lib_$ac_lib_var=yes"
  1910. else
  1911.   rm -rf conftest*
  1912.   eval "ac_cv_lib_$ac_lib_var=no"
  1913. fi
  1914. rm -f conftest*
  1915. LIBS="$ac_save_LIBS"
  1916.  
  1917. fi
  1918. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1919.   echo "$ac_t""yes" 1>&6
  1920.     ac_tr_lib=HAVE_LIB`echo getline | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1921.   cat >> confdefs.h <<EOF
  1922. #define $ac_tr_lib 1
  1923. EOF
  1924.  
  1925.   LIBS="-lgetline $LIBS"
  1926.  
  1927. else
  1928.   echo "$ac_t""no" 1>&6
  1929. fi
  1930.  
  1931. fi
  1932.  
  1933. # We don't need termcap directly, but on some systems you need to link
  1934. # with -lcurses -ltermcap.
  1935.  
  1936. echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
  1937. ac_lib_var=`echo termcap'_'tgetstr | tr './+\055' '__p_'`
  1938. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1939.   echo $ac_n "(cached) $ac_c" 1>&6
  1940. else
  1941.   ac_save_LIBS="$LIBS"
  1942. LIBS="-ltermcap  $LIBS"
  1943. cat > conftest.$ac_ext <<EOF
  1944. #line 1945 "configure"
  1945. #include "confdefs.h"
  1946. /* Override any gcc2 internal prototype to avoid an error.  */
  1947. /* We use char because int might match the return type of a gcc2
  1948.     builtin and then its argument prototype would still apply.  */
  1949. char tgetstr();
  1950.  
  1951. int main() { return 0; }
  1952. int t() {
  1953. tgetstr()
  1954. ; return 0; }
  1955. EOF
  1956. if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1957.   rm -rf conftest*
  1958.   eval "ac_cv_lib_$ac_lib_var=yes"
  1959. else
  1960.   rm -rf conftest*
  1961.   eval "ac_cv_lib_$ac_lib_var=no"
  1962. fi
  1963. rm -f conftest*
  1964. LIBS="$ac_save_LIBS"
  1965.  
  1966. fi
  1967. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1968.   echo "$ac_t""yes" 1>&6
  1969.   nc_cv_lib_termcap=yes
  1970. else
  1971.   echo "$ac_t""no" 1>&6
  1972. nc_cv_lib_termcap=no
  1973. fi
  1974.  
  1975.  
  1976. CURSESLIB=''
  1977. TERMCAPLIB=''
  1978. obselete_lib=no
  1979.  
  1980. if test $nc_cv_curses = yes ; then
  1981.     # cursesX is an Ultrix oddity
  1982.     echo $ac_n "checking for -lcursesX""... $ac_c" 1>&6
  1983. ac_lib_var=`echo cursesX'_'endwin | tr './+\055' '__p_'`
  1984. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1985.   echo $ac_n "(cached) $ac_c" 1>&6
  1986. else
  1987.   ac_save_LIBS="$LIBS"
  1988. LIBS="-lcursesX  $LIBS"
  1989. cat > conftest.$ac_ext <<EOF
  1990. #line 1991 "configure"
  1991. #include "confdefs.h"
  1992. /* Override any gcc2 internal prototype to avoid an error.  */
  1993. /* We use char because int might match the return type of a gcc2
  1994.     builtin and then its argument prototype would still apply.  */
  1995. char endwin();
  1996.  
  1997. int main() { return 0; }
  1998. int t() {
  1999. endwin()
  2000. ; return 0; }
  2001. EOF
  2002. if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2003.   rm -rf conftest*
  2004.   eval "ac_cv_lib_$ac_lib_var=yes"
  2005. else
  2006.   rm -rf conftest*
  2007.   eval "ac_cv_lib_$ac_lib_var=no"
  2008. fi
  2009. rm -f conftest*
  2010. LIBS="$ac_save_LIBS"
  2011.  
  2012. fi
  2013. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2014.   echo "$ac_t""yes" 1>&6
  2015.   CURSESLIB=cursesX
  2016. else
  2017.   echo "$ac_t""no" 1>&6
  2018. fi
  2019.  
  2020.  
  2021.     if test "$CURSESLIB" = "" ; then
  2022.         echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  2023. ac_lib_var=`echo curses'_'wnoutrefresh | tr './+\055' '__p_'`
  2024. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2025.   echo $ac_n "(cached) $ac_c" 1>&6
  2026. else
  2027.   ac_save_LIBS="$LIBS"
  2028. LIBS="-lcurses  $LIBS"
  2029. cat > conftest.$ac_ext <<EOF
  2030. #line 2031 "configure"
  2031. #include "confdefs.h"
  2032. /* Override any gcc2 internal prototype to avoid an error.  */
  2033. /* We use char because int might match the return type of a gcc2
  2034.     builtin and then its argument prototype would still apply.  */
  2035. char wnoutrefresh();
  2036.  
  2037. int main() { return 0; }
  2038. int t() {
  2039. wnoutrefresh()
  2040. ; return 0; }
  2041. EOF
  2042. if { (eval echo configure:2043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2043.   rm -rf conftest*
  2044.   eval "ac_cv_lib_$ac_lib_var=yes"
  2045. else
  2046.   rm -rf conftest*
  2047.   eval "ac_cv_lib_$ac_lib_var=no"
  2048. fi
  2049. rm -f conftest*
  2050. LIBS="$ac_save_LIBS"
  2051.  
  2052. fi
  2053. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2054.   echo "$ac_t""yes" 1>&6
  2055.   CURSESLIB=curses
  2056. else
  2057.   echo "$ac_t""no" 1>&6
  2058. fi
  2059.  
  2060.     fi
  2061.  
  2062.     # Okay, maybe that didn't work, but maybe you needed to
  2063.     # use -lcurses -ltermcap.
  2064.     if test "$CURSESLIB" = "" ; then
  2065.         if test "$nc_cv_lib_termcap" = yes ; then
  2066.             unset ac_cv_lib_curses
  2067.             echo "configure: warning: Did not detect curses, but trying again with termcap:" 1>&2
  2068.             echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  2069. ac_lib_var=`echo curses'_'wnoutrefresh | tr './+\055' '__p_'`
  2070. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2071.   echo $ac_n "(cached) $ac_c" 1>&6
  2072. else
  2073.   ac_save_LIBS="$LIBS"
  2074. LIBS="-lcurses -ltermcap $LIBS"
  2075. cat > conftest.$ac_ext <<EOF
  2076. #line 2077 "configure"
  2077. #include "confdefs.h"
  2078. /* Override any gcc2 internal prototype to avoid an error.  */
  2079. /* We use char because int might match the return type of a gcc2
  2080.     builtin and then its argument prototype would still apply.  */
  2081. char wnoutrefresh();
  2082.  
  2083. int main() { return 0; }
  2084. int t() {
  2085. wnoutrefresh()
  2086. ; return 0; }
  2087. EOF
  2088. if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2089.   rm -rf conftest*
  2090.   eval "ac_cv_lib_$ac_lib_var=yes"
  2091. else
  2092.   rm -rf conftest*
  2093.   eval "ac_cv_lib_$ac_lib_var=no"
  2094. fi
  2095. rm -f conftest*
  2096. LIBS="$ac_save_LIBS"
  2097.  
  2098. fi
  2099. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2100.   echo "$ac_t""yes" 1>&6
  2101.   CURSESLIB=curses
  2102. else
  2103.   echo "$ac_t""no" 1>&6
  2104. CURSESLIB=''
  2105. fi
  2106.  
  2107.             if test "$CURSESLIB" = "curses" ; then
  2108.                 TERMCAPLIB=-ltermcap
  2109.             else
  2110.                 # Okay, you don't have one ncftp can use, but maybe
  2111.                 # we should tell the user if they have a shitty curses
  2112.                 # library.
  2113.  
  2114.                 unset ac_cv_lib_curses
  2115.                 if test "$nc_cv_lib_termcap" = yes ; then
  2116.                     echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  2117. ac_lib_var=`echo curses'_'endwin | tr './+\055' '__p_'`
  2118. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2119.   echo $ac_n "(cached) $ac_c" 1>&6
  2120. else
  2121.   ac_save_LIBS="$LIBS"
  2122. LIBS="-lcurses -ltermcap $LIBS"
  2123. cat > conftest.$ac_ext <<EOF
  2124. #line 2125 "configure"
  2125. #include "confdefs.h"
  2126. /* Override any gcc2 internal prototype to avoid an error.  */
  2127. /* We use char because int might match the return type of a gcc2
  2128.     builtin and then its argument prototype would still apply.  */
  2129. char endwin();
  2130.  
  2131. int main() { return 0; }
  2132. int t() {
  2133. endwin()
  2134. ; return 0; }
  2135. EOF
  2136. if { (eval echo configure:2137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2137.   rm -rf conftest*
  2138.   eval "ac_cv_lib_$ac_lib_var=yes"
  2139. else
  2140.   rm -rf conftest*
  2141.   eval "ac_cv_lib_$ac_lib_var=no"
  2142. fi
  2143. rm -f conftest*
  2144. LIBS="$ac_save_LIBS"
  2145.  
  2146. fi
  2147. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2148.   echo "$ac_t""yes" 1>&6
  2149.   obselete_lib=yes
  2150. else
  2151.   echo "$ac_t""no" 1>&6
  2152. obselete_lib=no
  2153. fi
  2154.  
  2155.                 else
  2156.                     echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  2157. ac_lib_var=`echo curses'_'endwin | tr './+\055' '__p_'`
  2158. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2159.   echo $ac_n "(cached) $ac_c" 1>&6
  2160. else
  2161.   ac_save_LIBS="$LIBS"
  2162. LIBS="-lcurses  $LIBS"
  2163. cat > conftest.$ac_ext <<EOF
  2164. #line 2165 "configure"
  2165. #include "confdefs.h"
  2166. /* Override any gcc2 internal prototype to avoid an error.  */
  2167. /* We use char because int might match the return type of a gcc2
  2168.     builtin and then its argument prototype would still apply.  */
  2169. char endwin();
  2170.  
  2171. int main() { return 0; }
  2172. int t() {
  2173. endwin()
  2174. ; return 0; }
  2175. EOF
  2176. if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2177.   rm -rf conftest*
  2178.   eval "ac_cv_lib_$ac_lib_var=yes"
  2179. else
  2180.   rm -rf conftest*
  2181.   eval "ac_cv_lib_$ac_lib_var=no"
  2182. fi
  2183. rm -f conftest*
  2184. LIBS="$ac_save_LIBS"
  2185.  
  2186. fi
  2187. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2188.   echo "$ac_t""yes" 1>&6
  2189.   obselete_lib=yes
  2190. else
  2191.   echo "$ac_t""no" 1>&6
  2192. obselete_lib=no
  2193. fi
  2194.  
  2195.                 fi
  2196.  
  2197.                 if test "$obselete_lib" = no ; then    
  2198.                     echo "configure: warning: Did not detect a useable curses library." 1>&2
  2199.                 fi
  2200.             fi
  2201.         fi
  2202.     fi
  2203.  
  2204.     if test "$CURSESLIB" = "" ; then
  2205.         # Try termlib with Solaris 2.3
  2206.         echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
  2207. ac_lib_var=`echo termlib'_'endwin | tr './+\055' '__p_'`
  2208. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2209.   echo $ac_n "(cached) $ac_c" 1>&6
  2210. else
  2211.   ac_save_LIBS="$LIBS"
  2212. LIBS="-ltermlib  $LIBS"
  2213. cat > conftest.$ac_ext <<EOF
  2214. #line 2215 "configure"
  2215. #include "confdefs.h"
  2216. /* Override any gcc2 internal prototype to avoid an error.  */
  2217. /* We use char because int might match the return type of a gcc2
  2218.     builtin and then its argument prototype would still apply.  */
  2219. char endwin();
  2220.  
  2221. int main() { return 0; }
  2222. int t() {
  2223. endwin()
  2224. ; return 0; }
  2225. EOF
  2226. if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2227.   rm -rf conftest*
  2228.   eval "ac_cv_lib_$ac_lib_var=yes"
  2229. else
  2230.   rm -rf conftest*
  2231.   eval "ac_cv_lib_$ac_lib_var=no"
  2232. fi
  2233. rm -f conftest*
  2234. LIBS="$ac_save_LIBS"
  2235.  
  2236. fi
  2237. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2238.   echo "$ac_t""yes" 1>&6
  2239.   CURSESLIB=termlib
  2240. else
  2241.   echo "$ac_t""no" 1>&6
  2242. fi
  2243.  
  2244.     fi
  2245. fi
  2246.  
  2247. if test $nc_cv_ncurses = yes ; then
  2248.     echo $ac_n "checking for -lncurses""... $ac_c" 1>&6
  2249. ac_lib_var=`echo ncurses'_'endwin | tr './+\055' '__p_'`
  2250. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2251.   echo $ac_n "(cached) $ac_c" 1>&6
  2252. else
  2253.   ac_save_LIBS="$LIBS"
  2254. LIBS="-lncurses  $LIBS"
  2255. cat > conftest.$ac_ext <<EOF
  2256. #line 2257 "configure"
  2257. #include "confdefs.h"
  2258. /* Override any gcc2 internal prototype to avoid an error.  */
  2259. /* We use char because int might match the return type of a gcc2
  2260.     builtin and then its argument prototype would still apply.  */
  2261. char endwin();
  2262.  
  2263. int main() { return 0; }
  2264. int t() {
  2265. endwin()
  2266. ; return 0; }
  2267. EOF
  2268. if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2269.   rm -rf conftest*
  2270.   eval "ac_cv_lib_$ac_lib_var=yes"
  2271. else
  2272.   rm -rf conftest*
  2273.   eval "ac_cv_lib_$ac_lib_var=no"
  2274. fi
  2275. rm -f conftest*
  2276. LIBS="$ac_save_LIBS"
  2277.  
  2278. fi
  2279. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2280.   echo "$ac_t""yes" 1>&6
  2281.   CURSESLIB=ncurses
  2282. else
  2283.   echo "$ac_t""no" 1>&6
  2284. fi
  2285.  
  2286.     if test "$CURSESLIB" = ncurses && test "$nc_cv_extra_dirs" = yes ; then
  2287.         # See if we should add -I/usr/local/include/ncurses, etc.
  2288.         echo "checking for extra include and lib directories..." 1>&6
  2289. b1=`cd .. ; pwd`
  2290. b2=`cd ../.. ; pwd`
  2291. exdirs="$HOME $j $b1 $b2 $prefix /usr/local /usr /usr/ccs"
  2292.  
  2293. subexdirs="ncurses"
  2294. if test "$subexdirs" = "" ; then
  2295.     subexdirs="-"
  2296. fi
  2297. for subexdir in $subexdirs ; do
  2298. if test "$subexdir" = "-" ; then
  2299.     subexdir=""
  2300. else
  2301.     subexdir="/$subexdir"
  2302. fi
  2303. for exdir in $exdirs ; do
  2304.     if test "$exdir" != "/usr" || test "$subexdir" != ""; then
  2305.         incdir="${exdir}/include${subexdir}"
  2306.         
  2307. incdir="$incdir"
  2308. if test -r $incdir ; then
  2309.     case "$CPPFLAGS" in
  2310.         *${incdir}*)
  2311.             # echo "   + already had $incdir" 1>&6
  2312.             ;;
  2313.         *)
  2314.             if test "$CPPFLAGS" = "" ; then
  2315.                 CPPFLAGS="-I$incdir"
  2316.             else
  2317.                 CPPFLAGS="$CPPFLAGS -I$incdir"
  2318.             fi
  2319.             echo "   + found $incdir" 1>&6
  2320.             ;;
  2321.     esac
  2322. fi
  2323.  
  2324.  
  2325.         libdir="${exdir}/lib${subexdir}"
  2326.         
  2327. libdir="$libdir"
  2328. if test -r $libdir ; then
  2329.     case "$LDFLAGS" in
  2330.         *${libdir}*)
  2331.             # echo "   + already had $libdir" 1>&6
  2332.             ;;
  2333.         *)
  2334.             if test "$LDFLAGS" = "" ; then
  2335.                 LDFLAGS="-L$libdir"
  2336.             else
  2337.                 LDFLAGS="$LDFLAGS -L$libdir"
  2338.             fi
  2339.             echo "   + found $libdir" 1>&6
  2340.             ;;
  2341.     esac
  2342. fi
  2343.  
  2344.     fi
  2345. done
  2346. done
  2347.  
  2348.  
  2349.         # See if we should add -I/usr/local/ncurses
  2350.         
  2351. incdir="/usr/local/ncurses"
  2352. if test -r $incdir ; then
  2353.     case "$CPPFLAGS" in
  2354.         *${incdir}*)
  2355.             # echo "   + already had $incdir" 1>&6
  2356.             ;;
  2357.         *)
  2358.             if test "$CPPFLAGS" = "" ; then
  2359.                 CPPFLAGS="-I$incdir"
  2360.             else
  2361.                 CPPFLAGS="$CPPFLAGS -I$incdir"
  2362.             fi
  2363.             echo "   + found $incdir" 1>&6
  2364.             ;;
  2365.     esac
  2366. fi
  2367.  
  2368.  
  2369.         # Some people (me) have two versions of ncurses on
  2370.         # the system.  Use the one in /usr/local first.
  2371.         case "$CPPFLAGS" in
  2372.             */usr/local/include/ncurses*/usr/include/ncurses*)
  2373.                 CPPFLAGS=`echo "$CPPFLAGS" | sed 's@-I/usr/include/ncurses@@g'`
  2374.         esac
  2375.     fi
  2376. fi
  2377.  
  2378. if test "x$CURSESLIB" = xcurses -o "x$CURSESLIB" = xcursesX -o "x$CURSESLIB" = "xtermlib" ; then
  2379.  
  2380.     LIBS="$LIBS -l$CURSESLIB"
  2381. #    if test "x$CURSESLIB" = xcursesX ; then
  2382. #        LIBS="$LIBS -lcurses"
  2383. #    fi
  2384.     cat >> confdefs.h <<\EOF
  2385. #define HAVE_LIBCURSES 1
  2386. EOF
  2387.  
  2388.  
  2389. elif test "x$CURSESLIB" = xncurses ; then
  2390.     LIBS="$LIBS -lncurses"
  2391.     cat >> confdefs.h <<\EOF
  2392. #define HAVE_LIBNCURSES 1
  2393. EOF
  2394.  
  2395. fi
  2396.  
  2397. if test "$TERMCAPLIB" != "" ; then
  2398.     LIBS="$LIBS -l$TERMCAPLIB"
  2399.     cat >> confdefs.h <<\EOF
  2400. #define HAVE_LIBTERMCAP 1
  2401. EOF
  2402.  
  2403. fi
  2404.  
  2405. if test "$obselete_lib" = yes ; then    
  2406.     if test "x$CURSESLIB" != xncurses ; then
  2407.             echo "configure: warning: You have an older curses library, but it" 1>&2
  2408.             echo "configure: warning: can't be used because it does not have the" 1>&2
  2409.             echo "configure: warning: functions wnoutrefresh and doupdate, which" 1>&2
  2410.             echo "configure: warning: NcFTP needs.  Consider installing the ncurses" 1>&2
  2411.             echo "configure: warning: library, from prep.ai.mit.edu, in /pub/gnu." 1>&2
  2412.     fi
  2413. fi
  2414.  
  2415. # Readline must be listed before -lcurses and/or -ltermcap.
  2416. if test "$nc_cv_readline" = yes ; then
  2417.     READLINELIB=''
  2418.     echo $ac_n "checking for -lreadline""... $ac_c" 1>&6
  2419. ac_lib_var=`echo readline'_'readline | tr './+\055' '__p_'`
  2420. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2421.   echo $ac_n "(cached) $ac_c" 1>&6
  2422. else
  2423.   ac_save_LIBS="$LIBS"
  2424. LIBS="-lreadline  $LIBS"
  2425. cat > conftest.$ac_ext <<EOF
  2426. #line 2427 "configure"
  2427. #include "confdefs.h"
  2428. /* Override any gcc2 internal prototype to avoid an error.  */
  2429. /* We use char because int might match the return type of a gcc2
  2430.     builtin and then its argument prototype would still apply.  */
  2431. char readline();
  2432.  
  2433. int main() { return 0; }
  2434. int t() {
  2435. readline()
  2436. ; return 0; }
  2437. EOF
  2438. if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2439.   rm -rf conftest*
  2440.   eval "ac_cv_lib_$ac_lib_var=yes"
  2441. else
  2442.   rm -rf conftest*
  2443.   eval "ac_cv_lib_$ac_lib_var=no"
  2444. fi
  2445. rm -f conftest*
  2446. LIBS="$ac_save_LIBS"
  2447.  
  2448. fi
  2449. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2450.   echo "$ac_t""yes" 1>&6
  2451.   READLINELIB=readline
  2452. else
  2453.   echo "$ac_t""no" 1>&6
  2454. fi
  2455.  
  2456.     if test "$READLINELIB" != "" ; then
  2457.         if test "$CURSESLIB" != "" ; then
  2458.             LIBS=`echo "$LIBS" | sed "s@$CURSESLIB@$READLINELIB -l$CURSESLIB@"`
  2459.         elif test "$TERMCAPLIB" != "" ; then
  2460.             LIBS=`echo "$LIBS" | sed "s@$TERMCAPLIB@$READLINELIB -l$TERMCAPLIB@"`
  2461.         fi
  2462.         cat >> confdefs.h <<\EOF
  2463. #define HAVE_LIBREADLINE 1
  2464. EOF
  2465.  
  2466.     fi
  2467. else
  2468.     ac_cv_lib_readline=no
  2469. fi
  2470.  
  2471.  
  2472. if test "$ac_cv_lib_readline" = yes ; then
  2473.     # Make sure we link termcap with readline if we aren't already
  2474.     # linking curses or termcap.
  2475.     case "$LIBS" in
  2476.         *termcap*|*curses*)
  2477.             ;;
  2478.         *)
  2479.             LIBS="$LIBS -ltermcap"
  2480.             ;;
  2481.     esac
  2482.     for ac_func in filename_completion_function
  2483. do
  2484. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2485. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2486.   echo $ac_n "(cached) $ac_c" 1>&6
  2487. else
  2488.   cat > conftest.$ac_ext <<EOF
  2489. #line 2490 "configure"
  2490. #include "confdefs.h"
  2491. /* System header to define __stub macros and hopefully few prototypes,
  2492.     which can conflict with char $ac_func(); below.  */
  2493. #include <assert.h>
  2494. /* Override any gcc2 internal prototype to avoid an error.  */
  2495. /* We use char because int might match the return type of a gcc2
  2496.     builtin and then its argument prototype would still apply.  */
  2497. char $ac_func();
  2498.  
  2499. int main() { return 0; }
  2500. int t() {
  2501.  
  2502. /* The GNU C library defines this for functions which it implements
  2503.     to always fail with ENOSYS.  Some functions are actually named
  2504.     something starting with __ and the normal name is an alias.  */
  2505. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2506. choke me
  2507. #else
  2508. $ac_func();
  2509. #endif
  2510.  
  2511. ; return 0; }
  2512. EOF
  2513. if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2514.   rm -rf conftest*
  2515.   eval "ac_cv_func_$ac_func=yes"
  2516. else
  2517.   rm -rf conftest*
  2518.   eval "ac_cv_func_$ac_func=no"
  2519. fi
  2520. rm -f conftest*
  2521.  
  2522. fi
  2523. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2524.   echo "$ac_t""yes" 1>&6
  2525.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2526.   cat >> confdefs.h <<EOF
  2527. #define $ac_tr_func 1
  2528. EOF
  2529.  
  2530. else
  2531.   echo "$ac_t""no" 1>&6
  2532. fi
  2533. done
  2534.  
  2535. fi
  2536.  
  2537.  
  2538.  
  2539. # Readline and Ncurses could both define "backspace".
  2540. # Warn about this if we have both things in our definitions list.
  2541.  
  2542. if test "$ac_cv_lib_readline" = yes && test "$ac_cv_lib_ncurses" = yes ; then
  2543.  
  2544. echo $ac_n "checking if readline and ncurses will link together""... $ac_c" 1>&6
  2545. j="$LIBS"
  2546. LIBS="-lreadline -lncurses"
  2547. cat > conftest.$ac_ext <<EOF
  2548. #line 2549 "configure"
  2549. #include "confdefs.h"
  2550.  
  2551. int main() { return 0; }
  2552. int t() {
  2553.  
  2554. readline("prompt");
  2555. endwin();
  2556.  
  2557. ; return 0; }
  2558. EOF
  2559. if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2560.   rm -rf conftest*
  2561.   k=yes
  2562. else
  2563.   rm -rf conftest*
  2564.   k=no
  2565. fi
  2566. rm -f conftest*
  2567.  
  2568. if test "$k" = no ; then
  2569.     echo "$ac_t""no" 1>&6
  2570.     # Remove '-lreadline' from LIBS.
  2571.     LIBS=`echo $j | sed s/-lreadline//g`
  2572.     ac_cv_lib_readline=no
  2573.     echo "configure: warning: The versions of GNU readline and ncurses you have installed on this system
  2574. can't be used together, because they use the same symbol, backspace. If
  2575. possible, recompile one of the libraries with -Dbackspace=back_space, then
  2576. re-run configure." 1>&2
  2577.  
  2578. else
  2579.     echo "$ac_t""yes" 1>&6
  2580.     LIBS="$j"
  2581. fi
  2582.  
  2583. fi
  2584.  
  2585. echo $ac_n "checking for -lposix""... $ac_c" 1>&6
  2586. ac_lib_var=`echo posix'_'tcgetpgrp | tr './+\055' '__p_'`
  2587. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2588.   echo $ac_n "(cached) $ac_c" 1>&6
  2589. else
  2590.   ac_save_LIBS="$LIBS"
  2591. LIBS="-lposix  $LIBS"
  2592. cat > conftest.$ac_ext <<EOF
  2593. #line 2594 "configure"
  2594. #include "confdefs.h"
  2595. /* Override any gcc2 internal prototype to avoid an error.  */
  2596. /* We use char because int might match the return type of a gcc2
  2597.     builtin and then its argument prototype would still apply.  */
  2598. char tcgetpgrp();
  2599.  
  2600. int main() { return 0; }
  2601. int t() {
  2602. tcgetpgrp()
  2603. ; return 0; }
  2604. EOF
  2605. if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2606.   rm -rf conftest*
  2607.   eval "ac_cv_lib_$ac_lib_var=yes"
  2608. else
  2609.   rm -rf conftest*
  2610.   eval "ac_cv_lib_$ac_lib_var=no"
  2611. fi
  2612. rm -f conftest*
  2613. LIBS="$ac_save_LIBS"
  2614.  
  2615. fi
  2616. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2617.   echo "$ac_t""yes" 1>&6
  2618.     ac_tr_lib=HAVE_LIB`echo posix | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2619.   cat >> confdefs.h <<EOF
  2620. #define $ac_tr_lib 1
  2621. EOF
  2622.  
  2623.   LIBS="-lposix $LIBS"
  2624.  
  2625. else
  2626.   echo "$ac_t""no" 1>&6
  2627. fi
  2628.  
  2629.  
  2630. if test "$nc_cv_shared_libc" = yes ; then
  2631. # This should be the last library to look for.
  2632. echo $ac_n "checking for -lc_s""... $ac_c" 1>&6
  2633. ac_lib_var=`echo c_s'_'main | tr './+\055' '__p_'`
  2634. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2635.   echo $ac_n "(cached) $ac_c" 1>&6
  2636. else
  2637.   ac_save_LIBS="$LIBS"
  2638. LIBS="-lc_s  $LIBS"
  2639. cat > conftest.$ac_ext <<EOF
  2640. #line 2641 "configure"
  2641. #include "confdefs.h"
  2642.  
  2643. int main() { return 0; }
  2644. int t() {
  2645. main()
  2646. ; return 0; }
  2647. EOF
  2648. if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2649.   rm -rf conftest*
  2650.   eval "ac_cv_lib_$ac_lib_var=yes"
  2651. else
  2652.   rm -rf conftest*
  2653.   eval "ac_cv_lib_$ac_lib_var=no"
  2654. fi
  2655. rm -f conftest*
  2656. LIBS="$ac_save_LIBS"
  2657.  
  2658. fi
  2659. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2660.   echo "$ac_t""yes" 1>&6
  2661.     ac_tr_lib=HAVE_LIB`echo c_s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2662.   cat >> confdefs.h <<EOF
  2663. #define $ac_tr_lib 1
  2664. EOF
  2665.  
  2666.   LIBS="-lc_s $LIBS"
  2667.  
  2668. else
  2669.   echo "$ac_t""no" 1>&6
  2670. fi
  2671.  
  2672. else
  2673. ac_cv_lib_c_s=no
  2674. fi
  2675.  
  2676. # strftime is in -lintl on SCO UNIX.
  2677. echo $ac_n "checking for -lintl""... $ac_c" 1>&6
  2678. ac_lib_var=`echo intl'_'strftime | tr './+\055' '__p_'`
  2679. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2680.   echo $ac_n "(cached) $ac_c" 1>&6
  2681. else
  2682.   ac_save_LIBS="$LIBS"
  2683. LIBS="-lintl  $LIBS"
  2684. cat > conftest.$ac_ext <<EOF
  2685. #line 2686 "configure"
  2686. #include "confdefs.h"
  2687. /* Override any gcc2 internal prototype to avoid an error.  */
  2688. /* We use char because int might match the return type of a gcc2
  2689.     builtin and then its argument prototype would still apply.  */
  2690. char strftime();
  2691.  
  2692. int main() { return 0; }
  2693. int t() {
  2694. strftime()
  2695. ; return 0; }
  2696. EOF
  2697. if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2698.   rm -rf conftest*
  2699.   eval "ac_cv_lib_$ac_lib_var=yes"
  2700. else
  2701.   rm -rf conftest*
  2702.   eval "ac_cv_lib_$ac_lib_var=no"
  2703. fi
  2704. rm -f conftest*
  2705. LIBS="$ac_save_LIBS"
  2706.  
  2707. fi
  2708. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2709.   echo "$ac_t""yes" 1>&6
  2710.   LIBS="-lintl $LIBS"
  2711. else
  2712.   echo "$ac_t""no" 1>&6
  2713. fi
  2714.  
  2715. echo $ac_n "checking for strftime""... $ac_c" 1>&6
  2716. if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
  2717.   echo $ac_n "(cached) $ac_c" 1>&6
  2718. else
  2719.   cat > conftest.$ac_ext <<EOF
  2720. #line 2721 "configure"
  2721. #include "confdefs.h"
  2722. /* System header to define __stub macros and hopefully few prototypes,
  2723.     which can conflict with char strftime(); below.  */
  2724. #include <assert.h>
  2725. /* Override any gcc2 internal prototype to avoid an error.  */
  2726. /* We use char because int might match the return type of a gcc2
  2727.     builtin and then its argument prototype would still apply.  */
  2728. char strftime();
  2729.  
  2730. int main() { return 0; }
  2731. int t() {
  2732.  
  2733. /* The GNU C library defines this for functions which it implements
  2734.     to always fail with ENOSYS.  Some functions are actually named
  2735.     something starting with __ and the normal name is an alias.  */
  2736. #if defined (__stub_strftime) || defined (__stub___strftime)
  2737. choke me
  2738. #else
  2739. strftime();
  2740. #endif
  2741.  
  2742. ; return 0; }
  2743. EOF
  2744. if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2745.   rm -rf conftest*
  2746.   eval "ac_cv_func_strftime=yes"
  2747. else
  2748.   rm -rf conftest*
  2749.   eval "ac_cv_func_strftime=no"
  2750. fi
  2751. rm -f conftest*
  2752.  
  2753. fi
  2754. if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
  2755.   echo "$ac_t""yes" 1>&6
  2756.   cat >> confdefs.h <<\EOF
  2757. #define HAVE_STRFTIME 1
  2758. EOF
  2759.  
  2760. else
  2761.   echo "$ac_t""no" 1>&6
  2762. fi
  2763.  
  2764.  
  2765. for ac_func in getdomainname getcwd getwd memmove mktime symlink setlinebuf
  2766. do
  2767. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2768. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2769.   echo $ac_n "(cached) $ac_c" 1>&6
  2770. else
  2771.   cat > conftest.$ac_ext <<EOF
  2772. #line 2773 "configure"
  2773. #include "confdefs.h"
  2774. /* System header to define __stub macros and hopefully few prototypes,
  2775.     which can conflict with char $ac_func(); below.  */
  2776. #include <assert.h>
  2777. /* Override any gcc2 internal prototype to avoid an error.  */
  2778. /* We use char because int might match the return type of a gcc2
  2779.     builtin and then its argument prototype would still apply.  */
  2780. char $ac_func();
  2781.  
  2782. int main() { return 0; }
  2783. int t() {
  2784.  
  2785. /* The GNU C library defines this for functions which it implements
  2786.     to always fail with ENOSYS.  Some functions are actually named
  2787.     something starting with __ and the normal name is an alias.  */
  2788. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2789. choke me
  2790. #else
  2791. $ac_func();
  2792. #endif
  2793.  
  2794. ; return 0; }
  2795. EOF
  2796. if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2797.   rm -rf conftest*
  2798.   eval "ac_cv_func_$ac_func=yes"
  2799. else
  2800.   rm -rf conftest*
  2801.   eval "ac_cv_func_$ac_func=no"
  2802. fi
  2803. rm -f conftest*
  2804.  
  2805. fi
  2806. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2807.   echo "$ac_t""yes" 1>&6
  2808.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2809.   cat >> confdefs.h <<EOF
  2810. #define $ac_tr_func 1
  2811. EOF
  2812.  
  2813. else
  2814.   echo "$ac_t""no" 1>&6
  2815. fi
  2816. done
  2817.  
  2818. for ac_func in strerror strcasecmp remove unlink tcgetpgrp fcntl flock
  2819. do
  2820. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2821. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2822.   echo $ac_n "(cached) $ac_c" 1>&6
  2823. else
  2824.   cat > conftest.$ac_ext <<EOF
  2825. #line 2826 "configure"
  2826. #include "confdefs.h"
  2827. /* System header to define __stub macros and hopefully few prototypes,
  2828.     which can conflict with char $ac_func(); below.  */
  2829. #include <assert.h>
  2830. /* Override any gcc2 internal prototype to avoid an error.  */
  2831. /* We use char because int might match the return type of a gcc2
  2832.     builtin and then its argument prototype would still apply.  */
  2833. char $ac_func();
  2834.  
  2835. int main() { return 0; }
  2836. int t() {
  2837.  
  2838. /* The GNU C library defines this for functions which it implements
  2839.     to always fail with ENOSYS.  Some functions are actually named
  2840.     something starting with __ and the normal name is an alias.  */
  2841. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2842. choke me
  2843. #else
  2844. $ac_func();
  2845. #endif
  2846.  
  2847. ; return 0; }
  2848. EOF
  2849. if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2850.   rm -rf conftest*
  2851.   eval "ac_cv_func_$ac_func=yes"
  2852. else
  2853.   rm -rf conftest*
  2854.   eval "ac_cv_func_$ac_func=no"
  2855. fi
  2856. rm -f conftest*
  2857.  
  2858. fi
  2859. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2860.   echo "$ac_t""yes" 1>&6
  2861.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2862.   cat >> confdefs.h <<EOF
  2863. #define $ac_tr_func 1
  2864. EOF
  2865.  
  2866. else
  2867.   echo "$ac_t""no" 1>&6
  2868. fi
  2869. done
  2870.  
  2871.  
  2872. echo $ac_n "checking for domain name in /etc/resolv.conf""... $ac_c" 1>&6
  2873. RESOLV_CONF_DOMAIN=""
  2874. if test -f /etc/resolv.conf ; then
  2875.         RESOLV_CONF_DOMAIN=`sed 's/[#;].*//' /etc/resolv.conf | sed -n 's/domain[     ]//p' | sed -n 1,1p | tr -d '     '`
  2876.         if test "$RESOLV_CONF_DOMAIN" = "" ; then
  2877.         echo "$ac_t""no" 1>&6
  2878.     else
  2879.         echo "$ac_t""$RESOLV_CONF_DOMAIN" 1>&6
  2880.         RESOLV_CONF_DOMAIN=" # -DDOMAINNAME=\\\"$RESOLV_CONF_DOMAIN\\\""
  2881.     fi
  2882. else
  2883.     echo "$ac_t""no" 1>&6
  2884. fi
  2885.  
  2886.  
  2887. if test "x$CURSESLIB" = x ; then
  2888. # Don't check these unless we have a curses library.
  2889.     ac_cv_func_curs_set=no
  2890.     ac_cv_func_getmaxyx=no
  2891.     ac_cv_func_beep=no
  2892.     ac_cv_func_notimeout=no
  2893. else
  2894.     for ac_func in curs_set getmaxyx beep notimeout
  2895. do
  2896. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2897. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2898.   echo $ac_n "(cached) $ac_c" 1>&6
  2899. else
  2900.   cat > conftest.$ac_ext <<EOF
  2901. #line 2902 "configure"
  2902. #include "confdefs.h"
  2903. /* System header to define __stub macros and hopefully few prototypes,
  2904.     which can conflict with char $ac_func(); below.  */
  2905. #include <assert.h>
  2906. /* Override any gcc2 internal prototype to avoid an error.  */
  2907. /* We use char because int might match the return type of a gcc2
  2908.     builtin and then its argument prototype would still apply.  */
  2909. char $ac_func();
  2910.  
  2911. int main() { return 0; }
  2912. int t() {
  2913.  
  2914. /* The GNU C library defines this for functions which it implements
  2915.     to always fail with ENOSYS.  Some functions are actually named
  2916.     something starting with __ and the normal name is an alias.  */
  2917. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2918. choke me
  2919. #else
  2920. $ac_func();
  2921. #endif
  2922.  
  2923. ; return 0; }
  2924. EOF
  2925. if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2926.   rm -rf conftest*
  2927.   eval "ac_cv_func_$ac_func=yes"
  2928. else
  2929.   rm -rf conftest*
  2930.   eval "ac_cv_func_$ac_func=no"
  2931. fi
  2932. rm -f conftest*
  2933.  
  2934. fi
  2935. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2936.   echo "$ac_t""yes" 1>&6
  2937.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2938.   cat >> confdefs.h <<EOF
  2939. #define $ac_tr_func 1
  2940. EOF
  2941.  
  2942. else
  2943.   echo "$ac_t""no" 1>&6
  2944. fi
  2945. done
  2946.  
  2947.     if test $ac_cv_func_getmaxyx = no ; then
  2948.         echo $ac_n "checking for maxx or _maxx in WINDOW structure""... $ac_c" 1>&6
  2949.         cat > conftest.$ac_ext <<EOF
  2950. #line 2951 "configure"
  2951. #include "confdefs.h"
  2952. #include <curses.h>
  2953. int main() { return 0; }
  2954. int t() {
  2955.  
  2956.         WINDOW *w;
  2957.     
  2958.         w = newwin(10, 10, 1, 1);
  2959.         w->maxx = 0;
  2960.         delwin(w);
  2961. ; return 0; }
  2962. EOF
  2963. if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2964.   rm -rf conftest*
  2965.   maxx=yes
  2966. else
  2967.   rm -rf conftest*
  2968.   _maxx=yes
  2969. fi
  2970. rm -f conftest*
  2971.  
  2972.         if test "$maxx" = yes ; then
  2973.             cat >> confdefs.h <<\EOF
  2974. #define HAVE_MAXX 1
  2975. EOF
  2976.  
  2977.             echo "$ac_t""maxx" 1>&6
  2978.         else
  2979.             # Most systems use _maxx as their internal field.
  2980.             cat >> confdefs.h <<\EOF
  2981. #define HAVE__MAXX 1
  2982. EOF
  2983.  
  2984.             echo "$ac_t""assuming _maxx" 1>&6
  2985.         fi
  2986.     fi
  2987. fi
  2988.  
  2989. if test $ac_cv_func_getcwd = no && test $ac_cv_func_getwd = no ; then
  2990. echo "configure: warning: This system does not have either getwd or getcwd?" 1>&2
  2991. echo "configure: warning: I find that a little hard to believe." 1>&2
  2992. echo "configure: warning: You may want to try -DHAVE_GETWD anyway." 1>&2
  2993. echo "configure: warning: 
  2994. This could also mean that your compiler isn't working" 1>&2
  2995. echo "configure: warning: with this configure script.  Check the ./config.log" 1>&2
  2996. echo "configure: warning: and look for anomalies." 1>&2
  2997. fi
  2998.  
  2999. if test $ac_cv_func_remove = no && test $ac_cv_func_unlink = no ; then
  3000. echo "configure: warning: This system does not have either remove or unlink?" 1>&2
  3001. echo "configure: warning: I find that a little hard to believe." 1>&2
  3002. echo "configure: warning: You may want to try -DHAVE_UNLINK anyway." 1>&2
  3003. fi
  3004.  
  3005. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  3006. # On Suns, sometimes $CPP names a directory.
  3007. if test -n "$CPP" && test -d "$CPP"; then
  3008.   CPP=
  3009. fi
  3010. if test -z "$CPP"; then
  3011. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  3012.   echo $ac_n "(cached) $ac_c" 1>&6
  3013. else
  3014.     # This must be in double quotes, not single quotes, because CPP may get
  3015.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  3016.   CPP="${CC-cc} -E"
  3017.   # On the NeXT, cc -E runs the code through the compiler's parser,
  3018.   # not just through cpp.
  3019.   cat > conftest.$ac_ext <<EOF
  3020. #line 3021 "configure"
  3021. #include "confdefs.h"
  3022. #include <assert.h>
  3023. Syntax Error
  3024. EOF
  3025. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3026. { (eval echo configure:3027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3027. ac_err=`grep -v '^ *+' conftest.out`
  3028. if test -z "$ac_err"; then
  3029.   :
  3030. else
  3031.   echo "$ac_err" >&5
  3032.   rm -rf conftest*
  3033.   CPP="${CC-cc} -E -traditional-cpp"
  3034.   cat > conftest.$ac_ext <<EOF
  3035. #line 3036 "configure"
  3036. #include "confdefs.h"
  3037. #include <assert.h>
  3038. Syntax Error
  3039. EOF
  3040. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3041. { (eval echo configure:3042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3042. ac_err=`grep -v '^ *+' conftest.out`
  3043. if test -z "$ac_err"; then
  3044.   :
  3045. else
  3046.   echo "$ac_err" >&5
  3047.   rm -rf conftest*
  3048.   CPP=/lib/cpp
  3049. fi
  3050. rm -f conftest*
  3051. fi
  3052. rm -f conftest*
  3053.   ac_cv_prog_CPP="$CPP"
  3054. fi
  3055.   CPP="$ac_cv_prog_CPP"
  3056. else
  3057.   ac_cv_prog_CPP="$CPP"
  3058. fi
  3059. echo "$ac_t""$CPP" 1>&6
  3060.  
  3061. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  3062. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  3063.   echo $ac_n "(cached) $ac_c" 1>&6
  3064. else
  3065.   cat > conftest.$ac_ext <<EOF
  3066. #line 3067 "configure"
  3067. #include "confdefs.h"
  3068. #include <stdlib.h>
  3069. #include <stdarg.h>
  3070. #include <string.h>
  3071. #include <float.h>
  3072. EOF
  3073. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3074. { (eval echo configure:3075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3075. ac_err=`grep -v '^ *+' conftest.out`
  3076. if test -z "$ac_err"; then
  3077.   rm -rf conftest*
  3078.   ac_cv_header_stdc=yes
  3079. else
  3080.   echo "$ac_err" >&5
  3081.   rm -rf conftest*
  3082.   ac_cv_header_stdc=no
  3083. fi
  3084. rm -f conftest*
  3085.  
  3086. if test $ac_cv_header_stdc = yes; then
  3087.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  3088. cat > conftest.$ac_ext <<EOF
  3089. #line 3090 "configure"
  3090. #include "confdefs.h"
  3091. #include <string.h>
  3092. EOF
  3093. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3094.   egrep "memchr" >/dev/null 2>&1; then
  3095.   :
  3096. else
  3097.   rm -rf conftest*
  3098.   ac_cv_header_stdc=no
  3099. fi
  3100. rm -f conftest*
  3101.  
  3102. fi
  3103.  
  3104. if test $ac_cv_header_stdc = yes; then
  3105.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  3106. cat > conftest.$ac_ext <<EOF
  3107. #line 3108 "configure"
  3108. #include "confdefs.h"
  3109. #include <stdlib.h>
  3110. EOF
  3111. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3112.   egrep "free" >/dev/null 2>&1; then
  3113.   :
  3114. else
  3115.   rm -rf conftest*
  3116.   ac_cv_header_stdc=no
  3117. fi
  3118. rm -f conftest*
  3119.  
  3120. fi
  3121.  
  3122. if test $ac_cv_header_stdc = yes; then
  3123.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  3124. if test "$cross_compiling" = yes; then
  3125.   :
  3126. else
  3127. cat > conftest.$ac_ext <<EOF
  3128. #line 3129 "configure"
  3129. #include "confdefs.h"
  3130. #include <ctype.h>
  3131. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  3132. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  3133. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  3134. int main () { int i; for (i = 0; i < 256; i++)
  3135. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  3136. exit (0); }
  3137.  
  3138. EOF
  3139. { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  3140. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3141.   :
  3142. else
  3143.   ac_cv_header_stdc=no
  3144. fi
  3145. fi
  3146. rm -fr conftest*
  3147. fi
  3148. fi
  3149.  
  3150. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  3151. if test $ac_cv_header_stdc = yes; then
  3152.   cat >> confdefs.h <<\EOF
  3153. #define STDC_HEADERS 1
  3154. EOF
  3155.  
  3156. fi
  3157.  
  3158. for ac_hdr in string.h memory.h unistd.h stdarg.h termios.h termio.h sgtty.h
  3159. do
  3160. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  3161. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3162. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3163.   echo $ac_n "(cached) $ac_c" 1>&6
  3164. else
  3165.   cat > conftest.$ac_ext <<EOF
  3166. #line 3167 "configure"
  3167. #include "confdefs.h"
  3168. #include <$ac_hdr>
  3169. EOF
  3170. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3171. { (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3172. ac_err=`grep -v '^ *+' conftest.out`
  3173. if test -z "$ac_err"; then
  3174.   rm -rf conftest*
  3175.   eval "ac_cv_header_$ac_safe=yes"
  3176. else
  3177.   echo "$ac_err" >&5
  3178.   rm -rf conftest*
  3179.   eval "ac_cv_header_$ac_safe=no"
  3180. fi
  3181. rm -f conftest*
  3182. fi
  3183. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3184.   echo "$ac_t""yes" 1>&6
  3185.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3186.   cat >> confdefs.h <<EOF
  3187. #define $ac_tr_hdr 1
  3188. EOF
  3189.  
  3190. else
  3191.   echo "$ac_t""no" 1>&6
  3192. fi
  3193. done
  3194.  
  3195. for ac_hdr in utime.h sys/time.h readline/history.h cursesX.h ncurses.h
  3196. do
  3197. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  3198. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3199. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3200.   echo $ac_n "(cached) $ac_c" 1>&6
  3201. else
  3202.   cat > conftest.$ac_ext <<EOF
  3203. #line 3204 "configure"
  3204. #include "confdefs.h"
  3205. #include <$ac_hdr>
  3206. EOF
  3207. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3208. { (eval echo configure:3209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3209. ac_err=`grep -v '^ *+' conftest.out`
  3210. if test -z "$ac_err"; then
  3211.   rm -rf conftest*
  3212.   eval "ac_cv_header_$ac_safe=yes"
  3213. else
  3214.   echo "$ac_err" >&5
  3215.   rm -rf conftest*
  3216.   eval "ac_cv_header_$ac_safe=no"
  3217. fi
  3218. rm -f conftest*
  3219. fi
  3220. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3221.   echo "$ac_t""yes" 1>&6
  3222.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3223.   cat >> confdefs.h <<EOF
  3224. #define $ac_tr_hdr 1
  3225. EOF
  3226.  
  3227. else
  3228.   echo "$ac_t""no" 1>&6
  3229. fi
  3230. done
  3231.  
  3232. for ac_hdr in limits.h termnet.h term/termnet.h fcntl.h sys/ioctl.h curses.h
  3233. do
  3234. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  3235. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3236. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3237.   echo $ac_n "(cached) $ac_c" 1>&6
  3238. else
  3239.   cat > conftest.$ac_ext <<EOF
  3240. #line 3241 "configure"
  3241. #include "confdefs.h"
  3242. #include <$ac_hdr>
  3243. EOF
  3244. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3245. { (eval echo configure:3246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3246. ac_err=`grep -v '^ *+' conftest.out`
  3247. if test -z "$ac_err"; then
  3248.   rm -rf conftest*
  3249.   eval "ac_cv_header_$ac_safe=yes"
  3250. else
  3251.   echo "$ac_err" >&5
  3252.   rm -rf conftest*
  3253.   eval "ac_cv_header_$ac_safe=no"
  3254. fi
  3255. rm -f conftest*
  3256. fi
  3257. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3258.   echo "$ac_t""yes" 1>&6
  3259.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3260.   cat >> confdefs.h <<EOF
  3261. #define $ac_tr_hdr 1
  3262. EOF
  3263.  
  3264. else
  3265.   echo "$ac_t""no" 1>&6
  3266. fi
  3267. done
  3268.  
  3269. for ac_hdr in net/errno.h sys/file.h sys/bsdtypes.h
  3270. do
  3271. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  3272. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3273. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3274.   echo $ac_n "(cached) $ac_c" 1>&6
  3275. else
  3276.   cat > conftest.$ac_ext <<EOF
  3277. #line 3278 "configure"
  3278. #include "confdefs.h"
  3279. #include <$ac_hdr>
  3280. EOF
  3281. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3282. { (eval echo configure:3283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3283. ac_err=`grep -v '^ *+' conftest.out`
  3284. if test -z "$ac_err"; then
  3285.   rm -rf conftest*
  3286.   eval "ac_cv_header_$ac_safe=yes"
  3287. else
  3288.   echo "$ac_err" >&5
  3289.   rm -rf conftest*
  3290.   eval "ac_cv_header_$ac_safe=no"
  3291. fi
  3292. rm -f conftest*
  3293. fi
  3294. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3295.   echo "$ac_t""yes" 1>&6
  3296.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3297.   cat >> confdefs.h <<EOF
  3298. #define $ac_tr_hdr 1
  3299. EOF
  3300.  
  3301. else
  3302.   echo "$ac_t""no" 1>&6
  3303. fi
  3304. done
  3305.  
  3306. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  3307. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  3308.   echo $ac_n "(cached) $ac_c" 1>&6
  3309. else
  3310.   cat > conftest.$ac_ext <<EOF
  3311. #line 3312 "configure"
  3312. #include "confdefs.h"
  3313. #include <sys/types.h>
  3314. #include <sys/time.h>
  3315. #include <time.h>
  3316. int main() { return 0; }
  3317. int t() {
  3318. struct tm *tp;
  3319. ; return 0; }
  3320. EOF
  3321. if { (eval echo configure:3322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3322.   rm -rf conftest*
  3323.   ac_cv_header_time=yes
  3324. else
  3325.   rm -rf conftest*
  3326.   ac_cv_header_time=no
  3327. fi
  3328. rm -f conftest*
  3329.  
  3330. fi
  3331.  
  3332. echo "$ac_t""$ac_cv_header_time" 1>&6
  3333. if test $ac_cv_header_time = yes; then
  3334.   cat >> confdefs.h <<\EOF
  3335. #define TIME_WITH_SYS_TIME 1
  3336. EOF
  3337.  
  3338. fi
  3339.  
  3340.  
  3341. echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
  3342. if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
  3343.   echo $ac_n "(cached) $ac_c" 1>&6
  3344. else
  3345.   if test "$cross_compiling" = yes; then
  3346.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3347. else
  3348. cat > conftest.$ac_ext <<EOF
  3349. #line 3350 "configure"
  3350. #include "confdefs.h"
  3351. #include <stdio.h>
  3352. /* If setvbuf has the reversed format, exit 0. */
  3353. main () {
  3354.   /* This call has the arguments reversed.
  3355.      A reversed system may check and see that the address of main
  3356.      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  3357.   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
  3358.     exit(1);
  3359.   putc('\r', stdout);
  3360.   exit(0);            /* Non-reversed systems segv here.  */
  3361. }
  3362. EOF
  3363. { (eval echo configure:3364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  3364. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3365.   ac_cv_func_setvbuf_reversed=yes
  3366. else
  3367.   ac_cv_func_setvbuf_reversed=no
  3368. fi
  3369. fi
  3370. rm -fr conftest*
  3371. rm -f core core.* *.core
  3372. fi
  3373.  
  3374. echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
  3375. if test $ac_cv_func_setvbuf_reversed = yes; then
  3376.   cat >> confdefs.h <<\EOF
  3377. #define SETVBUF_REVERSED 1
  3378. EOF
  3379.  
  3380. fi
  3381.  
  3382. echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
  3383. if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
  3384.   echo $ac_n "(cached) $ac_c" 1>&6
  3385. else
  3386.   if test "$cross_compiling" = yes; then
  3387.   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
  3388. else
  3389. cat > conftest.$ac_ext <<EOF
  3390. #line 3391 "configure"
  3391. #include "confdefs.h"
  3392.  
  3393. /*
  3394.  * If this system has a BSD-style getpgrp(),
  3395.  * which takes a pid argument, exit unsuccessfully.
  3396.  *
  3397.  * Snarfed from Chet Ramey's bash pgrp.c test program
  3398.  */
  3399. #include <stdio.h>
  3400. #include <sys/types.h>
  3401.  
  3402. int     pid;
  3403. int     pg1, pg2, pg3, pg4;
  3404. int     ng, np, s, child;
  3405.  
  3406. main()
  3407. {
  3408.         pid = getpid();
  3409.         pg1 = getpgrp(0);
  3410.         pg2 = getpgrp();
  3411.         pg3 = getpgrp(pid);
  3412.         pg4 = getpgrp(1);
  3413.  
  3414.         /*
  3415.          * If all of these values are the same, it's pretty sure that
  3416.          * we're on a system that ignores getpgrp's first argument.
  3417.          */
  3418.         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
  3419.                 exit(0);
  3420.  
  3421.         child = fork();
  3422.         if (child < 0)
  3423.                 exit(1);
  3424.         else if (child == 0) {
  3425.                 np = getpid();
  3426.                 /*
  3427.                  * If this is Sys V, this will not work; pgrp will be
  3428.                  * set to np because setpgrp just changes a pgrp to be
  3429.                  * the same as the pid.
  3430.                  */
  3431.                 setpgrp(np, pg1);
  3432.                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
  3433.                 if (ng == pg1) {
  3434.                         exit(1);
  3435.                 } else {
  3436.                         exit(0);
  3437.                 }
  3438.         } else {
  3439.                 wait(&s);
  3440.                 exit(s>>8);
  3441.         }
  3442. }
  3443.  
  3444. EOF
  3445. { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  3446. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3447.   ac_cv_func_getpgrp_void=yes
  3448. else
  3449.   ac_cv_func_getpgrp_void=no
  3450. fi
  3451. fi
  3452. rm -fr conftest*
  3453.  
  3454. fi
  3455.  
  3456. echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
  3457. if test $ac_cv_func_getpgrp_void = yes; then
  3458.   cat >> confdefs.h <<\EOF
  3459. #define GETPGRP_VOID 1
  3460. EOF
  3461.  
  3462. fi
  3463.  
  3464. if test $ac_cv_prog_gcc = yes; then
  3465.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  3466. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  3467.   echo $ac_n "(cached) $ac_c" 1>&6
  3468. else
  3469.     ac_pattern="Autoconf.*'x'"
  3470.   cat > conftest.$ac_ext <<EOF
  3471. #line 3472 "configure"
  3472. #include "confdefs.h"
  3473. #include <sgtty.h>
  3474. Autoconf TIOCGETP
  3475. EOF
  3476. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3477.   egrep "$ac_pattern" >/dev/null 2>&1; then
  3478.   rm -rf conftest*
  3479.   ac_cv_prog_gcc_traditional=yes
  3480. else
  3481.   rm -rf conftest*
  3482.   ac_cv_prog_gcc_traditional=no
  3483. fi
  3484. rm -f conftest*
  3485.  
  3486.  
  3487.   if test $ac_cv_prog_gcc_traditional = no; then
  3488.     cat > conftest.$ac_ext <<EOF
  3489. #line 3490 "configure"
  3490. #include "confdefs.h"
  3491. #include <termio.h>
  3492. Autoconf TCGETA
  3493. EOF
  3494. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3495.   egrep "$ac_pattern" >/dev/null 2>&1; then
  3496.   rm -rf conftest*
  3497.   ac_cv_prog_gcc_traditional=yes
  3498. fi
  3499. rm -f conftest*
  3500.  
  3501.   fi
  3502. fi
  3503.  
  3504. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  3505.   if test $ac_cv_prog_gcc_traditional = yes; then
  3506.     CC="$CC -traditional"
  3507.   fi
  3508. fi
  3509.  
  3510.  
  3511. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  3512. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  3513.   echo $ac_n "(cached) $ac_c" 1>&6
  3514. else
  3515.   cat > conftest.$ac_ext <<EOF
  3516. #line 3517 "configure"
  3517. #include "confdefs.h"
  3518. #include <sys/types.h>
  3519. #if STDC_HEADERS
  3520. #include <stdlib.h>
  3521. #endif
  3522. EOF
  3523. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3524.   egrep "size_t" >/dev/null 2>&1; then
  3525.   rm -rf conftest*
  3526.   ac_cv_type_size_t=yes
  3527. else
  3528.   rm -rf conftest*
  3529.   ac_cv_type_size_t=no
  3530. fi
  3531. rm -f conftest*
  3532.  
  3533. fi
  3534. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  3535. if test $ac_cv_type_size_t = no; then
  3536.   cat >> confdefs.h <<\EOF
  3537. #define size_t unsigned
  3538. EOF
  3539.  
  3540. fi
  3541.  
  3542.  
  3543. trap '' 1 2 15
  3544. cat > confcache <<\EOF
  3545. # This file is a shell script that caches the results of configure
  3546. # tests run on this system so they can be shared between configure
  3547. # scripts and configure runs.  It is not useful on other systems.
  3548. # If it contains results you don't want to keep, you may remove or edit it.
  3549. #
  3550. # By default, configure uses ./config.cache as the cache file,
  3551. # creating it if it does not exist already.  You can give configure
  3552. # the --cache-file=FILE option to use a different cache file; that is
  3553. # what configure does when it calls configure scripts in
  3554. # subdirectories, so they share the cache.
  3555. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3556. # config.status only pays attention to the cache file if you give it the
  3557. # --recheck option to rerun configure.
  3558. #
  3559. EOF
  3560. # Ultrix sh set writes to stderr and can't be redirected directly,
  3561. # and sets the high bit in the cache file unless we assign to the vars.
  3562. (set) 2>&1 |
  3563.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  3564.   >> confcache
  3565. if cmp -s $cache_file confcache; then
  3566.   :
  3567. else
  3568.   if test -w $cache_file; then
  3569.     echo "updating cache $cache_file"
  3570.     cat confcache > $cache_file
  3571.   else
  3572.     echo "not updating unwritable cache $cache_file"
  3573.   fi
  3574. fi
  3575. rm -f confcache
  3576.  
  3577. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3578.  
  3579. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3580. # Let make expand exec_prefix.
  3581. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3582.  
  3583. # Any assignment to VPATH causes Sun make to only execute
  3584. # the first set of double-colon rules, so remove it if not needed.
  3585. # If there is a colon in the path, we need to keep it.
  3586. if test "x$srcdir" = x.; then
  3587.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3588. fi
  3589.  
  3590. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3591.  
  3592. DEFS=-DHAVE_CONFIG_H
  3593.  
  3594. # Without the "./", some shells look in PATH for config.status.
  3595. : ${CONFIG_STATUS=./config.status}
  3596.  
  3597. echo creating $CONFIG_STATUS
  3598. rm -f $CONFIG_STATUS
  3599. cat > $CONFIG_STATUS <<EOF
  3600. #! /bin/sh
  3601. # Generated automatically by configure.
  3602. # Run this file to recreate the current configuration.
  3603. # This directory was configured as follows,
  3604. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3605. #
  3606. # $0 $ac_configure_args
  3607. #
  3608. # Compiler output produced by configure, useful for debugging
  3609. # configure, is in ./config.log if it exists.
  3610.  
  3611. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3612. for ac_option
  3613. do
  3614.   case "\$ac_option" in
  3615.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3616.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3617.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3618.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3619.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  3620.     exit 0 ;;
  3621.   -help | --help | --hel | --he | --h)
  3622.     echo "\$ac_cs_usage"; exit 0 ;;
  3623.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3624.   esac
  3625. done
  3626.  
  3627. ac_given_srcdir=$srcdir
  3628.  
  3629. trap 'rm -fr `echo "Makefile Config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3630. EOF
  3631. cat >> $CONFIG_STATUS <<EOF
  3632.  
  3633. # Protect against being on the right side of a sed subst in config.status.
  3634. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3635.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3636. $ac_vpsub
  3637. $extrasub
  3638. s%@CFLAGS@%$CFLAGS%g
  3639. s%@CPPFLAGS@%$CPPFLAGS%g
  3640. s%@CXXFLAGS@%$CXXFLAGS%g
  3641. s%@DEFS@%$DEFS%g
  3642. s%@LDFLAGS@%$LDFLAGS%g
  3643. s%@LIBS@%$LIBS%g
  3644. s%@exec_prefix@%$exec_prefix%g
  3645. s%@prefix@%$prefix%g
  3646. s%@program_transform_name@%$program_transform_name%g
  3647. s%@bindir@%$bindir%g
  3648. s%@sbindir@%$sbindir%g
  3649. s%@libexecdir@%$libexecdir%g
  3650. s%@datadir@%$datadir%g
  3651. s%@sysconfdir@%$sysconfdir%g
  3652. s%@sharedstatedir@%$sharedstatedir%g
  3653. s%@localstatedir@%$localstatedir%g
  3654. s%@libdir@%$libdir%g
  3655. s%@includedir@%$includedir%g
  3656. s%@oldincludedir@%$oldincludedir%g
  3657. s%@infodir@%$infodir%g
  3658. s%@mandir@%$mandir%g
  3659. s%@OS@%$OS%g
  3660. s%@PROGS@%$PROGS%g
  3661. s%@PROG1@%$PROG1%g
  3662. s%@PROG2@%$PROG2%g
  3663. s%@SLDFLAGS@%$SLDFLAGS%g
  3664. s%@Z31@%$Z31%g
  3665. s%@Z32@%$Z32%g
  3666. s%@CC@%$CC%g
  3667. s%@SET_MAKE@%$SET_MAKE%g
  3668. s%@MORE@%$MORE%g
  3669. s%@LS@%$LS%g
  3670. s%@GZCAT@%$GZCAT%g
  3671. s%@ZCAT@%$ZCAT%g
  3672. s%@RESOLV_CONF_DOMAIN@%$RESOLV_CONF_DOMAIN%g
  3673. s%@CPP@%$CPP%g
  3674.  
  3675. CEOF
  3676. EOF
  3677. cat >> $CONFIG_STATUS <<EOF
  3678.  
  3679. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  3680. EOF
  3681. cat >> $CONFIG_STATUS <<\EOF
  3682. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3683.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3684.   case "$ac_file" in
  3685.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3686.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3687.   *) ac_file_in="${ac_file}.in" ;;
  3688.   esac
  3689.  
  3690.   # Adjust relative srcdir, etc. for subdirectories.
  3691.  
  3692.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3693.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3694.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3695.     # The file is in a subdirectory.
  3696.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3697.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3698.     # A "../" for each directory in $ac_dir_suffix.
  3699.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3700.   else
  3701.     ac_dir_suffix= ac_dots=
  3702.   fi
  3703.  
  3704.   case "$ac_given_srcdir" in
  3705.   .)  srcdir=.
  3706.       if test -z "$ac_dots"; then top_srcdir=.
  3707.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3708.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3709.   *) # Relative path.
  3710.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3711.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3712.   esac
  3713.  
  3714.   echo creating "$ac_file"
  3715.   rm -f "$ac_file"
  3716.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3717.   case "$ac_file" in
  3718.   *Makefile*) ac_comsub="1i\\
  3719. # $configure_input" ;;
  3720.   *) ac_comsub= ;;
  3721.   esac
  3722.   sed -e "$ac_comsub
  3723. s%@configure_input@%$configure_input%g
  3724. s%@srcdir@%$srcdir%g
  3725. s%@top_srcdir@%$top_srcdir%g
  3726. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  3727. fi; done
  3728. rm -f conftest.subs
  3729.  
  3730. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3731. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3732. #
  3733. # ac_d sets the value in "#define NAME VALUE" lines.
  3734. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3735. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3736. ac_dC='\3'
  3737. ac_dD='%g'
  3738. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3739. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3740. ac_uB='\([     ]\)%\1#\2define\3'
  3741. ac_uC=' '
  3742. ac_uD='\4%g'
  3743. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3744. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3745. ac_eB='$%\1#\2define\3'
  3746. ac_eC=' '
  3747. ac_eD='%g'
  3748.  
  3749. CONFIG_HEADERS=${CONFIG_HEADERS-"Config.h"}
  3750. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3751.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3752.   case "$ac_file" in
  3753.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3754.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3755.   *) ac_file_in="${ac_file}.in" ;;
  3756.   esac
  3757.  
  3758.   echo creating $ac_file
  3759.  
  3760.   rm -f conftest.frag conftest.in conftest.out
  3761.   cp $ac_given_srcdir/$ac_file_in conftest.in
  3762.  
  3763. EOF
  3764.  
  3765. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3766. # the proper values into config.h.in to produce config.h.  And first:
  3767. # Protect against being on the right side of a sed subst in config.status.
  3768. # Protect against being in an unquoted here document in config.status.
  3769. rm -f conftest.vals
  3770. cat > conftest.hdr <<\EOF
  3771. s/[\\&%]/\\&/g
  3772. s%[\\$`]%\\&%g
  3773. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3774. s%ac_d%ac_u%gp
  3775. s%ac_u%ac_e%gp
  3776. EOF
  3777. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3778. rm -f conftest.hdr
  3779.  
  3780. # This sed command replaces #undef with comments.  This is necessary, for
  3781. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3782. # on some systems where configure will not decide to define it.
  3783. cat >> conftest.vals <<\EOF
  3784. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3785. EOF
  3786.  
  3787. # Break up conftest.vals because some shells have a limit on
  3788. # the size of here documents, and old seds have small limits too.
  3789. # Maximum number of lines to put in a single here document.
  3790. ac_max_here_lines=12
  3791.  
  3792. rm -f conftest.tail
  3793. while :
  3794. do
  3795.   ac_lines=`grep -c . conftest.vals`
  3796.   # grep -c gives empty output for an empty file on some AIX systems.
  3797.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3798.   # Write a limited-size here document to conftest.frag.
  3799.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3800.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3801.   echo 'CEOF
  3802.   sed -f conftest.frag conftest.in > conftest.out
  3803.   rm -f conftest.in
  3804.   mv conftest.out conftest.in
  3805. ' >> $CONFIG_STATUS
  3806.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3807.   rm -f conftest.vals
  3808.   mv conftest.tail conftest.vals
  3809. done
  3810. rm -f conftest.vals
  3811.  
  3812. cat >> $CONFIG_STATUS <<\EOF
  3813.   rm -f conftest.frag conftest.h
  3814.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3815.   cat conftest.in >> conftest.h
  3816.   rm -f conftest.in
  3817.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3818.     echo "$ac_file is unchanged"
  3819.     rm -f conftest.h
  3820.   else
  3821.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3822.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3823.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3824.       # The file is in a subdirectory.
  3825.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3826.     fi
  3827.     rm -f $ac_file
  3828.     mv conftest.h $ac_file
  3829.   fi
  3830. fi; done
  3831.  
  3832.  
  3833.  
  3834. exit 0
  3835. EOF
  3836. chmod +x $CONFIG_STATUS
  3837. rm -fr confdefs* $ac_clean_files
  3838. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3839.  
  3840.