home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / socks5v1.zip / configure < prev    next >
Text File  |  2001-02-14  |  149KB  |  5,257 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. CC=gcc
  11. RANLIB="ar -s"
  12. CFLAGS="-D__ST_MT_ERRNO__ -DOS2 -O3 -Zmt -Wall- -Dlstat=stat"
  13. EXTRA_LDFLAGS="-Zexe -Zmtd -Zsysv-signals -Zbin-files"
  14. LIBS="-lsyslog -lcrypt"
  15. # Defaults:
  16. ac_help=
  17. ac_default_prefix=/usr/local
  18. # Any additions from configure.in:
  19. ac_help="$ac_help
  20. --with-krb5        Turn on Kerberos 5"
  21. ac_help="$ac_help
  22. --with-ident        Turn on ident verification"
  23. ac_help="$ac_help
  24. --with-debug        Turn on debugging and compile time warnings"
  25. ac_help="$ac_help
  26. --with-static        Turn on static compiling"
  27. ac_help="$ac_help
  28. --with-threads        Turn on threading in the server if possible"
  29. ac_help="$ac_help
  30. --with-libconffile=val    Set the location of the library config file"
  31. ac_help="$ac_help
  32. --with-srvconffile=val    Set the location of the server config file"
  33. ac_help="$ac_help
  34. --with-srvpidfile=val    Set the location of the server pid file"
  35. ac_help="$ac_help
  36. --with-srvidtfile=val    Set the location of the server ident file"
  37. ac_help="$ac_help
  38. --with-srvpwdfile=val    Set the location of the server password file"
  39. ac_help="$ac_help
  40. --with-default-port=val     Set the default socks port"
  41. ac_help="$ac_help
  42. --with-default-server=val     Set the default socks server"
  43. ac_help="$ac_help
  44. --with-default-version=val    Set the default socks version"
  45. ac_help="$ac_help
  46. --with-syslog-facility=val Set the syslog facility for socks5"
  47. ac_help="$ac_help
  48. --with-passwd=val          Turn on use of passwd file for passwords"
  49. ac_help="$ac_help
  50. --with-shadow-passwd=val          Turn on use of shadow passwd file for passwords"
  51.  
  52. # Initialize some variables set by options.
  53. # The variables have the same names as the options, with
  54. # dashes changed to underlines.
  55. build=NONE
  56. cache_file=./config.cache
  57. exec_prefix=NONE
  58. host=NONE
  59. no_create=
  60. nonopt=NONE
  61. no_recursion=
  62. prefix=NONE
  63. program_prefix=NONE
  64. program_suffix=NONE
  65. program_transform_name=s,x,x,
  66. silent=
  67. site=
  68. srcdir=
  69. target=NONE
  70. verbose=
  71. x_includes=NONE
  72. x_libraries=NONE
  73. bindir='${exec_prefix}/bin'
  74. sbindir='${exec_prefix}/sbin'
  75. libexecdir='${exec_prefix}/libexec'
  76. datadir='${prefix}/share'
  77. sysconfdir='${prefix}/etc'
  78. sharedstatedir='${prefix}/com'
  79. localstatedir='${prefix}/var'
  80. libdir='${exec_prefix}/lib'
  81. includedir='${prefix}/include'
  82. oldincludedir='/usr/include'
  83. infodir='${prefix}/info'
  84. mandir='${prefix}/man'
  85.  
  86. # Initialize some other variables.
  87. subdirs=
  88. MFLAGS= MAKEFLAGS=
  89. # Maximum number of lines to put in a shell here document.
  90. ac_max_here_lines=12
  91.  
  92. ac_prev=
  93. for ac_option
  94. do
  95.  
  96.   # If the previous option needs an argument, assign it.
  97.   if test -n "$ac_prev"; then
  98.     eval "$ac_prev=\$ac_option"
  99.     ac_prev=
  100.     continue
  101.   fi
  102.  
  103.   case "$ac_option" in
  104.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  105.   *) ac_optarg= ;;
  106.   esac
  107.  
  108.   # Accept the important Cygnus configure options, so we can diagnose typos.
  109.  
  110.   case "$ac_option" in
  111.  
  112.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  113.     ac_prev=bindir ;;
  114.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  115.     bindir="$ac_optarg" ;;
  116.  
  117.   -build | --build | --buil | --bui | --bu)
  118.     ac_prev=build ;;
  119.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  120.     build="$ac_optarg" ;;
  121.  
  122.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  123.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  124.     ac_prev=cache_file ;;
  125.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  126.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  127.     cache_file="$ac_optarg" ;;
  128.  
  129.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  130.     ac_prev=datadir ;;
  131.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  132.   | --da=*)
  133.     datadir="$ac_optarg" ;;
  134.  
  135.   -disable-* | --disable-*)
  136.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  137.     # Reject names that are not valid shell variable names.
  138.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  139.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  140.     fi
  141.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  142.     eval "enable_${ac_feature}=no" ;;
  143.  
  144.   -enable-* | --enable-*)
  145.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  146.     # Reject names that are not valid shell variable names.
  147.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  148.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  149.     fi
  150.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  151.     case "$ac_option" in
  152.       *=*) ;;
  153.       *) ac_optarg=yes ;;
  154.     esac
  155.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  156.  
  157.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  158.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  159.   | --exec | --exe | --ex)
  160.     ac_prev=exec_prefix ;;
  161.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  162.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  163.   | --exec=* | --exe=* | --ex=*)
  164.     exec_prefix="$ac_optarg" ;;
  165.  
  166.   -gas | --gas | --ga | --g)
  167.     # Obsolete; use --with-gas.
  168.     with_gas=yes ;;
  169.  
  170.   -help | --help | --hel | --he)
  171.     # Omit some internal or obsolete options to make the list less imposing.
  172.     # This message is too long to be a string in the A/UX 3.1 sh.
  173.     cat << EOF
  174. Usage: configure [options] [host]
  175. Options: [defaults in brackets after descriptions]
  176. Configuration:
  177.   --cache-file=FILE       cache test results in FILE
  178.   --help                  print this message
  179.   --no-create             do not create output files
  180.   --quiet, --silent       do not print \`checking...' messages
  181.   --version               print the version of autoconf that created configure
  182. Directory and file names:
  183.   --prefix=PREFIX         install architecture-independent files in PREFIX
  184.                           [$ac_default_prefix]
  185.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  186.                           [same as prefix]
  187.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  188.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  189.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  190.   --datadir=DIR           read-only architecture-independent data in DIR
  191.                           [PREFIX/share]
  192.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  193.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  194.                           [PREFIX/com]
  195.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  196.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  197.   --includedir=DIR        C header files in DIR [PREFIX/include]
  198.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  199.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  200.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  201.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  202.   --program-prefix=PREFIX prepend PREFIX to installed program names
  203.   --program-suffix=SUFFIX append SUFFIX to installed program names
  204.   --program-transform-name=PROGRAM
  205.                           run sed PROGRAM on installed program names
  206. EOF
  207.     cat << EOF
  208. Host type:
  209.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  210.   --host=HOST             configure for HOST [guessed]
  211.   --target=TARGET         configure for TARGET [TARGET=HOST]
  212. Features and packages:
  213.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  214.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  215.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  216.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  217.   --x-includes=DIR        X include files are in DIR
  218.   --x-libraries=DIR       X library files are in DIR
  219. EOF
  220.     if test -n "$ac_help"; then
  221.       echo "--enable and --with options recognized:$ac_help"
  222.     fi
  223.     exit 0 ;;
  224.  
  225.   -host | --host | --hos | --ho)
  226.     ac_prev=host ;;
  227.   -host=* | --host=* | --hos=* | --ho=*)
  228.     host="$ac_optarg" ;;
  229.  
  230.   -includedir | --includedir | --includedi | --included | --include \
  231.   | --includ | --inclu | --incl | --inc)
  232.     ac_prev=includedir ;;
  233.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  234.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  235.     includedir="$ac_optarg" ;;
  236.  
  237.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  238.     ac_prev=infodir ;;
  239.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  240.     infodir="$ac_optarg" ;;
  241.  
  242.   -libdir | --libdir | --libdi | --libd)
  243.     ac_prev=libdir ;;
  244.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  245.     libdir="$ac_optarg" ;;
  246.  
  247.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  248.   | --libexe | --libex | --libe)
  249.     ac_prev=libexecdir ;;
  250.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  251.   | --libexe=* | --libex=* | --libe=*)
  252.     libexecdir="$ac_optarg" ;;
  253.  
  254.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  255.   | --localstate | --localstat | --localsta | --localst \
  256.   | --locals | --local | --loca | --loc | --lo)
  257.     ac_prev=localstatedir ;;
  258.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  259.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  260.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  261.     localstatedir="$ac_optarg" ;;
  262.  
  263.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  264.     ac_prev=mandir ;;
  265.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  266.     mandir="$ac_optarg" ;;
  267.  
  268.   -nfp | --nfp | --nf)
  269.     # Obsolete; use --without-fp.
  270.     with_fp=no ;;
  271.  
  272.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  273.   | --no-cr | --no-c)
  274.     no_create=yes ;;
  275.  
  276.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  277.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  278.     no_recursion=yes ;;
  279.  
  280.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  281.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  282.   | --oldin | --oldi | --old | --ol | --o)
  283.     ac_prev=oldincludedir ;;
  284.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  285.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  286.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  287.     oldincludedir="$ac_optarg" ;;
  288.  
  289.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  290.     ac_prev=prefix ;;
  291.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  292.     prefix="$ac_optarg" ;;
  293.  
  294.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  295.   | --program-pre | --program-pr | --program-p)
  296.     ac_prev=program_prefix ;;
  297.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  298.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  299.     program_prefix="$ac_optarg" ;;
  300.  
  301.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  302.   | --program-suf | --program-su | --program-s)
  303.     ac_prev=program_suffix ;;
  304.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  305.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  306.     program_suffix="$ac_optarg" ;;
  307.  
  308.   -program-transform-name | --program-transform-name \
  309.   | --program-transform-nam | --program-transform-na \
  310.   | --program-transform-n | --program-transform- \
  311.   | --program-transform | --program-transfor \
  312.   | --program-transfo | --program-transf \
  313.   | --program-trans | --program-tran \
  314.   | --progr-tra | --program-tr | --program-t)
  315.     ac_prev=program_transform_name ;;
  316.   -program-transform-name=* | --program-transform-name=* \
  317.   | --program-transform-nam=* | --program-transform-na=* \
  318.   | --program-transform-n=* | --program-transform-=* \
  319.   | --program-transform=* | --program-transfor=* \
  320.   | --program-transfo=* | --program-transf=* \
  321.   | --program-trans=* | --program-tran=* \
  322.   | --progr-tra=* | --program-tr=* | --program-t=*)
  323.     program_transform_name="$ac_optarg" ;;
  324.  
  325.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  326.   | -silent | --silent | --silen | --sile | --sil)
  327.     silent=yes ;;
  328.  
  329.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  330.     ac_prev=sbindir ;;
  331.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  332.   | --sbi=* | --sb=*)
  333.     sbindir="$ac_optarg" ;;
  334.  
  335.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  336.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  337.   | --sharedst | --shareds | --shared | --share | --shar \
  338.   | --sha | --sh)
  339.     ac_prev=sharedstatedir ;;
  340.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  341.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  342.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  343.   | --sha=* | --sh=*)
  344.     sharedstatedir="$ac_optarg" ;;
  345.  
  346.   -site | --site | --sit)
  347.     ac_prev=site ;;
  348.   -site=* | --site=* | --sit=*)
  349.     site="$ac_optarg" ;;
  350.  
  351.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  352.     ac_prev=srcdir ;;
  353.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  354.     srcdir="$ac_optarg" ;;
  355.  
  356.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  357.   | --syscon | --sysco | --sysc | --sys | --sy)
  358.     ac_prev=sysconfdir ;;
  359.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  360.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  361.     sysconfdir="$ac_optarg" ;;
  362.  
  363.   -target | --target | --targe | --targ | --tar | --ta | --t)
  364.     ac_prev=target ;;
  365.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  366.     target="$ac_optarg" ;;
  367.  
  368.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  369.     verbose=yes ;;
  370.  
  371.   -version | --version | --versio | --versi | --vers)
  372.     echo "configure generated by autoconf version 2.12"
  373.     exit 0 ;;
  374.  
  375.   -with-* | --with-*)
  376.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  377.     # Reject names that are not valid shell variable names.
  378.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  379.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  380.     fi
  381.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  382.     case "$ac_option" in
  383.       *=*) ;;
  384.       *) ac_optarg=yes ;;
  385.     esac
  386.     eval "with_${ac_package}='$ac_optarg'" ;;
  387.  
  388.   -without-* | --without-*)
  389.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  390.     # Reject names that are not valid shell variable names.
  391.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  392.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  393.     fi
  394.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  395.     eval "with_${ac_package}=no" ;;
  396.  
  397.   --x)
  398.     # Obsolete; use --with-x.
  399.     with_x=yes ;;
  400.  
  401.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  402.   | --x-incl | --x-inc | --x-in | --x-i)
  403.     ac_prev=x_includes ;;
  404.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  405.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  406.     x_includes="$ac_optarg" ;;
  407.  
  408.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  409.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  410.     ac_prev=x_libraries ;;
  411.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  412.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  413.     x_libraries="$ac_optarg" ;;
  414.  
  415.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  416.     ;;
  417.  
  418.   *)
  419.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  420.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  421.     fi
  422.     if test "x$nonopt" != xNONE; then
  423.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  424.     fi
  425.     nonopt="$ac_option"
  426.     ;;
  427.  
  428.   esac
  429. done
  430.  
  431. if test -n "$ac_prev"; then
  432.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  433. fi
  434.  
  435. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  436.  
  437. # File descriptor usage:
  438. # 0 standard input
  439. # 1 file creation
  440. # 2 errors and warnings
  441. # 3 some systems may open it to /dev/tty
  442. # 4 used on the Kubota Titan
  443. # 6 checking for... messages and results
  444. # 5 compiler messages saved in config.log
  445. if test "$silent" = yes; then
  446.   exec 6>/dev/null
  447. else
  448.   exec 6>&1
  449. fi
  450. exec 5>./config.log
  451.  
  452. echo "\
  453. This file contains any messages produced by compilers while
  454. running configure, to aid debugging if configure makes a mistake.
  455. " 1>&5
  456.  
  457. # Strip out --no-create and --no-recursion so they do not pile up.
  458. # Also quote any args containing shell metacharacters.
  459. ac_configure_args=
  460. for ac_arg
  461. do
  462.   case "$ac_arg" in
  463.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  464.   | --no-cr | --no-c) ;;
  465.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  466.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  467.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  468.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  469.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  470.   esac
  471. done
  472.  
  473. # NLS nuisances.
  474. # Only set these to C if already set.  These must not be set unconditionally
  475. # because not all systems understand e.g. LANG=C (notably SCO).
  476. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  477. # Non-C LC_CTYPE values break the ctype check.
  478. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  479. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  480. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  481. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  482.  
  483. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  484. rm -rf conftest* confdefs.h
  485. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  486. echo > confdefs.h
  487.  
  488. # A filename unique to this package, relative to the directory that
  489. # configure is in, which we can look for to find out if srcdir is correct.
  490. ac_unique_file=README
  491.  
  492. # Find the source files, if location was not specified.
  493. if test -z "$srcdir"; then
  494.   ac_srcdir_defaulted=yes
  495.   # Try the directory containing this script, then its parent.
  496.   ac_prog=$0
  497.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  498.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  499.   srcdir=$ac_confdir
  500.   if test ! -r $srcdir/$ac_unique_file; then
  501.     srcdir=..
  502.   fi
  503. else
  504.   ac_srcdir_defaulted=no
  505. fi
  506. if test ! -r $srcdir/$ac_unique_file; then
  507.   if test "$ac_srcdir_defaulted" = yes; then
  508.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  509.   else
  510.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  511.   fi
  512. fi
  513. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  514.  
  515. # Prefer explicitly selected file to automatically selected ones.
  516. if test -z "$CONFIG_SITE"; then
  517.   if test "x$prefix" != xNONE; then
  518.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  519.   else
  520.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  521.   fi
  522. fi
  523. for ac_site_file in $CONFIG_SITE; do
  524.   if test -r "$ac_site_file"; then
  525.     echo "loading site script $ac_site_file"
  526.     . "$ac_site_file"
  527.   fi
  528. done
  529.  
  530. if test -r "$cache_file"; then
  531.   echo "loading cache $cache_file"
  532.   . $cache_file
  533. else
  534.   echo "creating cache $cache_file"
  535.   > $cache_file
  536. fi
  537.  
  538. ac_ext=c
  539. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  540. ac_cpp='$CPP $CPPFLAGS'
  541. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  542. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  543. cross_compiling=$ac_cv_prog_cc_cross
  544.  
  545. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  546.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  547.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  548.     ac_n= ac_c='
  549. ' ac_t='    '
  550.   else
  551.     ac_n=-n ac_c= ac_t=
  552.   fi
  553. else
  554.   ac_n= ac_c='\c' ac_t=
  555. fi
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563. OS=`uname -s`
  564.  
  565. if test -n "$CC"; then use_env_cc="yes"; fi
  566. # Extract the first word of "gcc2", so it can be a program name with args.
  567. set dummy gcc2; ac_word=$2
  568. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  569. echo "configure:565: checking for $ac_word" >&5
  570. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  571.   echo $ac_n "(cached) $ac_c" 1>&6
  572. else
  573.   if test -n "$CC"; then
  574.   ac_cv_prog_CC="$CC" # Let the user override the test.
  575. else
  576.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  577.   for ac_dir in $PATH; do
  578.     test -z "$ac_dir" && ac_dir=.
  579.     if test -f $ac_dir/$ac_word; then
  580.       ac_cv_prog_CC="gcc2"
  581.       break
  582.     fi
  583.   done
  584.   IFS="$ac_save_ifs"
  585. fi
  586. fi
  587. CC="$ac_cv_prog_CC"
  588. if test -n "$CC"; then
  589.   echo "$ac_t""$CC" 1>&6
  590. else
  591.   echo "$ac_t""no" 1>&6
  592. fi
  593.  
  594. OCFLAGS="$CFLAGS"
  595. CFLAGS=
  596. # Extract the first word of "gcc", so it can be a program name with args.
  597. set dummy gcc; ac_word=$2
  598. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  599. echo "configure:595: checking for $ac_word" >&5
  600. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  601.   echo $ac_n "(cached) $ac_c" 1>&6
  602. else
  603.   if test -n "$CC"; then
  604.   ac_cv_prog_CC="$CC" # Let the user override the test.
  605. else
  606.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  607.   for ac_dir in $PATH; do
  608.     test -z "$ac_dir" && ac_dir=.
  609.     if test -f $ac_dir/$ac_word; then
  610.       ac_cv_prog_CC="gcc"
  611.       break
  612.     fi
  613.   done
  614.   IFS="$ac_save_ifs"
  615. fi
  616. fi
  617. CC="$ac_cv_prog_CC"
  618. if test -n "$CC"; then
  619.   echo "$ac_t""$CC" 1>&6
  620. else
  621.   echo "$ac_t""no" 1>&6
  622. fi
  623.  
  624. if test -z "$CC"; then
  625.   # Extract the first word of "cc", so it can be a program name with args.
  626. set dummy cc; ac_word=$2
  627. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  628. echo "configure:624: checking for $ac_word" >&5
  629. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  630.   echo $ac_n "(cached) $ac_c" 1>&6
  631. else
  632.   if test -n "$CC"; then
  633.   ac_cv_prog_CC="$CC" # Let the user override the test.
  634. else
  635.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  636.   ac_prog_rejected=no
  637.   for ac_dir in $PATH; do
  638.     test -z "$ac_dir" && ac_dir=.
  639.     if test -f $ac_dir/$ac_word; then
  640.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  641.         ac_prog_rejected=yes
  642.     continue
  643.       fi
  644.       ac_cv_prog_CC="cc"
  645.       break
  646.     fi
  647.   done
  648.   IFS="$ac_save_ifs"
  649. if test $ac_prog_rejected = yes; then
  650.   # We found a bogon in the path, so make sure we never use it.
  651.   set dummy $ac_cv_prog_CC
  652.   shift
  653.   if test $# -gt 0; then
  654.     # We chose a different compiler from the bogus one.
  655.     # However, it has the same basename, so the bogon will be chosen
  656.     # first if we set CC to just the basename; use the full file name.
  657.     shift
  658.     set dummy "$ac_dir/$ac_word" "$@"
  659.     shift
  660.     ac_cv_prog_CC="$@"
  661.   fi
  662. fi
  663. fi
  664. fi
  665. CC="$ac_cv_prog_CC"
  666. if test -n "$CC"; then
  667.   echo "$ac_t""$CC" 1>&6
  668. else
  669.   echo "$ac_t""no" 1>&6
  670. fi
  671.  
  672.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  673. fi
  674.  
  675. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  676. echo "configure:672: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  677.  
  678. ac_ext=c
  679. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  680. ac_cpp='$CPP $CPPFLAGS'
  681. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  682. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  683. cross_compiling=$ac_cv_prog_cc_cross
  684.  
  685. cat > conftest.$ac_ext <<EOF
  686. #line 682 "configure"
  687. #include "confdefs.h"
  688. main(){return(0);}
  689. EOF
  690. if { (eval echo configure:686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  691.   ac_cv_prog_cc_works=yes
  692.   # If we can't run a trivial program, we are probably using a cross compiler.
  693.   if (./conftest; exit) 2>/dev/null; then
  694.     ac_cv_prog_cc_cross=no
  695.   else
  696.     ac_cv_prog_cc_cross=no
  697.   fi
  698. else
  699.   echo "configure: failed program was:" >&5
  700.   cat conftest.$ac_ext >&5
  701.   ac_cv_prog_cc_works=no
  702. fi
  703. rm -fr conftest*
  704.  
  705. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  706. if test $ac_cv_prog_cc_works = no; then
  707.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  708. fi
  709. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  710. echo "configure:706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  711. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  712. cross_compiling=$ac_cv_prog_cc_cross
  713.  
  714. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  715. echo "configure:711: checking whether we are using GNU C" >&5
  716. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  717.   echo $ac_n "(cached) $ac_c" 1>&6
  718. else
  719.   cat > conftest.c <<EOF
  720. #ifdef __GNUC__
  721.   yes;
  722. #endif
  723. EOF
  724. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  725.   ac_cv_prog_gcc=yes
  726. else
  727.   ac_cv_prog_gcc=no
  728. fi
  729. fi
  730.  
  731. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  732.  
  733. if test $ac_cv_prog_gcc = yes; then
  734.   GCC=yes
  735.   ac_test_CFLAGS="${CFLAGS+set}"
  736.   ac_save_CFLAGS="$CFLAGS"
  737.   CFLAGS=
  738.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  739. echo "configure:735: checking whether ${CC-cc} accepts -g" >&5
  740. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  741.   echo $ac_n "(cached) $ac_c" 1>&6
  742. else
  743.   echo 'void f(){}' > conftest.c
  744. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  745.   ac_cv_prog_cc_g=yes
  746. else
  747.   ac_cv_prog_cc_g=no
  748. fi
  749. rm -f conftest*
  750.  
  751. fi
  752.  
  753. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  754.   if test "$ac_test_CFLAGS" = set; then
  755.     CFLAGS="$ac_save_CFLAGS"
  756.   elif test $ac_cv_prog_cc_g = yes; then
  757.     CFLAGS="-g -O2"
  758.   else
  759.     CFLAGS="-O2"
  760.   fi
  761. else
  762.   GCC=
  763.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  764. fi
  765.  
  766. CDEBUG_FLAGS="$CFLAGS"
  767. CFLAGS="$OCFLAGS"
  768. savedcc="$CC"
  769. OS=`uname -s`
  770. OSVER=`uname -r`
  771. if test "$OS" = "SunOS"; then
  772.     case $OSVER in
  773.     5.5*)
  774.     cat >> confdefs.h <<\EOF
  775. #define USE_SYSTEM_SEMAPHORE 1
  776. EOF
  777.  
  778.     esac
  779. fi
  780. if test "$GCC" = "yes"; then
  781.         CFLAGS="$CFLAGS -D__USE_FIXED_PROTOTYPES__"
  782. elif test "$OS" = "HP-UX" -a "$use_env_cc" != "yes"; then
  783.         CFLAGS="-Ae"
  784.         cat > conftest.$ac_ext <<EOF
  785. #line 781 "configure"
  786. #include "confdefs.h"
  787. void foo(int bar){}
  788. int main() {
  789.  
  790. ; return 0; }
  791. EOF
  792. if { (eval echo configure:788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  793.   rm -rf conftest*
  794.   s5_have_ansi_cc="yes"
  795. else
  796.   echo "configure: failed program was:" >&5
  797.   cat conftest.$ac_ext >&5
  798.   rm -rf conftest*
  799.   s5_have_ansi_cc="no"
  800. fi
  801. rm -f conftest*
  802.         if test "$s5_have_ansi_cc" = "no"; then
  803.                 CFLAGS=""
  804.                 unset CC
  805.                 unset ac_cv_prog_CC   #unset cached CC
  806.                 # Extract the first word of "c89", so it can be a program name with args.
  807. set dummy c89; ac_word=$2
  808. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  809. echo "configure:805: checking for $ac_word" >&5
  810. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  811.   echo $ac_n "(cached) $ac_c" 1>&6
  812. else
  813.   if test -n "$CC"; then
  814.   ac_cv_prog_CC="$CC" # Let the user override the test.
  815. else
  816.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  817.   for ac_dir in $PATH; do
  818.     test -z "$ac_dir" && ac_dir=.
  819.     if test -f $ac_dir/$ac_word; then
  820.       ac_cv_prog_CC="c89"
  821.       break
  822.     fi
  823.   done
  824.   IFS="$ac_save_ifs"
  825.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="$savedcc"
  826. fi
  827. fi
  828. CC="$ac_cv_prog_CC"
  829. if test -n "$CC"; then
  830.   echo "$ac_t""$CC" 1>&6
  831. else
  832.   echo "$ac_t""no" 1>&6
  833. fi
  834.  
  835.                 if test "$CC" = "c89" ; then CFLAGS="-D_HPUX_SOURCE"; fi
  836.         fi
  837. elif test "$OS" = "SunOS"  -a "$use_env_cc" != "yes"; then
  838.         cat > conftest.$ac_ext <<EOF
  839. #line 835 "configure"
  840. #include "confdefs.h"
  841. void foo(int bar){}
  842. int main() {
  843.  
  844. ; return 0; }
  845. EOF
  846. if { (eval echo configure:842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  847.   rm -rf conftest*
  848.   s5_have_ansi_cc="yes"
  849. else
  850.   echo "configure: failed program was:" >&5
  851.   cat conftest.$ac_ext >&5
  852.   rm -rf conftest*
  853.   s5_have_ansi_cc="no"
  854. fi
  855. rm -f conftest*
  856.         if test "$s5_have_ansi_cc" = "no"; then
  857.             unset CC
  858.             unset ac_cv_prog_CC   #unset cached CC
  859.             # Extract the first word of "acc", so it can be a program name with args.
  860. set dummy acc; ac_word=$2
  861. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  862. echo "configure:858: checking for $ac_word" >&5
  863. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  864.   echo $ac_n "(cached) $ac_c" 1>&6
  865. else
  866.   if test -n "$CC"; then
  867.   ac_cv_prog_CC="$CC" # Let the user override the test.
  868. else
  869.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  870.   for ac_dir in $PATH; do
  871.     test -z "$ac_dir" && ac_dir=.
  872.     if test -f $ac_dir/$ac_word; then
  873.       ac_cv_prog_CC="acc"
  874.       break
  875.     fi
  876.   done
  877.   IFS="$ac_save_ifs"
  878.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="$savedcc"
  879. fi
  880. fi
  881. CC="$ac_cv_prog_CC"
  882. if test -n "$CC"; then
  883.   echo "$ac_t""$CC" 1>&6
  884. else
  885.   echo "$ac_t""no" 1>&6
  886. fi
  887.  
  888.             if test "$CC" = "acc" ; then CFLAGS=""; fi
  889.     fi
  890. fi
  891. if test "$savedcc" != "$CC"; then echo "$ac_t""resetting CC to $CC" 1>&6; fi
  892. cat > conftest.$ac_ext <<EOF
  893. #line 889 "configure"
  894. #include "confdefs.h"
  895. void foo(int bar){}
  896. int main() {
  897.  
  898. ; return 0; }
  899. EOF
  900. if { (eval echo configure:896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  901.   rm -rf conftest*
  902.   cat >> confdefs.h <<\EOF
  903. #define HAVE_FUNC_PROTOTYPE 1
  904. EOF
  905.  
  906. else
  907.   echo "configure: failed program was:" >&5
  908.   cat conftest.$ac_ext >&5
  909.   rm -rf conftest*
  910.   echo "configure: warning: --> no ANSI C compiler found!\n" 1>&2
  911. fi
  912. rm -f conftest*
  913.  
  914. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  915. echo "configure:911: checking how to run the C preprocessor" >&5
  916. # On Suns, sometimes $CPP names a directory.
  917. if test -n "$CPP" && test -d "$CPP"; then
  918.   CPP=
  919. fi
  920. if test -z "$CPP"; then
  921. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  922.   echo $ac_n "(cached) $ac_c" 1>&6
  923. else
  924.     # This must be in double quotes, not single quotes, because CPP may get
  925.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  926.   CPP="${CC-cc} -E"
  927.   # On the NeXT, cc -E runs the code through the compiler's parser,
  928.   # not just through cpp.
  929.   cat > conftest.$ac_ext <<EOF
  930. #line 926 "configure"
  931. #include "confdefs.h"
  932. #include <assert.h>
  933. Syntax Error
  934. EOF
  935. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  936. { (eval echo configure:932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  937. ac_err=`grep -v '^ *+' conftest.out`
  938. if test -z "$ac_err"; then
  939.   :
  940. else
  941.   echo "$ac_err" >&5
  942.   echo "configure: failed program was:" >&5
  943.   cat conftest.$ac_ext >&5
  944.   rm -rf conftest*
  945.   CPP="${CC-cc} -E -traditional-cpp"
  946.   cat > conftest.$ac_ext <<EOF
  947. #line 943 "configure"
  948. #include "confdefs.h"
  949. #include <assert.h>
  950. Syntax Error
  951. EOF
  952. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  953. { (eval echo configure:949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  954. ac_err=`grep -v '^ *+' conftest.out`
  955. if test -z "$ac_err"; then
  956.   :
  957. else
  958.   echo "$ac_err" >&5
  959.   echo "configure: failed program was:" >&5
  960.   cat conftest.$ac_ext >&5
  961.   rm -rf conftest*
  962.   CPP=/lib/cpp
  963. fi
  964. rm -f conftest*
  965. fi
  966. rm -f conftest*
  967.   ac_cv_prog_CPP="$CPP"
  968. fi
  969.   CPP="$ac_cv_prog_CPP"
  970. else
  971.   ac_cv_prog_CPP="$CPP"
  972. fi
  973. echo "$ac_t""$CPP" 1>&6
  974.  
  975. if test $ac_cv_prog_gcc = yes; then
  976.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  977. echo "configure:973: checking whether ${CC-cc} needs -traditional" >&5
  978. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  979.   echo $ac_n "(cached) $ac_c" 1>&6
  980. else
  981.     ac_pattern="Autoconf.*'x'"
  982.   cat > conftest.$ac_ext <<EOF
  983. #line 979 "configure"
  984. #include "confdefs.h"
  985. #include <sgtty.h>
  986. Autoconf TIOCGETP
  987. EOF
  988. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  989.   egrep "$ac_pattern" >/dev/null 2>&1; then
  990.   rm -rf conftest*
  991.   ac_cv_prog_gcc_traditional=yes
  992. else
  993.   rm -rf conftest*
  994.   ac_cv_prog_gcc_traditional=no
  995. fi
  996. rm -f conftest*
  997.  
  998.  
  999.   if test $ac_cv_prog_gcc_traditional = no; then
  1000.     cat > conftest.$ac_ext <<EOF
  1001. #line 997 "configure"
  1002. #include "confdefs.h"
  1003. #include <termio.h>
  1004. Autoconf TCGETA
  1005. EOF
  1006. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1007.   egrep "$ac_pattern" >/dev/null 2>&1; then
  1008.   rm -rf conftest*
  1009.   ac_cv_prog_gcc_traditional=yes
  1010. fi
  1011. rm -f conftest*
  1012.  
  1013.   fi
  1014. fi
  1015.  
  1016. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  1017.   if test $ac_cv_prog_gcc_traditional = yes; then
  1018.     CC="$CC -traditional"
  1019.   fi
  1020. fi
  1021.  
  1022. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1023. echo "configure:1019: checking for working const" >&5
  1024. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1025.   echo $ac_n "(cached) $ac_c" 1>&6
  1026. else
  1027.   cat > conftest.$ac_ext <<EOF
  1028. #line 1024 "configure"
  1029. #include "confdefs.h"
  1030.  
  1031. int main() {
  1032.  
  1033. /* Ultrix mips cc rejects this.  */
  1034. typedef int charset[2]; const charset x;
  1035. /* SunOS 4.1.1 cc rejects this.  */
  1036. char const *const *ccp;
  1037. char **p;
  1038. /* NEC SVR4.0.2 mips cc rejects this.  */
  1039. struct point {int x, y;};
  1040. static struct point const zero = {0,0};
  1041. /* AIX XL C 1.02.0.0 rejects this.
  1042.    It does not let you subtract one const X* pointer from another in an arm
  1043.    of an if-expression whose if-part is not a constant expression */
  1044. const char *g = "string";
  1045. ccp = &g + (g ? g-g : 0);
  1046. /* HPUX 7.0 cc rejects these. */
  1047. ++ccp;
  1048. p = (char**) ccp;
  1049. ccp = (char const *const *) p;
  1050. { /* SCO 3.2v4 cc rejects this.  */
  1051.   char *t;
  1052.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1053.  
  1054.   *t++ = 0;
  1055. }
  1056. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1057.   int x[] = {25, 17};
  1058.   const int *foo = &x[0];
  1059.   ++foo;
  1060. }
  1061. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1062.   typedef const int *iptr;
  1063.   iptr p = 0;
  1064.   ++p;
  1065. }
  1066. { /* AIX XL C 1.02.0.0 rejects this saying
  1067.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1068.   struct s { int j; const int *ap[3]; };
  1069.   struct s *b; b->j = 5;
  1070. }
  1071. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1072.   const int foo = 10;
  1073. }
  1074.  
  1075. ; return 0; }
  1076. EOF
  1077. if { (eval echo configure:1073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1078.   rm -rf conftest*
  1079.   ac_cv_c_const=yes
  1080. else
  1081.   echo "configure: failed program was:" >&5
  1082.   cat conftest.$ac_ext >&5
  1083.   rm -rf conftest*
  1084.   ac_cv_c_const=no
  1085. fi
  1086. rm -f conftest*
  1087. fi
  1088.  
  1089. echo "$ac_t""$ac_cv_c_const" 1>&6
  1090. if test $ac_cv_c_const = no; then
  1091.   cat >> confdefs.h <<\EOF
  1092. #define const 
  1093. EOF
  1094.  
  1095. fi
  1096.  
  1097. echo $ac_n "checking for inline""... $ac_c" 1>&6
  1098. echo "configure:1094: checking for inline" >&5
  1099. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1100.   echo $ac_n "(cached) $ac_c" 1>&6
  1101. else
  1102.   ac_cv_c_inline=no
  1103. for ac_kw in inline __inline__ __inline; do
  1104.   cat > conftest.$ac_ext <<EOF
  1105. #line 1101 "configure"
  1106. #include "confdefs.h"
  1107.  
  1108. int main() {
  1109. } $ac_kw foo() {
  1110. ; return 0; }
  1111. EOF
  1112. if { (eval echo configure:1108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1113.   rm -rf conftest*
  1114.   ac_cv_c_inline=$ac_kw; break
  1115. else
  1116.   echo "configure: failed program was:" >&5
  1117.   cat conftest.$ac_ext >&5
  1118. fi
  1119. rm -f conftest*
  1120. done
  1121.  
  1122. fi
  1123.  
  1124. echo "$ac_t""$ac_cv_c_inline" 1>&6
  1125. case "$ac_cv_c_inline" in
  1126.   inline | yes) ;;
  1127.   no) cat >> confdefs.h <<\EOF
  1128. #define inline 
  1129. EOF
  1130.  ;;
  1131.   *)  cat >> confdefs.h <<EOF
  1132. #define inline $ac_cv_c_inline
  1133. EOF
  1134.  ;;
  1135. esac
  1136.  
  1137.  
  1138. echo
  1139.  
  1140. # Extract the first word of "ranlib", so it can be a program name with args.
  1141. set dummy ranlib; ac_word=$2
  1142. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1143. echo "configure:1139: checking for $ac_word" >&5
  1144. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1145.   echo $ac_n "(cached) $ac_c" 1>&6
  1146. else
  1147.   if test -n "$RANLIB"; then
  1148.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1149. else
  1150.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1151.   for ac_dir in $PATH; do
  1152.     test -z "$ac_dir" && ac_dir=.
  1153.     if test -f $ac_dir/$ac_word; then
  1154.       ac_cv_prog_RANLIB="ranlib"
  1155.       break
  1156.     fi
  1157.   done
  1158.   IFS="$ac_save_ifs"
  1159.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1160. fi
  1161. fi
  1162. RANLIB="$ac_cv_prog_RANLIB"
  1163. if test -n "$RANLIB"; then
  1164.   echo "$ac_t""$RANLIB" 1>&6
  1165. else
  1166.   echo "$ac_t""no" 1>&6
  1167. fi
  1168.  
  1169. ac_aux_dir=
  1170. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  1171.   if test -f $ac_dir/install-sh; then
  1172.     ac_aux_dir=$ac_dir
  1173.     ac_install_sh="$ac_aux_dir/install-sh -c"
  1174.     break
  1175.   elif test -f $ac_dir/install.sh; then
  1176.     ac_aux_dir=$ac_dir
  1177.     ac_install_sh="$ac_aux_dir/install.sh -c"
  1178.     break
  1179.   fi
  1180. done
  1181. if test -z "$ac_aux_dir"; then
  1182.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  1183. fi
  1184. ac_config_guess=$ac_aux_dir/config.guess
  1185. ac_config_sub=$ac_aux_dir/config.sub
  1186. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1187.  
  1188. # Find a good install program.  We prefer a C program (faster),
  1189. # so one script is as good as another.  But avoid the broken or
  1190. # incompatible versions:
  1191. # SysV /etc/install, /usr/sbin/install
  1192. # SunOS /usr/etc/install
  1193. # IRIX /sbin/install
  1194. # AIX /bin/install
  1195. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1196. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1197. # ./install, which can be erroneously created by make from ./install.sh.
  1198. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1199. echo "configure:1195: checking for a BSD compatible install" >&5
  1200. if test -z "$INSTALL"; then
  1201. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  1202.   echo $ac_n "(cached) $ac_c" 1>&6
  1203. else
  1204.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  1205.   for ac_dir in $PATH; do
  1206.     # Account for people who put trailing slashes in PATH elements.
  1207.     case "$ac_dir/" in
  1208.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1209.     *)
  1210.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1211.       for ac_prog in ginstall installbsd scoinst install; do
  1212.         if test -f $ac_dir/$ac_prog; then
  1213.       if test $ac_prog = install &&
  1214.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1215.         # AIX install.  It has an incompatible calling convention.
  1216.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1217.         :
  1218.       else
  1219.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1220.         break 2
  1221.       fi
  1222.     fi
  1223.       done
  1224.       ;;
  1225.     esac
  1226.   done
  1227.   IFS="$ac_save_IFS"
  1228.  
  1229. fi
  1230.   if test "${ac_cv_path_install+set}" = set; then
  1231.     INSTALL="$ac_cv_path_install"
  1232.   else
  1233.     # As a last resort, use the slow shell script.  We don't cache a
  1234.     # path for INSTALL within a source directory, because that will
  1235.     # break other packages using the cache if that directory is
  1236.     # removed, or if the path is relative.
  1237.     INSTALL="$ac_install_sh"
  1238.   fi
  1239. fi
  1240. echo "$ac_t""$INSTALL" 1>&6
  1241.  
  1242. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1243. # It thinks the first close brace ends the variable substitution.
  1244. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1245.  
  1246. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1247.  
  1248. # Extract the first word of "makedepend", so it can be a program name with args.
  1249. set dummy makedepend; ac_word=$2
  1250. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1251. echo "configure:1247: checking for $ac_word" >&5
  1252. if eval "test \"`echo '$''{'ac_cv_prog_MAKED'+set}'`\" = set"; then
  1253.   echo $ac_n "(cached) $ac_c" 1>&6
  1254. else
  1255.   if test -n "$MAKED"; then
  1256.   ac_cv_prog_MAKED="$MAKED" # Let the user override the test.
  1257. else
  1258.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1259.   for ac_dir in $PATH; do
  1260.     test -z "$ac_dir" && ac_dir=.
  1261.     if test -f $ac_dir/$ac_word; then
  1262.       ac_cv_prog_MAKED="makedepend"
  1263.       break
  1264.     fi
  1265.   done
  1266.   IFS="$ac_save_ifs"
  1267.   test -z "$ac_cv_prog_MAKED" && ac_cv_prog_MAKED="true"
  1268. fi
  1269. fi
  1270. MAKED="$ac_cv_prog_MAKED"
  1271. if test -n "$MAKED"; then
  1272.   echo "$ac_t""$MAKED" 1>&6
  1273. else
  1274.   echo "$ac_t""no" 1>&6
  1275. fi
  1276.  
  1277. # Extract the first word of "autoconf", so it can be a program name with args.
  1278. set dummy autoconf; ac_word=$2
  1279. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1280. echo "configure:1276: checking for $ac_word" >&5
  1281. if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
  1282.   echo $ac_n "(cached) $ac_c" 1>&6
  1283. else
  1284.   if test -n "$AUTOCONF"; then
  1285.   ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
  1286. else
  1287.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1288.   for ac_dir in $PATH; do
  1289.     test -z "$ac_dir" && ac_dir=.
  1290.     if test -f $ac_dir/$ac_word; then
  1291.       ac_cv_prog_AUTOCONF="autoconf"
  1292.       break
  1293.     fi
  1294.   done
  1295.   IFS="$ac_save_ifs"
  1296.   test -z "$ac_cv_prog_AUTOCONF" && ac_cv_prog_AUTOCONF="true"
  1297. fi
  1298. fi
  1299. AUTOCONF="$ac_cv_prog_AUTOCONF"
  1300. if test -n "$AUTOCONF"; then
  1301.   echo "$ac_t""$AUTOCONF" 1>&6
  1302. else
  1303.   echo "$ac_t""no" 1>&6
  1304. fi
  1305.  
  1306. # Extract the first word of "autoheader", so it can be a program name with args.
  1307. set dummy autoheader; ac_word=$2
  1308. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1309. echo "configure:1305: checking for $ac_word" >&5
  1310. if eval "test \"`echo '$''{'ac_cv_prog_AUTOHDR'+set}'`\" = set"; then
  1311.   echo $ac_n "(cached) $ac_c" 1>&6
  1312. else
  1313.   if test -n "$AUTOHDR"; then
  1314.   ac_cv_prog_AUTOHDR="$AUTOHDR" # Let the user override the test.
  1315. else
  1316.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1317.   for ac_dir in $PATH; do
  1318.     test -z "$ac_dir" && ac_dir=.
  1319.     if test -f $ac_dir/$ac_word; then
  1320.       ac_cv_prog_AUTOHDR="autoheader"
  1321.       break
  1322.     fi
  1323.   done
  1324.   IFS="$ac_save_ifs"
  1325.   test -z "$ac_cv_prog_AUTOHDR" && ac_cv_prog_AUTOHDR="true"
  1326. fi
  1327. fi
  1328. AUTOHDR="$ac_cv_prog_AUTOHDR"
  1329. if test -n "$AUTOHDR"; then
  1330.   echo "$ac_t""$AUTOHDR" 1>&6
  1331. else
  1332.   echo "$ac_t""no" 1>&6
  1333. fi
  1334.  
  1335.  
  1336. echo 
  1337.  
  1338. for ac_hdr in fcntl.h memory.h unistd.h string.h strings.h bstring.h varargs.h stdarg.h stdlib.h time.h syslog.h ifaddrs.h crypt.h
  1339. do
  1340. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1341. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1342. echo "configure:1338: checking for $ac_hdr" >&5
  1343. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1344.   echo $ac_n "(cached) $ac_c" 1>&6
  1345. else
  1346.   cat > conftest.$ac_ext <<EOF
  1347. #line 1343 "configure"
  1348. #include "confdefs.h"
  1349. #include <$ac_hdr>
  1350. EOF
  1351. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1352. { (eval echo configure:1348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1353. ac_err=`grep -v '^ *+' conftest.out`
  1354. if test -z "$ac_err"; then
  1355.   rm -rf conftest*
  1356.   eval "ac_cv_header_$ac_safe=yes"
  1357. else
  1358.   echo "$ac_err" >&5
  1359.   echo "configure: failed program was:" >&5
  1360.   cat conftest.$ac_ext >&5
  1361.   rm -rf conftest*
  1362.   eval "ac_cv_header_$ac_safe=no"
  1363. fi
  1364. rm -f conftest*
  1365. fi
  1366. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1367.   echo "$ac_t""yes" 1>&6
  1368.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1369.   cat >> confdefs.h <<EOF
  1370. #define $ac_tr_hdr 1
  1371. EOF
  1372.  
  1373. else
  1374.   echo "$ac_t""no" 1>&6
  1375. fi
  1376. done
  1377.  
  1378. for ac_hdr in sys/stat.h sys/param.h sys/signal.h sys/resource.h sys/socket.h sys/uio.h sys/time.h sys/wait.h
  1379. do
  1380. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1381. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1382. echo "configure:1378: checking for $ac_hdr" >&5
  1383. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1384.   echo $ac_n "(cached) $ac_c" 1>&6
  1385. else
  1386.   cat > conftest.$ac_ext <<EOF
  1387. #line 1383 "configure"
  1388. #include "confdefs.h"
  1389. #include <$ac_hdr>
  1390. EOF
  1391. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1392. { (eval echo configure:1388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1393. ac_err=`grep -v '^ *+' conftest.out`
  1394. if test -z "$ac_err"; then
  1395.   rm -rf conftest*
  1396.   eval "ac_cv_header_$ac_safe=yes"
  1397. else
  1398.   echo "$ac_err" >&5
  1399.   echo "configure: failed program was:" >&5
  1400.   cat conftest.$ac_ext >&5
  1401.   rm -rf conftest*
  1402.   eval "ac_cv_header_$ac_safe=no"
  1403. fi
  1404. rm -f conftest*
  1405. fi
  1406. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1407.   echo "$ac_t""yes" 1>&6
  1408.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1409.   cat >> confdefs.h <<EOF
  1410. #define $ac_tr_hdr 1
  1411. EOF
  1412.  
  1413. else
  1414.   echo "$ac_t""no" 1>&6
  1415. fi
  1416. done
  1417.  
  1418. for ac_hdr in sys/ttychars.h sys/ipc.h sys/bitypes.h sys/mbuf.h sys/sem.h sys/select.h
  1419. do
  1420. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1421. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1422. echo "configure:1418: checking for $ac_hdr" >&5
  1423. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1424.   echo $ac_n "(cached) $ac_c" 1>&6
  1425. else
  1426.   cat > conftest.$ac_ext <<EOF
  1427. #line 1423 "configure"
  1428. #include "confdefs.h"
  1429. #include <$ac_hdr>
  1430. EOF
  1431. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1432. { (eval echo configure:1428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1433. ac_err=`grep -v '^ *+' conftest.out`
  1434. if test -z "$ac_err"; then
  1435.   rm -rf conftest*
  1436.   eval "ac_cv_header_$ac_safe=yes"
  1437. else
  1438.   echo "$ac_err" >&5
  1439.   echo "configure: failed program was:" >&5
  1440.   cat conftest.$ac_ext >&5
  1441.   rm -rf conftest*
  1442.   eval "ac_cv_header_$ac_safe=no"
  1443. fi
  1444. rm -f conftest*
  1445. fi
  1446. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1447.   echo "$ac_t""yes" 1>&6
  1448.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1449.   cat >> confdefs.h <<EOF
  1450. #define $ac_tr_hdr 1
  1451. EOF
  1452.  
  1453. else
  1454.   echo "$ac_t""no" 1>&6
  1455. fi
  1456. done
  1457.  
  1458. for ac_hdr in sys/file.h sys/ioctl.h sys/fcntl.h sys/filio.h sys/sockio.h
  1459. do
  1460. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1461. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1462. echo "configure:1458: checking for $ac_hdr" >&5
  1463. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1464.   echo $ac_n "(cached) $ac_c" 1>&6
  1465. else
  1466.   cat > conftest.$ac_ext <<EOF
  1467. #line 1463 "configure"
  1468. #include "confdefs.h"
  1469. #include <$ac_hdr>
  1470. EOF
  1471. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1472. { (eval echo configure:1468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1473. ac_err=`grep -v '^ *+' conftest.out`
  1474. if test -z "$ac_err"; then
  1475.   rm -rf conftest*
  1476.   eval "ac_cv_header_$ac_safe=yes"
  1477. else
  1478.   echo "$ac_err" >&5
  1479.   echo "configure: failed program was:" >&5
  1480.   cat conftest.$ac_ext >&5
  1481.   rm -rf conftest*
  1482.   eval "ac_cv_header_$ac_safe=no"
  1483. fi
  1484. rm -f conftest*
  1485. fi
  1486. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1487.   echo "$ac_t""yes" 1>&6
  1488.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1489.   cat >> confdefs.h <<EOF
  1490. #define $ac_tr_hdr 1
  1491. EOF
  1492.  
  1493. else
  1494.   echo "$ac_t""no" 1>&6
  1495. fi
  1496. done
  1497.  
  1498. for ac_hdr in sys/termios.h sys/termio.h termios.h termio.h sys/un.h
  1499. do
  1500. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1501. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1502. echo "configure:1498: checking for $ac_hdr" >&5
  1503. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1504.   echo $ac_n "(cached) $ac_c" 1>&6
  1505. else
  1506.   cat > conftest.$ac_ext <<EOF
  1507. #line 1503 "configure"
  1508. #include "confdefs.h"
  1509. #include <$ac_hdr>
  1510. EOF
  1511. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1512. { (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1513. ac_err=`grep -v '^ *+' conftest.out`
  1514. if test -z "$ac_err"; then
  1515.   rm -rf conftest*
  1516.   eval "ac_cv_header_$ac_safe=yes"
  1517. else
  1518.   echo "$ac_err" >&5
  1519.   echo "configure: failed program was:" >&5
  1520.   cat conftest.$ac_ext >&5
  1521.   rm -rf conftest*
  1522.   eval "ac_cv_header_$ac_safe=no"
  1523. fi
  1524. rm -f conftest*
  1525. fi
  1526. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1527.   echo "$ac_t""yes" 1>&6
  1528.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1529.   cat >> confdefs.h <<EOF
  1530. #define $ac_tr_hdr 1
  1531. EOF
  1532.  
  1533. else
  1534.   echo "$ac_t""no" 1>&6
  1535. fi
  1536. done
  1537.  
  1538. for ac_hdr in netinet/in_systm.h net/route.h machine/endian.h paths.h nl_types.h
  1539. do
  1540. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1541. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1542. echo "configure:1538: checking for $ac_hdr" >&5
  1543. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1544.   echo $ac_n "(cached) $ac_c" 1>&6
  1545. else
  1546.   cat > conftest.$ac_ext <<EOF
  1547. #line 1543 "configure"
  1548. #include "confdefs.h"
  1549. #include <$ac_hdr>
  1550. EOF
  1551. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1552. { (eval echo configure:1548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1553. ac_err=`grep -v '^ *+' conftest.out`
  1554. if test -z "$ac_err"; then
  1555.   rm -rf conftest*
  1556.   eval "ac_cv_header_$ac_safe=yes"
  1557. else
  1558.   echo "$ac_err" >&5
  1559.   echo "configure: failed program was:" >&5
  1560.   cat conftest.$ac_ext >&5
  1561.   rm -rf conftest*
  1562.   eval "ac_cv_header_$ac_safe=no"
  1563. fi
  1564. rm -f conftest*
  1565. fi
  1566. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1567.   echo "$ac_t""yes" 1>&6
  1568.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1569.   cat >> confdefs.h <<EOF
  1570. #define $ac_tr_hdr 1
  1571. EOF
  1572.  
  1573. else
  1574.   echo "$ac_t""no" 1>&6
  1575. fi
  1576. done
  1577.  
  1578. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1579. echo "configure:1575: checking whether time.h and sys/time.h may both be included" >&5
  1580. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1581.   echo $ac_n "(cached) $ac_c" 1>&6
  1582. else
  1583.   cat > conftest.$ac_ext <<EOF
  1584. #line 1580 "configure"
  1585. #include "confdefs.h"
  1586. #include <sys/types.h>
  1587. #include <sys/time.h>
  1588. #include <time.h>
  1589. int main() {
  1590. struct tm *tp;
  1591. ; return 0; }
  1592. EOF
  1593. if { (eval echo configure:1589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1594.   rm -rf conftest*
  1595.   ac_cv_header_time=yes
  1596. else
  1597.   echo "configure: failed program was:" >&5
  1598.   cat conftest.$ac_ext >&5
  1599.   rm -rf conftest*
  1600.   ac_cv_header_time=no
  1601. fi
  1602. rm -f conftest*
  1603. fi
  1604.  
  1605. echo "$ac_t""$ac_cv_header_time" 1>&6
  1606. if test $ac_cv_header_time = yes; then
  1607.   cat >> confdefs.h <<\EOF
  1608. #define TIME_WITH_SYS_TIME 1
  1609. EOF
  1610.  
  1611. fi
  1612.  
  1613. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1614. echo "configure:1610: checking for ANSI C header files" >&5
  1615. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1616.   echo $ac_n "(cached) $ac_c" 1>&6
  1617. else
  1618.   cat > conftest.$ac_ext <<EOF
  1619. #line 1615 "configure"
  1620. #include "confdefs.h"
  1621. #include <stdlib.h>
  1622. #include <stdarg.h>
  1623. #include <string.h>
  1624. #include <float.h>
  1625. EOF
  1626. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1627. { (eval echo configure:1623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1628. ac_err=`grep -v '^ *+' conftest.out`
  1629. if test -z "$ac_err"; then
  1630.   rm -rf conftest*
  1631.   ac_cv_header_stdc=yes
  1632. else
  1633.   echo "$ac_err" >&5
  1634.   echo "configure: failed program was:" >&5
  1635.   cat conftest.$ac_ext >&5
  1636.   rm -rf conftest*
  1637.   ac_cv_header_stdc=no
  1638. fi
  1639. rm -f conftest*
  1640.  
  1641. if test $ac_cv_header_stdc = yes; then
  1642.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1643. cat > conftest.$ac_ext <<EOF
  1644. #line 1640 "configure"
  1645. #include "confdefs.h"
  1646. #include <string.h>
  1647. EOF
  1648. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1649.   egrep "memchr" >/dev/null 2>&1; then
  1650.   :
  1651. else
  1652.   rm -rf conftest*
  1653.   ac_cv_header_stdc=no
  1654. fi
  1655. rm -f conftest*
  1656.  
  1657. fi
  1658.  
  1659. if test $ac_cv_header_stdc = yes; then
  1660.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1661. cat > conftest.$ac_ext <<EOF
  1662. #line 1658 "configure"
  1663. #include "confdefs.h"
  1664. #include <stdlib.h>
  1665. EOF
  1666. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1667.   egrep "free" >/dev/null 2>&1; then
  1668.   :
  1669. else
  1670.   rm -rf conftest*
  1671.   ac_cv_header_stdc=no
  1672. fi
  1673. rm -f conftest*
  1674.  
  1675. fi
  1676.  
  1677. if test $ac_cv_header_stdc = yes; then
  1678.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1679. if test "$cross_compiling" = yes; then
  1680.   :
  1681. else
  1682.   cat > conftest.$ac_ext <<EOF
  1683. #line 1679 "configure"
  1684. #include "confdefs.h"
  1685. #include <ctype.h>
  1686. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1687. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1688. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1689. int main () { int i; for (i = 0; i < 256; i++)
  1690. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1691. exit (0); }
  1692.  
  1693. EOF
  1694. if { (eval echo configure:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1695. then
  1696.   :
  1697. else
  1698.   echo "configure: failed program was:" >&5
  1699.   cat conftest.$ac_ext >&5
  1700.   rm -fr conftest*
  1701.   ac_cv_header_stdc=no
  1702. fi
  1703. rm -fr conftest*
  1704. fi
  1705.  
  1706. fi
  1707. fi
  1708.  
  1709. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1710. if test $ac_cv_header_stdc = yes; then
  1711.   cat >> confdefs.h <<\EOF
  1712. #define STDC_HEADERS 1
  1713. EOF
  1714.  
  1715. fi
  1716.  
  1717. ac_header_dirent=no
  1718. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1719. do
  1720. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1721. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1722. echo "configure:1718: checking for $ac_hdr that defines DIR" >&5
  1723. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1724.   echo $ac_n "(cached) $ac_c" 1>&6
  1725. else
  1726.   cat > conftest.$ac_ext <<EOF
  1727. #line 1723 "configure"
  1728. #include "confdefs.h"
  1729. #include <sys/types.h>
  1730. #include <$ac_hdr>
  1731. int main() {
  1732. DIR *dirp = 0;
  1733. ; return 0; }
  1734. EOF
  1735. if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1736.   rm -rf conftest*
  1737.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1738. else
  1739.   echo "configure: failed program was:" >&5
  1740.   cat conftest.$ac_ext >&5
  1741.   rm -rf conftest*
  1742.   eval "ac_cv_header_dirent_$ac_safe=no"
  1743. fi
  1744. rm -f conftest*
  1745. fi
  1746. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1747.   echo "$ac_t""yes" 1>&6
  1748.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1749.   cat >> confdefs.h <<EOF
  1750. #define $ac_tr_hdr 1
  1751. EOF
  1752.  ac_header_dirent=$ac_hdr; break
  1753. else
  1754.   echo "$ac_t""no" 1>&6
  1755. fi
  1756. done
  1757. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1758. if test $ac_header_dirent = dirent.h; then
  1759. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  1760. echo "configure:1756: checking for opendir in -ldir" >&5
  1761. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  1762. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1763.   echo $ac_n "(cached) $ac_c" 1>&6
  1764. else
  1765.   ac_save_LIBS="$LIBS"
  1766. LIBS="-ldir  $LIBS"
  1767. cat > conftest.$ac_ext <<EOF
  1768. #line 1764 "configure"
  1769. #include "confdefs.h"
  1770. /* Override any gcc2 internal prototype to avoid an error.  */
  1771. /* We use char because int might match the return type of a gcc2
  1772.     builtin and then its argument prototype would still apply.  */
  1773. char opendir();
  1774.  
  1775. int main() {
  1776. opendir()
  1777. ; return 0; }
  1778. EOF
  1779. if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1780.   rm -rf conftest*
  1781.   eval "ac_cv_lib_$ac_lib_var=yes"
  1782. else
  1783.   echo "configure: failed program was:" >&5
  1784.   cat conftest.$ac_ext >&5
  1785.   rm -rf conftest*
  1786.   eval "ac_cv_lib_$ac_lib_var=no"
  1787. fi
  1788. rm -f conftest*
  1789. LIBS="$ac_save_LIBS"
  1790.  
  1791. fi
  1792. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1793.   echo "$ac_t""yes" 1>&6
  1794.   LIBS="$LIBS -ldir"
  1795. else
  1796.   echo "$ac_t""no" 1>&6
  1797. fi
  1798.  
  1799. else
  1800. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  1801. echo "configure:1797: checking for opendir in -lx" >&5
  1802. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  1803. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1804.   echo $ac_n "(cached) $ac_c" 1>&6
  1805. else
  1806.   ac_save_LIBS="$LIBS"
  1807. LIBS="-lx  $LIBS"
  1808. cat > conftest.$ac_ext <<EOF
  1809. #line 1805 "configure"
  1810. #include "confdefs.h"
  1811. /* Override any gcc2 internal prototype to avoid an error.  */
  1812. /* We use char because int might match the return type of a gcc2
  1813.     builtin and then its argument prototype would still apply.  */
  1814. char opendir();
  1815.  
  1816. int main() {
  1817. opendir()
  1818. ; return 0; }
  1819. EOF
  1820. if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1821.   rm -rf conftest*
  1822.   eval "ac_cv_lib_$ac_lib_var=yes"
  1823. else
  1824.   echo "configure: failed program was:" >&5
  1825.   cat conftest.$ac_ext >&5
  1826.   rm -rf conftest*
  1827.   eval "ac_cv_lib_$ac_lib_var=no"
  1828. fi
  1829. rm -f conftest*
  1830. LIBS="$ac_save_LIBS"
  1831.  
  1832. fi
  1833. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1834.   echo "$ac_t""yes" 1>&6
  1835.   LIBS="$LIBS -lx"
  1836. else
  1837.   echo "$ac_t""no" 1>&6
  1838. fi
  1839.  
  1840. fi
  1841.  
  1842.  
  1843.  
  1844. echo
  1845.  
  1846. if test "$OS" != "IRIX"; then
  1847. echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
  1848. echo "configure:1844: checking for main in -lsocket" >&5
  1849. ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
  1850. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1851.   echo $ac_n "(cached) $ac_c" 1>&6
  1852. else
  1853.   ac_save_LIBS="$LIBS"
  1854. LIBS="-lsocket  $LIBS"
  1855. cat > conftest.$ac_ext <<EOF
  1856. #line 1852 "configure"
  1857. #include "confdefs.h"
  1858.  
  1859. int main() {
  1860. main()
  1861. ; return 0; }
  1862. EOF
  1863. if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1864.   rm -rf conftest*
  1865.   eval "ac_cv_lib_$ac_lib_var=yes"
  1866. else
  1867.   echo "configure: failed program was:" >&5
  1868.   cat conftest.$ac_ext >&5
  1869.   rm -rf conftest*
  1870.   eval "ac_cv_lib_$ac_lib_var=no"
  1871. fi
  1872. rm -f conftest*
  1873. LIBS="$ac_save_LIBS"
  1874.  
  1875. fi
  1876. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1877.   echo "$ac_t""yes" 1>&6
  1878.     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1879.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1880.   cat >> confdefs.h <<EOF
  1881. #define $ac_tr_lib 1
  1882. EOF
  1883.  
  1884.   LIBS="-lsocket $LIBS"
  1885.  
  1886. else
  1887.   echo "$ac_t""no" 1>&6
  1888. fi
  1889.  
  1890. echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
  1891. echo "configure:1887: checking for main in -ldl" >&5
  1892. ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
  1893. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1894.   echo $ac_n "(cached) $ac_c" 1>&6
  1895. else
  1896.   ac_save_LIBS="$LIBS"
  1897. LIBS="-ldl  $LIBS"
  1898. cat > conftest.$ac_ext <<EOF
  1899. #line 1895 "configure"
  1900. #include "confdefs.h"
  1901.  
  1902. int main() {
  1903. main()
  1904. ; return 0; }
  1905. EOF
  1906. if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1907.   rm -rf conftest*
  1908.   eval "ac_cv_lib_$ac_lib_var=yes"
  1909. else
  1910.   echo "configure: failed program was:" >&5
  1911.   cat conftest.$ac_ext >&5
  1912.   rm -rf conftest*
  1913.   eval "ac_cv_lib_$ac_lib_var=no"
  1914. fi
  1915. rm -f conftest*
  1916. LIBS="$ac_save_LIBS"
  1917.  
  1918. fi
  1919. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1920.   echo "$ac_t""yes" 1>&6
  1921.     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1922.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1923.   cat >> confdefs.h <<EOF
  1924. #define $ac_tr_lib 1
  1925. EOF
  1926.  
  1927.   LIBS="-ldl $LIBS"
  1928.  
  1929. else
  1930.   echo "$ac_t""no" 1>&6
  1931. fi
  1932.  
  1933. fi
  1934. echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
  1935. echo "configure:1931: checking for main in -ldld" >&5
  1936. ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
  1937. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1938.   echo $ac_n "(cached) $ac_c" 1>&6
  1939. else
  1940.   ac_save_LIBS="$LIBS"
  1941. LIBS="-ldld  $LIBS"
  1942. cat > conftest.$ac_ext <<EOF
  1943. #line 1939 "configure"
  1944. #include "confdefs.h"
  1945.  
  1946. int main() {
  1947. main()
  1948. ; return 0; }
  1949. EOF
  1950. if { (eval echo configure:1946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1951.   rm -rf conftest*
  1952.   eval "ac_cv_lib_$ac_lib_var=yes"
  1953. else
  1954.   echo "configure: failed program was:" >&5
  1955.   cat conftest.$ac_ext >&5
  1956.   rm -rf conftest*
  1957.   eval "ac_cv_lib_$ac_lib_var=no"
  1958. fi
  1959. rm -f conftest*
  1960. LIBS="$ac_save_LIBS"
  1961.  
  1962. fi
  1963. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1964.   echo "$ac_t""yes" 1>&6
  1965.     ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1966.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1967.   cat >> confdefs.h <<EOF
  1968. #define $ac_tr_lib 1
  1969. EOF
  1970.  
  1971.   LIBS="-ldld $LIBS"
  1972.  
  1973. else
  1974.   echo "$ac_t""no" 1>&6
  1975. fi
  1976.  
  1977. echo $ac_n "checking for main in -lsvld""... $ac_c" 1>&6
  1978. echo "configure:1974: checking for main in -lsvld" >&5
  1979. ac_lib_var=`echo svld'_'main | sed 'y%./+-%__p_%'`
  1980. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1981.   echo $ac_n "(cached) $ac_c" 1>&6
  1982. else
  1983.   ac_save_LIBS="$LIBS"
  1984. LIBS="-lsvld  $LIBS"
  1985. cat > conftest.$ac_ext <<EOF
  1986. #line 1982 "configure"
  1987. #include "confdefs.h"
  1988.  
  1989. int main() {
  1990. main()
  1991. ; return 0; }
  1992. EOF
  1993. if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1994.   rm -rf conftest*
  1995.   eval "ac_cv_lib_$ac_lib_var=yes"
  1996. else
  1997.   echo "configure: failed program was:" >&5
  1998.   cat conftest.$ac_ext >&5
  1999.   rm -rf conftest*
  2000.   eval "ac_cv_lib_$ac_lib_var=no"
  2001. fi
  2002. rm -f conftest*
  2003. LIBS="$ac_save_LIBS"
  2004.  
  2005. fi
  2006. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2007.   echo "$ac_t""yes" 1>&6
  2008.     ac_tr_lib=HAVE_LIB`echo svld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2009.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2010.   cat >> confdefs.h <<EOF
  2011. #define $ac_tr_lib 1
  2012. EOF
  2013.  
  2014.   LIBS="-lsvld $LIBS"
  2015.  
  2016. else
  2017.   echo "$ac_t""no" 1>&6
  2018. fi
  2019.  
  2020. echo $ac_n "checking for setupterm in -ltermcap""... $ac_c" 1>&6
  2021. echo "configure:2017: checking for setupterm in -ltermcap" >&5
  2022. ac_lib_var=`echo termcap'_'setupterm | sed 'y%./+-%__p_%'`
  2023. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2024.   echo $ac_n "(cached) $ac_c" 1>&6
  2025. else
  2026.   ac_save_LIBS="$LIBS"
  2027. LIBS="-ltermcap  $LIBS"
  2028. cat > conftest.$ac_ext <<EOF
  2029. #line 2025 "configure"
  2030. #include "confdefs.h"
  2031. /* Override any gcc2 internal prototype to avoid an error.  */
  2032. /* We use char because int might match the return type of a gcc2
  2033.     builtin and then its argument prototype would still apply.  */
  2034. char setupterm();
  2035.  
  2036. int main() {
  2037. setupterm()
  2038. ; return 0; }
  2039. EOF
  2040. if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2041.   rm -rf conftest*
  2042.   eval "ac_cv_lib_$ac_lib_var=yes"
  2043. else
  2044.   echo "configure: failed program was:" >&5
  2045.   cat conftest.$ac_ext >&5
  2046.   rm -rf conftest*
  2047.   eval "ac_cv_lib_$ac_lib_var=no"
  2048. fi
  2049. rm -f conftest*
  2050. LIBS="$ac_save_LIBS"
  2051.  
  2052. fi
  2053. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2054.   echo "$ac_t""yes" 1>&6
  2055.   TELNET_LIBS="$TELNET_LIBS -ltermcap"; TELNET_DEFS="$TELNET_DEFS -DHAVE_SETUPTERM"
  2056. else
  2057.   echo "$ac_t""no" 1>&6
  2058. echo $ac_n "checking for setupterm in -lcurses""... $ac_c" 1>&6
  2059. echo "configure:2055: checking for setupterm in -lcurses" >&5
  2060. ac_lib_var=`echo curses'_'setupterm | sed 'y%./+-%__p_%'`
  2061. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2062.   echo $ac_n "(cached) $ac_c" 1>&6
  2063. else
  2064.   ac_save_LIBS="$LIBS"
  2065. LIBS="-lcurses  $LIBS"
  2066. cat > conftest.$ac_ext <<EOF
  2067. #line 2063 "configure"
  2068. #include "confdefs.h"
  2069. /* Override any gcc2 internal prototype to avoid an error.  */
  2070. /* We use char because int might match the return type of a gcc2
  2071.     builtin and then its argument prototype would still apply.  */
  2072. char setupterm();
  2073.  
  2074. int main() {
  2075. setupterm()
  2076. ; return 0; }
  2077. EOF
  2078. if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2079.   rm -rf conftest*
  2080.   eval "ac_cv_lib_$ac_lib_var=yes"
  2081. else
  2082.   echo "configure: failed program was:" >&5
  2083.   cat conftest.$ac_ext >&5
  2084.   rm -rf conftest*
  2085.   eval "ac_cv_lib_$ac_lib_var=no"
  2086. fi
  2087. rm -f conftest*
  2088. LIBS="$ac_save_LIBS"
  2089.  
  2090. fi
  2091. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2092.   echo "$ac_t""yes" 1>&6
  2093.   TELNET_LIBS="$TELNET_LIBS -lcurses"; TELNET_DEFS="$TELNET_DEFS -DHAVE_SETUPTERM"
  2094. else
  2095.   echo "$ac_t""no" 1>&6
  2096. echo $ac_n "checking for setupterm in -lncurses""... $ac_c" 1>&6
  2097. echo "configure:2093: checking for setupterm in -lncurses" >&5
  2098. ac_lib_var=`echo ncurses'_'setupterm | sed 'y%./+-%__p_%'`
  2099. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2100.   echo $ac_n "(cached) $ac_c" 1>&6
  2101. else
  2102.   ac_save_LIBS="$LIBS"
  2103. LIBS="-lncurses  $LIBS"
  2104. cat > conftest.$ac_ext <<EOF
  2105. #line 2101 "configure"
  2106. #include "confdefs.h"
  2107. /* Override any gcc2 internal prototype to avoid an error.  */
  2108. /* We use char because int might match the return type of a gcc2
  2109.     builtin and then its argument prototype would still apply.  */
  2110. char setupterm();
  2111.  
  2112. int main() {
  2113. setupterm()
  2114. ; return 0; }
  2115. EOF
  2116. if { (eval echo configure:2112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2117.   rm -rf conftest*
  2118.   eval "ac_cv_lib_$ac_lib_var=yes"
  2119. else
  2120.   echo "configure: failed program was:" >&5
  2121.   cat conftest.$ac_ext >&5
  2122.   rm -rf conftest*
  2123.   eval "ac_cv_lib_$ac_lib_var=no"
  2124. fi
  2125. rm -f conftest*
  2126. LIBS="$ac_save_LIBS"
  2127.  
  2128. fi
  2129. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2130.   echo "$ac_t""yes" 1>&6
  2131.   TELNET_LIBS="$TELNET_LIBS -lncurses"; TELNET_DEFS="$TELNET_DEFS -DHAVE_SETUPTERM"
  2132. else
  2133.   echo "$ac_t""no" 1>&6
  2134. echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
  2135. echo "configure:2131: checking for tgetent in -ltermcap" >&5
  2136. ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
  2137. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2138.   echo $ac_n "(cached) $ac_c" 1>&6
  2139. else
  2140.   ac_save_LIBS="$LIBS"
  2141. LIBS="-ltermcap  $LIBS"
  2142. cat > conftest.$ac_ext <<EOF
  2143. #line 2139 "configure"
  2144. #include "confdefs.h"
  2145. /* Override any gcc2 internal prototype to avoid an error.  */
  2146. /* We use char because int might match the return type of a gcc2
  2147.     builtin and then its argument prototype would still apply.  */
  2148. char tgetent();
  2149.  
  2150. int main() {
  2151. tgetent()
  2152. ; return 0; }
  2153. EOF
  2154. if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2155.   rm -rf conftest*
  2156.   eval "ac_cv_lib_$ac_lib_var=yes"
  2157. else
  2158.   echo "configure: failed program was:" >&5
  2159.   cat conftest.$ac_ext >&5
  2160.   rm -rf conftest*
  2161.   eval "ac_cv_lib_$ac_lib_var=no"
  2162. fi
  2163. rm -f conftest*
  2164. LIBS="$ac_save_LIBS"
  2165.  
  2166. fi
  2167. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2168.   echo "$ac_t""yes" 1>&6
  2169.   TELNET_LIBS="$TELNET_LIBS -ltermcap"
  2170. else
  2171.   echo "$ac_t""no" 1>&6
  2172. echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
  2173. echo "configure:2169: checking for tgetent in -lcurses" >&5
  2174. ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
  2175. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2176.   echo $ac_n "(cached) $ac_c" 1>&6
  2177. else
  2178.   ac_save_LIBS="$LIBS"
  2179. LIBS="-lcurses  $LIBS"
  2180. cat > conftest.$ac_ext <<EOF
  2181. #line 2177 "configure"
  2182. #include "confdefs.h"
  2183. /* Override any gcc2 internal prototype to avoid an error.  */
  2184. /* We use char because int might match the return type of a gcc2
  2185.     builtin and then its argument prototype would still apply.  */
  2186. char tgetent();
  2187.  
  2188. int main() {
  2189. tgetent()
  2190. ; return 0; }
  2191. EOF
  2192. if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2193.   rm -rf conftest*
  2194.   eval "ac_cv_lib_$ac_lib_var=yes"
  2195. else
  2196.   echo "configure: failed program was:" >&5
  2197.   cat conftest.$ac_ext >&5
  2198.   rm -rf conftest*
  2199.   eval "ac_cv_lib_$ac_lib_var=no"
  2200. fi
  2201. rm -f conftest*
  2202. LIBS="$ac_save_LIBS"
  2203.  
  2204. fi
  2205. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2206.   echo "$ac_t""yes" 1>&6
  2207.   TELNET_LIBS="$TELNET_LIBS -lcurses"
  2208. else
  2209.   echo "$ac_t""no" 1>&6
  2210. echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
  2211. echo "configure:2207: checking for tgetent in -lncurses" >&5
  2212. ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
  2213. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2214.   echo $ac_n "(cached) $ac_c" 1>&6
  2215. else
  2216.   ac_save_LIBS="$LIBS"
  2217. LIBS="-lncurses  $LIBS"
  2218. cat > conftest.$ac_ext <<EOF
  2219. #line 2215 "configure"
  2220. #include "confdefs.h"
  2221. /* Override any gcc2 internal prototype to avoid an error.  */
  2222. /* We use char because int might match the return type of a gcc2
  2223.     builtin and then its argument prototype would still apply.  */
  2224. char tgetent();
  2225.  
  2226. int main() {
  2227. tgetent()
  2228. ; return 0; }
  2229. EOF
  2230. if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2231.   rm -rf conftest*
  2232.   eval "ac_cv_lib_$ac_lib_var=yes"
  2233. else
  2234.   echo "configure: failed program was:" >&5
  2235.   cat conftest.$ac_ext >&5
  2236.   rm -rf conftest*
  2237.   eval "ac_cv_lib_$ac_lib_var=no"
  2238. fi
  2239. rm -f conftest*
  2240. LIBS="$ac_save_LIBS"
  2241.  
  2242. fi
  2243. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2244.   echo "$ac_t""yes" 1>&6
  2245.   TELNET_LIBS="$TELNET_LIBS -lncurses"
  2246. else
  2247.   echo "$ac_t""no" 1>&6
  2248. fi
  2249.  
  2250.  
  2251. fi
  2252.  
  2253. fi
  2254.  
  2255. fi
  2256.  
  2257. fi
  2258.  
  2259. fi
  2260.  
  2261. echo $ac_n "checking for gethostbyname in -lc""... $ac_c" 1>&6
  2262. echo "configure:2258: checking for gethostbyname in -lc" >&5
  2263. ac_lib_var=`echo c'_'gethostbyname | sed 'y%./+-%__p_%'`
  2264. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2265.   echo $ac_n "(cached) $ac_c" 1>&6
  2266. else
  2267.   ac_save_LIBS="$LIBS"
  2268. LIBS="-lc  $LIBS"
  2269. cat > conftest.$ac_ext <<EOF
  2270. #line 2266 "configure"
  2271. #include "confdefs.h"
  2272. /* Override any gcc2 internal prototype to avoid an error.  */
  2273. /* We use char because int might match the return type of a gcc2
  2274.     builtin and then its argument prototype would still apply.  */
  2275. char gethostbyname();
  2276.  
  2277. int main() {
  2278. gethostbyname()
  2279. ; return 0; }
  2280. EOF
  2281. if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2282.   rm -rf conftest*
  2283.   eval "ac_cv_lib_$ac_lib_var=yes"
  2284. else
  2285.   echo "configure: failed program was:" >&5
  2286.   cat conftest.$ac_ext >&5
  2287.   rm -rf conftest*
  2288.   eval "ac_cv_lib_$ac_lib_var=no"
  2289. fi
  2290. rm -f conftest*
  2291. LIBS="$ac_save_LIBS"
  2292.  
  2293. fi
  2294. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2295.   echo "$ac_t""yes" 1>&6
  2296.   STATIC_LIBS=""
  2297. else
  2298.   echo "$ac_t""no" 1>&6
  2299. echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
  2300. echo "configure:2296: checking for gethostbyname in -lresolv" >&5
  2301. ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
  2302. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2303.   echo $ac_n "(cached) $ac_c" 1>&6
  2304. else
  2305.   ac_save_LIBS="$LIBS"
  2306. LIBS="-lresolv  $LIBS"
  2307. cat > conftest.$ac_ext <<EOF
  2308. #line 2304 "configure"
  2309. #include "confdefs.h"
  2310. /* Override any gcc2 internal prototype to avoid an error.  */
  2311. /* We use char because int might match the return type of a gcc2
  2312.     builtin and then its argument prototype would still apply.  */
  2313. char gethostbyname();
  2314.  
  2315. int main() {
  2316. gethostbyname()
  2317. ; return 0; }
  2318. EOF
  2319. if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2320.   rm -rf conftest*
  2321.   eval "ac_cv_lib_$ac_lib_var=yes"
  2322. else
  2323.   echo "configure: failed program was:" >&5
  2324.   cat conftest.$ac_ext >&5
  2325.   rm -rf conftest*
  2326.   eval "ac_cv_lib_$ac_lib_var=no"
  2327. fi
  2328. rm -f conftest*
  2329. LIBS="$ac_save_LIBS"
  2330.  
  2331. fi
  2332. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2333.   echo "$ac_t""yes" 1>&6
  2334.   STATIC_LIBS="-lresolv"
  2335. else
  2336.   echo "$ac_t""no" 1>&6
  2337. fi
  2338.  
  2339. fi
  2340.  
  2341.  
  2342. echo $ac_n "checking if we can use -lnsl""... $ac_c" 1>&6
  2343. echo "configure:2339: checking if we can use -lnsl" >&5
  2344. if eval "test \"`echo '$''{'r_cv_use_libnsl'+set}'`\" = set"; then
  2345.   echo $ac_n "(cached) $ac_c" 1>&6
  2346. else
  2347.   if test "$cross_compiling" = yes; then
  2348.   r_cv_use_libnsl=no
  2349. else
  2350.   cat > conftest.$ac_ext <<EOF
  2351. #line 2347 "configure"
  2352. #include "confdefs.h"
  2353. main() { if (gethostbyname("localhost")) exit(0); exit(-1); }
  2354. EOF
  2355. if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2356. then
  2357.   r_cv_use_libnsl=no
  2358. else
  2359.   echo "configure: failed program was:" >&5
  2360.   cat conftest.$ac_ext >&5
  2361.   rm -fr conftest*
  2362.   r_cv_use_libnsl=no
  2363. fi
  2364. rm -fr conftest*
  2365. fi
  2366.  
  2367. fi
  2368.  
  2369. echo "$ac_t""$r_cv_use_libnsl" 1>&6
  2370. if test "$r_cv_use_libnsl" = "yes"; then LIBS="$LIBS -lnsl"; fi
  2371.  
  2372.  
  2373. for r_lib_name in libc libnsl libsocket libresolv libdgc
  2374. do
  2375.  
  2376. ac_safe=`echo "$r_lib_name" | tr './\055' '___'`
  2377. echo $ac_n "checking for shared $r_lib_name""... $ac_c" 1>&6
  2378. echo "configure:2374: checking for shared $r_lib_name" >&5
  2379. if eval "test \"`echo '$''{'r_cv_name_$ac_safe'+set}'`\" = set"; then
  2380.   echo $ac_n "(cached) $ac_c" 1>&6
  2381. else
  2382.   
  2383. case `uname -rs` in
  2384.     IRIX*5.*)
  2385.         if test -n "`ls /usr/lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2386.             eval "r_cv_name_$ac_safe=`cd /usr/lib; ls $ac_safe.so.* | sort -r | head -1`"
  2387.         elif test -n "`ls /lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2388.             eval "r_cv_name_$ac_safe=`cd /lib; ls $ac_safe.so.* | sort -r | head -1`"
  2389.         elif test -f /usr/lib/$ac_safe.so; then
  2390.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2391.         elif test -f /lib/$ac_safe.so; then
  2392.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2393.         fi
  2394.         ;;
  2395.     OSF1*)
  2396.         if test -f /usr/shlib/$ac_safe.so; then
  2397.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2398.         elif test -f /usr/lib/$ac_safe.so; then
  2399.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2400.         elif test -f /lib/$ac_safe.so; then
  2401.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2402.         fi
  2403.         ;;
  2404.     Linux*)
  2405.         if test -n "`ls /lib/$ac_safe.so.? 2>/dev/null | sort -r | head -1`"; then
  2406.             eval "r_cv_name_$ac_safe=`cd /lib; ls $ac_safe.so.? | sort -r | head -1`"
  2407.         elif test -n "`ls /usr/lib/$ac_safe.so.? 2>/dev/null | sort -r | head -1`"; then
  2408.             eval "r_cv_name_$ac_safe=`cd /usr/lib; ls $ac_safe.so.* | sort -r | head -1`"
  2409.         elif test -n "`ls /lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2410.             eval "r_cv_name_$ac_safe=`cd /lib; ls $ac_safe.so.* | sort -r | head -1`"
  2411.         elif test -n "`ls /usr/lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2412.             eval "r_cv_name_$ac_safe=`cd /usr/lib; ls $ac_safe.so.* | sort -r | head -1`"
  2413.         elif test -f /lib/$ac_safe.so; then
  2414.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2415.         elif test -f /usr/lib/$ac_safe.so; then
  2416.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2417.         fi
  2418.         ;;
  2419.     SunOS*)
  2420.         if test -f /usr/lib/$ac_safe.so; then
  2421.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2422.         elif test -n "`ls /usr/lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2423.             eval "r_cv_name_$ac_safe=`cd /usr/lib; ls $ac_safe.so.* | sort -r | head -1`"
  2424.         elif test -f /lib/$ac_safe.so; then
  2425.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2426.         elif test -n "`ls /lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2427.             eval "r_cv_name_$ac_safe=`cd /lib; ls $ac_safe.so.* | sort -r | head -1`"
  2428.         fi
  2429.         ;;
  2430.     dgux*)
  2431.         if test -f /usr/dglib/$ac_safe.so; then
  2432.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2433.         elif test -n "`ls /usr/dglib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2434.             eval "r_cv_name_$ac_safe=`cd /usr/dglib; ls $ac_safe.so.* | sort -r | head -1`"
  2435.         fi
  2436.         ;;
  2437.     FreeBSD*)
  2438.         if test -f /lib/$ac_safe.so; then
  2439.             eval "r_cv_name_$ac_safe=/lib/$ac_safe.so"
  2440.         elif test -n "`ls /lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2441.             eval "r_cv_name_$ac_safe=`ls /lib/$ac_safe.so.* | sort -r | head -1`"
  2442.         elif test -f /usr/lib/$ac_safe.so; then
  2443.             eval "r_cv_name_$ac_safe=/usr/lib/$ac_safe.so"
  2444.         elif test -n "`ls /usr/lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2445.             eval "r_cv_name_$ac_safe=`ls /usr/lib/$ac_safe.so.* | sort -r | head -1`"
  2446.         fi
  2447.         ;;
  2448.         OS/2*)
  2449.         if test -f /lib/$ac_safe.dll; then
  2450.             eval "r_cv_name_$ac_safe=/lib/$ac_safe.dll"
  2451.         elif test -n "`ls /lib/$ac_safe.dll.* 2>/dev/null | sort -r | head -1`"; then
  2452.             eval "r_cv_name_$ac_safe=`ls /lib/$ac_safe.dll.* | sort -r | head -1`"
  2453.         elif test -f /usr/lib/$ac_safe.dll; then
  2454.             eval "r_cv_name_$ac_safe=/usr/lib/$ac_safe.dll"
  2455.         elif test -n "`ls /usr/lib/$ac_safe.dll.* 2>/dev/null | sort -r | head -1`"; then
  2456.             eval "r_cv_name_$ac_safe=`ls /usr/lib/$ac_safe.dll.* | sort -r | head -1`"
  2457.         fi
  2458.         ;;
  2459.     *)
  2460.         if test -f /lib/$ac_safe.so; then
  2461.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2462.         elif test -n "`ls /lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2463.             eval "r_cv_name_$ac_safe=`cd \\lib; ls $ac_safe.so.* | sort -r | head -1`"
  2464.         elif test -f /usr/lib/$ac_safe.so; then
  2465.             eval "r_cv_name_$ac_safe=$ac_safe.so"
  2466.         elif test -n "`ls /usr/lib/$ac_safe.so.* 2>/dev/null | sort -r | head -1`"; then
  2467.             eval "r_cv_name_$ac_safe=`cd \\usr\\lib; ls $ac_safe.so.* | sort -r | head -1`"
  2468.         fi
  2469.         ;;
  2470. esac
  2471.  
  2472. fi
  2473. ac_result=`eval echo '$r_cv_name_'$ac_safe`
  2474. if test "$ac_result" != ""; then
  2475.     echo "$ac_t""$ac_result" 1>&6
  2476.     
  2477. r_fixed=`echo $r_lib_name | tr '[a-z]./\055' '[A-Z]___'`_NAME
  2478. cat >> confdefs.h <<EOF
  2479. #define $r_fixed "$ac_result"
  2480. EOF
  2481.  else 
  2482.     echo "$ac_t""no" 1>&6
  2483.     fi
  2484. done
  2485.  
  2486. if test "yes" = "no"; then
  2487. cat >> confdefs.h <<EOF
  2488. #define LIBC_NAME 1
  2489. EOF
  2490.  
  2491. cat >> confdefs.h <<EOF
  2492. #define LIBNSL_NAME 1
  2493. EOF
  2494.  
  2495. cat >> confdefs.h <<EOF
  2496. #define LIBRESOLV_NAME 1
  2497. EOF
  2498.  
  2499. cat >> confdefs.h <<EOF
  2500. #define LIBSOCKET_NAME 1
  2501. EOF
  2502.  
  2503. cat >> confdefs.h <<EOF
  2504. #define LIBDGC_NAME 1
  2505. EOF
  2506.  
  2507. fi
  2508.  
  2509. echo
  2510.  
  2511. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  2512. echo "configure:2497: checking for pid_t" >&5
  2513. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  2514.   echo $ac_n "(cached) $ac_c" 1>&6
  2515. else
  2516.   cat > conftest.$ac_ext <<EOF
  2517. #line 2502 "configure"
  2518. #include "confdefs.h"
  2519. #include <sys/types.h>
  2520. #if STDC_HEADERS
  2521. #include <stdlib.h>
  2522. #include <stddef.h>
  2523. #endif
  2524. EOF
  2525. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2526.   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2527.   rm -rf conftest*
  2528.   ac_cv_type_pid_t=yes
  2529. else
  2530.   rm -rf conftest*
  2531.   ac_cv_type_pid_t=no
  2532. fi
  2533. rm -f conftest*
  2534.  
  2535. fi
  2536. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  2537. if test $ac_cv_type_pid_t = no; then
  2538.   cat >> confdefs.h <<\EOF
  2539. #define pid_t int
  2540. EOF
  2541.  
  2542. fi
  2543.  
  2544. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  2545. echo "configure:2530: checking for size_t" >&5
  2546. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  2547.   echo $ac_n "(cached) $ac_c" 1>&6
  2548. else
  2549.   cat > conftest.$ac_ext <<EOF
  2550. #line 2535 "configure"
  2551. #include "confdefs.h"
  2552. #include <sys/types.h>
  2553. #if STDC_HEADERS
  2554. #include <stdlib.h>
  2555. #include <stddef.h>
  2556. #endif
  2557. EOF
  2558. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2559.   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2560.   rm -rf conftest*
  2561.   ac_cv_type_size_t=yes
  2562. else
  2563.   rm -rf conftest*
  2564.   ac_cv_type_size_t=no
  2565. fi
  2566. rm -f conftest*
  2567.  
  2568. fi
  2569. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  2570. if test $ac_cv_type_size_t = no; then
  2571.   cat >> confdefs.h <<\EOF
  2572. #define size_t unsigned
  2573. EOF
  2574.  
  2575. fi
  2576.  
  2577. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2578. echo "configure:2563: checking return type of signal handlers" >&5
  2579. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  2580.   echo $ac_n "(cached) $ac_c" 1>&6
  2581. else
  2582.   cat > conftest.$ac_ext <<EOF
  2583. #line 2568 "configure"
  2584. #include "confdefs.h"
  2585. #include <sys/types.h>
  2586. #include <signal.h>
  2587. #ifdef signal
  2588. #undef signal
  2589. #endif
  2590. #ifdef __cplusplus
  2591. extern "C" void (*signal (int, void (*)(int)))(int);
  2592. #else
  2593. void (*signal ()) ();
  2594. #endif
  2595.  
  2596. int main() {
  2597. int i;
  2598. ; return 0; }
  2599. EOF
  2600. if { (eval echo configure:2585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2601.   rm -rf conftest*
  2602.   ac_cv_type_signal=void
  2603. else
  2604.   echo "configure: failed program was:" >&5
  2605.   cat conftest.$ac_ext >&5
  2606.   rm -rf conftest*
  2607.   ac_cv_type_signal=int
  2608. fi
  2609. rm -f conftest*
  2610. fi
  2611.  
  2612. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2613. cat >> confdefs.h <<EOF
  2614. #define RETSIGTYPE $ac_cv_type_signal
  2615. EOF
  2616.  
  2617.  
  2618.  
  2619. echo $ac_n "checking whether sockaddr_un has sun_len""... $ac_c" 1>&6
  2620. echo "configure:2605: checking whether sockaddr_un has sun_len" >&5
  2621. if eval "test \"`echo '$''{'sc_cv_sockaddr_sun_len'+set}'`\" = set"; then
  2622.   echo $ac_n "(cached) $ac_c" 1>&6
  2623. else
  2624.   cat > conftest.$ac_ext <<EOF
  2625. #line 2610 "configure"
  2626. #include "confdefs.h"
  2627. #include <sys/types.h>
  2628. #include <sys/un.h>
  2629. int main() {
  2630. struct sockaddr_un s_un; s_un.sun_len=0;
  2631. ; return 0; }
  2632. EOF
  2633. if { (eval echo configure:2618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2634.   rm -rf conftest*
  2635.   sc_cv_sockaddr_sun_len=yes
  2636. else
  2637.   echo "configure: failed program was:" >&5
  2638.   cat conftest.$ac_ext >&5
  2639.   rm -rf conftest*
  2640.   sc_cv_sockaddr_sun_len=no
  2641. fi
  2642. rm -f conftest*
  2643. fi
  2644.  
  2645. if test "$sc_cv_sockaddr_sun_len" = "yes"; then cat >> confdefs.h <<\EOF
  2646. #define HAVE_SOCKADDR_SUN_LEN 1
  2647. EOF
  2648.  fi
  2649. echo "$ac_t""$sc_cv_sockaddr_sun_len" 1>&6
  2650.  
  2651.  
  2652. echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
  2653. echo "configure:2638: checking for sig_atomic_t" >&5
  2654. if eval "test \"`echo '$''{'r_cv_type_sig_atomic_t'+set}'`\" = set"; then
  2655.   echo $ac_n "(cached) $ac_c" 1>&6
  2656. else
  2657.   cat > conftest.$ac_ext <<EOF
  2658. #line 2643 "configure"
  2659. #include "confdefs.h"
  2660.  
  2661. #include <sys/types.h>
  2662. #include <signal.h>
  2663. #if HAVE_SYS_SIGNAL_H
  2664. #include <sys/signal.h>
  2665. #endif
  2666. EOF
  2667. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2668.   egrep "sig_atomic_t" >/dev/null 2>&1; then
  2669.   rm -rf conftest*
  2670.   r_cv_type_sig_atomic_t=yes
  2671. else
  2672.   rm -rf conftest*
  2673.   r_cv_type_sig_atomic_t=no
  2674. fi
  2675. rm -f conftest*
  2676.  
  2677. fi
  2678. echo "$ac_t""$r_cv_type_sig_atomic_t" 1>&6
  2679. if test "$r_cv_type_sig_atomic_t" = "no"; then
  2680. cat >> confdefs.h <<\EOF
  2681. #define sig_atomic_t int
  2682. EOF
  2683.  
  2684. fi
  2685.  
  2686. echo $ac_n "checking for cc_t""... $ac_c" 1>&6
  2687. echo "configure:2672: checking for cc_t" >&5
  2688. if eval "test \"`echo '$''{'r_cv_have_cct'+set}'`\" = set"; then
  2689.   echo $ac_n "(cached) $ac_c" 1>&6
  2690. else
  2691.   cat > conftest.$ac_ext <<EOF
  2692. #line 2677 "configure"
  2693. #include "confdefs.h"
  2694. cc_t
  2695. int main() {
  2696. #include <termio.h>
  2697. ; return 0; }
  2698. EOF
  2699. if { (eval echo configure:2684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2700.   rm -rf conftest*
  2701.   cc_t foo;
  2702. else
  2703.   echo "configure: failed program was:" >&5
  2704.   cat conftest.$ac_ext >&5
  2705.   rm -rf conftest*
  2706.   r_cv_have_cct=yes
  2707. fi
  2708. rm -f conftest*
  2709. fi
  2710.  
  2711. if test $r_cv_have_cct = no; then cat >> confdefs.h <<\EOF
  2712. #define NO_CC_T 1
  2713. EOF
  2714.  fi
  2715. echo "$ac_t""$r_cv_have_cct" 1>&6
  2716.  
  2717. echo $ac_n "checking for sig_t""... $ac_c" 1>&6
  2718. echo "configure:2703: checking for sig_t" >&5
  2719. if eval "test \"`echo '$''{'r_cv_have_sigt'+set}'`\" = set"; then
  2720.   echo $ac_n "(cached) $ac_c" 1>&6
  2721. else
  2722.   cat > conftest.$ac_ext <<EOF
  2723. #line 2708 "configure"
  2724. #include "confdefs.h"
  2725. #include <signal.h>
  2726. int main() {
  2727. sig_t i = (sig_t)0;
  2728. ; return 0; }
  2729. EOF
  2730. if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2731.   rm -rf conftest*
  2732.   r_cv_have_sigt=yes
  2733. else
  2734.   echo "configure: failed program was:" >&5
  2735.   cat conftest.$ac_ext >&5
  2736.   rm -rf conftest*
  2737.   r_cv_have_sigt=no
  2738. fi
  2739. rm -f conftest*
  2740. fi
  2741.  
  2742. if test "$r_cv_have_sigt" = "no"; then FTPDEFS="$FTPDEFS -DCOMPAT"; fi
  2743. echo "$ac_t""$r_cv_have_sigt" 1>&6
  2744.  
  2745. echo $ac_n "checking for getpassphrase""... $ac_c" 1>&6
  2746. echo "configure:2731: checking for getpassphrase" >&5
  2747. if eval "test \"`echo '$''{'ac_cv_func_getpassphrase'+set}'`\" = set"; then
  2748.   echo $ac_n "(cached) $ac_c" 1>&6
  2749. else
  2750.   cat > conftest.$ac_ext <<EOF
  2751. #line 2736 "configure"
  2752. #include "confdefs.h"
  2753. /* System header to define __stub macros and hopefully few prototypes,
  2754.     which can conflict with char getpassphrase(); below.  */
  2755. #include <assert.h>
  2756. /* Override any gcc2 internal prototype to avoid an error.  */
  2757. /* We use char because int might match the return type of a gcc2
  2758.     builtin and then its argument prototype would still apply.  */
  2759. char getpassphrase();
  2760.  
  2761. int main() {
  2762.  
  2763. /* The GNU C library defines this for functions which it implements
  2764.     to always fail with ENOSYS.  Some functions are actually named
  2765.     something starting with __ and the normal name is an alias.  */
  2766. #if defined (__stub_getpassphrase) || defined (__stub___getpassphrase)
  2767. choke me
  2768. #else
  2769. getpassphrase();
  2770. #endif
  2771.  
  2772. ; return 0; }
  2773. EOF
  2774. if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2775.   rm -rf conftest*
  2776.   eval "ac_cv_func_getpassphrase=yes"
  2777. else
  2778.   echo "configure: failed program was:" >&5
  2779.   cat conftest.$ac_ext >&5
  2780.   rm -rf conftest*
  2781.   eval "ac_cv_func_getpassphrase=no"
  2782. fi
  2783. rm -f conftest*
  2784. fi
  2785.  
  2786. if eval "test \"`echo '$ac_cv_func_'getpassphrase`\" = yes"; then
  2787.   echo "$ac_t""yes" 1>&6
  2788.   r_cv_have_getpassphrase=yes
  2789. else
  2790.   echo "$ac_t""no" 1>&6
  2791. r_cv_have_getpassphrase=no
  2792. fi
  2793.  
  2794. if test "$r_cv_have_getpassphrase" = "yes"; then FTPDEFS="$FTPDEFS -DHAVE_GETPASSPHRASE"; fi
  2795.  
  2796. echo
  2797.  
  2798. echo $ac_n "checking for sys_errlist""... $ac_c" 1>&6
  2799. echo "configure:2784: checking for sys_errlist" >&5
  2800. if eval "test \"`echo '$''{'r_cv_have_sysel'+set}'`\" = set"; then
  2801.   echo $ac_n "(cached) $ac_c" 1>&6
  2802. else
  2803.   cat > conftest.$ac_ext <<EOF
  2804. #line 2789 "configure"
  2805. #include "confdefs.h"
  2806.  
  2807. int main() {
  2808. extern char **sys_errlist;char **foo = sys_errlist;
  2809. ; return 0; }
  2810. EOF
  2811. if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2812.   rm -rf conftest*
  2813.   r_cv_have_sysel=yes
  2814. else
  2815.   echo "configure: failed program was:" >&5
  2816.   cat conftest.$ac_ext >&5
  2817.   rm -rf conftest*
  2818.   r_cv_have_sysel=no
  2819. fi
  2820. rm -f conftest*
  2821. fi
  2822.  
  2823. if test "$r_cv_have_sysel" = "yes"; then cat >> confdefs.h <<\EOF
  2824. #define HAVE_SYSERRLIST 1
  2825. EOF
  2826.  fi
  2827. echo "$ac_t""$r_cv_have_sysel" 1>&6
  2828.  
  2829. for ac_func in dlopen shl_load
  2830. do
  2831. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2832. echo "configure:2817: checking for $ac_func" >&5
  2833. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2834.   echo $ac_n "(cached) $ac_c" 1>&6
  2835. else
  2836.   cat > conftest.$ac_ext <<EOF
  2837. #line 2822 "configure"
  2838. #include "confdefs.h"
  2839. /* System header to define __stub macros and hopefully few prototypes,
  2840.     which can conflict with char $ac_func(); below.  */
  2841. #include <assert.h>
  2842. /* Override any gcc2 internal prototype to avoid an error.  */
  2843. /* We use char because int might match the return type of a gcc2
  2844.     builtin and then its argument prototype would still apply.  */
  2845. char $ac_func();
  2846.  
  2847. int main() {
  2848.  
  2849. /* The GNU C library defines this for functions which it implements
  2850.     to always fail with ENOSYS.  Some functions are actually named
  2851.     something starting with __ and the normal name is an alias.  */
  2852. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2853. choke me
  2854. #else
  2855. $ac_func();
  2856. #endif
  2857.  
  2858. ; return 0; }
  2859. EOF
  2860. if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2861.   rm -rf conftest*
  2862.   eval "ac_cv_func_$ac_func=yes"
  2863. else
  2864.   echo "configure: failed program was:" >&5
  2865.   cat conftest.$ac_ext >&5
  2866.   rm -rf conftest*
  2867.   eval "ac_cv_func_$ac_func=no"
  2868. fi
  2869. rm -f conftest*
  2870. fi
  2871.  
  2872. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2873.   echo "$ac_t""yes" 1>&6
  2874.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2875.   cat >> confdefs.h <<EOF
  2876. #define $ac_tr_func 1
  2877. EOF
  2878.  
  2879. else
  2880.   echo "$ac_t""no" 1>&6
  2881. fi
  2882. done
  2883.  
  2884.  
  2885. saved_libs="$LIBS"
  2886. LIBS="$LIBS $TELNET_LIBS"
  2887. for ac_func in setupterm
  2888. do
  2889. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2890. echo "configure:2875: checking for $ac_func" >&5
  2891. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2892.   echo $ac_n "(cached) $ac_c" 1>&6
  2893. else
  2894.   cat > conftest.$ac_ext <<EOF
  2895. #line 2880 "configure"
  2896. #include "confdefs.h"
  2897. /* System header to define __stub macros and hopefully few prototypes,
  2898.     which can conflict with char $ac_func(); below.  */
  2899. #include <assert.h>
  2900. /* Override any gcc2 internal prototype to avoid an error.  */
  2901. /* We use char because int might match the return type of a gcc2
  2902.     builtin and then its argument prototype would still apply.  */
  2903. char $ac_func();
  2904.  
  2905. int main() {
  2906.  
  2907. /* The GNU C library defines this for functions which it implements
  2908.     to always fail with ENOSYS.  Some functions are actually named
  2909.     something starting with __ and the normal name is an alias.  */
  2910. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2911. choke me
  2912. #else
  2913. $ac_func();
  2914. #endif
  2915.  
  2916. ; return 0; }
  2917. EOF
  2918. if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2919.   rm -rf conftest*
  2920.   eval "ac_cv_func_$ac_func=yes"
  2921. else
  2922.   echo "configure: failed program was:" >&5
  2923.   cat conftest.$ac_ext >&5
  2924.   rm -rf conftest*
  2925.   eval "ac_cv_func_$ac_func=no"
  2926. fi
  2927. rm -f conftest*
  2928. fi
  2929.  
  2930. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2931.   echo "$ac_t""yes" 1>&6
  2932.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2933.   cat >> confdefs.h <<EOF
  2934. #define $ac_tr_func 1
  2935. EOF
  2936.  
  2937. else
  2938.   echo "$ac_t""no" 1>&6
  2939. fi
  2940. done
  2941.  
  2942. for ac_func in tgetent
  2943. do
  2944. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2945. echo "configure:2930: checking for $ac_func" >&5
  2946. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2947.   echo $ac_n "(cached) $ac_c" 1>&6
  2948. else
  2949.   cat > conftest.$ac_ext <<EOF
  2950. #line 2935 "configure"
  2951. #include "confdefs.h"
  2952. /* System header to define __stub macros and hopefully few prototypes,
  2953.     which can conflict with char $ac_func(); below.  */
  2954. #include <assert.h>
  2955. /* Override any gcc2 internal prototype to avoid an error.  */
  2956. /* We use char because int might match the return type of a gcc2
  2957.     builtin and then its argument prototype would still apply.  */
  2958. char $ac_func();
  2959.  
  2960. int main() {
  2961.  
  2962. /* The GNU C library defines this for functions which it implements
  2963.     to always fail with ENOSYS.  Some functions are actually named
  2964.     something starting with __ and the normal name is an alias.  */
  2965. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2966. choke me
  2967. #else
  2968. $ac_func();
  2969. #endif
  2970.  
  2971. ; return 0; }
  2972. EOF
  2973. if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2974.   rm -rf conftest*
  2975.   eval "ac_cv_func_$ac_func=yes"
  2976. else
  2977.   echo "configure: failed program was:" >&5
  2978.   cat conftest.$ac_ext >&5
  2979.   rm -rf conftest*
  2980.   eval "ac_cv_func_$ac_func=no"
  2981. fi
  2982. rm -f conftest*
  2983. fi
  2984.  
  2985. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2986.   echo "$ac_t""yes" 1>&6
  2987.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2988.   cat >> confdefs.h <<EOF
  2989. #define $ac_tr_func 1
  2990. EOF
  2991.  
  2992. else
  2993.   echo "$ac_t""no" 1>&6
  2994. fi
  2995. done
  2996.  
  2997. LIBS="$saved_libs"
  2998.  
  2999. for ac_func in gethostbyname2
  3000. do
  3001. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3002. echo "configure:2987: checking for $ac_func" >&5
  3003. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3004.   echo $ac_n "(cached) $ac_c" 1>&6
  3005. else
  3006.   cat > conftest.$ac_ext <<EOF
  3007. #line 2992 "configure"
  3008. #include "confdefs.h"
  3009. /* System header to define __stub macros and hopefully few prototypes,
  3010.     which can conflict with char $ac_func(); below.  */
  3011. #include <assert.h>
  3012. /* Override any gcc2 internal prototype to avoid an error.  */
  3013. /* We use char because int might match the return type of a gcc2
  3014.     builtin and then its argument prototype would still apply.  */
  3015. char $ac_func();
  3016.  
  3017. int main() {
  3018.  
  3019. /* The GNU C library defines this for functions which it implements
  3020.     to always fail with ENOSYS.  Some functions are actually named
  3021.     something starting with __ and the normal name is an alias.  */
  3022. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3023. choke me
  3024. #else
  3025. $ac_func();
  3026. #endif
  3027.  
  3028. ; return 0; }
  3029. EOF
  3030. if { (eval echo configure:3015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3031.   rm -rf conftest*
  3032.   eval "ac_cv_func_$ac_func=yes"
  3033. else
  3034.   echo "configure: failed program was:" >&5
  3035.   cat conftest.$ac_ext >&5
  3036.   rm -rf conftest*
  3037.   eval "ac_cv_func_$ac_func=no"
  3038. fi
  3039. rm -f conftest*
  3040. fi
  3041.  
  3042. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3043.   echo "$ac_t""yes" 1>&6
  3044.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3045.   cat >> confdefs.h <<EOF
  3046. #define $ac_tr_func 1
  3047. EOF
  3048.  
  3049. else
  3050.   echo "$ac_t""no" 1>&6
  3051. fi
  3052. done
  3053.  
  3054. for ac_func in gethostbyname_r gethostbyaddr_r getpwuid_r getservbyname_r
  3055. do
  3056. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3057. echo "configure:3042: checking for $ac_func" >&5
  3058. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3059.   echo $ac_n "(cached) $ac_c" 1>&6
  3060. else
  3061.   cat > conftest.$ac_ext <<EOF
  3062. #line 3047 "configure"
  3063. #include "confdefs.h"
  3064. /* System header to define __stub macros and hopefully few prototypes,
  3065.     which can conflict with char $ac_func(); below.  */
  3066. #include <assert.h>
  3067. /* Override any gcc2 internal prototype to avoid an error.  */
  3068. /* We use char because int might match the return type of a gcc2
  3069.     builtin and then its argument prototype would still apply.  */
  3070. char $ac_func();
  3071.  
  3072. int main() {
  3073.  
  3074. /* The GNU C library defines this for functions which it implements
  3075.     to always fail with ENOSYS.  Some functions are actually named
  3076.     something starting with __ and the normal name is an alias.  */
  3077. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3078. choke me
  3079. #else
  3080. $ac_func();
  3081. #endif
  3082.  
  3083. ; return 0; }
  3084. EOF
  3085. if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3086.   rm -rf conftest*
  3087.   eval "ac_cv_func_$ac_func=yes"
  3088. else
  3089.   echo "configure: failed program was:" >&5
  3090.   cat conftest.$ac_ext >&5
  3091.   rm -rf conftest*
  3092.   eval "ac_cv_func_$ac_func=no"
  3093. fi
  3094. rm -f conftest*
  3095. fi
  3096.  
  3097. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3098.   echo "$ac_t""yes" 1>&6
  3099.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3100.   cat >> confdefs.h <<EOF
  3101. #define $ac_tr_func 1
  3102. EOF
  3103.  
  3104. else
  3105.   echo "$ac_t""no" 1>&6
  3106. fi
  3107. done
  3108.  
  3109. for ac_func in memset memcmp memmove strchr strrchr strdup strerror
  3110. do
  3111. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3112. echo "configure:3097: checking for $ac_func" >&5
  3113. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3114.   echo $ac_n "(cached) $ac_c" 1>&6
  3115. else
  3116.   cat > conftest.$ac_ext <<EOF
  3117. #line 3102 "configure"
  3118. #include "confdefs.h"
  3119. /* System header to define __stub macros and hopefully few prototypes,
  3120.     which can conflict with char $ac_func(); below.  */
  3121. #include <assert.h>
  3122. /* Override any gcc2 internal prototype to avoid an error.  */
  3123. /* We use char because int might match the return type of a gcc2
  3124.     builtin and then its argument prototype would still apply.  */
  3125. char $ac_func();
  3126.  
  3127. int main() {
  3128.  
  3129. /* The GNU C library defines this for functions which it implements
  3130.     to always fail with ENOSYS.  Some functions are actually named
  3131.     something starting with __ and the normal name is an alias.  */
  3132. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3133. choke me
  3134. #else
  3135. $ac_func();
  3136. #endif
  3137.  
  3138. ; return 0; }
  3139. EOF
  3140. if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3141.   rm -rf conftest*
  3142.   eval "ac_cv_func_$ac_func=yes"
  3143. else
  3144.   echo "configure: failed program was:" >&5
  3145.   cat conftest.$ac_ext >&5
  3146.   rm -rf conftest*
  3147.   eval "ac_cv_func_$ac_func=no"
  3148. fi
  3149. rm -f conftest*
  3150. fi
  3151.  
  3152. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3153.   echo "$ac_t""yes" 1>&6
  3154.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3155.   cat >> confdefs.h <<EOF
  3156. #define $ac_tr_func 1
  3157. EOF
  3158.  
  3159. else
  3160.   echo "$ac_t""no" 1>&6
  3161. fi
  3162. done
  3163.  
  3164. for ac_func in bcopy bcmp bzero index rindex
  3165. do
  3166. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3167. echo "configure:3152: checking for $ac_func" >&5
  3168. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3169.   echo $ac_n "(cached) $ac_c" 1>&6
  3170. else
  3171.   cat > conftest.$ac_ext <<EOF
  3172. #line 3157 "configure"
  3173. #include "confdefs.h"
  3174. /* System header to define __stub macros and hopefully few prototypes,
  3175.     which can conflict with char $ac_func(); below.  */
  3176. #include <assert.h>
  3177. /* Override any gcc2 internal prototype to avoid an error.  */
  3178. /* We use char because int might match the return type of a gcc2
  3179.     builtin and then its argument prototype would still apply.  */
  3180. char $ac_func();
  3181.  
  3182. int main() {
  3183.  
  3184. /* The GNU C library defines this for functions which it implements
  3185.     to always fail with ENOSYS.  Some functions are actually named
  3186.     something starting with __ and the normal name is an alias.  */
  3187. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3188. choke me
  3189. #else
  3190. $ac_func();
  3191. #endif
  3192.  
  3193. ; return 0; }
  3194. EOF
  3195. if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3196.   rm -rf conftest*
  3197.   eval "ac_cv_func_$ac_func=yes"
  3198. else
  3199.   echo "configure: failed program was:" >&5
  3200.   cat conftest.$ac_ext >&5
  3201.   rm -rf conftest*
  3202.   eval "ac_cv_func_$ac_func=no"
  3203. fi
  3204. rm -f conftest*
  3205. fi
  3206.  
  3207. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3208.   echo "$ac_t""yes" 1>&6
  3209.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3210.   cat >> confdefs.h <<EOF
  3211. #define $ac_tr_func 1
  3212. EOF
  3213.  
  3214. else
  3215.   echo "$ac_t""no" 1>&6
  3216. fi
  3217. done
  3218.  
  3219. for ac_func in setenv putenv unsetenv getenv
  3220. do
  3221. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3222. echo "configure:3207: checking for $ac_func" >&5
  3223. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3224.   echo $ac_n "(cached) $ac_c" 1>&6
  3225. else
  3226.   cat > conftest.$ac_ext <<EOF
  3227. #line 3212 "configure"
  3228. #include "confdefs.h"
  3229. /* System header to define __stub macros and hopefully few prototypes,
  3230.     which can conflict with char $ac_func(); below.  */
  3231. #include <assert.h>
  3232. /* Override any gcc2 internal prototype to avoid an error.  */
  3233. /* We use char because int might match the return type of a gcc2
  3234.     builtin and then its argument prototype would still apply.  */
  3235. char $ac_func();
  3236.  
  3237. int main() {
  3238.  
  3239. /* The GNU C library defines this for functions which it implements
  3240.     to always fail with ENOSYS.  Some functions are actually named
  3241.     something starting with __ and the normal name is an alias.  */
  3242. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3243. choke me
  3244. #else
  3245. $ac_func();
  3246. #endif
  3247.  
  3248. ; return 0; }
  3249. EOF
  3250. if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3251.   rm -rf conftest*
  3252.   eval "ac_cv_func_$ac_func=yes"
  3253. else
  3254.   echo "configure: failed program was:" >&5
  3255.   cat conftest.$ac_ext >&5
  3256.   rm -rf conftest*
  3257.   eval "ac_cv_func_$ac_func=no"
  3258. fi
  3259. rm -f conftest*
  3260. fi
  3261.  
  3262. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3263.   echo "$ac_t""yes" 1>&6
  3264.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3265.   cat >> confdefs.h <<EOF
  3266. #define $ac_tr_func 1
  3267. EOF
  3268.  
  3269. else
  3270.   echo "$ac_t""no" 1>&6
  3271. fi
  3272. done
  3273.  
  3274. for ac_func in getdomainname rresvport sendmsg setsid setpgid setpgrp getifaddrs
  3275. do
  3276. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3277. echo "configure:3262: checking for $ac_func" >&5
  3278. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3279.   echo $ac_n "(cached) $ac_c" 1>&6
  3280. else
  3281.   cat > conftest.$ac_ext <<EOF
  3282. #line 3267 "configure"
  3283. #include "confdefs.h"
  3284. /* System header to define __stub macros and hopefully few prototypes,
  3285.     which can conflict with char $ac_func(); below.  */
  3286. #include <assert.h>
  3287. /* Override any gcc2 internal prototype to avoid an error.  */
  3288. /* We use char because int might match the return type of a gcc2
  3289.     builtin and then its argument prototype would still apply.  */
  3290. char $ac_func();
  3291.  
  3292. int main() {
  3293.  
  3294. /* The GNU C library defines this for functions which it implements
  3295.     to always fail with ENOSYS.  Some functions are actually named
  3296.     something starting with __ and the normal name is an alias.  */
  3297. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3298. choke me
  3299. #else
  3300. $ac_func();
  3301. #endif
  3302.  
  3303. ; return 0; }
  3304. EOF
  3305. if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3306.   rm -rf conftest*
  3307.   eval "ac_cv_func_$ac_func=yes"
  3308. else
  3309.   echo "configure: failed program was:" >&5
  3310.   cat conftest.$ac_ext >&5
  3311.   rm -rf conftest*
  3312.   eval "ac_cv_func_$ac_func=no"
  3313. fi
  3314. rm -f conftest*
  3315. fi
  3316.  
  3317. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3318.   echo "$ac_t""yes" 1>&6
  3319.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3320.   cat >> confdefs.h <<EOF
  3321. #define $ac_tr_func 1
  3322. EOF
  3323.  
  3324. else
  3325.   echo "$ac_t""no" 1>&6
  3326. fi
  3327. done
  3328.  
  3329. for ac_func in waitpid flock dgettext sigaction sigprocmask
  3330. do
  3331. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3332. echo "configure:3317: checking for $ac_func" >&5
  3333. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3334.   echo $ac_n "(cached) $ac_c" 1>&6
  3335. else
  3336.   cat > conftest.$ac_ext <<EOF
  3337. #line 3322 "configure"
  3338. #include "confdefs.h"
  3339. /* System header to define __stub macros and hopefully few prototypes,
  3340.     which can conflict with char $ac_func(); below.  */
  3341. #include <assert.h>
  3342. /* Override any gcc2 internal prototype to avoid an error.  */
  3343. /* We use char because int might match the return type of a gcc2
  3344.     builtin and then its argument prototype would still apply.  */
  3345. char $ac_func();
  3346.  
  3347. int main() {
  3348.  
  3349. /* The GNU C library defines this for functions which it implements
  3350.     to always fail with ENOSYS.  Some functions are actually named
  3351.     something starting with __ and the normal name is an alias.  */
  3352. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3353. choke me
  3354. #else
  3355. $ac_func();
  3356. #endif
  3357.  
  3358. ; return 0; }
  3359. EOF
  3360. if { (eval echo configure:3345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3361.   rm -rf conftest*
  3362.   eval "ac_cv_func_$ac_func=yes"
  3363. else
  3364.   echo "configure: failed program was:" >&5
  3365.   cat conftest.$ac_ext >&5
  3366.   rm -rf conftest*
  3367.   eval "ac_cv_func_$ac_func=no"
  3368. fi
  3369. rm -f conftest*
  3370. fi
  3371.  
  3372. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3373.   echo "$ac_t""yes" 1>&6
  3374.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3375.   cat >> confdefs.h <<EOF
  3376. #define $ac_tr_func 1
  3377. EOF
  3378.  
  3379. else
  3380.   echo "$ac_t""no" 1>&6
  3381. fi
  3382. done
  3383.  
  3384. for ac_func in re_comp strspn getcwd vfork herror genget getopt
  3385. do
  3386. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3387. echo "configure:3372: checking for $ac_func" >&5
  3388. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3389.   echo $ac_n "(cached) $ac_c" 1>&6
  3390. else
  3391.   cat > conftest.$ac_ext <<EOF
  3392. #line 3377 "configure"
  3393. #include "confdefs.h"
  3394. /* System header to define __stub macros and hopefully few prototypes,
  3395.     which can conflict with char $ac_func(); below.  */
  3396. #include <assert.h>
  3397. /* Override any gcc2 internal prototype to avoid an error.  */
  3398. /* We use char because int might match the return type of a gcc2
  3399.     builtin and then its argument prototype would still apply.  */
  3400. char $ac_func();
  3401.  
  3402. int main() {
  3403.  
  3404. /* The GNU C library defines this for functions which it implements
  3405.     to always fail with ENOSYS.  Some functions are actually named
  3406.     something starting with __ and the normal name is an alias.  */
  3407. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3408. choke me
  3409. #else
  3410. $ac_func();
  3411. #endif
  3412.  
  3413. ; return 0; }
  3414. EOF
  3415. if { (eval echo configure:3400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3416.   rm -rf conftest*
  3417.   eval "ac_cv_func_$ac_func=yes"
  3418. else
  3419.   echo "configure: failed program was:" >&5
  3420.   cat conftest.$ac_ext >&5
  3421.   rm -rf conftest*
  3422.   eval "ac_cv_func_$ac_func=no"
  3423. fi
  3424. rm -f conftest*
  3425. fi
  3426.  
  3427. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3428.   echo "$ac_t""yes" 1>&6
  3429.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3430.   cat >> confdefs.h <<EOF
  3431. #define $ac_tr_func 1
  3432. EOF
  3433.  
  3434. else
  3435.   echo "$ac_t""no" 1>&6
  3436. fi
  3437. done
  3438.  
  3439. echo $ac_n "checking for vprintf""... $ac_c" 1>&6
  3440. echo "configure:3425: checking for vprintf" >&5
  3441. if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  3442.   echo $ac_n "(cached) $ac_c" 1>&6
  3443. else
  3444.   cat > conftest.$ac_ext <<EOF
  3445. #line 3430 "configure"
  3446. #include "confdefs.h"
  3447. /* System header to define __stub macros and hopefully few prototypes,
  3448.     which can conflict with char vprintf(); below.  */
  3449. #include <assert.h>
  3450. /* Override any gcc2 internal prototype to avoid an error.  */
  3451. /* We use char because int might match the return type of a gcc2
  3452.     builtin and then its argument prototype would still apply.  */
  3453. char vprintf();
  3454.  
  3455. int main() {
  3456.  
  3457. /* The GNU C library defines this for functions which it implements
  3458.     to always fail with ENOSYS.  Some functions are actually named
  3459.     something starting with __ and the normal name is an alias.  */
  3460. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  3461. choke me
  3462. #else
  3463. vprintf();
  3464. #endif
  3465.  
  3466. ; return 0; }
  3467. EOF
  3468. if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3469.   rm -rf conftest*
  3470.   eval "ac_cv_func_vprintf=yes"
  3471. else
  3472.   echo "configure: failed program was:" >&5
  3473.   cat conftest.$ac_ext >&5
  3474.   rm -rf conftest*
  3475.   eval "ac_cv_func_vprintf=no"
  3476. fi
  3477. rm -f conftest*
  3478. fi
  3479.  
  3480. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  3481.   echo "$ac_t""yes" 1>&6
  3482.   cat >> confdefs.h <<\EOF
  3483. #define HAVE_VPRINTF 1
  3484. EOF
  3485.  
  3486. else
  3487.   echo "$ac_t""no" 1>&6
  3488. fi
  3489.  
  3490. if test "$ac_cv_func_vprintf" != yes; then
  3491. echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
  3492. echo "configure:3477: checking for _doprnt" >&5
  3493. if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  3494.   echo $ac_n "(cached) $ac_c" 1>&6
  3495. else
  3496.   cat > conftest.$ac_ext <<EOF
  3497. #line 3482 "configure"
  3498. #include "confdefs.h"
  3499. /* System header to define __stub macros and hopefully few prototypes,
  3500.     which can conflict with char _doprnt(); below.  */
  3501. #include <assert.h>
  3502. /* Override any gcc2 internal prototype to avoid an error.  */
  3503. /* We use char because int might match the return type of a gcc2
  3504.     builtin and then its argument prototype would still apply.  */
  3505. char _doprnt();
  3506.  
  3507. int main() {
  3508.  
  3509. /* The GNU C library defines this for functions which it implements
  3510.     to always fail with ENOSYS.  Some functions are actually named
  3511.     something starting with __ and the normal name is an alias.  */
  3512. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  3513. choke me
  3514. #else
  3515. _doprnt();
  3516. #endif
  3517.  
  3518. ; return 0; }
  3519. EOF
  3520. if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3521.   rm -rf conftest*
  3522.   eval "ac_cv_func__doprnt=yes"
  3523. else
  3524.   echo "configure: failed program was:" >&5
  3525.   cat conftest.$ac_ext >&5
  3526.   rm -rf conftest*
  3527.   eval "ac_cv_func__doprnt=no"
  3528. fi
  3529. rm -f conftest*
  3530. fi
  3531.  
  3532. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  3533.   echo "$ac_t""yes" 1>&6
  3534.   cat >> confdefs.h <<\EOF
  3535. #define HAVE_DOPRNT 1
  3536. EOF
  3537.  
  3538. else
  3539.   echo "$ac_t""no" 1>&6
  3540. fi
  3541.  
  3542. fi
  3543.  
  3544. echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
  3545. echo "configure:3530: checking whether setpgrp takes no argument" >&5
  3546. if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
  3547.   echo $ac_n "(cached) $ac_c" 1>&6
  3548. else
  3549.   if test "$cross_compiling" = yes; then
  3550.   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
  3551. else
  3552.   cat > conftest.$ac_ext <<EOF
  3553. #line 3538 "configure"
  3554. #include "confdefs.h"
  3555.  
  3556. /*
  3557.  * If this system has a BSD-style setpgrp, which takes arguments, exit
  3558.  * successfully.
  3559.  */
  3560. main()
  3561. {
  3562.     if (setpgrp(1,1) == -1)
  3563.     exit(0);
  3564.     else
  3565.     exit(1);
  3566. }
  3567.  
  3568. EOF
  3569. if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3570. then
  3571.   ac_cv_func_setpgrp_void=no
  3572. else
  3573.   echo "configure: failed program was:" >&5
  3574.   cat conftest.$ac_ext >&5
  3575.   rm -fr conftest*
  3576.   ac_cv_func_setpgrp_void=yes
  3577. fi
  3578. rm -fr conftest*
  3579. fi
  3580.  
  3581.  
  3582. fi
  3583.  
  3584. echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
  3585. if test $ac_cv_func_setpgrp_void = yes; then
  3586.   cat >> confdefs.h <<\EOF
  3587. #define SETPGRP_VOID 1
  3588. EOF
  3589.  
  3590. fi
  3591.  
  3592.  
  3593. # Check whether --with-krb5 or --without-krb5 was given.
  3594. if test "${with_krb5+set}" = set; then
  3595.   withval="$with_krb5"
  3596.   KRB5="$withval"
  3597. else
  3598.   KRB5="no"
  3599. fi
  3600.  
  3601. if test "$KRB5" != "no"; then
  3602. echo
  3603. echo $ac_n "checking Kerberos 5""... $ac_c" 1>&6
  3604. echo "configure:3589: checking Kerberos 5" >&5
  3605. if eval "test \"`echo '$''{'r_cv_krb5_home'+set}'`\" = set"; then
  3606.   echo $ac_n "(cached) $ac_c" 1>&6
  3607. else
  3608.   
  3609. if test "$KRB5" = "yes" -o "$KRB5" = ""; then
  3610.     r_cv_krb5_home=`egrep \^klogin /etc/inetd.conf|awk '{print $6;}'|awk -F/ '{ORS="/";for(i=1;i<=NF-2;i++) print $i;}'`
  3611. else
  3612.     r_cv_krb5_home=$KRB5
  3613. fi
  3614. fi
  3615.  
  3616. if test "$KRB5" = "" -a "$r_cv_krb5_home" != "" -a  ! -d $r_cv_krb5_home/include/krb5; then
  3617.     r_cv_krb5_home=""
  3618. fi
  3619. KRB5_HOME=$r_cv_krb5_home
  3620. if test "$KRB5_HOME" != ""; then
  3621.     echo "$ac_t"""$KRB5_HOME"" 1>&6
  3622. elif test "$KRB5" != ""; then
  3623.     echo "$ac_t"""default"" 1>&6
  3624. else 
  3625.     echo "$ac_t"""no"" 1>&6
  3626. fi
  3627. if test "$KRB5" != "" -o "$KRB5_HOME" != ""; then
  3628.     if test "$KRB5_HOME" != ""; then
  3629.         CFLAGS="$CFLAGS -I$KRB5_HOME/include"
  3630.         LDFLAGS="$LDFLAGS -L$KRB5_HOME/lib"
  3631.     fi
  3632.     echo $ac_n "checking for main in -ldb""... $ac_c" 1>&6
  3633. echo "configure:3618: checking for main in -ldb" >&5
  3634. ac_lib_var=`echo db'_'main | sed 'y%./+-%__p_%'`
  3635. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3636.   echo $ac_n "(cached) $ac_c" 1>&6
  3637. else
  3638.   ac_save_LIBS="$LIBS"
  3639. LIBS="-ldb  $LIBS"
  3640. cat > conftest.$ac_ext <<EOF
  3641. #line 3626 "configure"
  3642. #include "confdefs.h"
  3643.  
  3644. int main() {
  3645. main()
  3646. ; return 0; }
  3647. EOF
  3648. if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3649.   rm -rf conftest*
  3650.   eval "ac_cv_lib_$ac_lib_var=yes"
  3651. else
  3652.   echo "configure: failed program was:" >&5
  3653.   cat conftest.$ac_ext >&5
  3654.   rm -rf conftest*
  3655.   eval "ac_cv_lib_$ac_lib_var=no"
  3656. fi
  3657. rm -f conftest*
  3658. LIBS="$ac_save_LIBS"
  3659.  
  3660. fi
  3661. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3662.   echo "$ac_t""yes" 1>&6
  3663.     ac_tr_lib=HAVE_LIB`echo db | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3664.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3665.   cat >> confdefs.h <<EOF
  3666. #define $ac_tr_lib 1
  3667. EOF
  3668.  
  3669.   LIBS="-ldb $LIBS"
  3670.  
  3671. else
  3672.   echo "$ac_t""no" 1>&6
  3673. fi
  3674.  
  3675.         if test "$ac_cv_lib_db_main" = "no"; then
  3676.         echo $ac_n "checking for main in -lndbm""... $ac_c" 1>&6
  3677. echo "configure:3662: checking for main in -lndbm" >&5
  3678. ac_lib_var=`echo ndbm'_'main | sed 'y%./+-%__p_%'`
  3679. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3680.   echo $ac_n "(cached) $ac_c" 1>&6
  3681. else
  3682.   ac_save_LIBS="$LIBS"
  3683. LIBS="-lndbm  $LIBS"
  3684. cat > conftest.$ac_ext <<EOF
  3685. #line 3670 "configure"
  3686. #include "confdefs.h"
  3687.  
  3688. int main() {
  3689. main()
  3690. ; return 0; }
  3691. EOF
  3692. if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3693.   rm -rf conftest*
  3694.   eval "ac_cv_lib_$ac_lib_var=yes"
  3695. else
  3696.   echo "configure: failed program was:" >&5
  3697.   cat conftest.$ac_ext >&5
  3698.   rm -rf conftest*
  3699.   eval "ac_cv_lib_$ac_lib_var=no"
  3700. fi
  3701. rm -f conftest*
  3702. LIBS="$ac_save_LIBS"
  3703.  
  3704. fi
  3705. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3706.   echo "$ac_t""yes" 1>&6
  3707.     ac_tr_lib=HAVE_LIB`echo ndbm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3708.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3709.   cat >> confdefs.h <<EOF
  3710. #define $ac_tr_lib 1
  3711. EOF
  3712.  
  3713.   LIBS="-lndbm $LIBS"
  3714.  
  3715. else
  3716.   echo "$ac_t""no" 1>&6
  3717. fi
  3718.  
  3719.     fi
  3720.     echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
  3721. echo "configure:3706: checking for main in -lisode" >&5
  3722. ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
  3723. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3724.   echo $ac_n "(cached) $ac_c" 1>&6
  3725. else
  3726.   ac_save_LIBS="$LIBS"
  3727. LIBS="-lisode  $LIBS"
  3728. cat > conftest.$ac_ext <<EOF
  3729. #line 3714 "configure"
  3730. #include "confdefs.h"
  3731.  
  3732. int main() {
  3733. main()
  3734. ; return 0; }
  3735. EOF
  3736. if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3737.   rm -rf conftest*
  3738.   eval "ac_cv_lib_$ac_lib_var=yes"
  3739. else
  3740.   echo "configure: failed program was:" >&5
  3741.   cat conftest.$ac_ext >&5
  3742.   rm -rf conftest*
  3743.   eval "ac_cv_lib_$ac_lib_var=no"
  3744. fi
  3745. rm -f conftest*
  3746. LIBS="$ac_save_LIBS"
  3747.  
  3748. fi
  3749. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3750.   echo "$ac_t""yes" 1>&6
  3751.     ac_tr_lib=HAVE_LIB`echo isode | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3752.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3753.   cat >> confdefs.h <<EOF
  3754. #define $ac_tr_lib 1
  3755. EOF
  3756.  
  3757.   LIBS="-lisode $LIBS"
  3758.  
  3759. else
  3760.   echo "$ac_t""no" 1>&6
  3761. fi
  3762.  
  3763.     echo $ac_n "checking for main in -lcom_err""... $ac_c" 1>&6
  3764. echo "configure:3749: checking for main in -lcom_err" >&5
  3765. ac_lib_var=`echo com_err'_'main | sed 'y%./+-%__p_%'`
  3766. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3767.   echo $ac_n "(cached) $ac_c" 1>&6
  3768. else
  3769.   ac_save_LIBS="$LIBS"
  3770. LIBS="-lcom_err  $LIBS"
  3771. cat > conftest.$ac_ext <<EOF
  3772. #line 3757 "configure"
  3773. #include "confdefs.h"
  3774.  
  3775. int main() {
  3776. main()
  3777. ; return 0; }
  3778. EOF
  3779. if { (eval echo configure:3764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3780.   rm -rf conftest*
  3781.   eval "ac_cv_lib_$ac_lib_var=yes"
  3782. else
  3783.   echo "configure: failed program was:" >&5
  3784.   cat conftest.$ac_ext >&5
  3785.   rm -rf conftest*
  3786.   eval "ac_cv_lib_$ac_lib_var=no"
  3787. fi
  3788. rm -f conftest*
  3789. LIBS="$ac_save_LIBS"
  3790.  
  3791. fi
  3792. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3793.   echo "$ac_t""yes" 1>&6
  3794.     ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3795.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3796.   cat >> confdefs.h <<EOF
  3797. #define $ac_tr_lib 1
  3798. EOF
  3799.  
  3800.   LIBS="-lcom_err $LIBS"
  3801.  
  3802. else
  3803.   echo "$ac_t""no" 1>&6
  3804. fi
  3805.  
  3806.     echo $ac_n "checking for main in -lcrypto""... $ac_c" 1>&6
  3807. echo "configure:3792: checking for main in -lcrypto" >&5
  3808. ac_lib_var=`echo crypto'_'main | sed 'y%./+-%__p_%'`
  3809. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3810.   echo $ac_n "(cached) $ac_c" 1>&6
  3811. else
  3812.   ac_save_LIBS="$LIBS"
  3813. LIBS="-lcrypto  $LIBS"
  3814. cat > conftest.$ac_ext <<EOF
  3815. #line 3800 "configure"
  3816. #include "confdefs.h"
  3817.  
  3818. int main() {
  3819. main()
  3820. ; return 0; }
  3821. EOF
  3822. if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3823.   rm -rf conftest*
  3824.   eval "ac_cv_lib_$ac_lib_var=yes"
  3825. else
  3826.   echo "configure: failed program was:" >&5
  3827.   cat conftest.$ac_ext >&5
  3828.   rm -rf conftest*
  3829.   eval "ac_cv_lib_$ac_lib_var=no"
  3830. fi
  3831. rm -f conftest*
  3832. LIBS="$ac_save_LIBS"
  3833.  
  3834. fi
  3835. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3836.   echo "$ac_t""yes" 1>&6
  3837.     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3838.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3839.   cat >> confdefs.h <<EOF
  3840. #define $ac_tr_lib 1
  3841. EOF
  3842.  
  3843.   LIBS="-lcrypto $LIBS"
  3844.  
  3845. else
  3846.   echo "$ac_t""no" 1>&6
  3847. fi
  3848.  
  3849.     echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
  3850. echo "configure:3835: checking for main in -lkrb5" >&5
  3851. ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
  3852. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3853.   echo $ac_n "(cached) $ac_c" 1>&6
  3854. else
  3855.   ac_save_LIBS="$LIBS"
  3856. LIBS="-lkrb5  $LIBS"
  3857. cat > conftest.$ac_ext <<EOF
  3858. #line 3843 "configure"
  3859. #include "confdefs.h"
  3860.  
  3861. int main() {
  3862. main()
  3863. ; return 0; }
  3864. EOF
  3865. if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3866.   rm -rf conftest*
  3867.   eval "ac_cv_lib_$ac_lib_var=yes"
  3868. else
  3869.   echo "configure: failed program was:" >&5
  3870.   cat conftest.$ac_ext >&5
  3871.   rm -rf conftest*
  3872.   eval "ac_cv_lib_$ac_lib_var=no"
  3873. fi
  3874. rm -f conftest*
  3875. LIBS="$ac_save_LIBS"
  3876.  
  3877. fi
  3878. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3879.   echo "$ac_t""yes" 1>&6
  3880.     ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3881.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3882.   cat >> confdefs.h <<EOF
  3883. #define $ac_tr_lib 1
  3884. EOF
  3885.  
  3886.   LIBS="-lkrb5 $LIBS"
  3887.  
  3888. else
  3889.   echo "$ac_t""no" 1>&6
  3890. fi
  3891.  
  3892.     echo $ac_n "checking for main in -lgssapi_krb5""... $ac_c" 1>&6
  3893. echo "configure:3878: checking for main in -lgssapi_krb5" >&5
  3894. ac_lib_var=`echo gssapi_krb5'_'main | sed 'y%./+-%__p_%'`
  3895. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3896.   echo $ac_n "(cached) $ac_c" 1>&6
  3897. else
  3898.   ac_save_LIBS="$LIBS"
  3899. LIBS="-lgssapi_krb5  $LIBS"
  3900. cat > conftest.$ac_ext <<EOF
  3901. #line 3886 "configure"
  3902. #include "confdefs.h"
  3903.  
  3904. int main() {
  3905. main()
  3906. ; return 0; }
  3907. EOF
  3908. if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3909.   rm -rf conftest*
  3910.   eval "ac_cv_lib_$ac_lib_var=yes"
  3911. else
  3912.   echo "configure: failed program was:" >&5
  3913.   cat conftest.$ac_ext >&5
  3914.   rm -rf conftest*
  3915.   eval "ac_cv_lib_$ac_lib_var=no"
  3916. fi
  3917. rm -f conftest*
  3918. LIBS="$ac_save_LIBS"
  3919.  
  3920. fi
  3921. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3922.   echo "$ac_t""yes" 1>&6
  3923.     ac_tr_lib=HAVE_LIB`echo gssapi_krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3924.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3925.   cat >> confdefs.h <<EOF
  3926. #define $ac_tr_lib 1
  3927. EOF
  3928.  
  3929.   LIBS="-lgssapi_krb5 $LIBS"
  3930.  
  3931. else
  3932.   echo "$ac_t""no" 1>&6
  3933. fi
  3934.  
  3935. fi
  3936. fi
  3937.  
  3938.  
  3939. # Check whether --with-ident or --without-ident was given.
  3940. if test "${with_ident+set}" = set; then
  3941.   withval="$with_ident"
  3942.   IDENT="$withval"
  3943. else
  3944.   IDENT="no"
  3945. fi
  3946.  
  3947. if test "$IDENT" != "no"; then
  3948.     if test "$IDENT" != "yes"; then
  3949.     CFLAGS="$CFLAGS -I$IDENT/include"
  3950.     LDFLAGS="$LDFLAGS -L$IDENT/lib -lident"
  3951.     fi
  3952.     
  3953. SAVED_CPPFLAGS="$CPPFLAGS"
  3954. if test "$IDENT" != ""; then
  3955. CPPFLAGS="$CPPFLAGS -I$IDENT/include"
  3956. fi
  3957. for ac_hdr in ident.h
  3958. do
  3959. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3960. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3961. echo "configure:3946: checking for $ac_hdr" >&5
  3962. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3963.   echo $ac_n "(cached) $ac_c" 1>&6
  3964. else
  3965.   cat > conftest.$ac_ext <<EOF
  3966. #line 3951 "configure"
  3967. #include "confdefs.h"
  3968. #include <$ac_hdr>
  3969. EOF
  3970. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3971. { (eval echo configure:3956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3972. ac_err=`grep -v '^ *+' conftest.out`
  3973. if test -z "$ac_err"; then
  3974.   rm -rf conftest*
  3975.   eval "ac_cv_header_$ac_safe=yes"
  3976. else
  3977.   echo "$ac_err" >&5
  3978.   echo "configure: failed program was:" >&5
  3979.   cat conftest.$ac_ext >&5
  3980.   rm -rf conftest*
  3981.   eval "ac_cv_header_$ac_safe=no"
  3982. fi
  3983. rm -f conftest*
  3984. fi
  3985. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3986.   echo "$ac_t""yes" 1>&6
  3987.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3988.   cat >> confdefs.h <<EOF
  3989. #define $ac_tr_hdr 1
  3990. EOF
  3991.  
  3992. else
  3993.   echo "$ac_t""no" 1>&6
  3994. fi
  3995. done
  3996.  
  3997. CPPFLAGS="$SAVED_CPPFLAGS"
  3998.  
  3999.     echo $ac_n "checking for main in -lident""... $ac_c" 1>&6
  4000. echo "configure:3985: checking for main in -lident" >&5
  4001. ac_lib_var=`echo ident'_'main | sed 'y%./+-%__p_%'`
  4002. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4003.   echo $ac_n "(cached) $ac_c" 1>&6
  4004. else
  4005.   ac_save_LIBS="$LIBS"
  4006. LIBS="-lident  $LIBS"
  4007. cat > conftest.$ac_ext <<EOF
  4008. #line 3993 "configure"
  4009. #include "confdefs.h"
  4010.  
  4011. int main() {
  4012. main()
  4013. ; return 0; }
  4014. EOF
  4015. if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4016.   rm -rf conftest*
  4017.   eval "ac_cv_lib_$ac_lib_var=yes"
  4018. else
  4019.   echo "configure: failed program was:" >&5
  4020.   cat conftest.$ac_ext >&5
  4021.   rm -rf conftest*
  4022.   eval "ac_cv_lib_$ac_lib_var=no"
  4023. fi
  4024. rm -f conftest*
  4025. LIBS="$ac_save_LIBS"
  4026.  
  4027. fi
  4028. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4029.   echo "$ac_t""yes" 1>&6
  4030.   cat >> confdefs.h <<\EOF
  4031. #define HAVE_LIBIDENT 1
  4032. EOF
  4033.  SERVER_LIBS="$SERVER_LIBS -lident"
  4034. else
  4035.   echo "$ac_t""no" 1>&6
  4036. fi
  4037.  
  4038. fi
  4039.  
  4040.  
  4041. echo
  4042.  
  4043. # Extract the first word of "finger", so it can be a program name with args.
  4044. set dummy finger; ac_word=$2
  4045. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4046. echo "configure:4031: checking for $ac_word" >&5
  4047. if eval "test \"`echo '$''{'ac_cv_path_ORIG_FINGER'+set}'`\" = set"; then
  4048.   echo $ac_n "(cached) $ac_c" 1>&6
  4049. else
  4050.   case "$ORIG_FINGER" in
  4051.   /*)
  4052.   ac_cv_path_ORIG_FINGER="$ORIG_FINGER" # Let the user override the test with a path.
  4053.   ;;
  4054.   *)
  4055.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4056.   for ac_dir in $PATH; do
  4057.     test -z "$ac_dir" && ac_dir=.
  4058.     if test -f $ac_dir/$ac_word; then
  4059.       ac_cv_path_ORIG_FINGER="$ac_dir/$ac_word"
  4060.       break
  4061.     fi
  4062.   done
  4063.   IFS="$ac_save_ifs"
  4064.   ;;
  4065. esac
  4066. fi
  4067. ORIG_FINGER="$ac_cv_path_ORIG_FINGER"
  4068. if test -n "$ORIG_FINGER"; then
  4069.   echo "$ac_t""$ORIG_FINGER" 1>&6
  4070. else
  4071.   echo "$ac_t""no" 1>&6
  4072. fi
  4073.  
  4074. # Extract the first word of "traceroute", so it can be a program name with args.
  4075. set dummy traceroute; ac_word=$2
  4076. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4077. echo "configure:4062: checking for $ac_word" >&5
  4078. if eval "test \"`echo '$''{'ac_cv_path_TROUTEPROG'+set}'`\" = set"; then
  4079.   echo $ac_n "(cached) $ac_c" 1>&6
  4080. else
  4081.   case "$TROUTEPROG" in
  4082.   /*)
  4083.   ac_cv_path_TROUTEPROG="$TROUTEPROG" # Let the user override the test with a path.
  4084.   ;;
  4085.   *)
  4086.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4087.   for ac_dir in $PATH; do
  4088.     test -z "$ac_dir" && ac_dir=.
  4089.     if test -f $ac_dir/$ac_word; then
  4090.       ac_cv_path_TROUTEPROG="$ac_dir/$ac_word"
  4091.       break
  4092.     fi
  4093.   done
  4094.   IFS="$ac_save_ifs"
  4095.   ;;
  4096. esac
  4097. fi
  4098. TROUTEPROG="$ac_cv_path_TROUTEPROG"
  4099. if test -n "$TROUTEPROG"; then
  4100.   echo "$ac_t""$TROUTEPROG" 1>&6
  4101. else
  4102.   echo "$ac_t""no" 1>&6
  4103. fi
  4104.  
  4105. if test "$TROUTEPROG" != ""; then 
  4106. cat >> confdefs.h <<EOF
  4107. #define TROUTEPROG "$TROUTEPROG"
  4108. EOF
  4109.  
  4110. fi
  4111. # Extract the first word of "ping", so it can be a program name with args.
  4112. set dummy ping; ac_word=$2
  4113. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4114. echo "configure:4099: checking for $ac_word" >&5
  4115. if eval "test \"`echo '$''{'ac_cv_path_PINGPROG'+set}'`\" = set"; then
  4116.   echo $ac_n "(cached) $ac_c" 1>&6
  4117. else
  4118.   case "$PINGPROG" in
  4119.   /*)
  4120.   ac_cv_path_PINGPROG="$PINGPROG" # Let the user override the test with a path.
  4121.   ;;
  4122.   *)
  4123.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4124.   for ac_dir in $PATH; do
  4125.     test -z "$ac_dir" && ac_dir=.
  4126.     if test -f $ac_dir/$ac_word; then
  4127.       ac_cv_path_PINGPROG="$ac_dir/$ac_word"
  4128.       break
  4129.     fi
  4130.   done
  4131.   IFS="$ac_save_ifs"
  4132.   ;;
  4133. esac
  4134. fi
  4135. PINGPROG="$ac_cv_path_PINGPROG"
  4136. if test -n "$PINGPROG"; then
  4137.   echo "$ac_t""$PINGPROG" 1>&6
  4138. else
  4139.   echo "$ac_t""no" 1>&6
  4140. fi
  4141.  
  4142. if test "$PINGPROG" != "";  then 
  4143. cat >> confdefs.h <<EOF
  4144. #define PINGPROG "$PINGPROG"
  4145. EOF
  4146.  
  4147. fi
  4148.  
  4149. echo
  4150.  
  4151. SRVPID_FILE="/tmp/socks5.pid"
  4152. SRVCONF_FILE="/etc/socks5.conf"
  4153. SRVIDT_FILE="/tmp/socks5.ident"
  4154. LIBCONF_FILE="/etc/libsocks5.conf"
  4155.  
  4156. # Check whether --with-debug or --without-debug was given.
  4157. if test "${with_debug+set}" = set; then
  4158.   withval="$with_debug"
  4159.   if test "$GCC" = "yes"; then CDEBUG_FLAGS="-g -Wall -Wno-comment"; else CDEBUG_FLAGS="-g"; fi
  4160. fi
  4161.  
  4162. # Check whether --with-static or --without-static was given.
  4163. if test "${with_static+set}" = set; then
  4164.   withval="$with_static"
  4165.   if test "$withval" != "yes"; then CC="$CC $withval" ; else CC="$CC -static" ;  fi
  4166. fi
  4167.  
  4168. # Check whether --with-threads or --without-threads was given.
  4169. if test "${with_threads+set}" = set; then
  4170.   withval="$with_threads"
  4171.   threads="$withval"
  4172. else
  4173.   threads="no"
  4174. fi
  4175.  
  4176. if test "$threads" != "no"; then
  4177.         CFLAGS="$CFLAGS -D_THREAD_SAFE"
  4178.     if test "$threads" != "yes"; then
  4179.                 CFLAGS="$CFLAGS -D_THREAD_SAFE -I$threads/include"
  4180.                 LDFLAGS="$LDFLAGS -L$threads/lib"
  4181.     fi;
  4182.     cat >> confdefs.h <<\EOF
  4183. #define USE_THREADS 1
  4184. EOF
  4185.  
  4186.     
  4187. SAVED_CPPFLAGS="$CPPFLAGS"
  4188. if test "$threads" != ""; then
  4189. CPPFLAGS="$CPPFLAGS -I$threads/include"
  4190. fi
  4191. for ac_hdr in pthread.h
  4192. do
  4193. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4194. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  4195. echo "configure:4180: checking for $ac_hdr" >&5
  4196. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4197.   echo $ac_n "(cached) $ac_c" 1>&6
  4198. else
  4199.   cat > conftest.$ac_ext <<EOF
  4200. #line 4185 "configure"
  4201. #include "confdefs.h"
  4202. #include <$ac_hdr>
  4203. EOF
  4204. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4205. { (eval echo configure:4190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4206. ac_err=`grep -v '^ *+' conftest.out`
  4207. if test -z "$ac_err"; then
  4208.   rm -rf conftest*
  4209.   eval "ac_cv_header_$ac_safe=yes"
  4210. else
  4211.   echo "$ac_err" >&5
  4212.   echo "configure: failed program was:" >&5
  4213.   cat conftest.$ac_ext >&5
  4214.   rm -rf conftest*
  4215.   eval "ac_cv_header_$ac_safe=no"
  4216. fi
  4217. rm -f conftest*
  4218. fi
  4219. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4220.   echo "$ac_t""yes" 1>&6
  4221.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4222.   cat >> confdefs.h <<EOF
  4223. #define $ac_tr_hdr 1
  4224. EOF
  4225.  
  4226. else
  4227.   echo "$ac_t""no" 1>&6
  4228. fi
  4229. done
  4230.  
  4231. CPPFLAGS="$SAVED_CPPFLAGS"
  4232.  
  4233. saved_libs="$LIBS"
  4234.         echo $ac_n "checking for main in -lpthreads""... $ac_c" 1>&6
  4235. echo "configure:4220: checking for main in -lpthreads" >&5
  4236. ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'`
  4237. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4238.   echo $ac_n "(cached) $ac_c" 1>&6
  4239. else
  4240.   ac_save_LIBS="$LIBS"
  4241. LIBS="-lpthreads  $LIBS"
  4242. cat > conftest.$ac_ext <<EOF
  4243. #line 4228 "configure"
  4244. #include "confdefs.h"
  4245.  
  4246. int main() {
  4247. main()
  4248. ; return 0; }
  4249. EOF
  4250. if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4251.   rm -rf conftest*
  4252.   eval "ac_cv_lib_$ac_lib_var=yes"
  4253. else
  4254.   echo "configure: failed program was:" >&5
  4255.   cat conftest.$ac_ext >&5
  4256.   rm -rf conftest*
  4257.   eval "ac_cv_lib_$ac_lib_var=no"
  4258. fi
  4259. rm -f conftest*
  4260. LIBS="$ac_save_LIBS"
  4261.  
  4262. fi
  4263. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4264.   echo "$ac_t""yes" 1>&6
  4265.   LIBS="-lpthreads $LIBS";SERVER_LIBS="$SERVER_LIBS -lpthreads"
  4266. else
  4267.   echo "$ac_t""no" 1>&6
  4268. fi
  4269.  
  4270.         echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
  4271. echo "configure:4256: checking for main in -lpthread" >&5
  4272. ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
  4273. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4274.   echo $ac_n "(cached) $ac_c" 1>&6
  4275. else
  4276.   ac_save_LIBS="$LIBS"
  4277. LIBS="-lpthread  $LIBS"
  4278. cat > conftest.$ac_ext <<EOF
  4279. #line 4264 "configure"
  4280. #include "confdefs.h"
  4281.  
  4282. int main() {
  4283. main()
  4284. ; return 0; }
  4285. EOF
  4286. if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4287.   rm -rf conftest*
  4288.   eval "ac_cv_lib_$ac_lib_var=yes"
  4289. else
  4290.   echo "configure: failed program was:" >&5
  4291.   cat conftest.$ac_ext >&5
  4292.   rm -rf conftest*
  4293.   eval "ac_cv_lib_$ac_lib_var=no"
  4294. fi
  4295. rm -f conftest*
  4296. LIBS="$ac_save_LIBS"
  4297.  
  4298. fi
  4299. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4300.   echo "$ac_t""yes" 1>&6
  4301.   LIBS="-lpthread $LIBS";SERVER_LIBS="$SERVER_LIBS -lpthread"
  4302. else
  4303.   echo "$ac_t""no" 1>&6
  4304. fi
  4305.  
  4306.         if test "$GCC" = "yes"; then
  4307.             if test "$OS" = "AIX"; then
  4308.                     SERVER_LIBS="$SERVER_LIBS -lc_r"
  4309.                     EXTRA_LDFLAGS="-nostartfiles"
  4310.                     EXTRA_OBJS="/lib/crt0_r.o"
  4311.             fi;
  4312.             if test "$OS" = "OSF1"; then
  4313.                     SERVER_LIBS="$SERVER_LIBS -lmach -lc_r"
  4314.             fi;
  4315.             if test "$OS" = "HP-UX"; then
  4316.                 case "$OSVER" in
  4317.                 *10.*)
  4318.                     SERVER_LIBS="$SERVER_LIBS -lcma -lc_r"
  4319.             LIBS="-lcma -lc_r $LIBS"
  4320.                 esac
  4321.             fi;
  4322.         fi;
  4323.         for ac_func in pthread_create pthread_self pthread_exit
  4324. do
  4325. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4326. echo "configure:4311: checking for $ac_func" >&5
  4327. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4328.   echo $ac_n "(cached) $ac_c" 1>&6
  4329. else
  4330.   cat > conftest.$ac_ext <<EOF
  4331. #line 4316 "configure"
  4332. #include "confdefs.h"
  4333. /* System header to define __stub macros and hopefully few prototypes,
  4334.     which can conflict with char $ac_func(); below.  */
  4335. #include <assert.h>
  4336. /* Override any gcc2 internal prototype to avoid an error.  */
  4337. /* We use char because int might match the return type of a gcc2
  4338.     builtin and then its argument prototype would still apply.  */
  4339. char $ac_func();
  4340.  
  4341. int main() {
  4342.  
  4343. /* The GNU C library defines this for functions which it implements
  4344.     to always fail with ENOSYS.  Some functions are actually named
  4345.     something starting with __ and the normal name is an alias.  */
  4346. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4347. choke me
  4348. #else
  4349. $ac_func();
  4350. #endif
  4351.  
  4352. ; return 0; }
  4353. EOF
  4354. if { (eval echo configure:4339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4355.   rm -rf conftest*
  4356.   eval "ac_cv_func_$ac_func=yes"
  4357. else
  4358.   echo "configure: failed program was:" >&5
  4359.   cat conftest.$ac_ext >&5
  4360.   rm -rf conftest*
  4361.   eval "ac_cv_func_$ac_func=no"
  4362. fi
  4363. rm -f conftest*
  4364. fi
  4365.  
  4366. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4367.   echo "$ac_t""yes" 1>&6
  4368.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4369.   cat >> confdefs.h <<EOF
  4370. #define $ac_tr_func 1
  4371. EOF
  4372.  
  4373. else
  4374.   echo "$ac_t""no" 1>&6
  4375. fi
  4376. done
  4377.  
  4378.         for ac_func in pthread_attr_init pthread_attr_setscope
  4379. do
  4380. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4381. echo "configure:4366: checking for $ac_func" >&5
  4382. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4383.   echo $ac_n "(cached) $ac_c" 1>&6
  4384. else
  4385.   cat > conftest.$ac_ext <<EOF
  4386. #line 4371 "configure"
  4387. #include "confdefs.h"
  4388. /* System header to define __stub macros and hopefully few prototypes,
  4389.     which can conflict with char $ac_func(); below.  */
  4390. #include <assert.h>
  4391. /* Override any gcc2 internal prototype to avoid an error.  */
  4392. /* We use char because int might match the return type of a gcc2
  4393.     builtin and then its argument prototype would still apply.  */
  4394. char $ac_func();
  4395.  
  4396. int main() {
  4397.  
  4398. /* The GNU C library defines this for functions which it implements
  4399.     to always fail with ENOSYS.  Some functions are actually named
  4400.     something starting with __ and the normal name is an alias.  */
  4401. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4402. choke me
  4403. #else
  4404. $ac_func();
  4405. #endif
  4406.  
  4407. ; return 0; }
  4408. EOF
  4409. if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4410.   rm -rf conftest*
  4411.   eval "ac_cv_func_$ac_func=yes"
  4412. else
  4413.   echo "configure: failed program was:" >&5
  4414.   cat conftest.$ac_ext >&5
  4415.   rm -rf conftest*
  4416.   eval "ac_cv_func_$ac_func=no"
  4417. fi
  4418. rm -f conftest*
  4419. fi
  4420.  
  4421. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4422.   echo "$ac_t""yes" 1>&6
  4423.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4424.   cat >> confdefs.h <<EOF
  4425. #define $ac_tr_func 1
  4426. EOF
  4427.  
  4428. else
  4429.   echo "$ac_t""no" 1>&6
  4430. fi
  4431. done
  4432.  
  4433.         for ac_func in pthread_attr_setdetachstate
  4434. do
  4435. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4436. echo "configure:4421: checking for $ac_func" >&5
  4437. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4438.   echo $ac_n "(cached) $ac_c" 1>&6
  4439. else
  4440.   cat > conftest.$ac_ext <<EOF
  4441. #line 4426 "configure"
  4442. #include "confdefs.h"
  4443. /* System header to define __stub macros and hopefully few prototypes,
  4444.     which can conflict with char $ac_func(); below.  */
  4445. #include <assert.h>
  4446. /* Override any gcc2 internal prototype to avoid an error.  */
  4447. /* We use char because int might match the return type of a gcc2
  4448.     builtin and then its argument prototype would still apply.  */
  4449. char $ac_func();
  4450.  
  4451. int main() {
  4452.  
  4453. /* The GNU C library defines this for functions which it implements
  4454.     to always fail with ENOSYS.  Some functions are actually named
  4455.     something starting with __ and the normal name is an alias.  */
  4456. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4457. choke me
  4458. #else
  4459. $ac_func();
  4460. #endif
  4461.  
  4462. ; return 0; }
  4463. EOF
  4464. if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4465.   rm -rf conftest*
  4466.   eval "ac_cv_func_$ac_func=yes"
  4467. else
  4468.   echo "configure: failed program was:" >&5
  4469.   cat conftest.$ac_ext >&5
  4470.   rm -rf conftest*
  4471.   eval "ac_cv_func_$ac_func=no"
  4472. fi
  4473. rm -f conftest*
  4474. fi
  4475.  
  4476. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4477.   echo "$ac_t""yes" 1>&6
  4478.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4479.   cat >> confdefs.h <<EOF
  4480. #define $ac_tr_func 1
  4481. EOF
  4482.  
  4483. else
  4484.   echo "$ac_t""no" 1>&6
  4485. fi
  4486. done
  4487.  
  4488.         for ac_func in pthread_detach
  4489. do
  4490. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4491. echo "configure:4476: checking for $ac_func" >&5
  4492. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4493.   echo $ac_n "(cached) $ac_c" 1>&6
  4494. else
  4495.   cat > conftest.$ac_ext <<EOF
  4496. #line 4481 "configure"
  4497. #include "confdefs.h"
  4498. /* System header to define __stub macros and hopefully few prototypes,
  4499.     which can conflict with char $ac_func(); below.  */
  4500. #include <assert.h>
  4501. /* Override any gcc2 internal prototype to avoid an error.  */
  4502. /* We use char because int might match the return type of a gcc2
  4503.     builtin and then its argument prototype would still apply.  */
  4504. char $ac_func();
  4505.  
  4506. int main() {
  4507.  
  4508. /* The GNU C library defines this for functions which it implements
  4509.     to always fail with ENOSYS.  Some functions are actually named
  4510.     something starting with __ and the normal name is an alias.  */
  4511. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4512. choke me
  4513. #else
  4514. $ac_func();
  4515. #endif
  4516.  
  4517. ; return 0; }
  4518. EOF
  4519. if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4520.   rm -rf conftest*
  4521.   eval "ac_cv_func_$ac_func=yes"
  4522. else
  4523.   echo "configure: failed program was:" >&5
  4524.   cat conftest.$ac_ext >&5
  4525.   rm -rf conftest*
  4526.   eval "ac_cv_func_$ac_func=no"
  4527. fi
  4528. rm -f conftest*
  4529. fi
  4530.  
  4531. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4532.   echo "$ac_t""yes" 1>&6
  4533.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4534.   cat >> confdefs.h <<EOF
  4535. #define $ac_tr_func 1
  4536. EOF
  4537.  
  4538. else
  4539.   echo "$ac_t""no" 1>&6
  4540. fi
  4541. done
  4542.  
  4543.         for ac_func in pthread_sigmask pthread_kill
  4544. do
  4545. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4546. echo "configure:4531: checking for $ac_func" >&5
  4547. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4548.   echo $ac_n "(cached) $ac_c" 1>&6
  4549. else
  4550.   cat > conftest.$ac_ext <<EOF
  4551. #line 4536 "configure"
  4552. #include "confdefs.h"
  4553. /* System header to define __stub macros and hopefully few prototypes,
  4554.     which can conflict with char $ac_func(); below.  */
  4555. #include <assert.h>
  4556. /* Override any gcc2 internal prototype to avoid an error.  */
  4557. /* We use char because int might match the return type of a gcc2
  4558.     builtin and then its argument prototype would still apply.  */
  4559. char $ac_func();
  4560.  
  4561. int main() {
  4562.  
  4563. /* The GNU C library defines this for functions which it implements
  4564.     to always fail with ENOSYS.  Some functions are actually named
  4565.     something starting with __ and the normal name is an alias.  */
  4566. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4567. choke me
  4568. #else
  4569. $ac_func();
  4570. #endif
  4571.  
  4572. ; return 0; }
  4573. EOF
  4574. if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4575.   rm -rf conftest*
  4576.   eval "ac_cv_func_$ac_func=yes"
  4577. else
  4578.   echo "configure: failed program was:" >&5
  4579.   cat conftest.$ac_ext >&5
  4580.   rm -rf conftest*
  4581.   eval "ac_cv_func_$ac_func=no"
  4582. fi
  4583. rm -f conftest*
  4584. fi
  4585.  
  4586. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4587.   echo "$ac_t""yes" 1>&6
  4588.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4589.   cat >> confdefs.h <<EOF
  4590. #define $ac_tr_func 1
  4591. EOF
  4592.  
  4593. else
  4594.   echo "$ac_t""no" 1>&6
  4595. fi
  4596. done
  4597.  
  4598. LIBS="$saved_libs"
  4599. fi
  4600. # Check whether --with-libconffile or --without-libconffile was given.
  4601. if test "${with_libconffile+set}" = set; then
  4602.   withval="$with_libconffile"
  4603.   LIBCONF_FILE="$withval"; cat >> confdefs.h <<EOF
  4604. #define LIBCONF_FILE "$withval"
  4605. EOF
  4606.  
  4607. fi
  4608.  
  4609. # Check whether --with-srvconffile or --without-srvconffile was given.
  4610. if test "${with_srvconffile+set}" = set; then
  4611.   withval="$with_srvconffile"
  4612.   SRVCONF_FILE="$withval"; cat >> confdefs.h <<EOF
  4613. #define SRVCONF_FILE "$withval"
  4614. EOF
  4615.  
  4616. fi
  4617.  
  4618. # Check whether --with-srvpidfile or --without-srvpidfile was given.
  4619. if test "${with_srvpidfile+set}" = set; then
  4620.   withval="$with_srvpidfile"
  4621.   SRVPID_FILE="$withval" ; cat >> confdefs.h <<EOF
  4622. #define SRVPID_FILE "$withval"
  4623. EOF
  4624.  
  4625. fi
  4626.  
  4627. # Check whether --with-srvidtfile or --without-srvidtfile was given.
  4628. if test "${with_srvidtfile+set}" = set; then
  4629.   withval="$with_srvidtfile"
  4630.   SRVIDT_FILE="$withval" ; cat >> confdefs.h <<EOF
  4631. #define SRVIDT_FILE "$withval"
  4632. EOF
  4633.  
  4634. fi
  4635.  
  4636. # Check whether --with-srvpwdfile or --without-srvpwdfile was given.
  4637. if test "${with_srvpwdfile+set}" = set; then
  4638.   withval="$with_srvpwdfile"
  4639.   SRVPWD_FILE="$withval" ; cat >> confdefs.h <<EOF
  4640. #define SRVPWD_FILE "$withval"
  4641. EOF
  4642.  
  4643. fi
  4644.  
  4645. # Check whether --with-default-port or --without-default-port was given.
  4646. if test "${with_default_port+set}" = set; then
  4647.   withval="$with_default_port"
  4648.   SOCKS_DEFAULT_PORT="$withval"; cat >> confdefs.h <<EOF
  4649. #define SOCKS_DEFAULT_PORT $withval
  4650. EOF
  4651.  
  4652. fi
  4653.  
  4654. # Check whether --with-default-server or --without-default-server was given.
  4655. if test "${with_default_server+set}" = set; then
  4656.   withval="$with_default_server"
  4657.   cat >> confdefs.h <<EOF
  4658. #define SOCKS_DEFAULT_SERVER "$withval"
  4659. EOF
  4660.  
  4661. fi
  4662.  
  4663. # Check whether --with-default-version or --without-default-version was given.
  4664. if test "${with_default_version+set}" = set; then
  4665.   withval="$with_default_version"
  4666.   cat >> confdefs.h <<EOF
  4667. #define SOCKS_DEFAULT_VERSION $withval
  4668. EOF
  4669.  
  4670. fi
  4671.  
  4672. # Check whether --with-syslog-facility or --without-syslog-facility was given.
  4673. if test "${with_syslog_facility+set}" = set; then
  4674.   withval="$with_syslog_facility"
  4675.   syslog_fac="$withval"
  4676. fi
  4677.  
  4678. if test "$syslog_fac" != "no"; then
  4679.     if test "$syslog_fac" = "yes" -o "$syslog_fac" = ""; then
  4680.         syslog_fac=LOG_DAEMON
  4681.     fi
  4682.     cat >> confdefs.h <<EOF
  4683. #define SYSLOG_FAC $syslog_fac
  4684. EOF
  4685.  
  4686. fi
  4687. # Check whether --with-passwd or --without-passwd was given.
  4688. if test "${with_passwd+set}" = set; then
  4689.   withval="$with_passwd"
  4690.   cat >> confdefs.h <<\EOF
  4691. #define USE_PASSWD 1
  4692. EOF
  4693.  
  4694. fi
  4695.  
  4696. # Check whether --with-shadow-passwd or --without-shadow-passwd was given.
  4697. if test "${with_shadow_passwd+set}" = set; then
  4698.   withval="$with_shadow_passwd"
  4699.   cat >> confdefs.h <<\EOF
  4700. #define USE_SHADOW_PASSWD 1
  4701. EOF
  4702.  
  4703. fi
  4704.  
  4705.  
  4706.  
  4707. SHLIB_LD="ld"
  4708. SHLIB_LIB=""
  4709. SHLIB_LFLAGS="-shared"
  4710. SHLIB_CFLAGS="-r"
  4711. SHLIB_OFLAGS="-o "
  4712. if test "$exec_prefix" != "NONE"; then
  4713.     SHLIB_DIR=$exec_prefix/lib
  4714. elif test "$prefix" != "NONE"; then
  4715.     SHLIB_DIR=$prefix/lib
  4716. else
  4717.     SHLIB_DIR=/usr/local/lib
  4718. fi
  4719. PRELOADS="echo Shared libraries not supported; exit; :"
  4720. PRELOADA=""
  4721. echo $ac_n "checking shared library support""... $ac_c" 1>&6
  4722. echo "configure:4707: checking shared library support" >&5
  4723. if test "$ac_cv_func_dlopen" = "yes" -o "$ac_cv_func_shl_load" = "yes"; then
  4724.     SHARED_LIBSOCKS5_CFLAGS="-DFOR_SHARED_LIBRARY -DIN_LIBRARY"
  4725.     if test  "$ac_cv_func_dlopen" = "yes"; then SHLIB_LIB="libsocks5_sh.so"; fi
  4726.     case `uname -rs` in
  4727.     UNIX_SV*|UNIX_System_V*)
  4728.         SHLIB_LFLAGS="-G"
  4729.         ;;
  4730.     FreeBSD*|NetBSD*)
  4731.         SHLIB_LFLAGS="-Bshareable"
  4732.         SHLIB_CFLAGS="-fpic"
  4733.         PRELOADS="LD_PRELOAD"
  4734.         ;;
  4735.     SunOS*4.*)
  4736.          SHLIB_CFLAGS="-P"
  4737.         SHLIB_LFLAGS="-dp -assert pure-text -assert nodefinitions"
  4738.         PRELOADS="LD_PRELOAD"
  4739.         ;;
  4740.     SunOS*5.*)
  4741.         SHLIB_LD="cc"
  4742.         SHLIB_CFLAGS="-KPIC"
  4743.         SHLIB_LFLAGS="-G"
  4744.         SHLIB_OFLAGS="-W0,-y-o -W0,-y"
  4745.         PRELOADS="LD_PRELOAD"
  4746.         ;;    
  4747.     IRIX*5.*|IRIX*6.*)
  4748.         SHLIB_CFLAGS="-KPIC"
  4749.         PRELOADS="_RLD_LIST"
  4750.         PRELOADA=":DEFAULT"
  4751.         ;;
  4752.     BSD/OS*)
  4753.         SHLIB_LIB=
  4754.         ;;
  4755.     OSF1*)
  4756.         PRELOADS="_RLD_LIST"
  4757.         PRELOADA=":DEFAULT"
  4758.         SHLIB_LFLAGS='-shared -expect_unresolved "*"'
  4759.         ;;
  4760.     AIX*)
  4761.         SHLIB_LIB=""
  4762.         ;;
  4763.     *)
  4764.         PRELOADS="LD_PRELOAD"
  4765.         ;;
  4766.     esac
  4767.  
  4768.     if test "$GCC" = "yes" ; then
  4769.         SHLIB_CFLAGS="-fpic"
  4770.         case `uname -rs` in
  4771.         SunOS*4.*)
  4772.             DLLIBS="-lc"
  4773.             ;;
  4774.         SunOS*5.*)
  4775.             SHLIB_LD="gcc"
  4776.             SHLIB_OFLAGS="-o "
  4777.             SHLIB_LFLAGS="-shared"
  4778.             ;;
  4779.         UNIX_SV*|UNIX_System_V*)
  4780.             SHLIB_CFLAGS=
  4781.             ;;
  4782.         FreeBSD*|NetBSD*)
  4783.             ;;
  4784.         *)
  4785.             SHLIB_LD="gcc"
  4786.             SHLIB_LFLAGS="-shared"
  4787.         esac
  4788.     fi
  4789.  
  4790.  
  4791.     if test `uname -s` = "FreeBSD"; then
  4792.         SHLIB_CFLAGS="-fpic -r"
  4793.     fi
  4794.  
  4795.     echo "$ac_t"""lflags: $SHLIB_LFLAGS cflags: $SHLIB_CFLAGS"" 1>&6
  4796.     else
  4797.     echo "$ac_t""no" 1>&6
  4798. fi
  4799. SHLIB_LIBS="$SHLIB_LIBS $LIBS"
  4800. if test "`uname`" = "Linux"; then
  4801.     SHLIB_LIBS="$SHLIB_LIBS -lc"
  4802. fi
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816. BINRM="/bin/rm -f"
  4817. LIBS="$LIBS $STATIC_LIBS"
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840. trap '' 1 2 15
  4841. cat > confcache <<\EOF
  4842. # This file is a shell script that caches the results of configure
  4843. # tests run on this system so they can be shared between configure
  4844. # scripts and configure runs.  It is not useful on other systems.
  4845. # If it contains results you don't want to keep, you may remove or edit it.
  4846. #
  4847. # By default, configure uses ./config.cache as the cache file,
  4848. # creating it if it does not exist already.  You can give configure
  4849. # the --cache-file=FILE option to use a different cache file; that is
  4850. # what configure does when it calls configure scripts in
  4851. # subdirectories, so they share the cache.
  4852. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  4853. # config.status only pays attention to the cache file if you give it the
  4854. # --recheck option to rerun configure.
  4855. #
  4856. EOF
  4857. # The following way of writing the cache mishandles newlines in values,
  4858. # but we know of no workaround that is simple, portable, and efficient.
  4859. # So, don't put newlines in cache variables' values.
  4860. # Ultrix sh set writes to stderr and can't be redirected directly,
  4861. # and sets the high bit in the cache file unless we assign to the vars.
  4862. (set) 2>&1 |
  4863.   case `(ac_space=' '; set) 2>&1` in
  4864.   *ac_space=\ *)
  4865.     # `set' does not quote correctly, so add quotes (double-quote substitution
  4866.     # turns \\\\ into \\, and sed turns \\ into \).
  4867.     sed -n \
  4868.       -e "s/'/'\\\\''/g" \
  4869.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  4870.     ;;
  4871.   *)
  4872.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  4873.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  4874.     ;;
  4875.   esac >> confcache
  4876. if cmp -s $cache_file confcache; then
  4877.   :
  4878. else
  4879.   if test -w $cache_file; then
  4880.     echo "updating cache $cache_file"
  4881.     cat confcache > $cache_file
  4882.   else
  4883.     echo "not updating unwritable cache $cache_file"
  4884.   fi
  4885. fi
  4886. rm -f confcache
  4887.  
  4888. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  4889.  
  4890. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  4891. # Let make expand exec_prefix.
  4892. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  4893.  
  4894. # Any assignment to VPATH causes Sun make to only execute
  4895. # the first set of double-colon rules, so remove it if not needed.
  4896. # If there is a colon in the path, we need to keep it.
  4897. if test "x$srcdir" = x.; then
  4898.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  4899. fi
  4900.  
  4901. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  4902.  
  4903. DEFS=-DHAVE_CONFIG_H
  4904.  
  4905. # Without the "./", some shells look in PATH for config.status.
  4906. : ${CONFIG_STATUS=./config.status}
  4907.  
  4908. echo creating $CONFIG_STATUS
  4909. rm -f $CONFIG_STATUS
  4910. cat > $CONFIG_STATUS <<EOF
  4911. #! /bin/sh
  4912. # Generated automatically by configure.
  4913. # Run this file to recreate the current configuration.
  4914. # This directory was configured as follows,
  4915. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  4916. #
  4917. # $0 $ac_configure_args
  4918. #
  4919. # Compiler output produced by configure, useful for debugging
  4920. # configure, is in ./config.log if it exists.
  4921.  
  4922. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  4923. for ac_option
  4924. do
  4925.   case "\$ac_option" in
  4926.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  4927.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  4928.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  4929.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  4930.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  4931.     exit 0 ;;
  4932.   -help | --help | --hel | --he | --h)
  4933.     echo "\$ac_cs_usage"; exit 0 ;;
  4934.   *) echo "\$ac_cs_usage"; exit 1 ;;
  4935.   esac
  4936. done
  4937.  
  4938. ac_given_srcdir=$srcdir
  4939. ac_given_INSTALL="$INSTALL"
  4940.  
  4941. trap 'rm -fr `echo "Makefile
  4942.     lib/Makefile
  4943.     test/Makefile
  4944.     shlib/Makefile
  4945.     shlib/runsocks
  4946.     server/Makefile
  4947.     server/stopsocks
  4948.     include/Makefile
  4949.     clients/Makefile
  4950.     clients/pt/Makefile
  4951.     clients/ftp/Makefile 
  4952.     clients/finger/Makefile
  4953.     clients/archie/Makefile 
  4954.     clients/telnet/Makefile
  4955.     clients/telnet/libtelnet/Makefile
  4956.     stamp-h include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  4957. EOF
  4958. cat >> $CONFIG_STATUS <<EOF
  4959.  
  4960. # Protect against being on the right side of a sed subst in config.status.
  4961. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  4962.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  4963. $ac_vpsub
  4964. $extrasub
  4965. s%@CFLAGS@%$CFLAGS%g
  4966. s%@CPPFLAGS@%$CPPFLAGS%g
  4967. s%@CXXFLAGS@%$CXXFLAGS%g
  4968. s%@DEFS@%$DEFS%g
  4969. s%@LDFLAGS@%$LDFLAGS%g
  4970. s%@LIBS@%$LIBS%g
  4971. s%@exec_prefix@%$exec_prefix%g
  4972. s%@prefix@%$prefix%g
  4973. s%@program_transform_name@%$program_transform_name%g
  4974. s%@bindir@%$bindir%g
  4975. s%@sbindir@%$sbindir%g
  4976. s%@libexecdir@%$libexecdir%g
  4977. s%@datadir@%$datadir%g
  4978. s%@sysconfdir@%$sysconfdir%g
  4979. s%@sharedstatedir@%$sharedstatedir%g
  4980. s%@localstatedir@%$localstatedir%g
  4981. s%@libdir@%$libdir%g
  4982. s%@includedir@%$includedir%g
  4983. s%@oldincludedir@%$oldincludedir%g
  4984. s%@infodir@%$infodir%g
  4985. s%@mandir@%$mandir%g
  4986. s%@CC@%$CC%g
  4987. s%@CPP@%$CPP%g
  4988. s%@RANLIB@%$RANLIB%g
  4989. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  4990. s%@INSTALL_DATA@%$INSTALL_DATA%g
  4991. s%@MAKED@%$MAKED%g
  4992. s%@AUTOCONF@%$AUTOCONF%g
  4993. s%@AUTOHDR@%$AUTOHDR%g
  4994. s%@ORIG_FINGER@%$ORIG_FINGER%g
  4995. s%@TROUTEPROG@%$TROUTEPROG%g
  4996. s%@PINGPROG@%$PINGPROG%g
  4997. s%@DLLIBS@%$DLLIBS%g
  4998. s%@SHLIB_LD@%$SHLIB_LD%g
  4999. s%@SHLIB_DIR@%$SHLIB_DIR%g
  5000. s%@SHLIB_LIB@%$SHLIB_LIB%g
  5001. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  5002. s%@SHLIB_OFLAGS@%$SHLIB_OFLAGS%g
  5003. s%@SHARED_LIBSOCKS5_CFLAGS@%$SHARED_LIBSOCKS5_CFLAGS%g
  5004. s%@PRELOADS@%$PRELOADS%g
  5005. s%@PRELOADA@%$PRELOADA%g
  5006. s%@SHLIB_LFLAGS@%$SHLIB_LFLAGS%g
  5007. s%@SHLIB_LIBS@%$SHLIB_LIBS%g
  5008. s%@SOCKS_DEFAULT_PORT@%$SOCKS_DEFAULT_PORT%g
  5009. s%@SRVPID_FILE@%$SRVPID_FILE%g
  5010. s%@SRVCONF_FILE@%$SRVCONF_FILE%g
  5011. s%@LIBCONF_FILE@%$LIBCONF_FILE%g
  5012. s%@CDEBUG_FLAGS@%$CDEBUG_FLAGS%g
  5013. s%@BINRM@%$BINRM%g
  5014. s%@SERVER_DEFS@%$SERVER_DEFS%g
  5015. s%@SERVER_LIBS@%$SERVER_LIBS%g
  5016. s%@EXTRA_OBJS@%$EXTRA_OBJS%g
  5017. s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
  5018. s%@EXPORT_LDFLAGS@%$EXPORT_LDFLAGS%g
  5019. s%@TELNET_DEFS@%$TELNET_DEFS%g
  5020. s%@TELNET_LIBS@%$TELNET_LIBS%g
  5021. s%@FTPDEFS@%$FTPDEFS%g
  5022.  
  5023. CEOF
  5024. EOF
  5025.  
  5026. cat >> $CONFIG_STATUS <<\EOF
  5027.  
  5028. # Split the substitutions into bite-sized pieces for seds with
  5029. # small command number limits, like on Digital OSF/1 and HP-UX.
  5030. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  5031. ac_file=1 # Number of current file.
  5032. ac_beg=1 # First line for current file.
  5033. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  5034. ac_more_lines=:
  5035. ac_sed_cmds=""
  5036. while $ac_more_lines; do
  5037.   if test $ac_beg -gt 1; then
  5038.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  5039.   else
  5040.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  5041.   fi
  5042.   if test ! -s conftest.s$ac_file; then
  5043.     ac_more_lines=false
  5044.     rm -f conftest.s$ac_file
  5045.   else
  5046.     if test -z "$ac_sed_cmds"; then
  5047.       ac_sed_cmds="sed -f conftest.s$ac_file"
  5048.     else
  5049.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  5050.     fi
  5051.     ac_file=`expr $ac_file + 1`
  5052.     ac_beg=$ac_end
  5053.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  5054.   fi
  5055. done
  5056. if test -z "$ac_sed_cmds"; then
  5057.   ac_sed_cmds=cat
  5058. fi
  5059. EOF
  5060.  
  5061. cat >> $CONFIG_STATUS <<EOF
  5062.  
  5063. CONFIG_FILES=\${CONFIG_FILES-"Makefile
  5064.     lib/Makefile
  5065.     test/Makefile
  5066.     shlib/Makefile
  5067.     shlib/runsocks
  5068.     server/Makefile
  5069.     server/stopsocks
  5070.     include/Makefile
  5071.     clients/Makefile
  5072.     clients/pt/Makefile
  5073.     clients/ftp/Makefile 
  5074.     clients/finger/Makefile
  5075.     clients/archie/Makefile 
  5076.     clients/telnet/Makefile
  5077.     clients/telnet/libtelnet/Makefile
  5078.     stamp-h"}
  5079. EOF
  5080. cat >> $CONFIG_STATUS <<\EOF
  5081. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  5082.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  5083.   case "$ac_file" in
  5084.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  5085.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  5086.   *) ac_file_in="${ac_file}.in" ;;
  5087.   esac
  5088.  
  5089.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  5090.  
  5091.   # Remove last slash and all that follows it.  Not all systems have dirname.
  5092.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  5093.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  5094.     # The file is in a subdirectory.
  5095.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  5096.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  5097.     # A "../" for each directory in $ac_dir_suffix.
  5098.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  5099.   else
  5100.     ac_dir_suffix= ac_dots=
  5101.   fi
  5102.  
  5103.   case "$ac_given_srcdir" in
  5104.   .)  srcdir=.
  5105.       if test -z "$ac_dots"; then top_srcdir=.
  5106.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  5107.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  5108.   *) # Relative path.
  5109.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  5110.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  5111.   esac
  5112.  
  5113.   case "$ac_given_INSTALL" in
  5114.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  5115.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  5116.   esac
  5117.  
  5118.   echo creating "$ac_file"
  5119.   rm -f "$ac_file"
  5120.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  5121.   case "$ac_file" in
  5122.   *Makefile*) ac_comsub="1i\\
  5123. # $configure_input" ;;
  5124.   *) ac_comsub= ;;
  5125.   esac
  5126.  
  5127.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  5128.   sed -e "$ac_comsub
  5129. s%@configure_input@%$configure_input%g
  5130. s%@srcdir@%$srcdir%g
  5131. s%@top_srcdir@%$top_srcdir%g
  5132. s%@INSTALL@%$INSTALL%g
  5133. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  5134. fi; done
  5135. rm -f conftest.s*
  5136.  
  5137. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  5138. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  5139. #
  5140. # ac_d sets the value in "#define NAME VALUE" lines.
  5141. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  5142. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  5143. ac_dC='\3'
  5144. ac_dD='%g'
  5145. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  5146. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  5147. ac_uB='\([     ]\)%\1#\2define\3'
  5148. ac_uC=' '
  5149. ac_uD='\4%g'
  5150. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  5151. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  5152. ac_eB='$%\1#\2define\3'
  5153. ac_eC=' '
  5154. ac_eD='%g'
  5155.  
  5156. if test "${CONFIG_HEADERS+set}" != set; then
  5157. EOF
  5158. cat >> $CONFIG_STATUS <<EOF
  5159.   CONFIG_HEADERS="include/config.h"
  5160. EOF
  5161. cat >> $CONFIG_STATUS <<\EOF
  5162. fi
  5163. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  5164.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  5165.   case "$ac_file" in
  5166.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  5167.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  5168.   *) ac_file_in="${ac_file}.in" ;;
  5169.   esac
  5170.  
  5171.   echo creating $ac_file
  5172.  
  5173.   rm -f conftest.frag conftest.in conftest.out
  5174.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  5175.   cat $ac_file_inputs > conftest.in
  5176.  
  5177. EOF
  5178.  
  5179. # Transform confdefs.h into a sed script conftest.vals that substitutes
  5180. # the proper values into config.h.in to produce config.h.  And first:
  5181. # Protect against being on the right side of a sed subst in config.status.
  5182. # Protect against being in an unquoted here document in config.status.
  5183. rm -f conftest.vals
  5184. cat > conftest.hdr <<\EOF
  5185. s/[\\&%]/\\&/g
  5186. s%[\\$`]%\\&%g
  5187. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  5188. s%ac_d%ac_u%gp
  5189. s%ac_u%ac_e%gp
  5190. EOF
  5191. sed -n -f conftest.hdr confdefs.h > conftest.vals
  5192. rm -f conftest.hdr
  5193.  
  5194. # This sed command replaces #undef with comments.  This is necessary, for
  5195. # example, in the case of _POSIX_SOURCE, which is predefined and required
  5196. # on some systems where configure will not decide to define it.
  5197. cat >> conftest.vals <<\EOF
  5198. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  5199. EOF
  5200.  
  5201. # Break up conftest.vals because some shells have a limit on
  5202. # the size of here documents, and old seds have small limits too.
  5203.  
  5204. rm -f conftest.tail
  5205. while :
  5206. do
  5207.   ac_lines=`grep -c . conftest.vals`
  5208.   # grep -c gives empty output for an empty file on some AIX systems.
  5209.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  5210.   # Write a limited-size here document to conftest.frag.
  5211.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  5212.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  5213.   echo 'CEOF
  5214.   sed -f conftest.frag conftest.in > conftest.out
  5215.   rm -f conftest.in
  5216.   mv conftest.out conftest.in
  5217. ' >> $CONFIG_STATUS
  5218.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  5219.   rm -f conftest.vals
  5220.   mv conftest.tail conftest.vals
  5221. done
  5222. rm -f conftest.vals
  5223.  
  5224. cat >> $CONFIG_STATUS <<\EOF
  5225.   rm -f conftest.frag conftest.h
  5226.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  5227.   cat conftest.in >> conftest.h
  5228.   rm -f conftest.in
  5229.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  5230.     echo "$ac_file is unchanged"
  5231.     rm -f conftest.h
  5232.   else
  5233.     # Remove last slash and all that follows it.  Not all systems have dirname.
  5234.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  5235.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  5236.       # The file is in a subdirectory.
  5237.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  5238.     fi
  5239.     rm -f $ac_file
  5240.     mv conftest.h $ac_file
  5241.   fi
  5242. fi; done
  5243.  
  5244. EOF
  5245. cat >> $CONFIG_STATUS <<EOF
  5246.  
  5247. EOF
  5248. cat >> $CONFIG_STATUS <<\EOF
  5249.  
  5250. exit 0
  5251. EOF
  5252. chmod +x $CONFIG_STATUS
  5253. rm -fr confdefs* $ac_clean_files
  5254. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  5255.  
  5256.  
  5257.