home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ncftp-2.3.0-base.tgz / ncftp-2.3.0-base.tar / contrib / ncftp / configure < prev    next >
Text File  |  1995-11-26  |  93KB  |  3,642 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.7 
  5. # Copyright (C) 1992, 1993, 1994 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.7"
  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='echo $CPP $CPPFLAGS 1>&5;
  515. $CPP $CPPFLAGS'
  516. ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
  517. ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  518. ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
  519. ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  520.  
  521. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  522.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  523.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  524.     ac_n= ac_c='
  525. ' ac_t='    '
  526.   else
  527.     ac_n=-n ac_c= ac_t=
  528.   fi
  529. else
  530.   ac_n= ac_c='\c' ac_t=
  531. fi
  532.  
  533.  
  534.  
  535.  
  536.  
  537. nc_cv_ncurses=yes
  538. nc_cv_curses=yes
  539. nc_cv_readline=yes
  540. nc_cv_termnet=no
  541. nc_cv_socks=no
  542. nc_cv_socks5=no
  543. nc_cv_shared_libc=no
  544. nc_cv_extra_dirs=yes
  545.  
  546. # Check whether --enable-ncurses or --disable-ncurses was given.
  547. if test "${enable_ncurses+set}" = set; then
  548.   enableval="$enable_ncurses"
  549.   nc_cv_ncurses=$enableval
  550. fi
  551.  
  552. # Check whether --enable-curses or --disable-curses was given.
  553. if test "${enable_curses+set}" = set; then
  554.   enableval="$enable_curses"
  555.   nc_cv_curses=$enableval
  556. fi
  557.  
  558. # Check whether --enable-readline or --disable-readline was given.
  559. if test "${enable_readline+set}" = set; then
  560.   enableval="$enable_readline"
  561.   nc_cv_readline=$enableval
  562. fi
  563.  
  564. # Check whether --enable-termnet or --disable-termnet was given.
  565. if test "${enable_termnet+set}" = set; then
  566.   enableval="$enable_termnet"
  567.   nc_cv_termnet=$enableval
  568. fi
  569.  
  570. # Check whether --enable-socks or --disable-socks was given.
  571. if test "${enable_socks+set}" = set; then
  572.   enableval="$enable_socks"
  573.   nc_cv_socks=$enableval
  574. fi
  575.  
  576. # Check whether --enable-socks5 or --disable-socks5 was given.
  577. if test "${enable_socks5+set}" = set; then
  578.   enableval="$enable_socks5"
  579.   nc_cv_socks5=$enableval
  580. fi
  581.  
  582. # Check whether --enable-shared-libc or --disable-shared-libc was given.
  583. if test "${enable_shared_libc+set}" = set; then
  584.   enableval="$enable_shared_libc"
  585.   nc_cv_shared_libc=$enableval
  586. fi
  587.  
  588. # Check whether --enable-extra-dirs or --disable-extra-dirs was given.
  589. if test "${enable_extra_dirs+set}" = set; then
  590.   enableval="$enable_extra_dirs"
  591.   nc_cv_extra_dirs=$enableval
  592. fi
  593.  
  594.  
  595. PATH="${prefix}/bin:${PATH}"
  596.  
  597. os=`uname -s 2>/dev/null | tr 'A-Z' 'a-z'`
  598.  
  599. if test "$os" = freebsd ; then
  600.     rev=`uname -r | cut -c1`
  601.     if test "$rev" = 1 ; then
  602.         echo "configure: warning: Won't use the curses library on FreeBSD 1.x" 1>&2
  603.         echo "configure: warning: is missing too much of it's functionality.  Try ncurses." 1>&2
  604.         nc_cv_curses=no
  605.     fi
  606. fi
  607.  
  608. if test "$os" = ultrix ; then
  609.     echo "configure: warning: Won't use curses or cursesX on ULTRIX." 1>&2
  610.     echo "configure: warning: They don't work to my satisfaction. Try ncurses instead." 1>&2
  611.     nc_cv_curses=no
  612. fi
  613.  
  614. host=`uname -n 2>/dev/null | tr 'A-Z' 'a-z'`
  615. Z10=''
  616. Z11=''
  617. Z20='#'
  618. Z21='#'
  619. if test "$host" = redwing ; then
  620.         Z20=''
  621.         Z21=''
  622.         Z10='#'
  623.         Z11='#'
  624. fi
  625.  
  626.  
  627.  
  628.  
  629.  
  630. # Extract the first word of "gcc", so it can be a program name with args.
  631. set dummy gcc; ac_word=$2
  632. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  633. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  634.   echo $ac_n "(cached) $ac_c" 1>&6
  635. else
  636.   if test -n "$CC"; then
  637.   ac_cv_prog_CC="$CC" # Let the user override the test.
  638. else
  639.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  640.   for ac_dir in $PATH; do
  641.     test -z "$ac_dir" && ac_dir=.
  642.     if test -f $ac_dir/$ac_word; then
  643.       ac_cv_prog_CC="gcc"
  644.       break
  645.     fi
  646.   done
  647.   IFS="$ac_save_ifs"
  648.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  649. fi
  650. fi
  651. CC="$ac_cv_prog_CC"
  652. if test -n "$CC"; then
  653.   echo "$ac_t""$CC" 1>&6
  654. else
  655.   echo "$ac_t""no" 1>&6
  656. fi
  657.  
  658.  
  659. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  660. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  661.   echo $ac_n "(cached) $ac_c" 1>&6
  662. else
  663.   cat > conftest.c <<EOF
  664. #ifdef __GNUC__
  665.   yes;
  666. #endif
  667. EOF
  668. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  669.   ac_cv_prog_gcc=yes
  670. else
  671.   ac_cv_prog_gcc=no
  672. fi
  673. fi
  674.  
  675. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  676. if test $ac_cv_prog_gcc = yes; then
  677.   GCC=yes
  678.   if test "${CFLAGS+set}" != set; then
  679.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  680. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  681.   echo $ac_n "(cached) $ac_c" 1>&6
  682. else
  683.   echo 'void f(){}' > conftest.c
  684. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  685.   ac_cv_prog_gcc_g=yes
  686. else
  687.   ac_cv_prog_gcc_g=no
  688. fi
  689. rm -f conftest*
  690.  
  691. fi
  692.  
  693. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  694.     if test $ac_cv_prog_gcc_g = yes; then
  695.       CFLAGS="-g -O"
  696.     else
  697.       CFLAGS="-O"
  698.     fi
  699.   fi
  700. else
  701.   GCC=
  702.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  703. fi
  704.  
  705.  
  706. echo $ac_n "checking if HP-UX ansi C compiler flags are needed""... $ac_c" 1>&6
  707.  
  708. os=`uname -s | tr 'A-Z' 'a-z'`
  709. ac_cv_hpux_flags=no
  710. if test "$os" = hp-ux ; then
  711.     if test "$ac_cv_prog_gcc" = yes ; then
  712.         if test "$CFLAGS" != "" ; then
  713.             # Shouldn't be in there.
  714.             CFLAGS=`echo "$CFLAGS" | sed 's/-Aa//g'`
  715.         fi
  716.     else
  717.         # If you're not using gcc, then you better have a cc/c89
  718.         # that is usable.  If you have the barebones compiler, it
  719.         # won't work.  The good compiler uses -Aa for the ANSI
  720.         # compatible stuff.
  721.         x=`echo $CFLAGS | grep 'Aa' 2>/dev/null`
  722.         if test "$x" = "" ; then
  723.             CFLAGS="$CFLAGS -Aa"
  724.         fi
  725.         ac_cv_hpux_flags=yes
  726.     fi
  727.     # Also add _HPUX_SOURCE to get the extended namespace.
  728.     x=`echo $CFLAGS | grep '_HPUX_SOURCE' 2>/dev/null`
  729.     if test "$x" = "" ; then
  730.         CFLAGS="$CFLAGS -D_HPUX_SOURCE"
  731.     fi
  732. fi
  733. echo "$ac_t""$ac_cv_hpux_flags" 1>&6
  734.  
  735.     if test "$CFLAGS" = "" ; then
  736.         CFLAGS="-g"
  737.     elif test "$ac_cv_prog_gcc" = "yes" ; then
  738.         case "$CFLAGS" in
  739.             *"-g -O"*)
  740.                 echo "using -g as default gcc CFLAGS" 1>&6
  741.                 CFLAGS=`echo $CFLAGS | sed 's/-g\ -O/-g/'`
  742.                 ;;
  743.             *"-O -g"*)
  744.                 # Leave the -g, but remove all -O options.
  745.                 echo "using -g as default gcc CFLAGS" 1>&6
  746.                 CFLAGS=`echo $CFLAGS | sed 's/-O\ -g/-g/'`
  747.                 ;;
  748.         esac
  749.     fi
  750.  
  751.  
  752. echo $ac_n "checking if the compiler supports function prototypes""... $ac_c" 1>&6
  753. cat > conftest.$ac_ext <<EOF
  754. #line 755 "configure"
  755. #include "confdefs.h"
  756.  
  757. int main() { return 0; }
  758. int t() {
  759. extern void exit(int status);
  760. ; return 0; }
  761. EOF
  762. if eval $ac_compile; then
  763.   rm -rf conftest*
  764.   wi_cv_prototypes=yes
  765. cat >> confdefs.h <<\EOF
  766. #define PROTOTYPES 1
  767. EOF
  768.  
  769. else
  770.   rm -rf conftest*
  771.   wi_cv_prototypes=no
  772. fi
  773. rm -f conftest*
  774.  
  775. echo "$ac_t""$wi_cv_prototypes" 1>&6
  776.  
  777.  
  778. if test "$wi_cv_prototypes" = no ; then
  779.     echo "configure: warning: Your compiler is probably won't be able to compile the package." 1>&2
  780.     echo "configure: warning: Get gcc, or any compiler that supports function prototypes." 1>&2
  781. fi
  782.  
  783. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  784. set dummy ${MAKE-make}; ac_make=$2
  785. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  786.   echo $ac_n "(cached) $ac_c" 1>&6
  787. else
  788.   cat > conftestmake <<\EOF
  789. all:
  790.     @echo 'ac_maketemp="${MAKE}"'
  791. EOF
  792. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  793. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  794. if test -n "$ac_maketemp"; then
  795.   eval ac_cv_prog_make_${ac_make}_set=yes
  796. else
  797.   eval ac_cv_prog_make_${ac_make}_set=no
  798. fi
  799. rm -f conftestmake
  800. fi
  801. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  802.   echo "$ac_t""yes" 1>&6
  803.   SET_MAKE=
  804. else
  805.   echo "$ac_t""no" 1>&6
  806.   SET_MAKE="MAKE=${MAKE-make}"
  807. fi
  808.  
  809. # Extract the first word of "more", so it can be a program name with args.
  810. set dummy more; ac_word=$2
  811. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  812. if eval "test \"`echo '$''{'ac_cv_path_MORE'+set}'`\" = set"; then
  813.   echo $ac_n "(cached) $ac_c" 1>&6
  814. else
  815.   case "$MORE" in
  816.   /*)
  817.   ac_cv_path_MORE="$MORE" # Let the user override the test with a path.
  818.   ;;
  819.   *)
  820.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  821.   for ac_dir in $PATH; do
  822.     test -z "$ac_dir" && ac_dir=.
  823.     if test -f $ac_dir/$ac_word; then
  824.       ac_cv_path_MORE="$ac_dir/$ac_word"
  825.       break
  826.     fi
  827.   done
  828.   IFS="$ac_save_ifs"
  829.   test -z "$ac_cv_path_MORE" && ac_cv_path_MORE="more"
  830.   ;;
  831. esac
  832. fi
  833. MORE="$ac_cv_path_MORE"
  834. if test -n "$MORE"; then
  835.   echo "$ac_t""$MORE" 1>&6
  836. else
  837.   echo "$ac_t""no" 1>&6
  838. fi
  839.  
  840. # Extract the first word of "ls", so it can be a program name with args.
  841. set dummy ls; ac_word=$2
  842. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  843. if eval "test \"`echo '$''{'ac_cv_path_LS'+set}'`\" = set"; then
  844.   echo $ac_n "(cached) $ac_c" 1>&6
  845. else
  846.   case "$LS" in
  847.   /*)
  848.   ac_cv_path_LS="$LS" # Let the user override the test with a path.
  849.   ;;
  850.   *)
  851.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  852.   for ac_dir in $PATH; do
  853.     test -z "$ac_dir" && ac_dir=.
  854.     if test -f $ac_dir/$ac_word; then
  855.       ac_cv_path_LS="$ac_dir/$ac_word"
  856.       break
  857.     fi
  858.   done
  859.   IFS="$ac_save_ifs"
  860.   test -z "$ac_cv_path_LS" && ac_cv_path_LS="/bin/ls"
  861.   ;;
  862. esac
  863. fi
  864. LS="$ac_cv_path_LS"
  865. if test -n "$LS"; then
  866.   echo "$ac_t""$LS" 1>&6
  867. else
  868.   echo "$ac_t""no" 1>&6
  869. fi
  870.  
  871.  
  872. # Extract the first word of "gzcat", so it can be a program name with args.
  873. set dummy gzcat; ac_word=$2
  874. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  875. if eval "test \"`echo '$''{'ac_cv_path_GZCAT'+set}'`\" = set"; then
  876.   echo $ac_n "(cached) $ac_c" 1>&6
  877. else
  878.   case "$GZCAT" in
  879.   /*)
  880.   ac_cv_path_GZCAT="$GZCAT" # Let the user override the test with a path.
  881.   ;;
  882.   *)
  883.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  884.   for ac_dir in $PATH; do
  885.     test -z "$ac_dir" && ac_dir=.
  886.     if test -f $ac_dir/$ac_word; then
  887.       ac_cv_path_GZCAT="$ac_dir/$ac_word"
  888.       break
  889.     fi
  890.   done
  891.   IFS="$ac_save_ifs"
  892.   ;;
  893. esac
  894. fi
  895. GZCAT="$ac_cv_path_GZCAT"
  896. if test -n "$GZCAT"; then
  897.   echo "$ac_t""$GZCAT" 1>&6
  898. else
  899.   echo "$ac_t""no" 1>&6
  900. fi
  901.  
  902. # Extract the first word of "zcat", so it can be a program name with args.
  903. set dummy zcat; ac_word=$2
  904. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  905. if eval "test \"`echo '$''{'ac_cv_path_ZCAT'+set}'`\" = set"; then
  906.   echo $ac_n "(cached) $ac_c" 1>&6
  907. else
  908.   case "$ZCAT" in
  909.   /*)
  910.   ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a path.
  911.   ;;
  912.   *)
  913.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  914.   for ac_dir in $PATH; do
  915.     test -z "$ac_dir" && ac_dir=.
  916.     if test -f $ac_dir/$ac_word; then
  917.       ac_cv_path_ZCAT="$ac_dir/$ac_word"
  918.       break
  919.     fi
  920.   done
  921.   IFS="$ac_save_ifs"
  922.   ;;
  923. esac
  924. fi
  925. ZCAT="$ac_cv_path_ZCAT"
  926. if test -n "$ZCAT"; then
  927.   echo "$ac_t""$ZCAT" 1>&6
  928. else
  929.   echo "$ac_t""no" 1>&6
  930. fi
  931.  
  932. if test "x$GZCAT" = x ; then
  933.     if test "x$ZCAT" != x ; then
  934.         # See if zcat is really gzcat.  gzcat has a --version option, regular
  935.         # zcat does not.
  936.         echo $ac_n "checking if zcat is really gzcat in disguise""... $ac_c" 1>&6
  937.         if $ZCAT --version 2> /dev/null ; then
  938.             cat >> confdefs.h <<EOF
  939. #define GZCAT "$ZCAT"
  940. EOF
  941.  
  942.             echo "$ac_t""yes" 1>&6
  943.         else
  944.             echo "$ac_t""no" 1>&6
  945.         fi
  946.     fi
  947. else
  948.     cat >> confdefs.h <<EOF
  949. #define GZCAT "$GZCAT"
  950. EOF
  951.  
  952. fi
  953.  
  954. if test "x$ZCAT" != x ; then
  955.     cat >> confdefs.h <<EOF
  956. #define ZCAT "$ZCAT"
  957. EOF
  958.  
  959. fi
  960.  
  961.  
  962. # See if we should add -I/usr/local/include -L/usr/local/lib, etc.
  963. echo "checking for extra include and lib directories..." 1>&6
  964. b1=`cd .. ; pwd`
  965. b2=`cd ../.. ; pwd`
  966. exdirs="$HOME $j $b1 $b2 $prefix /usr/local /usr/ccs"
  967.  
  968. subexdirs="-"
  969. if test "$subexdirs" = "" ; then
  970.     subexdirs="-"
  971. fi
  972. for subexdir in $subexdirs ; do
  973. if test "$subexdir" = "-" ; then
  974.     subexdir=""
  975. else
  976.     subexdir="/$subexdir"
  977. fi
  978. for exdir in $exdirs ; do
  979.     if test "$exdir" != "/usr" || test "$subexdir" != ""; then
  980.         incdir="${exdir}/include${subexdir}"
  981.         
  982. incdir="$incdir"
  983. if test -r $incdir ; then
  984.     case "$CPPFLAGS" in
  985.         *${incdir}*)
  986.             # echo "   + already had $incdir" 1>&6
  987.             ;;
  988.         *)
  989.             if test "$CPPFLAGS" = "" ; then
  990.                 CPPFLAGS="-I$incdir"
  991.             else
  992.                 CPPFLAGS="$CPPFLAGS -I$incdir"
  993.             fi
  994.             echo "   + found $incdir" 1>&6
  995.             ;;
  996.     esac
  997. fi
  998.  
  999.  
  1000.         libdir="${exdir}/lib${subexdir}"
  1001.         
  1002. libdir="$libdir"
  1003. if test -r $libdir ; then
  1004.     case "$LDFLAGS" in
  1005.         *${libdir}*)
  1006.             # echo "   + already had $libdir" 1>&6
  1007.             ;;
  1008.         *)
  1009.             if test "$LDFLAGS" = "" ; then
  1010.                 LDFLAGS="-L$libdir"
  1011.             else
  1012.                 LDFLAGS="$LDFLAGS -L$libdir"
  1013.             fi
  1014.             echo "   + found $libdir" 1>&6
  1015.             ;;
  1016.     esac
  1017. fi
  1018.  
  1019.     fi
  1020. done
  1021. done
  1022.  
  1023.  
  1024. # Look for SunOS' /usr/5lib and 5include directories, because
  1025. # we want to use those for the curses stuff.  Cheat a little and
  1026. # don't do this if it looks like we are going to use ncurses.
  1027. if test -f /usr/local/include/ncurses/unctrl.h && test "$nc_cv_ncurses" = yes ; then
  1028.     echo >/dev/null        # no op
  1029. else
  1030.  
  1031. # Use System V because their curses extensions are required.  This must
  1032. # be done early so we use the -I and -L in the library checks also.
  1033. # This is mostly a Solaris/SunOS hack.  Note that doing this will also
  1034. # use all of the other System V libraries and headers.
  1035.  
  1036. echo $ac_n "checking for alternative System V libraries""... $ac_c" 1>&6
  1037. if test -f /usr/5include/curses.h ; then
  1038.     CPPFLAGS="$CPPFLAGS -I/usr/5include"
  1039.     LDFLAGS="$LDFLAGS -L/usr/5lib"
  1040.     echo "$ac_t""yes" 1>&6
  1041. else
  1042.     echo "$ac_t""no" 1>&6
  1043. fi
  1044.  
  1045. fi
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054. # Get first 127 chars of all uname information.  Some folks have
  1055. # way too much stuff there, so grab only the first 127.
  1056. unam=`uname -a 2>/dev/null | cut -c1-127`
  1057. if test "$unam" != "" ; then
  1058.     cat >> confdefs.h <<EOF
  1059. #define UNAME "$unam"
  1060. EOF
  1061.  
  1062. fi
  1063.  
  1064. cat >> confdefs.h <<EOF
  1065. #define MORE "$MORE"
  1066. EOF
  1067.  
  1068. cat >> confdefs.h <<EOF
  1069. #define LS "$LS"
  1070. EOF
  1071.  
  1072.  
  1073. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1074. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1075.   echo $ac_n "(cached) $ac_c" 1>&6
  1076. else
  1077.   cat > conftest.$ac_ext <<EOF
  1078. #line 1079 "configure"
  1079. #include "confdefs.h"
  1080.  
  1081. int main() { return 0; }
  1082. int t() {
  1083.  
  1084. /* Ultrix mips cc rejects this.  */
  1085. typedef int charset[2]; const charset x;
  1086. /* SunOS 4.1.1 cc rejects this.  */
  1087. char const *const *ccp;
  1088. char **p;
  1089. /* NEC SVR4.0.2 mips cc rejects this.  */
  1090. struct point {int x, y;};
  1091. static struct point const zero = {0,0};
  1092. /* AIX XL C 1.02.0.0 rejects this.
  1093.    It does not let you subtract one const X* pointer from another in an arm
  1094.    of an if-expression whose if-part is not a constant expression */
  1095. const char *g = "string";
  1096. ccp = &g + (g ? g-g : 0);
  1097. /* HPUX 7.0 cc rejects these. */
  1098. ++ccp;
  1099. p = (char**) ccp;
  1100. ccp = (char const *const *) p;
  1101. { /* SCO 3.2v4 cc rejects this.  */
  1102.   char *t;
  1103.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1104.  
  1105.   *t++ = 0;
  1106. }
  1107. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1108.   int x[] = {25, 17};
  1109.   const int *foo = &x[0];
  1110.   ++foo;
  1111. }
  1112. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1113.   typedef const int *iptr;
  1114.   iptr p = 0;
  1115.   ++p;
  1116. }
  1117. { /* AIX XL C 1.02.0.0 rejects this saying
  1118.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1119.   struct s { int j; const int *ap[3]; };
  1120.   struct s *b; b->j = 5;
  1121. }
  1122. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1123.   const int foo = 10;
  1124. }
  1125.  
  1126. ; return 0; }
  1127. EOF
  1128. if eval $ac_compile; then
  1129.   rm -rf conftest*
  1130.   ac_cv_c_const=yes
  1131. else
  1132.   rm -rf conftest*
  1133.   ac_cv_c_const=no
  1134. fi
  1135. rm -f conftest*
  1136.  
  1137. fi
  1138.  
  1139. echo "$ac_t""$ac_cv_c_const" 1>&6
  1140. if test $ac_cv_c_const = no; then
  1141.   cat >> confdefs.h <<\EOF
  1142. #define const 
  1143. EOF
  1144.  
  1145. fi
  1146.  
  1147.  
  1148. echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  1149. ac_lib_var=`echo socket | tr '.-/+' '___p'`
  1150. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1151.   echo $ac_n "(cached) $ac_c" 1>&6
  1152. else
  1153.   ac_save_LIBS="$LIBS"
  1154. LIBS="-lsocket  $LIBS"
  1155. cat > conftest.$ac_ext <<EOF
  1156. #line 1157 "configure"
  1157. #include "confdefs.h"
  1158.  
  1159. int main() { return 0; }
  1160. int t() {
  1161. socket()
  1162. ; return 0; }
  1163. EOF
  1164. if eval $ac_link; then
  1165.   rm -rf conftest*
  1166.   eval "ac_cv_lib_$ac_lib_var=yes"
  1167. else
  1168.   rm -rf conftest*
  1169.   eval "ac_cv_lib_$ac_lib_var=no"
  1170. fi
  1171. rm -f conftest*
  1172. LIBS="$ac_save_LIBS"
  1173.  
  1174. fi
  1175. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1176.   echo "$ac_t""yes" 1>&6
  1177.     ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1178.   cat >> confdefs.h <<EOF
  1179. #define $ac_tr_lib 1
  1180. EOF
  1181.  
  1182.   LIBS="-lsocket $LIBS"
  1183.  
  1184. else
  1185.   echo "$ac_t""no" 1>&6
  1186. fi
  1187.  
  1188. echo $ac_n "checking for -linet""... $ac_c" 1>&6
  1189. ac_lib_var=`echo inet | tr '.-/+' '___p'`
  1190. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1191.   echo $ac_n "(cached) $ac_c" 1>&6
  1192. else
  1193.   ac_save_LIBS="$LIBS"
  1194. LIBS="-linet  $LIBS"
  1195. cat > conftest.$ac_ext <<EOF
  1196. #line 1197 "configure"
  1197. #include "confdefs.h"
  1198.  
  1199. int main() { return 0; }
  1200. int t() {
  1201. main()
  1202. ; return 0; }
  1203. EOF
  1204. if eval $ac_link; then
  1205.   rm -rf conftest*
  1206.   eval "ac_cv_lib_$ac_lib_var=yes"
  1207. else
  1208.   rm -rf conftest*
  1209.   eval "ac_cv_lib_$ac_lib_var=no"
  1210. fi
  1211. rm -f conftest*
  1212. LIBS="$ac_save_LIBS"
  1213.  
  1214. fi
  1215. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1216.   echo "$ac_t""yes" 1>&6
  1217.     ac_tr_lib=HAVE_LIB`echo inet | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1218.   cat >> confdefs.h <<EOF
  1219. #define $ac_tr_lib 1
  1220. EOF
  1221.  
  1222.   LIBS="-linet $LIBS"
  1223.  
  1224. else
  1225.   echo "$ac_t""no" 1>&6
  1226. fi
  1227.  
  1228.  
  1229. # If we cannot run a trivial program, we must be cross compiling.
  1230. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1231. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1232.   echo $ac_n "(cached) $ac_c" 1>&6
  1233. else
  1234.   if test "$cross_compiling" = yes; then
  1235.   ac_cv_c_cross=yes
  1236. else
  1237. cat > conftest.$ac_ext <<EOF
  1238. #line 1239 "configure"
  1239. #include "confdefs.h"
  1240. main(){return(0);}
  1241. EOF
  1242. eval $ac_link
  1243. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1244.   ac_cv_c_cross=no
  1245. else
  1246.   ac_cv_c_cross=yes
  1247. fi
  1248. fi
  1249. rm -fr conftest*
  1250. fi
  1251.  
  1252. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1253. cross_compiling=$ac_cv_c_cross
  1254.  
  1255.  
  1256. echo $ac_n "checking if we can use -lnsl""... $ac_c" 1>&6
  1257. ac_save_LIBS="$LIBS";
  1258. LIBS="$LIBS -lnsl";
  1259. if eval "test \"`echo '$''{'r_cv_use_libnsl'+set}'`\" = set"; then
  1260.   echo $ac_n "(cached) $ac_c" 1>&6
  1261. else
  1262.   
  1263. if test "$cross_compiling" = yes; then
  1264.   nc_cv_use_libnsl=no
  1265. else
  1266. cat > conftest.$ac_ext <<EOF
  1267. #line 1268 "configure"
  1268. #include "confdefs.h"
  1269. main() { if (getpwuid(getuid())) exit(0); exit(-1); }
  1270. EOF
  1271. eval $ac_link
  1272. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1273.   nc_cv_use_libnsl=yes
  1274. else
  1275.   nc_cv_use_libnsl=no
  1276. fi
  1277. fi
  1278. rm -fr conftest*
  1279.  
  1280. fi
  1281.  
  1282. if test "$nc_cv_use_libnsl" = "no"; then LIBS="$ac_save_LIBS"; fi
  1283. echo "$ac_t""$nc_cv_use_libnsl" 1>&6
  1284.  
  1285.  
  1286. # See if we could access two well-known sites without help of any special
  1287. # libraries, like resolv.
  1288.  
  1289. if test "$cross_compiling" = yes; then
  1290.   look_for_resolv=yes
  1291. else
  1292. cat > conftest.$ac_ext <<EOF
  1293. #line 1294 "configure"
  1294. #include "confdefs.h"
  1295.  
  1296. #include <sys/types.h>
  1297. #include <sys/socket.h>
  1298. #include <netinet/in.h>
  1299. #include <netdb.h>
  1300.  
  1301. main()
  1302. {
  1303.     struct hostent *hp1, *hp2;
  1304.     int result;
  1305.  
  1306.     hp1 = gethostbyname("gatekeeper.dec.com");
  1307.     hp2 = gethostbyname("ftp.ncsa.uiuc.edu");
  1308.     result = ((hp1 != (struct hostent *) 0) && (hp2 != (struct hostent *) 0));
  1309.     exit(! result);
  1310. }
  1311. EOF
  1312. eval $ac_link
  1313. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1314.   look_for_resolv=no
  1315. else
  1316.   look_for_resolv=yes
  1317. fi
  1318. fi
  1319. rm -fr conftest*
  1320.  
  1321. echo $ac_n "checking if we need to look for -lresolv""... $ac_c" 1>&6
  1322. echo "$ac_t""$look_for_resolv" 1>&6
  1323. if test "$look_for_resolv" = yes ; then
  1324. echo $ac_n "checking for -lresolv""... $ac_c" 1>&6
  1325. ac_lib_var=`echo resolv | tr '.-/+' '___p'`
  1326. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1327.   echo $ac_n "(cached) $ac_c" 1>&6
  1328. else
  1329.   ac_save_LIBS="$LIBS"
  1330. LIBS="-lresolv  $LIBS"
  1331. cat > conftest.$ac_ext <<EOF
  1332. #line 1333 "configure"
  1333. #include "confdefs.h"
  1334.  
  1335. int main() { return 0; }
  1336. int t() {
  1337. main()
  1338. ; return 0; }
  1339. EOF
  1340. if eval $ac_link; then
  1341.   rm -rf conftest*
  1342.   eval "ac_cv_lib_$ac_lib_var=yes"
  1343. else
  1344.   rm -rf conftest*
  1345.   eval "ac_cv_lib_$ac_lib_var=no"
  1346. fi
  1347. rm -f conftest*
  1348. LIBS="$ac_save_LIBS"
  1349.  
  1350. fi
  1351. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1352.   echo "$ac_t""yes" 1>&6
  1353.     ac_tr_lib=HAVE_LIB`echo resolv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1354.   cat >> confdefs.h <<EOF
  1355. #define $ac_tr_lib 1
  1356. EOF
  1357.  
  1358.   LIBS="-lresolv $LIBS"
  1359.  
  1360. else
  1361.   echo "$ac_t""no" 1>&6
  1362. fi
  1363.  
  1364. else
  1365.     ac_cv_lib_resolv=no
  1366. fi
  1367.  
  1368.  
  1369. if test "$nc_cv_socks5" = yes ; then
  1370. # Look for the "SOCKS" library for use with Firewalls/Gateways.
  1371. savelibs="$LIBS"
  1372. echo $ac_n "checking for -ldb""... $ac_c" 1>&6
  1373. ac_lib_var=`echo db | tr '.-/+' '___p'`
  1374. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1375.   echo $ac_n "(cached) $ac_c" 1>&6
  1376. else
  1377.   ac_save_LIBS="$LIBS"
  1378. LIBS="-ldb  $LIBS"
  1379. cat > conftest.$ac_ext <<EOF
  1380. #line 1381 "configure"
  1381. #include "confdefs.h"
  1382.  
  1383. int main() { return 0; }
  1384. int t() {
  1385. main()
  1386. ; return 0; }
  1387. EOF
  1388. if eval $ac_link; then
  1389.   rm -rf conftest*
  1390.   eval "ac_cv_lib_$ac_lib_var=yes"
  1391. else
  1392.   rm -rf conftest*
  1393.   eval "ac_cv_lib_$ac_lib_var=no"
  1394. fi
  1395. rm -f conftest*
  1396. LIBS="$ac_save_LIBS"
  1397.  
  1398. fi
  1399. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1400.   echo "$ac_t""yes" 1>&6
  1401.     ac_tr_lib=HAVE_LIB`echo db | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1402.   cat >> confdefs.h <<EOF
  1403. #define $ac_tr_lib 1
  1404. EOF
  1405.  
  1406.   LIBS="-ldb $LIBS"
  1407.  
  1408. else
  1409.   echo "$ac_t""no" 1>&6
  1410. fi
  1411.  
  1412. echo $ac_n "checking for -lisode""... $ac_c" 1>&6
  1413. ac_lib_var=`echo isode | tr '.-/+' '___p'`
  1414. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1415.   echo $ac_n "(cached) $ac_c" 1>&6
  1416. else
  1417.   ac_save_LIBS="$LIBS"
  1418. LIBS="-lisode  $LIBS"
  1419. cat > conftest.$ac_ext <<EOF
  1420. #line 1421 "configure"
  1421. #include "confdefs.h"
  1422.  
  1423. int main() { return 0; }
  1424. int t() {
  1425. main()
  1426. ; return 0; }
  1427. EOF
  1428. if eval $ac_link; then
  1429.   rm -rf conftest*
  1430.   eval "ac_cv_lib_$ac_lib_var=yes"
  1431. else
  1432.   rm -rf conftest*
  1433.   eval "ac_cv_lib_$ac_lib_var=no"
  1434. fi
  1435. rm -f conftest*
  1436. LIBS="$ac_save_LIBS"
  1437.  
  1438. fi
  1439. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1440.   echo "$ac_t""yes" 1>&6
  1441.     ac_tr_lib=HAVE_LIB`echo isode | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1442.   cat >> confdefs.h <<EOF
  1443. #define $ac_tr_lib 1
  1444. EOF
  1445.  
  1446.   LIBS="-lisode $LIBS"
  1447.  
  1448. else
  1449.   echo "$ac_t""no" 1>&6
  1450. fi
  1451.  
  1452. echo $ac_n "checking for -lcom_err""... $ac_c" 1>&6
  1453. ac_lib_var=`echo com_err | tr '.-/+' '___p'`
  1454. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1455.   echo $ac_n "(cached) $ac_c" 1>&6
  1456. else
  1457.   ac_save_LIBS="$LIBS"
  1458. LIBS="-lcom_err  $LIBS"
  1459. cat > conftest.$ac_ext <<EOF
  1460. #line 1461 "configure"
  1461. #include "confdefs.h"
  1462.  
  1463. int main() { return 0; }
  1464. int t() {
  1465. main()
  1466. ; return 0; }
  1467. EOF
  1468. if eval $ac_link; then
  1469.   rm -rf conftest*
  1470.   eval "ac_cv_lib_$ac_lib_var=yes"
  1471. else
  1472.   rm -rf conftest*
  1473.   eval "ac_cv_lib_$ac_lib_var=no"
  1474. fi
  1475. rm -f conftest*
  1476. LIBS="$ac_save_LIBS"
  1477.  
  1478. fi
  1479. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1480.   echo "$ac_t""yes" 1>&6
  1481.     ac_tr_lib=HAVE_LIB`echo com_err | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1482.   cat >> confdefs.h <<EOF
  1483. #define $ac_tr_lib 1
  1484. EOF
  1485.  
  1486.   LIBS="-lcom_err $LIBS"
  1487.  
  1488. else
  1489.   echo "$ac_t""no" 1>&6
  1490. fi
  1491.  
  1492. echo $ac_n "checking for -lcrypto""... $ac_c" 1>&6
  1493. ac_lib_var=`echo crypto | tr '.-/+' '___p'`
  1494. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1495.   echo $ac_n "(cached) $ac_c" 1>&6
  1496. else
  1497.   ac_save_LIBS="$LIBS"
  1498. LIBS="-lcrypto  $LIBS"
  1499. cat > conftest.$ac_ext <<EOF
  1500. #line 1501 "configure"
  1501. #include "confdefs.h"
  1502.  
  1503. int main() { return 0; }
  1504. int t() {
  1505. main()
  1506. ; return 0; }
  1507. EOF
  1508. if eval $ac_link; then
  1509.   rm -rf conftest*
  1510.   eval "ac_cv_lib_$ac_lib_var=yes"
  1511. else
  1512.   rm -rf conftest*
  1513.   eval "ac_cv_lib_$ac_lib_var=no"
  1514. fi
  1515. rm -f conftest*
  1516. LIBS="$ac_save_LIBS"
  1517.  
  1518. fi
  1519. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1520.   echo "$ac_t""yes" 1>&6
  1521.     ac_tr_lib=HAVE_LIB`echo crypto | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1522.   cat >> confdefs.h <<EOF
  1523. #define $ac_tr_lib 1
  1524. EOF
  1525.  
  1526.   LIBS="-lcrypto $LIBS"
  1527.  
  1528. else
  1529.   echo "$ac_t""no" 1>&6
  1530. fi
  1531.  
  1532. echo $ac_n "checking for -lkrb5""... $ac_c" 1>&6
  1533. ac_lib_var=`echo krb5 | tr '.-/+' '___p'`
  1534. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1535.   echo $ac_n "(cached) $ac_c" 1>&6
  1536. else
  1537.   ac_save_LIBS="$LIBS"
  1538. LIBS="-lkrb5  $LIBS"
  1539. cat > conftest.$ac_ext <<EOF
  1540. #line 1541 "configure"
  1541. #include "confdefs.h"
  1542.  
  1543. int main() { return 0; }
  1544. int t() {
  1545. main()
  1546. ; return 0; }
  1547. EOF
  1548. if eval $ac_link; then
  1549.   rm -rf conftest*
  1550.   eval "ac_cv_lib_$ac_lib_var=yes"
  1551. else
  1552.   rm -rf conftest*
  1553.   eval "ac_cv_lib_$ac_lib_var=no"
  1554. fi
  1555. rm -f conftest*
  1556. LIBS="$ac_save_LIBS"
  1557.  
  1558. fi
  1559. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1560.   echo "$ac_t""yes" 1>&6
  1561.     ac_tr_lib=HAVE_LIB`echo krb5 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1562.   cat >> confdefs.h <<EOF
  1563. #define $ac_tr_lib 1
  1564. EOF
  1565.  
  1566.   LIBS="-lkrb5 $LIBS"
  1567.  
  1568. else
  1569.   echo "$ac_t""no" 1>&6
  1570. fi
  1571.  
  1572. echo $ac_n "checking for -lgssapi_krb5""... $ac_c" 1>&6
  1573. ac_lib_var=`echo gssapi_krb5 | tr '.-/+' '___p'`
  1574. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1575.   echo $ac_n "(cached) $ac_c" 1>&6
  1576. else
  1577.   ac_save_LIBS="$LIBS"
  1578. LIBS="-lgssapi_krb5  $LIBS"
  1579. cat > conftest.$ac_ext <<EOF
  1580. #line 1581 "configure"
  1581. #include "confdefs.h"
  1582.  
  1583. int main() { return 0; }
  1584. int t() {
  1585. main()
  1586. ; return 0; }
  1587. EOF
  1588. if eval $ac_link; then
  1589.   rm -rf conftest*
  1590.   eval "ac_cv_lib_$ac_lib_var=yes"
  1591. else
  1592.   rm -rf conftest*
  1593.   eval "ac_cv_lib_$ac_lib_var=no"
  1594. fi
  1595. rm -f conftest*
  1596. LIBS="$ac_save_LIBS"
  1597.  
  1598. fi
  1599. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1600.   echo "$ac_t""yes" 1>&6
  1601.     ac_tr_lib=HAVE_LIB`echo gssapi_krb5 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1602.   cat >> confdefs.h <<EOF
  1603. #define $ac_tr_lib 1
  1604. EOF
  1605.  
  1606.   LIBS="-lgssapi_krb5 $LIBS"
  1607.  
  1608. else
  1609.   echo "$ac_t""no" 1>&6
  1610. fi
  1611.  
  1612. echo $ac_n "checking for -lsocks5""... $ac_c" 1>&6
  1613. ac_lib_var=`echo socks5 | tr '.-/+' '___p'`
  1614. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1615.   echo $ac_n "(cached) $ac_c" 1>&6
  1616. else
  1617.   ac_save_LIBS="$LIBS"
  1618. LIBS="-lsocks5  $LIBS"
  1619. cat > conftest.$ac_ext <<EOF
  1620. #line 1621 "configure"
  1621. #include "confdefs.h"
  1622.  
  1623. int main() { return 0; }
  1624. int t() {
  1625. SOCKSinit()
  1626. ; return 0; }
  1627. EOF
  1628. if eval $ac_link; then
  1629.   rm -rf conftest*
  1630.   eval "ac_cv_lib_$ac_lib_var=yes"
  1631. else
  1632.   rm -rf conftest*
  1633.   eval "ac_cv_lib_$ac_lib_var=no"
  1634. fi
  1635. rm -f conftest*
  1636. LIBS="$ac_save_LIBS"
  1637.  
  1638. fi
  1639. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1640.   echo "$ac_t""yes" 1>&6
  1641.     ac_tr_lib=HAVE_LIB`echo socks5 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1642.   cat >> confdefs.h <<EOF
  1643. #define $ac_tr_lib 1
  1644. EOF
  1645.  
  1646.   LIBS="-lsocks5 $LIBS"
  1647.  
  1648. else
  1649.   echo "$ac_t""no" 1>&6
  1650. fi
  1651.  
  1652.       if test "$ac_cv_lib_socks5" = yes ; then
  1653.               nc_cv_socks=no
  1654.       else
  1655.               LIBS="$savelibs"
  1656.       fi
  1657. else
  1658. ac_cv_lib_socks5=no
  1659. fi
  1660.  
  1661. if test "$nc_cv_socks" = yes ; then
  1662. # Look for the "SOCKS" library for use with Firewalls/Gateways.
  1663. echo $ac_n "checking for -lsocks""... $ac_c" 1>&6
  1664. ac_lib_var=`echo socks | tr '.-/+' '___p'`
  1665. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1666.   echo $ac_n "(cached) $ac_c" 1>&6
  1667. else
  1668.   ac_save_LIBS="$LIBS"
  1669. LIBS="-lsocks  $LIBS"
  1670. cat > conftest.$ac_ext <<EOF
  1671. #line 1672 "configure"
  1672. #include "confdefs.h"
  1673.  
  1674. int main() { return 0; }
  1675. int t() {
  1676. SOCKSinit()
  1677. ; return 0; }
  1678. EOF
  1679. if eval $ac_link; then
  1680.   rm -rf conftest*
  1681.   eval "ac_cv_lib_$ac_lib_var=yes"
  1682. else
  1683.   rm -rf conftest*
  1684.   eval "ac_cv_lib_$ac_lib_var=no"
  1685. fi
  1686. rm -f conftest*
  1687. LIBS="$ac_save_LIBS"
  1688.  
  1689. fi
  1690. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1691.   echo "$ac_t""yes" 1>&6
  1692.     ac_tr_lib=HAVE_LIB`echo socks | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1693.   cat >> confdefs.h <<EOF
  1694. #define $ac_tr_lib 1
  1695. EOF
  1696.  
  1697.   LIBS="-lsocks $LIBS"
  1698.  
  1699. else
  1700.   echo "$ac_t""no" 1>&6
  1701. fi
  1702.  
  1703.     if test "$ac_cv_lib_socks" = yes ; then
  1704.         # Socks requires PASV.
  1705.         # Use FTP_DATA_PORT_MODE == 1 (kPassiveMode)
  1706.         cat >> confdefs.h <<\EOF
  1707. #define FTP_DATA_PORT_MODE 1
  1708. EOF
  1709.  
  1710.     fi
  1711. else
  1712. ac_cv_lib_socks=no
  1713. fi
  1714.  
  1715.  
  1716. if test "$nc_cv_termnet" = yes ; then
  1717. # Look for the "TERM" library for use with Linux, etc.
  1718. echo $ac_n "checking for -ltermnet""... $ac_c" 1>&6
  1719. ac_lib_var=`echo termnet | tr '.-/+' '___p'`
  1720. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1721.   echo $ac_n "(cached) $ac_c" 1>&6
  1722. else
  1723.   ac_save_LIBS="$LIBS"
  1724. LIBS="-ltermnet  $LIBS"
  1725. cat > conftest.$ac_ext <<EOF
  1726. #line 1727 "configure"
  1727. #include "confdefs.h"
  1728.  
  1729. int main() { return 0; }
  1730. int t() {
  1731. main()
  1732. ; return 0; }
  1733. EOF
  1734. if eval $ac_link; then
  1735.   rm -rf conftest*
  1736.   eval "ac_cv_lib_$ac_lib_var=yes"
  1737. else
  1738.   rm -rf conftest*
  1739.   eval "ac_cv_lib_$ac_lib_var=no"
  1740. fi
  1741. rm -f conftest*
  1742. LIBS="$ac_save_LIBS"
  1743.  
  1744. fi
  1745. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1746.   echo "$ac_t""yes" 1>&6
  1747.     ac_tr_lib=HAVE_LIB`echo termnet | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1748.   cat >> confdefs.h <<EOF
  1749. #define $ac_tr_lib 1
  1750. EOF
  1751.  
  1752.   LIBS="-ltermnet $LIBS"
  1753.  
  1754. else
  1755.   echo "$ac_t""no" 1>&6
  1756. fi
  1757.  
  1758. else
  1759. ac_cv_lib_termnet=no
  1760. fi
  1761.  
  1762. if test "$nc_cv_readline" = no; then
  1763. echo $ac_n "checking for -lgetline""... $ac_c" 1>&6
  1764. ac_lib_var=`echo getline | tr '.-/+' '___p'`
  1765. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1766.   echo $ac_n "(cached) $ac_c" 1>&6
  1767. else
  1768.   ac_save_LIBS="$LIBS"
  1769. LIBS="-lgetline  $LIBS"
  1770. cat > conftest.$ac_ext <<EOF
  1771. #line 1772 "configure"
  1772. #include "confdefs.h"
  1773.  
  1774. int main() { return 0; }
  1775. int t() {
  1776. gl_histadd()
  1777. ; return 0; }
  1778. EOF
  1779. if eval $ac_link; then
  1780.   rm -rf conftest*
  1781.   eval "ac_cv_lib_$ac_lib_var=yes"
  1782. else
  1783.   rm -rf conftest*
  1784.   eval "ac_cv_lib_$ac_lib_var=no"
  1785. fi
  1786. rm -f conftest*
  1787. LIBS="$ac_save_LIBS"
  1788.  
  1789. fi
  1790. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1791.   echo "$ac_t""yes" 1>&6
  1792.     ac_tr_lib=HAVE_LIB`echo getline | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1793.   cat >> confdefs.h <<EOF
  1794. #define $ac_tr_lib 1
  1795. EOF
  1796.  
  1797.   LIBS="-lgetline $LIBS"
  1798.  
  1799. else
  1800.   echo "$ac_t""no" 1>&6
  1801. fi
  1802.  
  1803. fi
  1804.  
  1805. # We don't need termcap directly, but on some systems you need to link
  1806. # with -lcurses -ltermcap.
  1807.  
  1808. echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
  1809. ac_lib_var=`echo termcap | tr '.-/+' '___p'`
  1810. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1811.   echo $ac_n "(cached) $ac_c" 1>&6
  1812. else
  1813.   ac_save_LIBS="$LIBS"
  1814. LIBS="-ltermcap  $LIBS"
  1815. cat > conftest.$ac_ext <<EOF
  1816. #line 1817 "configure"
  1817. #include "confdefs.h"
  1818.  
  1819. int main() { return 0; }
  1820. int t() {
  1821. tgetstr()
  1822. ; return 0; }
  1823. EOF
  1824. if eval $ac_link; then
  1825.   rm -rf conftest*
  1826.   eval "ac_cv_lib_$ac_lib_var=yes"
  1827. else
  1828.   rm -rf conftest*
  1829.   eval "ac_cv_lib_$ac_lib_var=no"
  1830. fi
  1831. rm -f conftest*
  1832. LIBS="$ac_save_LIBS"
  1833.  
  1834. fi
  1835. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1836.   echo "$ac_t""yes" 1>&6
  1837.   nc_cv_lib_termcap=yes
  1838. else
  1839.   echo "$ac_t""no" 1>&6
  1840. nc_cv_lib_termcap=no
  1841. fi
  1842.  
  1843.  
  1844. CURSESLIB=''
  1845. TERMCAPLIB=''
  1846. obselete_lib=no
  1847.  
  1848. if test $nc_cv_curses = yes ; then
  1849.     # cursesX is an Ultrix oddity
  1850.     echo $ac_n "checking for -lcursesX""... $ac_c" 1>&6
  1851. ac_lib_var=`echo cursesX | tr '.-/+' '___p'`
  1852. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1853.   echo $ac_n "(cached) $ac_c" 1>&6
  1854. else
  1855.   ac_save_LIBS="$LIBS"
  1856. LIBS="-lcursesX  $LIBS"
  1857. cat > conftest.$ac_ext <<EOF
  1858. #line 1859 "configure"
  1859. #include "confdefs.h"
  1860.  
  1861. int main() { return 0; }
  1862. int t() {
  1863. endwin()
  1864. ; return 0; }
  1865. EOF
  1866. if eval $ac_link; then
  1867.   rm -rf conftest*
  1868.   eval "ac_cv_lib_$ac_lib_var=yes"
  1869. else
  1870.   rm -rf conftest*
  1871.   eval "ac_cv_lib_$ac_lib_var=no"
  1872. fi
  1873. rm -f conftest*
  1874. LIBS="$ac_save_LIBS"
  1875.  
  1876. fi
  1877. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1878.   echo "$ac_t""yes" 1>&6
  1879.   CURSESLIB=cursesX
  1880. else
  1881.   echo "$ac_t""no" 1>&6
  1882. fi
  1883.  
  1884.  
  1885.     if test "$CURSESLIB" = "" ; then
  1886.         echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  1887. ac_lib_var=`echo curses | tr '.-/+' '___p'`
  1888. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1889.   echo $ac_n "(cached) $ac_c" 1>&6
  1890. else
  1891.   ac_save_LIBS="$LIBS"
  1892. LIBS="-lcurses  $LIBS"
  1893. cat > conftest.$ac_ext <<EOF
  1894. #line 1895 "configure"
  1895. #include "confdefs.h"
  1896.  
  1897. int main() { return 0; }
  1898. int t() {
  1899. wnoutrefresh()
  1900. ; return 0; }
  1901. EOF
  1902. if eval $ac_link; then
  1903.   rm -rf conftest*
  1904.   eval "ac_cv_lib_$ac_lib_var=yes"
  1905. else
  1906.   rm -rf conftest*
  1907.   eval "ac_cv_lib_$ac_lib_var=no"
  1908. fi
  1909. rm -f conftest*
  1910. LIBS="$ac_save_LIBS"
  1911.  
  1912. fi
  1913. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1914.   echo "$ac_t""yes" 1>&6
  1915.   CURSESLIB=curses
  1916. else
  1917.   echo "$ac_t""no" 1>&6
  1918. fi
  1919.  
  1920.     fi
  1921.  
  1922.     # Okay, maybe that didn't work, but maybe you needed to
  1923.     # use -lcurses -ltermcap.
  1924.     if test "$CURSESLIB" = "" ; then
  1925.         if test "$nc_cv_lib_termcap" = yes ; then
  1926.             unset ac_cv_lib_curses
  1927.             echo "configure: warning: Did not detect curses, but trying again with termcap:" 1>&2
  1928.             echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  1929. ac_lib_var=`echo curses | tr '.-/+' '___p'`
  1930. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1931.   echo $ac_n "(cached) $ac_c" 1>&6
  1932. else
  1933.   ac_save_LIBS="$LIBS"
  1934. LIBS="-lcurses -ltermcap $LIBS"
  1935. cat > conftest.$ac_ext <<EOF
  1936. #line 1937 "configure"
  1937. #include "confdefs.h"
  1938.  
  1939. int main() { return 0; }
  1940. int t() {
  1941. wnoutrefresh()
  1942. ; return 0; }
  1943. EOF
  1944. if eval $ac_link; then
  1945.   rm -rf conftest*
  1946.   eval "ac_cv_lib_$ac_lib_var=yes"
  1947. else
  1948.   rm -rf conftest*
  1949.   eval "ac_cv_lib_$ac_lib_var=no"
  1950. fi
  1951. rm -f conftest*
  1952. LIBS="$ac_save_LIBS"
  1953.  
  1954. fi
  1955. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1956.   echo "$ac_t""yes" 1>&6
  1957.   CURSESLIB=curses
  1958. else
  1959.   echo "$ac_t""no" 1>&6
  1960. CURSESLIB=''
  1961. fi
  1962.  
  1963.             if test "$CURSESLIB" = "curses" ; then
  1964.                 TERMCAPLIB=-ltermcap
  1965.             else
  1966.                 # Okay, you don't have one ncftp can use, but maybe
  1967.                 # we should tell the user if they have a shitty curses
  1968.                 # library.
  1969.  
  1970.                 unset ac_cv_lib_curses
  1971.                 if test "$nc_cv_lib_termcap" = yes ; then
  1972.                     echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  1973. ac_lib_var=`echo curses | tr '.-/+' '___p'`
  1974. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1975.   echo $ac_n "(cached) $ac_c" 1>&6
  1976. else
  1977.   ac_save_LIBS="$LIBS"
  1978. LIBS="-lcurses -ltermcap $LIBS"
  1979. cat > conftest.$ac_ext <<EOF
  1980. #line 1981 "configure"
  1981. #include "confdefs.h"
  1982.  
  1983. int main() { return 0; }
  1984. int t() {
  1985. endwin()
  1986. ; return 0; }
  1987. EOF
  1988. if eval $ac_link; then
  1989.   rm -rf conftest*
  1990.   eval "ac_cv_lib_$ac_lib_var=yes"
  1991. else
  1992.   rm -rf conftest*
  1993.   eval "ac_cv_lib_$ac_lib_var=no"
  1994. fi
  1995. rm -f conftest*
  1996. LIBS="$ac_save_LIBS"
  1997.  
  1998. fi
  1999. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2000.   echo "$ac_t""yes" 1>&6
  2001.   obselete_lib=yes
  2002. else
  2003.   echo "$ac_t""no" 1>&6
  2004. obselete_lib=no
  2005. fi
  2006.  
  2007.                 else
  2008.                     echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  2009. ac_lib_var=`echo curses | tr '.-/+' '___p'`
  2010. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2011.   echo $ac_n "(cached) $ac_c" 1>&6
  2012. else
  2013.   ac_save_LIBS="$LIBS"
  2014. LIBS="-lcurses  $LIBS"
  2015. cat > conftest.$ac_ext <<EOF
  2016. #line 2017 "configure"
  2017. #include "confdefs.h"
  2018.  
  2019. int main() { return 0; }
  2020. int t() {
  2021. endwin()
  2022. ; return 0; }
  2023. EOF
  2024. if eval $ac_link; then
  2025.   rm -rf conftest*
  2026.   eval "ac_cv_lib_$ac_lib_var=yes"
  2027. else
  2028.   rm -rf conftest*
  2029.   eval "ac_cv_lib_$ac_lib_var=no"
  2030. fi
  2031. rm -f conftest*
  2032. LIBS="$ac_save_LIBS"
  2033.  
  2034. fi
  2035. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2036.   echo "$ac_t""yes" 1>&6
  2037.   obselete_lib=yes
  2038. else
  2039.   echo "$ac_t""no" 1>&6
  2040. obselete_lib=no
  2041. fi
  2042.  
  2043.                 fi
  2044.  
  2045.                 if test "$obselete_lib" = no ; then    
  2046.                     echo "configure: warning: Did not detect a useable curses library." 1>&2
  2047.                 fi
  2048.             fi
  2049.         fi
  2050.     fi
  2051.  
  2052.     if test "$CURSESLIB" = "" ; then
  2053.         # Try termlib with Solaris 2.3
  2054.         echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
  2055. ac_lib_var=`echo termlib | tr '.-/+' '___p'`
  2056. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2057.   echo $ac_n "(cached) $ac_c" 1>&6
  2058. else
  2059.   ac_save_LIBS="$LIBS"
  2060. LIBS="-ltermlib  $LIBS"
  2061. cat > conftest.$ac_ext <<EOF
  2062. #line 2063 "configure"
  2063. #include "confdefs.h"
  2064.  
  2065. int main() { return 0; }
  2066. int t() {
  2067. endwin()
  2068. ; return 0; }
  2069. EOF
  2070. if eval $ac_link; then
  2071.   rm -rf conftest*
  2072.   eval "ac_cv_lib_$ac_lib_var=yes"
  2073. else
  2074.   rm -rf conftest*
  2075.   eval "ac_cv_lib_$ac_lib_var=no"
  2076. fi
  2077. rm -f conftest*
  2078. LIBS="$ac_save_LIBS"
  2079.  
  2080. fi
  2081. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2082.   echo "$ac_t""yes" 1>&6
  2083.   CURSESLIB=termlib
  2084. else
  2085.   echo "$ac_t""no" 1>&6
  2086. fi
  2087.  
  2088.     fi
  2089. fi
  2090.  
  2091. if test $nc_cv_ncurses = yes ; then
  2092.     echo $ac_n "checking for -lncurses""... $ac_c" 1>&6
  2093. ac_lib_var=`echo ncurses | tr '.-/+' '___p'`
  2094. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2095.   echo $ac_n "(cached) $ac_c" 1>&6
  2096. else
  2097.   ac_save_LIBS="$LIBS"
  2098. LIBS="-lncurses  $LIBS"
  2099. cat > conftest.$ac_ext <<EOF
  2100. #line 2101 "configure"
  2101. #include "confdefs.h"
  2102.  
  2103. int main() { return 0; }
  2104. int t() {
  2105. endwin()
  2106. ; return 0; }
  2107. EOF
  2108. if eval $ac_link; then
  2109.   rm -rf conftest*
  2110.   eval "ac_cv_lib_$ac_lib_var=yes"
  2111. else
  2112.   rm -rf conftest*
  2113.   eval "ac_cv_lib_$ac_lib_var=no"
  2114. fi
  2115. rm -f conftest*
  2116. LIBS="$ac_save_LIBS"
  2117.  
  2118. fi
  2119. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2120.   echo "$ac_t""yes" 1>&6
  2121.   CURSESLIB=ncurses
  2122. else
  2123.   echo "$ac_t""no" 1>&6
  2124. fi
  2125.  
  2126.     if test "$CURSESLIB" = ncurses && test "$nc_cv_extra_dirs" = yes ; then
  2127.         # See if we should add -I/usr/local/include/ncurses, etc.
  2128.         echo "checking for extra include and lib directories..." 1>&6
  2129. b1=`cd .. ; pwd`
  2130. b2=`cd ../.. ; pwd`
  2131. exdirs="$HOME $j $b1 $b2 $prefix /usr/local /usr /usr/ccs"
  2132.  
  2133. subexdirs="ncurses"
  2134. if test "$subexdirs" = "" ; then
  2135.     subexdirs="-"
  2136. fi
  2137. for subexdir in $subexdirs ; do
  2138. if test "$subexdir" = "-" ; then
  2139.     subexdir=""
  2140. else
  2141.     subexdir="/$subexdir"
  2142. fi
  2143. for exdir in $exdirs ; do
  2144.     if test "$exdir" != "/usr" || test "$subexdir" != ""; then
  2145.         incdir="${exdir}/include${subexdir}"
  2146.         
  2147. incdir="$incdir"
  2148. if test -r $incdir ; then
  2149.     case "$CPPFLAGS" in
  2150.         *${incdir}*)
  2151.             # echo "   + already had $incdir" 1>&6
  2152.             ;;
  2153.         *)
  2154.             if test "$CPPFLAGS" = "" ; then
  2155.                 CPPFLAGS="-I$incdir"
  2156.             else
  2157.                 CPPFLAGS="$CPPFLAGS -I$incdir"
  2158.             fi
  2159.             echo "   + found $incdir" 1>&6
  2160.             ;;
  2161.     esac
  2162. fi
  2163.  
  2164.  
  2165.         libdir="${exdir}/lib${subexdir}"
  2166.         
  2167. libdir="$libdir"
  2168. if test -r $libdir ; then
  2169.     case "$LDFLAGS" in
  2170.         *${libdir}*)
  2171.             # echo "   + already had $libdir" 1>&6
  2172.             ;;
  2173.         *)
  2174.             if test "$LDFLAGS" = "" ; then
  2175.                 LDFLAGS="-L$libdir"
  2176.             else
  2177.                 LDFLAGS="$LDFLAGS -L$libdir"
  2178.             fi
  2179.             echo "   + found $libdir" 1>&6
  2180.             ;;
  2181.     esac
  2182. fi
  2183.  
  2184.     fi
  2185. done
  2186. done
  2187.  
  2188.  
  2189.         # See if we should add -I/usr/local/ncurses
  2190.         
  2191. incdir="/usr/local/ncurses"
  2192. if test -r $incdir ; then
  2193.     case "$CPPFLAGS" in
  2194.         *${incdir}*)
  2195.             # echo "   + already had $incdir" 1>&6
  2196.             ;;
  2197.         *)
  2198.             if test "$CPPFLAGS" = "" ; then
  2199.                 CPPFLAGS="-I$incdir"
  2200.             else
  2201.                 CPPFLAGS="$CPPFLAGS -I$incdir"
  2202.             fi
  2203.             echo "   + found $incdir" 1>&6
  2204.             ;;
  2205.     esac
  2206. fi
  2207.  
  2208.  
  2209.         # Some people (me) have two versions of ncurses on
  2210.         # the system.  Use the one in /usr/local first.
  2211.         case "$CPPFLAGS" in
  2212.             */usr/local/include/ncurses*/usr/include/ncurses*)
  2213.                 CPPFLAGS=`echo "$CPPFLAGS" | sed 's@-I/usr/include/ncurses@@g'`
  2214.         esac
  2215.     fi
  2216. fi
  2217.  
  2218. if test "x$CURSESLIB" = xcurses -o "x$CURSESLIB" = xcursesX -o "x$CURSESLIB" = "xtermlib" ; then
  2219.  
  2220.     LIBS="$LIBS -l$CURSESLIB"
  2221. #    if test "x$CURSESLIB" = xcursesX ; then
  2222. #        LIBS="$LIBS -lcurses"
  2223. #    fi
  2224.     cat >> confdefs.h <<\EOF
  2225. #define HAVE_LIBCURSES 1
  2226. EOF
  2227.  
  2228.  
  2229. elif test "x$CURSESLIB" = xncurses ; then
  2230.     LIBS="$LIBS -lncurses"
  2231.     cat >> confdefs.h <<\EOF
  2232. #define HAVE_LIBNCURSES 1
  2233. EOF
  2234.  
  2235. fi
  2236.  
  2237. if test "$TERMCAPLIB" != "" ; then
  2238.     LIBS="$LIBS -l$TERMCAPLIB"
  2239.     cat >> confdefs.h <<\EOF
  2240. #define HAVE_LIBTERMCAP 1
  2241. EOF
  2242.  
  2243. fi
  2244.  
  2245. if test "$obselete_lib" = yes ; then    
  2246.     if test "x$CURSESLIB" != xncurses ; then
  2247.             echo "configure: warning: You have an older curses library, but it" 1>&2
  2248.             echo "configure: warning: can't be used because it does not have the" 1>&2
  2249.             echo "configure: warning: functions wnoutrefresh and doupdate, which" 1>&2
  2250.             echo "configure: warning: NcFTP needs.  Consider installing the ncurses" 1>&2
  2251.             echo "configure: warning: library, from prep.ai.mit.edu, in /pub/gnu." 1>&2
  2252.     fi
  2253. fi
  2254.  
  2255. # Readline must be listed before -lcurses and/or -ltermcap.
  2256. if test "$nc_cv_readline" = yes ; then
  2257.     READLINELIB=''
  2258.     echo $ac_n "checking for -lreadline""... $ac_c" 1>&6
  2259. ac_lib_var=`echo readline | tr '.-/+' '___p'`
  2260. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2261.   echo $ac_n "(cached) $ac_c" 1>&6
  2262. else
  2263.   ac_save_LIBS="$LIBS"
  2264. LIBS="-lreadline  $LIBS"
  2265. cat > conftest.$ac_ext <<EOF
  2266. #line 2267 "configure"
  2267. #include "confdefs.h"
  2268.  
  2269. int main() { return 0; }
  2270. int t() {
  2271. readline()
  2272. ; return 0; }
  2273. EOF
  2274. if eval $ac_link; then
  2275.   rm -rf conftest*
  2276.   eval "ac_cv_lib_$ac_lib_var=yes"
  2277. else
  2278.   rm -rf conftest*
  2279.   eval "ac_cv_lib_$ac_lib_var=no"
  2280. fi
  2281. rm -f conftest*
  2282. LIBS="$ac_save_LIBS"
  2283.  
  2284. fi
  2285. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2286.   echo "$ac_t""yes" 1>&6
  2287.   READLINELIB=readline
  2288. else
  2289.   echo "$ac_t""no" 1>&6
  2290. fi
  2291.  
  2292.     if test "$READLINELIB" != "" ; then
  2293.         if test "$CURSESLIB" != "" ; then
  2294.             LIBS=`echo "$LIBS" | sed "s@$CURSESLIB@$READLINELIB -l$CURSESLIB@"`
  2295.         elif test "$TERMCAPLIB" != "" ; then
  2296.             LIBS=`echo "$LIBS" | sed "s@$TERMCAPLIB@$READLINELIB -l$TERMCAPLIB@"`
  2297.         fi
  2298.         cat >> confdefs.h <<\EOF
  2299. #define HAVE_LIBREADLINE 1
  2300. EOF
  2301.  
  2302.     fi
  2303. else
  2304.     ac_cv_lib_readline=no
  2305. fi
  2306.  
  2307.  
  2308. if test "$ac_cv_lib_readline" = yes ; then
  2309.     # Make sure we link termcap with readline if we aren't already
  2310.     # linking curses or termcap.
  2311.     case "$LIBS" in
  2312.         *termcap*|*curses*)
  2313.             ;;
  2314.         *)
  2315.             LIBS="$LIBS -ltermcap"
  2316.             ;;
  2317.     esac
  2318.     for ac_func in filename_completion_function
  2319. do
  2320. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2321. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2322.   echo $ac_n "(cached) $ac_c" 1>&6
  2323. else
  2324.   cat > conftest.$ac_ext <<EOF
  2325. #line 2326 "configure"
  2326. #include "confdefs.h"
  2327. /* System header to define __stub macros and hopefully few prototypes,
  2328.     which can conflict with char $ac_func(); below.  */
  2329. #include <assert.h>
  2330. /* Override any gcc2 internal prototype to avoid an error.  */
  2331. char $ac_func();
  2332.  
  2333. int main() { return 0; }
  2334. int t() {
  2335.  
  2336. /* The GNU C library defines this for functions which it implements
  2337.     to always fail with ENOSYS.  Some functions are actually named
  2338.     something starting with __ and the normal name is an alias.  */
  2339. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2340. choke me
  2341. #else
  2342. $ac_func();
  2343. #endif
  2344.  
  2345. ; return 0; }
  2346. EOF
  2347. if eval $ac_link; then
  2348.   rm -rf conftest*
  2349.   eval "ac_cv_func_$ac_func=yes"
  2350. else
  2351.   rm -rf conftest*
  2352.   eval "ac_cv_func_$ac_func=no"
  2353. fi
  2354. rm -f conftest*
  2355.  
  2356. fi
  2357. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2358.   echo "$ac_t""yes" 1>&6
  2359.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2360.   cat >> confdefs.h <<EOF
  2361. #define $ac_tr_func 1
  2362. EOF
  2363.  
  2364. else
  2365.   echo "$ac_t""no" 1>&6
  2366. fi
  2367. done
  2368.  
  2369. fi
  2370.  
  2371.  
  2372.  
  2373. # Readline and Ncurses could both define "backspace".
  2374. # Warn about this if we have both things in our definitions list.
  2375.  
  2376. if test "$ac_cv_lib_readline" = yes && test "$ac_cv_lib_ncurses" = yes ; then
  2377.  
  2378. echo $ac_n "checking if readline and ncurses will link together""... $ac_c" 1>&6
  2379. j="$LIBS"
  2380. LIBS="-lreadline -lncurses"
  2381. cat > conftest.$ac_ext <<EOF
  2382. #line 2383 "configure"
  2383. #include "confdefs.h"
  2384.  
  2385. int main() { return 0; }
  2386. int t() {
  2387.  
  2388. readline("prompt");
  2389. endwin();
  2390.  
  2391. ; return 0; }
  2392. EOF
  2393. if eval $ac_link; then
  2394.   rm -rf conftest*
  2395.   k=yes
  2396. else
  2397.   rm -rf conftest*
  2398.   k=no
  2399. fi
  2400. rm -f conftest*
  2401.  
  2402. if test "$k" = no ; then
  2403.     echo "$ac_t""no" 1>&6
  2404.     # Remove '-lreadline' from LIBS.
  2405.     LIBS=`echo $j | sed s/-lreadline//g`
  2406.     ac_cv_lib_readline=no
  2407.     echo "configure: warning: The versions of GNU readline and ncurses you have installed on this system
  2408. can't be used together, because they use the same symbol, backspace. If
  2409. possible, recompile one of the libraries with -Dbackspace=back_space, then
  2410. re-run configure." 1>&2
  2411.  
  2412. else
  2413.     echo "$ac_t""yes" 1>&6
  2414.     LIBS="$j"
  2415. fi
  2416.  
  2417. fi
  2418.  
  2419. echo $ac_n "checking for -lposix""... $ac_c" 1>&6
  2420. ac_lib_var=`echo posix | tr '.-/+' '___p'`
  2421. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2422.   echo $ac_n "(cached) $ac_c" 1>&6
  2423. else
  2424.   ac_save_LIBS="$LIBS"
  2425. LIBS="-lposix  $LIBS"
  2426. cat > conftest.$ac_ext <<EOF
  2427. #line 2428 "configure"
  2428. #include "confdefs.h"
  2429.  
  2430. int main() { return 0; }
  2431. int t() {
  2432. tcgetpgrp()
  2433. ; return 0; }
  2434. EOF
  2435. if eval $ac_link; then
  2436.   rm -rf conftest*
  2437.   eval "ac_cv_lib_$ac_lib_var=yes"
  2438. else
  2439.   rm -rf conftest*
  2440.   eval "ac_cv_lib_$ac_lib_var=no"
  2441. fi
  2442. rm -f conftest*
  2443. LIBS="$ac_save_LIBS"
  2444.  
  2445. fi
  2446. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2447.   echo "$ac_t""yes" 1>&6
  2448.     ac_tr_lib=HAVE_LIB`echo posix | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2449.   cat >> confdefs.h <<EOF
  2450. #define $ac_tr_lib 1
  2451. EOF
  2452.  
  2453.   LIBS="-lposix $LIBS"
  2454.  
  2455. else
  2456.   echo "$ac_t""no" 1>&6
  2457. fi
  2458.  
  2459.  
  2460. if test "$nc_cv_shared_libc" = yes ; then
  2461. # This should be the last library to look for.
  2462. echo $ac_n "checking for -lc_s""... $ac_c" 1>&6
  2463. ac_lib_var=`echo c_s | tr '.-/+' '___p'`
  2464. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2465.   echo $ac_n "(cached) $ac_c" 1>&6
  2466. else
  2467.   ac_save_LIBS="$LIBS"
  2468. LIBS="-lc_s  $LIBS"
  2469. cat > conftest.$ac_ext <<EOF
  2470. #line 2471 "configure"
  2471. #include "confdefs.h"
  2472.  
  2473. int main() { return 0; }
  2474. int t() {
  2475. main()
  2476. ; return 0; }
  2477. EOF
  2478. if eval $ac_link; then
  2479.   rm -rf conftest*
  2480.   eval "ac_cv_lib_$ac_lib_var=yes"
  2481. else
  2482.   rm -rf conftest*
  2483.   eval "ac_cv_lib_$ac_lib_var=no"
  2484. fi
  2485. rm -f conftest*
  2486. LIBS="$ac_save_LIBS"
  2487.  
  2488. fi
  2489. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2490.   echo "$ac_t""yes" 1>&6
  2491.     ac_tr_lib=HAVE_LIB`echo c_s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2492.   cat >> confdefs.h <<EOF
  2493. #define $ac_tr_lib 1
  2494. EOF
  2495.  
  2496.   LIBS="-lc_s $LIBS"
  2497.  
  2498. else
  2499.   echo "$ac_t""no" 1>&6
  2500. fi
  2501.  
  2502. else
  2503. ac_cv_lib_c_s=no
  2504. fi
  2505.  
  2506. # strftime is in -lintl on SCO UNIX.
  2507. echo $ac_n "checking for -lintl""... $ac_c" 1>&6
  2508. ac_lib_var=`echo intl | tr '.-/+' '___p'`
  2509. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2510.   echo $ac_n "(cached) $ac_c" 1>&6
  2511. else
  2512.   ac_save_LIBS="$LIBS"
  2513. LIBS="-lintl  $LIBS"
  2514. cat > conftest.$ac_ext <<EOF
  2515. #line 2516 "configure"
  2516. #include "confdefs.h"
  2517.  
  2518. int main() { return 0; }
  2519. int t() {
  2520. strftime()
  2521. ; return 0; }
  2522. EOF
  2523. if eval $ac_link; then
  2524.   rm -rf conftest*
  2525.   eval "ac_cv_lib_$ac_lib_var=yes"
  2526. else
  2527.   rm -rf conftest*
  2528.   eval "ac_cv_lib_$ac_lib_var=no"
  2529. fi
  2530. rm -f conftest*
  2531. LIBS="$ac_save_LIBS"
  2532.  
  2533. fi
  2534. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2535.   echo "$ac_t""yes" 1>&6
  2536.   LIBS="-lintl $LIBS"
  2537. else
  2538.   echo "$ac_t""no" 1>&6
  2539. fi
  2540.  
  2541. echo $ac_n "checking for strftime""... $ac_c" 1>&6
  2542. if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
  2543.   echo $ac_n "(cached) $ac_c" 1>&6
  2544. else
  2545.   cat > conftest.$ac_ext <<EOF
  2546. #line 2547 "configure"
  2547. #include "confdefs.h"
  2548. /* System header to define __stub macros and hopefully few prototypes,
  2549.     which can conflict with char strftime(); below.  */
  2550. #include <assert.h>
  2551. /* Override any gcc2 internal prototype to avoid an error.  */
  2552. char strftime();
  2553.  
  2554. int main() { return 0; }
  2555. int t() {
  2556.  
  2557. /* The GNU C library defines this for functions which it implements
  2558.     to always fail with ENOSYS.  Some functions are actually named
  2559.     something starting with __ and the normal name is an alias.  */
  2560. #if defined (__stub_strftime) || defined (__stub___strftime)
  2561. choke me
  2562. #else
  2563. strftime();
  2564. #endif
  2565.  
  2566. ; return 0; }
  2567. EOF
  2568. if eval $ac_link; then
  2569.   rm -rf conftest*
  2570.   eval "ac_cv_func_strftime=yes"
  2571. else
  2572.   rm -rf conftest*
  2573.   eval "ac_cv_func_strftime=no"
  2574. fi
  2575. rm -f conftest*
  2576.  
  2577. fi
  2578. if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
  2579.   echo "$ac_t""yes" 1>&6
  2580.   cat >> confdefs.h <<\EOF
  2581. #define HAVE_STRFTIME 1
  2582. EOF
  2583.  
  2584. else
  2585.   echo "$ac_t""no" 1>&6
  2586. fi
  2587.  
  2588.  
  2589. for ac_func in getdomainname getcwd getwd memmove mktime symlink setlinebuf
  2590. do
  2591. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2592. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2593.   echo $ac_n "(cached) $ac_c" 1>&6
  2594. else
  2595.   cat > conftest.$ac_ext <<EOF
  2596. #line 2597 "configure"
  2597. #include "confdefs.h"
  2598. /* System header to define __stub macros and hopefully few prototypes,
  2599.     which can conflict with char $ac_func(); below.  */
  2600. #include <assert.h>
  2601. /* Override any gcc2 internal prototype to avoid an error.  */
  2602. char $ac_func();
  2603.  
  2604. int main() { return 0; }
  2605. int t() {
  2606.  
  2607. /* The GNU C library defines this for functions which it implements
  2608.     to always fail with ENOSYS.  Some functions are actually named
  2609.     something starting with __ and the normal name is an alias.  */
  2610. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2611. choke me
  2612. #else
  2613. $ac_func();
  2614. #endif
  2615.  
  2616. ; return 0; }
  2617. EOF
  2618. if eval $ac_link; then
  2619.   rm -rf conftest*
  2620.   eval "ac_cv_func_$ac_func=yes"
  2621. else
  2622.   rm -rf conftest*
  2623.   eval "ac_cv_func_$ac_func=no"
  2624. fi
  2625. rm -f conftest*
  2626.  
  2627. fi
  2628. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2629.   echo "$ac_t""yes" 1>&6
  2630.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2631.   cat >> confdefs.h <<EOF
  2632. #define $ac_tr_func 1
  2633. EOF
  2634.  
  2635. else
  2636.   echo "$ac_t""no" 1>&6
  2637. fi
  2638. done
  2639.  
  2640. for ac_func in strerror strcasecmp remove unlink tcgetpgrp fcntl flock
  2641. do
  2642. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2643. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2644.   echo $ac_n "(cached) $ac_c" 1>&6
  2645. else
  2646.   cat > conftest.$ac_ext <<EOF
  2647. #line 2648 "configure"
  2648. #include "confdefs.h"
  2649. /* System header to define __stub macros and hopefully few prototypes,
  2650.     which can conflict with char $ac_func(); below.  */
  2651. #include <assert.h>
  2652. /* Override any gcc2 internal prototype to avoid an error.  */
  2653. char $ac_func();
  2654.  
  2655. int main() { return 0; }
  2656. int t() {
  2657.  
  2658. /* The GNU C library defines this for functions which it implements
  2659.     to always fail with ENOSYS.  Some functions are actually named
  2660.     something starting with __ and the normal name is an alias.  */
  2661. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2662. choke me
  2663. #else
  2664. $ac_func();
  2665. #endif
  2666.  
  2667. ; return 0; }
  2668. EOF
  2669. if eval $ac_link; then
  2670.   rm -rf conftest*
  2671.   eval "ac_cv_func_$ac_func=yes"
  2672. else
  2673.   rm -rf conftest*
  2674.   eval "ac_cv_func_$ac_func=no"
  2675. fi
  2676. rm -f conftest*
  2677.  
  2678. fi
  2679. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2680.   echo "$ac_t""yes" 1>&6
  2681.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2682.   cat >> confdefs.h <<EOF
  2683. #define $ac_tr_func 1
  2684. EOF
  2685.  
  2686. else
  2687.   echo "$ac_t""no" 1>&6
  2688. fi
  2689. done
  2690.  
  2691.  
  2692. echo $ac_n "checking for domain name in /etc/resolv.conf""... $ac_c" 1>&6
  2693. RESOLV_CONF_DOMAIN=""
  2694. if test -f /etc/resolv.conf ; then
  2695.         RESOLV_CONF_DOMAIN=`sed 's/[#;].*//' /etc/resolv.conf | sed -n 's/domain[     ]//p' | sed -n 1,1p | tr -d '     '`
  2696.         if test "$RESOLV_CONF_DOMAIN" = "" ; then
  2697.         echo "$ac_t""no" 1>&6
  2698.     else
  2699.         echo "$ac_t""$RESOLV_CONF_DOMAIN" 1>&6
  2700.         RESOLV_CONF_DOMAIN=" # -DDOMAINNAME=\\\"$RESOLV_CONF_DOMAIN\\\""
  2701.     fi
  2702. else
  2703.     echo "$ac_t""no" 1>&6
  2704. fi
  2705.  
  2706.  
  2707. if test "x$CURSESLIB" = x ; then
  2708. # Don't check these unless we have a curses library.
  2709.     ac_cv_func_curs_set=no
  2710.     ac_cv_func_getmaxyx=no
  2711.     ac_cv_func_beep=no
  2712.     ac_cv_func_notimeout=no
  2713. else
  2714.     for ac_func in curs_set getmaxyx beep notimeout
  2715. do
  2716. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2717. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2718.   echo $ac_n "(cached) $ac_c" 1>&6
  2719. else
  2720.   cat > conftest.$ac_ext <<EOF
  2721. #line 2722 "configure"
  2722. #include "confdefs.h"
  2723. /* System header to define __stub macros and hopefully few prototypes,
  2724.     which can conflict with char $ac_func(); below.  */
  2725. #include <assert.h>
  2726. /* Override any gcc2 internal prototype to avoid an error.  */
  2727. char $ac_func();
  2728.  
  2729. int main() { return 0; }
  2730. int t() {
  2731.  
  2732. /* The GNU C library defines this for functions which it implements
  2733.     to always fail with ENOSYS.  Some functions are actually named
  2734.     something starting with __ and the normal name is an alias.  */
  2735. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2736. choke me
  2737. #else
  2738. $ac_func();
  2739. #endif
  2740.  
  2741. ; return 0; }
  2742. EOF
  2743. if eval $ac_link; then
  2744.   rm -rf conftest*
  2745.   eval "ac_cv_func_$ac_func=yes"
  2746. else
  2747.   rm -rf conftest*
  2748.   eval "ac_cv_func_$ac_func=no"
  2749. fi
  2750. rm -f conftest*
  2751.  
  2752. fi
  2753. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2754.   echo "$ac_t""yes" 1>&6
  2755.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2756.   cat >> confdefs.h <<EOF
  2757. #define $ac_tr_func 1
  2758. EOF
  2759.  
  2760. else
  2761.   echo "$ac_t""no" 1>&6
  2762. fi
  2763. done
  2764.  
  2765.     if test $ac_cv_func_getmaxyx = no ; then
  2766.         echo $ac_n "checking for maxx or _maxx in WINDOW structure""... $ac_c" 1>&6
  2767.         cat > conftest.$ac_ext <<EOF
  2768. #line 2769 "configure"
  2769. #include "confdefs.h"
  2770. #include <curses.h>
  2771. int main() { return 0; }
  2772. int t() {
  2773.  
  2774.         WINDOW *w;
  2775.     
  2776.         w = newwin(10, 10, 1, 1);
  2777.         w->maxx = 0;
  2778.         delwin(w);
  2779. ; return 0; }
  2780. EOF
  2781. if eval $ac_compile; then
  2782.   rm -rf conftest*
  2783.   maxx=yes
  2784. else
  2785.   rm -rf conftest*
  2786.   _maxx=yes
  2787. fi
  2788. rm -f conftest*
  2789.  
  2790.         if test "$maxx" = yes ; then
  2791.             cat >> confdefs.h <<\EOF
  2792. #define HAVE_MAXX 1
  2793. EOF
  2794.  
  2795.             echo "$ac_t""maxx" 1>&6
  2796.         else
  2797.             # Most systems use _maxx as their internal field.
  2798.             cat >> confdefs.h <<\EOF
  2799. #define HAVE__MAXX 1
  2800. EOF
  2801.  
  2802.             echo "$ac_t""assuming _maxx" 1>&6
  2803.         fi
  2804.     fi
  2805. fi
  2806.  
  2807. if test $ac_cv_func_getcwd = no && test $ac_cv_func_getwd = no ; then
  2808. echo "configure: warning: This system does not have either getwd or getcwd?" 1>&2
  2809. echo "configure: warning: I find that a little hard to believe." 1>&2
  2810. echo "configure: warning: You may want to try -DHAVE_GETWD anyway." 1>&2
  2811. echo "configure: warning: 
  2812. This could also mean that your compiler isn't working" 1>&2
  2813. echo "configure: warning: with this configure script.  Check the ./config.log" 1>&2
  2814. echo "configure: warning: and look for anomalies." 1>&2
  2815. fi
  2816.  
  2817. if test $ac_cv_func_remove = no && test $ac_cv_func_unlink = no ; then
  2818. echo "configure: warning: This system does not have either remove or unlink?" 1>&2
  2819. echo "configure: warning: I find that a little hard to believe." 1>&2
  2820. echo "configure: warning: You may want to try -DHAVE_UNLINK anyway." 1>&2
  2821. fi
  2822.  
  2823. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2824. # On Suns, sometimes $CPP names a directory.
  2825. if test -n "$CPP" && test -d "$CPP"; then
  2826.   CPP=
  2827. fi
  2828. if test -z "$CPP"; then
  2829. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  2830.   echo $ac_n "(cached) $ac_c" 1>&6
  2831. else
  2832.     # This must be in double quotes, not single quotes, because CPP may get
  2833.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  2834.   CPP="${CC-cc} -E"
  2835.   # On the NeXT, cc -E runs the code through the compiler's parser,
  2836.   # not just through cpp.
  2837.   cat > conftest.$ac_ext <<EOF
  2838. #line 2839 "configure"
  2839. #include "confdefs.h"
  2840. #include <assert.h>
  2841. Syntax Error
  2842. EOF
  2843. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2844. ac_err=`grep -v '^ *+' conftest.out`
  2845. if test -z "$ac_err"; then
  2846.   :
  2847. else
  2848.   echo "$ac_err" >&5
  2849.   rm -rf conftest*
  2850.   CPP="${CC-cc} -E -traditional-cpp"
  2851.   cat > conftest.$ac_ext <<EOF
  2852. #line 2853 "configure"
  2853. #include "confdefs.h"
  2854. #include <assert.h>
  2855. Syntax Error
  2856. EOF
  2857. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2858. ac_err=`grep -v '^ *+' conftest.out`
  2859. if test -z "$ac_err"; then
  2860.   :
  2861. else
  2862.   echo "$ac_err" >&5
  2863.   rm -rf conftest*
  2864.   CPP=/lib/cpp
  2865. fi
  2866. rm -f conftest*
  2867. fi
  2868. rm -f conftest*
  2869.   ac_cv_prog_CPP="$CPP"
  2870. fi
  2871.   CPP="$ac_cv_prog_CPP"
  2872. else
  2873.   ac_cv_prog_CPP="$CPP"
  2874. fi
  2875. echo "$ac_t""$CPP" 1>&6
  2876.  
  2877. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2878. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  2879.   echo $ac_n "(cached) $ac_c" 1>&6
  2880. else
  2881.   cat > conftest.$ac_ext <<EOF
  2882. #line 2883 "configure"
  2883. #include "confdefs.h"
  2884. #include <stdlib.h>
  2885. #include <stdarg.h>
  2886. #include <string.h>
  2887. #include <float.h>
  2888. EOF
  2889. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2890. ac_err=`grep -v '^ *+' conftest.out`
  2891. if test -z "$ac_err"; then
  2892.   rm -rf conftest*
  2893.   ac_cv_header_stdc=yes
  2894. else
  2895.   echo "$ac_err" >&5
  2896.   rm -rf conftest*
  2897.   ac_cv_header_stdc=no
  2898. fi
  2899. rm -f conftest*
  2900.  
  2901. if test $ac_cv_header_stdc = yes; then
  2902.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2903. cat > conftest.$ac_ext <<EOF
  2904. #line 2905 "configure"
  2905. #include "confdefs.h"
  2906. #include <string.h>
  2907. EOF
  2908. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2909.   egrep "memchr" >/dev/null 2>&1; then
  2910.   :
  2911. else
  2912.   rm -rf conftest*
  2913.   ac_cv_header_stdc=no
  2914. fi
  2915. rm -f conftest*
  2916.  
  2917. fi
  2918.  
  2919. if test $ac_cv_header_stdc = yes; then
  2920.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2921. cat > conftest.$ac_ext <<EOF
  2922. #line 2923 "configure"
  2923. #include "confdefs.h"
  2924. #include <stdlib.h>
  2925. EOF
  2926. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2927.   egrep "free" >/dev/null 2>&1; then
  2928.   :
  2929. else
  2930.   rm -rf conftest*
  2931.   ac_cv_header_stdc=no
  2932. fi
  2933. rm -f conftest*
  2934.  
  2935. fi
  2936.  
  2937. if test $ac_cv_header_stdc = yes; then
  2938.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2939. if test "$cross_compiling" = yes; then
  2940.   :
  2941. else
  2942. cat > conftest.$ac_ext <<EOF
  2943. #line 2944 "configure"
  2944. #include "confdefs.h"
  2945. #include <ctype.h>
  2946. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2947. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2948. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2949. int main () { int i; for (i = 0; i < 256; i++)
  2950. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2951. exit (0); }
  2952.  
  2953. EOF
  2954. eval $ac_link
  2955. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2956.   :
  2957. else
  2958.   ac_cv_header_stdc=no
  2959. fi
  2960. fi
  2961. rm -fr conftest*
  2962. fi
  2963. fi
  2964.  
  2965. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2966. if test $ac_cv_header_stdc = yes; then
  2967.   cat >> confdefs.h <<\EOF
  2968. #define STDC_HEADERS 1
  2969. EOF
  2970.  
  2971. fi
  2972.  
  2973. for ac_hdr in string.h memory.h unistd.h stdarg.h termios.h termio.h sgtty.h
  2974. do
  2975. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2976. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2977. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2978.   echo $ac_n "(cached) $ac_c" 1>&6
  2979. else
  2980.   cat > conftest.$ac_ext <<EOF
  2981. #line 2982 "configure"
  2982. #include "confdefs.h"
  2983. #include <$ac_hdr>
  2984. EOF
  2985. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2986. ac_err=`grep -v '^ *+' conftest.out`
  2987. if test -z "$ac_err"; then
  2988.   rm -rf conftest*
  2989.   eval "ac_cv_header_$ac_safe=yes"
  2990. else
  2991.   echo "$ac_err" >&5
  2992.   rm -rf conftest*
  2993.   eval "ac_cv_header_$ac_safe=no"
  2994. fi
  2995. rm -f conftest*
  2996. fi
  2997. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2998.   echo "$ac_t""yes" 1>&6
  2999.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3000.   cat >> confdefs.h <<EOF
  3001. #define $ac_tr_hdr 1
  3002. EOF
  3003.  
  3004. else
  3005.   echo "$ac_t""no" 1>&6
  3006. fi
  3007. done
  3008.  
  3009. for ac_hdr in utime.h sys/time.h readline/history.h cursesX.h ncurses.h
  3010. do
  3011. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  3012. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3013. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3014.   echo $ac_n "(cached) $ac_c" 1>&6
  3015. else
  3016.   cat > conftest.$ac_ext <<EOF
  3017. #line 3018 "configure"
  3018. #include "confdefs.h"
  3019. #include <$ac_hdr>
  3020. EOF
  3021. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3022. ac_err=`grep -v '^ *+' conftest.out`
  3023. if test -z "$ac_err"; then
  3024.   rm -rf conftest*
  3025.   eval "ac_cv_header_$ac_safe=yes"
  3026. else
  3027.   echo "$ac_err" >&5
  3028.   rm -rf conftest*
  3029.   eval "ac_cv_header_$ac_safe=no"
  3030. fi
  3031. rm -f conftest*
  3032. fi
  3033. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3034.   echo "$ac_t""yes" 1>&6
  3035.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3036.   cat >> confdefs.h <<EOF
  3037. #define $ac_tr_hdr 1
  3038. EOF
  3039.  
  3040. else
  3041.   echo "$ac_t""no" 1>&6
  3042. fi
  3043. done
  3044.  
  3045. for ac_hdr in limits.h termnet.h term/termnet.h fcntl.h sys/ioctl.h curses.h
  3046. do
  3047. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  3048. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3049. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3050.   echo $ac_n "(cached) $ac_c" 1>&6
  3051. else
  3052.   cat > conftest.$ac_ext <<EOF
  3053. #line 3054 "configure"
  3054. #include "confdefs.h"
  3055. #include <$ac_hdr>
  3056. EOF
  3057. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3058. ac_err=`grep -v '^ *+' conftest.out`
  3059. if test -z "$ac_err"; then
  3060.   rm -rf conftest*
  3061.   eval "ac_cv_header_$ac_safe=yes"
  3062. else
  3063.   echo "$ac_err" >&5
  3064.   rm -rf conftest*
  3065.   eval "ac_cv_header_$ac_safe=no"
  3066. fi
  3067. rm -f conftest*
  3068. fi
  3069. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3070.   echo "$ac_t""yes" 1>&6
  3071.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3072.   cat >> confdefs.h <<EOF
  3073. #define $ac_tr_hdr 1
  3074. EOF
  3075.  
  3076. else
  3077.   echo "$ac_t""no" 1>&6
  3078. fi
  3079. done
  3080.  
  3081. for ac_hdr in net/errno.h sys/file.h sys/bsdtypes.h
  3082. do
  3083. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  3084. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3085. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3086.   echo $ac_n "(cached) $ac_c" 1>&6
  3087. else
  3088.   cat > conftest.$ac_ext <<EOF
  3089. #line 3090 "configure"
  3090. #include "confdefs.h"
  3091. #include <$ac_hdr>
  3092. EOF
  3093. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3094. ac_err=`grep -v '^ *+' conftest.out`
  3095. if test -z "$ac_err"; then
  3096.   rm -rf conftest*
  3097.   eval "ac_cv_header_$ac_safe=yes"
  3098. else
  3099.   echo "$ac_err" >&5
  3100.   rm -rf conftest*
  3101.   eval "ac_cv_header_$ac_safe=no"
  3102. fi
  3103. rm -f conftest*
  3104. fi
  3105. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3106.   echo "$ac_t""yes" 1>&6
  3107.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  3108.   cat >> confdefs.h <<EOF
  3109. #define $ac_tr_hdr 1
  3110. EOF
  3111.  
  3112. else
  3113.   echo "$ac_t""no" 1>&6
  3114. fi
  3115. done
  3116.  
  3117. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  3118. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  3119.   echo $ac_n "(cached) $ac_c" 1>&6
  3120. else
  3121.   cat > conftest.$ac_ext <<EOF
  3122. #line 3123 "configure"
  3123. #include "confdefs.h"
  3124. #include <sys/types.h>
  3125. #include <sys/time.h>
  3126. #include <time.h>
  3127. int main() { return 0; }
  3128. int t() {
  3129. struct tm *tp;
  3130. ; return 0; }
  3131. EOF
  3132. if eval $ac_compile; then
  3133.   rm -rf conftest*
  3134.   ac_cv_header_time=yes
  3135. else
  3136.   rm -rf conftest*
  3137.   ac_cv_header_time=no
  3138. fi
  3139. rm -f conftest*
  3140.  
  3141. fi
  3142.  
  3143. echo "$ac_t""$ac_cv_header_time" 1>&6
  3144. if test $ac_cv_header_time = yes; then
  3145.   cat >> confdefs.h <<\EOF
  3146. #define TIME_WITH_SYS_TIME 1
  3147. EOF
  3148.  
  3149. fi
  3150.  
  3151.  
  3152. echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
  3153. if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
  3154.   echo $ac_n "(cached) $ac_c" 1>&6
  3155. else
  3156.   if test "$cross_compiling" = yes; then
  3157.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3158. else
  3159. cat > conftest.$ac_ext <<EOF
  3160. #line 3161 "configure"
  3161. #include "confdefs.h"
  3162. #include <stdio.h>
  3163. /* If setvbuf has the reversed format, exit 0. */
  3164. main () {
  3165.   /* This call has the arguments reversed.
  3166.      A reversed system may check and see that the address of main
  3167.      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  3168.   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
  3169.     exit(1);
  3170.   putc('\r', stdout);
  3171.   exit(0);            /* Non-reversed systems segv here.  */
  3172. }
  3173. EOF
  3174. eval $ac_link
  3175. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3176.   ac_cv_func_setvbuf_reversed=yes
  3177. else
  3178.   ac_cv_func_setvbuf_reversed=no
  3179. fi
  3180. fi
  3181. rm -fr conftest*
  3182. rm -f core core.* *.core
  3183. fi
  3184.  
  3185. echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
  3186. if test $ac_cv_func_setvbuf_reversed = yes; then
  3187.   cat >> confdefs.h <<\EOF
  3188. #define SETVBUF_REVERSED 1
  3189. EOF
  3190.  
  3191. fi
  3192.  
  3193. echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
  3194. if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
  3195.   echo $ac_n "(cached) $ac_c" 1>&6
  3196. else
  3197.   if test "$cross_compiling" = yes; then
  3198.   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
  3199. else
  3200. cat > conftest.$ac_ext <<EOF
  3201. #line 3202 "configure"
  3202. #include "confdefs.h"
  3203.  
  3204. /*
  3205.  * If this system has a BSD-style getpgrp(),
  3206.  * which takes a pid argument, exit unsuccessfully.
  3207.  *
  3208.  * Snarfed from Chet Ramey's bash pgrp.c test program
  3209.  */
  3210. #include <stdio.h>
  3211. #include <sys/types.h>
  3212.  
  3213. int     pid;
  3214. int     pg1, pg2, pg3, pg4;
  3215. int     ng, np, s, child;
  3216.  
  3217. main()
  3218. {
  3219.         pid = getpid();
  3220.         pg1 = getpgrp(0);
  3221.         pg2 = getpgrp();
  3222.         pg3 = getpgrp(pid);
  3223.         pg4 = getpgrp(1);
  3224.  
  3225.         /*
  3226.          * If all of these values are the same, it's pretty sure that
  3227.          * we're on a system that ignores getpgrp's first argument.
  3228.          */
  3229.         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
  3230.                 exit(0);
  3231.  
  3232.         child = fork();
  3233.         if (child < 0)
  3234.                 exit(1);
  3235.         else if (child == 0) {
  3236.                 np = getpid();
  3237.                 /*
  3238.                  * If this is Sys V, this will not work; pgrp will be
  3239.                  * set to np because setpgrp just changes a pgrp to be
  3240.                  * the same as the pid.
  3241.                  */
  3242.                 setpgrp(np, pg1);
  3243.                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
  3244.                 if (ng == pg1) {
  3245.                         exit(1);
  3246.                 } else {
  3247.                         exit(0);
  3248.                 }
  3249.         } else {
  3250.                 wait(&s);
  3251.                 exit(s>>8);
  3252.         }
  3253. }
  3254.  
  3255. EOF
  3256. eval $ac_link
  3257. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3258.   ac_cv_func_getpgrp_void=yes
  3259. else
  3260.   ac_cv_func_getpgrp_void=no
  3261. fi
  3262. fi
  3263. rm -fr conftest*
  3264.  
  3265. fi
  3266.  
  3267. echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
  3268. if test $ac_cv_func_getpgrp_void = yes; then
  3269.   cat >> confdefs.h <<\EOF
  3270. #define GETPGRP_VOID 1
  3271. EOF
  3272.  
  3273. fi
  3274.  
  3275. if test $ac_cv_prog_gcc = yes; then
  3276.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  3277. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  3278.   echo $ac_n "(cached) $ac_c" 1>&6
  3279. else
  3280.     ac_pattern="Autoconf.*'x'"
  3281.   cat > conftest.$ac_ext <<EOF
  3282. #line 3283 "configure"
  3283. #include "confdefs.h"
  3284. #include <sgtty.h>
  3285. Autoconf TIOCGETP
  3286. EOF
  3287. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3288.   egrep "$ac_pattern" >/dev/null 2>&1; then
  3289.   rm -rf conftest*
  3290.   ac_cv_prog_gcc_traditional=yes
  3291. else
  3292.   rm -rf conftest*
  3293.   ac_cv_prog_gcc_traditional=no
  3294. fi
  3295. rm -f conftest*
  3296.  
  3297.  
  3298.   if test $ac_cv_prog_gcc_traditional = no; then
  3299.     cat > conftest.$ac_ext <<EOF
  3300. #line 3301 "configure"
  3301. #include "confdefs.h"
  3302. #include <termio.h>
  3303. Autoconf TCGETA
  3304. EOF
  3305. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3306.   egrep "$ac_pattern" >/dev/null 2>&1; then
  3307.   rm -rf conftest*
  3308.   ac_cv_prog_gcc_traditional=yes
  3309. fi
  3310. rm -f conftest*
  3311.  
  3312.   fi
  3313. fi
  3314.  
  3315. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  3316.   if test $ac_cv_prog_gcc_traditional = yes; then
  3317.     CC="$CC -traditional"
  3318.   fi
  3319. fi
  3320.  
  3321.  
  3322. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  3323. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  3324.   echo $ac_n "(cached) $ac_c" 1>&6
  3325. else
  3326.   cat > conftest.$ac_ext <<EOF
  3327. #line 3328 "configure"
  3328. #include "confdefs.h"
  3329. #include <sys/types.h>
  3330. #if STDC_HEADERS
  3331. #include <stdlib.h>
  3332. #endif
  3333. EOF
  3334. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3335.   egrep "size_t" >/dev/null 2>&1; then
  3336.   rm -rf conftest*
  3337.   ac_cv_type_size_t=yes
  3338. else
  3339.   rm -rf conftest*
  3340.   ac_cv_type_size_t=no
  3341. fi
  3342. rm -f conftest*
  3343.  
  3344. fi
  3345. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  3346. if test $ac_cv_type_size_t = no; then
  3347.   cat >> confdefs.h <<\EOF
  3348. #define size_t unsigned
  3349. EOF
  3350.  
  3351. fi
  3352.  
  3353.  
  3354. trap '' 1 2 15
  3355. cat > confcache <<\EOF
  3356. # This file is a shell script that caches the results of configure
  3357. # tests run on this system so they can be shared between configure
  3358. # scripts and configure runs.  It is not useful on other systems.
  3359. # If it contains results you don't want to keep, you may remove or edit it.
  3360. #
  3361. # By default, configure uses ./config.cache as the cache file,
  3362. # creating it if it does not exist already.  You can give configure
  3363. # the --cache-file=FILE option to use a different cache file; that is
  3364. # what configure does when it calls configure scripts in
  3365. # subdirectories, so they share the cache.
  3366. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3367. # config.status only pays attention to the cache file if you give it the
  3368. # --recheck option to rerun configure.
  3369. #
  3370. EOF
  3371. # Ultrix sh set writes to stderr and can't be redirected directly,
  3372. # and sets the high bit in the cache file unless we assign to the vars.
  3373. (set) 2>&1 |
  3374.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  3375.   >> confcache
  3376. if cmp -s $cache_file confcache; then
  3377.   :
  3378. else
  3379.   if test -w $cache_file; then
  3380.     echo "updating cache $cache_file"
  3381.     cat confcache > $cache_file
  3382.   else
  3383.     echo "not updating unwritable cache $cache_file"
  3384.   fi
  3385. fi
  3386. rm -f confcache
  3387.  
  3388. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3389.  
  3390. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3391. # Let make expand exec_prefix.
  3392. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3393.  
  3394. # Any assignment to VPATH causes Sun make to only execute
  3395. # the first set of double-colon rules, so remove it if not needed.
  3396. # If there is a colon in the path, we need to keep it.
  3397. if test "x$srcdir" = x.; then
  3398.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3399. fi
  3400.  
  3401. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3402.  
  3403. DEFS=-DHAVE_CONFIG_H
  3404.  
  3405. # Without the "./", some shells look in PATH for config.status.
  3406. : ${CONFIG_STATUS=./config.status}
  3407.  
  3408. echo creating $CONFIG_STATUS
  3409. rm -f $CONFIG_STATUS
  3410. cat > $CONFIG_STATUS <<EOF
  3411. #! /bin/sh
  3412. # Generated automatically by configure.
  3413. # Run this file to recreate the current configuration.
  3414. # This directory was configured as follows,
  3415. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3416. #
  3417. # $0 $ac_configure_args
  3418. #
  3419. # Compiler output produced by configure, useful for debugging
  3420. # configure, is in ./config.log if it exists.
  3421.  
  3422. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3423. for ac_option
  3424. do
  3425.   case "\$ac_option" in
  3426.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3427.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3428.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3429.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3430.     echo "$CONFIG_STATUS generated by autoconf version 2.7"
  3431.     exit 0 ;;
  3432.   -help | --help | --hel | --he | --h)
  3433.     echo "\$ac_cs_usage"; exit 0 ;;
  3434.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3435.   esac
  3436. done
  3437.  
  3438. ac_given_srcdir=$srcdir
  3439.  
  3440. trap 'rm -fr `echo "Makefile Config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3441. EOF
  3442. cat >> $CONFIG_STATUS <<EOF
  3443.  
  3444. # Protect against being on the right side of a sed subst in config.status.
  3445. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3446.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3447. $ac_vpsub
  3448. $extrasub
  3449. s%@CFLAGS@%$CFLAGS%g
  3450. s%@CPPFLAGS@%$CPPFLAGS%g
  3451. s%@CXXFLAGS@%$CXXFLAGS%g
  3452. s%@DEFS@%$DEFS%g
  3453. s%@LDFLAGS@%$LDFLAGS%g
  3454. s%@LIBS@%$LIBS%g
  3455. s%@exec_prefix@%$exec_prefix%g
  3456. s%@prefix@%$prefix%g
  3457. s%@program_transform_name@%$program_transform_name%g
  3458. s%@bindir@%$bindir%g
  3459. s%@sbindir@%$sbindir%g
  3460. s%@libexecdir@%$libexecdir%g
  3461. s%@datadir@%$datadir%g
  3462. s%@sysconfdir@%$sysconfdir%g
  3463. s%@sharedstatedir@%$sharedstatedir%g
  3464. s%@localstatedir@%$localstatedir%g
  3465. s%@libdir@%$libdir%g
  3466. s%@includedir@%$includedir%g
  3467. s%@oldincludedir@%$oldincludedir%g
  3468. s%@infodir@%$infodir%g
  3469. s%@mandir@%$mandir%g
  3470. s%@Z10@%$Z10%g
  3471. s%@Z11@%$Z11%g
  3472. s%@Z20@%$Z20%g
  3473. s%@Z21@%$Z21%g
  3474. s%@CC@%$CC%g
  3475. s%@SET_MAKE@%$SET_MAKE%g
  3476. s%@MORE@%$MORE%g
  3477. s%@LS@%$LS%g
  3478. s%@GZCAT@%$GZCAT%g
  3479. s%@ZCAT@%$ZCAT%g
  3480. s%@RESOLV_CONF_DOMAIN@%$RESOLV_CONF_DOMAIN%g
  3481. s%@CPP@%$CPP%g
  3482.  
  3483. CEOF
  3484. EOF
  3485. cat >> $CONFIG_STATUS <<EOF
  3486.  
  3487. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  3488. EOF
  3489. cat >> $CONFIG_STATUS <<\EOF
  3490. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3491.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3492.   case "$ac_file" in
  3493.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3494.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3495.   *) ac_file_in="${ac_file}.in" ;;
  3496.   esac
  3497.  
  3498.   # Adjust relative srcdir, etc. for subdirectories.
  3499.  
  3500.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3501.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3502.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3503.     # The file is in a subdirectory.
  3504.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3505.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3506.     # A "../" for each directory in $ac_dir_suffix.
  3507.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3508.   else
  3509.     ac_dir_suffix= ac_dots=
  3510.   fi
  3511.  
  3512.   case "$ac_given_srcdir" in
  3513.   .)  srcdir=.
  3514.       if test -z "$ac_dots"; then top_srcdir=.
  3515.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3516.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3517.   *) # Relative path.
  3518.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3519.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3520.   esac
  3521.  
  3522.   echo creating "$ac_file"
  3523.   rm -f "$ac_file"
  3524.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3525.   case "$ac_file" in
  3526.   *Makefile*) ac_comsub="1i\\
  3527. # $configure_input" ;;
  3528.   *) ac_comsub= ;;
  3529.   esac
  3530.   sed -e "$ac_comsub
  3531. s%@configure_input@%$configure_input%g
  3532. s%@srcdir@%$srcdir%g
  3533. s%@top_srcdir@%$top_srcdir%g
  3534. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  3535. fi; done
  3536. rm -f conftest.subs
  3537.  
  3538. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3539. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3540. #
  3541. # ac_d sets the value in "#define NAME VALUE" lines.
  3542. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3543. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3544. ac_dC='\3'
  3545. ac_dD='%g'
  3546. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3547. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3548. ac_uB='\([     ]\)%\1#\2define\3'
  3549. ac_uC=' '
  3550. ac_uD='\4%g'
  3551. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3552. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3553. ac_eB='$%\1#\2define\3'
  3554. ac_eC=' '
  3555. ac_eD='%g'
  3556.  
  3557. CONFIG_HEADERS=${CONFIG_HEADERS-"Config.h"}
  3558. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3559.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3560.   case "$ac_file" in
  3561.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3562.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3563.   *) ac_file_in="${ac_file}.in" ;;
  3564.   esac
  3565.  
  3566.   echo creating $ac_file
  3567.  
  3568.   rm -f conftest.frag conftest.in conftest.out
  3569.   cp $ac_given_srcdir/$ac_file_in conftest.in
  3570.  
  3571. EOF
  3572.  
  3573. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3574. # the proper values into config.h.in to produce config.h.  And first:
  3575. # Protect against being on the right side of a sed subst in config.status.
  3576. # Protect against being in an unquoted here document in config.status.
  3577. rm -f conftest.vals
  3578. cat > conftest.hdr <<\EOF
  3579. s/[\\&%]/\\&/g
  3580. s%[\\$`]%\\&%g
  3581. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3582. s%ac_d%ac_u%gp
  3583. s%ac_u%ac_e%gp
  3584. EOF
  3585. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3586. rm -f conftest.hdr
  3587.  
  3588. # This sed command replaces #undef with comments.  This is necessary, for
  3589. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3590. # on some systems where configure will not decide to define it.
  3591. cat >> conftest.vals <<\EOF
  3592. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3593. EOF
  3594.  
  3595. # Break up conftest.vals because some shells have a limit on
  3596. # the size of here documents, and old seds have small limits too.
  3597. # Maximum number of lines to put in a single here document.
  3598. ac_max_here_lines=12
  3599.  
  3600. rm -f conftest.tail
  3601. while :
  3602. do
  3603.   ac_lines=`grep -c . conftest.vals`
  3604.   # grep -c gives empty output for an empty file on some AIX systems.
  3605.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3606.   # Write a limited-size here document to conftest.frag.
  3607.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3608.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3609.   echo 'CEOF
  3610.   sed -f conftest.frag conftest.in > conftest.out
  3611.   rm -f conftest.in
  3612.   mv conftest.out conftest.in
  3613. ' >> $CONFIG_STATUS
  3614.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3615.   rm -f conftest.vals
  3616.   mv conftest.tail conftest.vals
  3617. done
  3618. rm -f conftest.vals
  3619.  
  3620. cat >> $CONFIG_STATUS <<\EOF
  3621.   rm -f conftest.frag conftest.h
  3622.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3623.   cat conftest.in >> conftest.h
  3624.   rm -f conftest.in
  3625.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3626.     echo "$ac_file is unchanged"
  3627.     rm -f conftest.h
  3628.   else
  3629.     rm -f $ac_file
  3630.     mv conftest.h $ac_file
  3631.   fi
  3632. fi; done
  3633.  
  3634.  
  3635.  
  3636. exit 0
  3637. EOF
  3638. chmod +x $CONFIG_STATUS
  3639. rm -fr confdefs* $ac_clean_files
  3640. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3641.  
  3642.