home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March / PCWK3A99.iso / Linux / DDD331 / DDD-3_1_.000 / DDD-3_1_ / ddd-3.1.1 / configure < prev    next >
Encoding:
Text File  |  1998-12-06  |  94.9 KB  |  3,125 lines

  1. #! /bin/sh
  2.  
  3. # From configure.in Id: configure.in,v 1.18 1998/07/13 08:09:25 zeller Exp 
  4. unset CDPATH
  5.  
  6.  
  7.  
  8.  
  9. # Do all the work for Automake.  This macro actually does too much --
  10. # some checks are only needed if your package does certain things.
  11. # But this isn't really a big deal.
  12.  
  13. # serial 1
  14.  
  15.  
  16.  
  17.  
  18.  
  19. # serial 1
  20.  
  21.  
  22.  
  23. #
  24. # Check to make sure that the build environment is sane.
  25. #
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34. # Check to see if we're running under Win32, without using
  35. # AC_CANONICAL_*.  If so, set output variable EXEEXT to ".exe".
  36. # Otherwise set it to "".
  37.  
  38.  
  39.  
  40. # Check to see if we're running under Cygwin32, without using
  41. # AC_CANONICAL_*.  If so, set output variable CYGWIN32 to "yes".
  42. # Otherwise set it to "no".
  43.  
  44.  
  45.  
  46. # Check to see if we're running under Mingw, without using
  47. # AC_CANONICAL_*.  If so, set output variable MINGW32 to "yes".
  48. # Otherwise set it to "no".
  49.  
  50.  
  51.  
  52. # Guess values for system-dependent variables and create Makefiles.
  53. # Generated automatically using autoconf version 2.12 
  54. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  55. #
  56. # This configure script is free software; the Free Software Foundation
  57. # gives unlimited permission to copy, distribute and modify it.
  58.  
  59. # Defaults:
  60. ac_help=
  61. ac_default_prefix=/usr/local
  62. # Any additions from configure.in:
  63. ac_help="$ac_help
  64.   --with-x                use the X Window System"
  65. ac_help="$ac_help
  66.   --without-motif                  do not use Motif widgets"
  67. ac_help="$ac_help
  68.   --with-motif-includes=DIR        Motif include files are in DIR"
  69. ac_help="$ac_help
  70.   --with-motif-libraries=DIR       Motif libraries are in DIR"
  71. ac_help="$ac_help
  72.   --without-athena                 do not use Athena widgets"
  73. ac_help="$ac_help
  74.   --with-athena-includes=DIR       Athena include files are in DIR"
  75. ac_help="$ac_help
  76.   --with-athena-libraries=DIR      Athena libraries are in DIR"
  77.  
  78. # Initialize some variables set by options.
  79. # The variables have the same names as the options, with
  80. # dashes changed to underlines.
  81. build=NONE
  82. cache_file=./config.cache
  83. exec_prefix=NONE
  84. host=NONE
  85. no_create=
  86. nonopt=NONE
  87. no_recursion=
  88. prefix=NONE
  89. program_prefix=NONE
  90. program_suffix=NONE
  91. program_transform_name=s,x,x,
  92. silent=
  93. site=
  94. srcdir=
  95. target=NONE
  96. verbose=
  97. x_includes=NONE
  98. x_libraries=NONE
  99. bindir='${exec_prefix}/bin'
  100. sbindir='${exec_prefix}/sbin'
  101. libexecdir='${exec_prefix}/libexec'
  102. datadir='${prefix}/share'
  103. sysconfdir='${prefix}/etc'
  104. sharedstatedir='${prefix}/com'
  105. localstatedir='${prefix}/var'
  106. libdir='${exec_prefix}/lib'
  107. includedir='${prefix}/include'
  108. oldincludedir='/usr/include'
  109. infodir='${prefix}/info'
  110. mandir='${prefix}/man'
  111.  
  112. # Initialize some other variables.
  113. subdirs=
  114. MFLAGS= MAKEFLAGS=
  115. # Maximum number of lines to put in a shell here document.
  116. ac_max_here_lines=12
  117.  
  118. ac_prev=
  119. for ac_option
  120. do
  121.  
  122.   # If the previous option needs an argument, assign it.
  123.   if test -n "$ac_prev"; then
  124.     eval "$ac_prev=\$ac_option"
  125.     ac_prev=
  126.     continue
  127.   fi
  128.  
  129.   case "$ac_option" in
  130.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  131.   *) ac_optarg= ;;
  132.   esac
  133.  
  134.   # Accept the important Cygnus configure options, so we can diagnose typos.
  135.  
  136.   case "$ac_option" in
  137.  
  138.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  139.     ac_prev=bindir ;;
  140.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  141.     bindir="$ac_optarg" ;;
  142.  
  143.   -build | --build | --buil | --bui | --bu)
  144.     ac_prev=build ;;
  145.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  146.     build="$ac_optarg" ;;
  147.  
  148.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  149.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  150.     ac_prev=cache_file ;;
  151.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  152.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  153.     cache_file="$ac_optarg" ;;
  154.  
  155.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  156.     ac_prev=datadir ;;
  157.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  158.   | --da=*)
  159.     datadir="$ac_optarg" ;;
  160.  
  161.   -disable-* | --disable-*)
  162.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  163.     # Reject names that are not valid shell variable names.
  164.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  165.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  166.     fi
  167.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  168.     eval "enable_${ac_feature}=no" ;;
  169.  
  170.   -enable-* | --enable-*)
  171.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  172.     # Reject names that are not valid shell variable names.
  173.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  174.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  175.     fi
  176.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  177.     case "$ac_option" in
  178.       *=*) ;;
  179.       *) ac_optarg=yes ;;
  180.     esac
  181.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  182.  
  183.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  184.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  185.   | --exec | --exe | --ex)
  186.     ac_prev=exec_prefix ;;
  187.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  188.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  189.   | --exec=* | --exe=* | --ex=*)
  190.     exec_prefix="$ac_optarg" ;;
  191.  
  192.   -gas | --gas | --ga | --g)
  193.     # Obsolete; use --with-gas.
  194.     with_gas=yes ;;
  195.  
  196.   -help | --help | --hel | --he)
  197.     # Omit some internal or obsolete options to make the list less imposing.
  198.     # This message is too long to be a string in the A/UX 3.1 sh.
  199.     cat << EOF
  200. Usage: configure [options] [host]
  201. Options: [defaults in brackets after descriptions]
  202. Configuration:
  203.   --cache-file=FILE       cache test results in FILE
  204.   --help                  print this message
  205.   --no-create             do not create output files
  206.   --quiet, --silent       do not print \`checking...' messages
  207.   --version               print the version of autoconf that created configure
  208. Directory and file names:
  209.   --prefix=PREFIX         install architecture-independent files in PREFIX
  210.                           [$ac_default_prefix]
  211.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  212.                           [same as prefix]
  213.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  214.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  215.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  216.   --datadir=DIR           read-only architecture-independent data in DIR
  217.                           [PREFIX/share]
  218.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  219.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  220.                           [PREFIX/com]
  221.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  222.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  223.   --includedir=DIR        C header files in DIR [PREFIX/include]
  224.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  225.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  226.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  227.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  228.   --program-prefix=PREFIX prepend PREFIX to installed program names
  229.   --program-suffix=SUFFIX append SUFFIX to installed program names
  230.   --program-transform-name=PROGRAM
  231.                           run sed PROGRAM on installed program names
  232. EOF
  233.     cat << EOF
  234. Host type:
  235.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  236.   --host=HOST             configure for HOST [guessed]
  237.   --target=TARGET         configure for TARGET [TARGET=HOST]
  238. Features and packages:
  239.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  240.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  241.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  242.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  243.   --x-includes=DIR        X include files are in DIR
  244.   --x-libraries=DIR       X library files are in DIR
  245. EOF
  246.     if test -n "$ac_help"; then
  247.       echo "--enable and --with options recognized:$ac_help"
  248.     fi
  249.     exit 0 ;;
  250.  
  251.   -host | --host | --hos | --ho)
  252.     ac_prev=host ;;
  253.   -host=* | --host=* | --hos=* | --ho=*)
  254.     host="$ac_optarg" ;;
  255.  
  256.   -includedir | --includedir | --includedi | --included | --include \
  257.   | --includ | --inclu | --incl | --inc)
  258.     ac_prev=includedir ;;
  259.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  260.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  261.     includedir="$ac_optarg" ;;
  262.  
  263.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  264.     ac_prev=infodir ;;
  265.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  266.     infodir="$ac_optarg" ;;
  267.  
  268.   -libdir | --libdir | --libdi | --libd)
  269.     ac_prev=libdir ;;
  270.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  271.     libdir="$ac_optarg" ;;
  272.  
  273.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  274.   | --libexe | --libex | --libe)
  275.     ac_prev=libexecdir ;;
  276.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  277.   | --libexe=* | --libex=* | --libe=*)
  278.     libexecdir="$ac_optarg" ;;
  279.  
  280.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  281.   | --localstate | --localstat | --localsta | --localst \
  282.   | --locals | --local | --loca | --loc | --lo)
  283.     ac_prev=localstatedir ;;
  284.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  285.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  286.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  287.     localstatedir="$ac_optarg" ;;
  288.  
  289.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  290.     ac_prev=mandir ;;
  291.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  292.     mandir="$ac_optarg" ;;
  293.  
  294.   -nfp | --nfp | --nf)
  295.     # Obsolete; use --without-fp.
  296.     with_fp=no ;;
  297.  
  298.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  299.   | --no-cr | --no-c)
  300.     no_create=yes ;;
  301.  
  302.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  303.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  304.     no_recursion=yes ;;
  305.  
  306.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  307.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  308.   | --oldin | --oldi | --old | --ol | --o)
  309.     ac_prev=oldincludedir ;;
  310.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  311.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  312.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  313.     oldincludedir="$ac_optarg" ;;
  314.  
  315.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  316.     ac_prev=prefix ;;
  317.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  318.     prefix="$ac_optarg" ;;
  319.  
  320.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  321.   | --program-pre | --program-pr | --program-p)
  322.     ac_prev=program_prefix ;;
  323.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  324.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  325.     program_prefix="$ac_optarg" ;;
  326.  
  327.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  328.   | --program-suf | --program-su | --program-s)
  329.     ac_prev=program_suffix ;;
  330.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  331.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  332.     program_suffix="$ac_optarg" ;;
  333.  
  334.   -program-transform-name | --program-transform-name \
  335.   | --program-transform-nam | --program-transform-na \
  336.   | --program-transform-n | --program-transform- \
  337.   | --program-transform | --program-transfor \
  338.   | --program-transfo | --program-transf \
  339.   | --program-trans | --program-tran \
  340.   | --progr-tra | --program-tr | --program-t)
  341.     ac_prev=program_transform_name ;;
  342.   -program-transform-name=* | --program-transform-name=* \
  343.   | --program-transform-nam=* | --program-transform-na=* \
  344.   | --program-transform-n=* | --program-transform-=* \
  345.   | --program-transform=* | --program-transfor=* \
  346.   | --program-transfo=* | --program-transf=* \
  347.   | --program-trans=* | --program-tran=* \
  348.   | --progr-tra=* | --program-tr=* | --program-t=*)
  349.     program_transform_name="$ac_optarg" ;;
  350.  
  351.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  352.   | -silent | --silent | --silen | --sile | --sil)
  353.     silent=yes ;;
  354.  
  355.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  356.     ac_prev=sbindir ;;
  357.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  358.   | --sbi=* | --sb=*)
  359.     sbindir="$ac_optarg" ;;
  360.  
  361.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  362.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  363.   | --sharedst | --shareds | --shared | --share | --shar \
  364.   | --sha | --sh)
  365.     ac_prev=sharedstatedir ;;
  366.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  367.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  368.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  369.   | --sha=* | --sh=*)
  370.     sharedstatedir="$ac_optarg" ;;
  371.  
  372.   -site | --site | --sit)
  373.     ac_prev=site ;;
  374.   -site=* | --site=* | --sit=*)
  375.     site="$ac_optarg" ;;
  376.  
  377.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  378.     ac_prev=srcdir ;;
  379.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  380.     srcdir="$ac_optarg" ;;
  381.  
  382.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  383.   | --syscon | --sysco | --sysc | --sys | --sy)
  384.     ac_prev=sysconfdir ;;
  385.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  386.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  387.     sysconfdir="$ac_optarg" ;;
  388.  
  389.   -target | --target | --targe | --targ | --tar | --ta | --t)
  390.     ac_prev=target ;;
  391.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  392.     target="$ac_optarg" ;;
  393.  
  394.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  395.     verbose=yes ;;
  396.  
  397.   -version | --version | --versio | --versi | --vers)
  398.     echo "configure generated by autoconf version 2.12"
  399.     exit 0 ;;
  400.  
  401.   -with-* | --with-*)
  402.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  403.     # Reject names that are not valid shell variable names.
  404.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  405.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  406.     fi
  407.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  408.     case "$ac_option" in
  409.       *=*) ;;
  410.       *) ac_optarg=yes ;;
  411.     esac
  412.     eval "with_${ac_package}='$ac_optarg'" ;;
  413.  
  414.   -without-* | --without-*)
  415.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  416.     # Reject names that are not valid shell variable names.
  417.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  418.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  419.     fi
  420.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  421.     eval "with_${ac_package}=no" ;;
  422.  
  423.   --x)
  424.     # Obsolete; use --with-x.
  425.     with_x=yes ;;
  426.  
  427.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  428.   | --x-incl | --x-inc | --x-in | --x-i)
  429.     ac_prev=x_includes ;;
  430.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  431.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  432.     x_includes="$ac_optarg" ;;
  433.  
  434.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  435.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  436.     ac_prev=x_libraries ;;
  437.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  438.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  439.     x_libraries="$ac_optarg" ;;
  440.  
  441.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  442.     ;;
  443.  
  444.   *)
  445.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  446.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  447.     fi
  448.     if test "x$nonopt" != xNONE; then
  449.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  450.     fi
  451.     nonopt="$ac_option"
  452.     ;;
  453.  
  454.   esac
  455. done
  456.  
  457. if test -n "$ac_prev"; then
  458.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  459. fi
  460.  
  461. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  462.  
  463. # File descriptor usage:
  464. # 0 standard input
  465. # 1 file creation
  466. # 2 errors and warnings
  467. # 3 some systems may open it to /dev/tty
  468. # 4 used on the Kubota Titan
  469. # 6 checking for... messages and results
  470. # 5 compiler messages saved in config.log
  471. if test "$silent" = yes; then
  472.   exec 6>/dev/null
  473. else
  474.   exec 6>&1
  475. fi
  476. exec 5>./config.log
  477.  
  478. echo "\
  479. This file contains any messages produced by compilers while
  480. running configure, to aid debugging if configure makes a mistake.
  481. " 1>&5
  482.  
  483. # Strip out --no-create and --no-recursion so they do not pile up.
  484. # Also quote any args containing shell metacharacters.
  485. ac_configure_args=
  486. for ac_arg
  487. do
  488.   case "$ac_arg" in
  489.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  490.   | --no-cr | --no-c) ;;
  491.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  492.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  493.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  494.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  495.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  496.   esac
  497. done
  498.  
  499. # NLS nuisances.
  500. # Only set these to C if already set.  These must not be set unconditionally
  501. # because not all systems understand e.g. LANG=C (notably SCO).
  502. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  503. # Non-C LC_CTYPE values break the ctype check.
  504. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  505. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  506. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  507. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  508.  
  509. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  510. rm -rf conftest* confdefs.h
  511. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  512. echo > confdefs.h
  513.  
  514. # A filename unique to this package, relative to the directory that
  515. # configure is in, which we can look for to find out if srcdir is correct.
  516. ac_unique_file=NEWS
  517.  
  518. # Find the source files, if location was not specified.
  519. if test -z "$srcdir"; then
  520.   ac_srcdir_defaulted=yes
  521.   # Try the directory containing this script, then its parent.
  522.   ac_prog=$0
  523.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  524.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  525.   srcdir=$ac_confdir
  526.   if test ! -r $srcdir/$ac_unique_file; then
  527.     srcdir=..
  528.   fi
  529. else
  530.   ac_srcdir_defaulted=no
  531. fi
  532. if test ! -r $srcdir/$ac_unique_file; then
  533.   if test "$ac_srcdir_defaulted" = yes; then
  534.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  535.   else
  536.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  537.   fi
  538. fi
  539. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  540.  
  541. # Prefer explicitly selected file to automatically selected ones.
  542. if test -z "$CONFIG_SITE"; then
  543.   if test "x$prefix" != xNONE; then
  544.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  545.   else
  546.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  547.   fi
  548. fi
  549. for ac_site_file in $CONFIG_SITE; do
  550.   if test -r "$ac_site_file"; then
  551.     echo "loading site script $ac_site_file"
  552.     . "$ac_site_file"
  553.   fi
  554. done
  555.  
  556. if test -r "$cache_file"; then
  557.   echo "loading cache $cache_file"
  558.   . $cache_file
  559. else
  560.   echo "creating cache $cache_file"
  561.   > $cache_file
  562. fi
  563.  
  564. ac_ext=c
  565. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  566. ac_cpp='$CPP $CPPFLAGS'
  567. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  568. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  569. cross_compiling=$ac_cv_prog_cc_cross
  570.  
  571. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  572.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  573.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  574.     ac_n= ac_c='
  575. ' ac_t='    '
  576.   else
  577.     ac_n=-n ac_c= ac_t=
  578.   fi
  579. else
  580.   ac_n= ac_c='\c' ac_t=
  581. fi
  582.  
  583.  
  584. ac_aux_dir=
  585. for ac_dir in libiberty $srcdir/libiberty; do
  586.   if test -f $ac_dir/install-sh; then
  587.     ac_aux_dir=$ac_dir
  588.     ac_install_sh="$ac_aux_dir/install-sh -c"
  589.     break
  590.   elif test -f $ac_dir/install.sh; then
  591.     ac_aux_dir=$ac_dir
  592.     ac_install_sh="$ac_aux_dir/install.sh -c"
  593.     break
  594.   fi
  595. done
  596. if test -z "$ac_aux_dir"; then
  597.   { echo "configure: error: can not find install-sh or install.sh in libiberty $srcdir/libiberty" 1>&2; exit 1; }
  598. fi
  599. ac_config_guess=$ac_aux_dir/config.guess
  600. ac_config_sub=$ac_aux_dir/config.sub
  601. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  602.  
  603.  
  604. # Do some error checking and defaulting for the host and target type.
  605. # The inputs are:
  606. #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
  607. #
  608. # The rules are:
  609. # 1. You are not allowed to specify --host, --target, and nonopt at the
  610. #    same time.
  611. # 2. Host defaults to nonopt.
  612. # 3. If nonopt is not specified, then host defaults to the current host,
  613. #    as determined by config.guess.
  614. # 4. Target and build default to nonopt.
  615. # 5. If nonopt is not specified, then target and build default to host.
  616.  
  617. # The aliases save the names the user supplied, while $host etc.
  618. # will get canonicalized.
  619. case $host---$target---$nonopt in
  620. NONE---*---* | *---NONE---* | *---*---NONE) ;;
  621. *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
  622. esac
  623.  
  624.  
  625. # Make sure we can run config.sub.
  626. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  627. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  628. fi
  629.  
  630. echo $ac_n "checking host system type""... $ac_c" 1>&6
  631. echo "configure:632: checking host system type" >&5
  632.  
  633. host_alias=$host
  634. case "$host_alias" in
  635. NONE)
  636.   case $nonopt in
  637.   NONE)
  638.     if host_alias=`$ac_config_guess`; then :
  639.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  640.     fi ;;
  641.   *) host_alias=$nonopt ;;
  642.   esac ;;
  643. esac
  644.  
  645. host=`$ac_config_sub $host_alias`
  646. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  647. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  648. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  649. echo "$ac_t""$host" 1>&6
  650.  
  651. echo $ac_n "checking target system type""... $ac_c" 1>&6
  652. echo "configure:653: checking target system type" >&5
  653.  
  654. target_alias=$target
  655. case "$target_alias" in
  656. NONE)
  657.   case $nonopt in
  658.   NONE) target_alias=$host_alias ;;
  659.   *) target_alias=$nonopt ;;
  660.   esac ;;
  661. esac
  662.  
  663. target=`$ac_config_sub $target_alias`
  664. target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  665. target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  666. target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  667. echo "$ac_t""$target" 1>&6
  668.  
  669. echo $ac_n "checking build system type""... $ac_c" 1>&6
  670. echo "configure:671: checking build system type" >&5
  671.  
  672. build_alias=$build
  673. case "$build_alias" in
  674. NONE)
  675.   case $nonopt in
  676.   NONE) build_alias=$host_alias ;;
  677.   *) build_alias=$nonopt ;;
  678.   esac ;;
  679. esac
  680.  
  681. build=`$ac_config_sub $build_alias`
  682. build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  683. build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  684. build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  685. echo "$ac_t""$build" 1>&6
  686.  
  687. test "$host_alias" != "$target_alias" &&
  688.   test "$program_prefix$program_suffix$program_transform_name" = \
  689.     NONENONEs,x,x, &&
  690.   program_prefix=${target_alias}-
  691.  
  692. # Find a good install program.  We prefer a C program (faster),
  693. # so one script is as good as another.  But avoid the broken or
  694. # incompatible versions:
  695. # SysV /etc/install, /usr/sbin/install
  696. # SunOS /usr/etc/install
  697. # IRIX /sbin/install
  698. # AIX /bin/install
  699. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  700. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  701. # ./install, which can be erroneously created by make from ./install.sh.
  702. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  703. echo "configure:704: checking for a BSD compatible install" >&5
  704. if test -z "$INSTALL"; then
  705. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  706.   echo $ac_n "(cached) $ac_c" 1>&6
  707. else
  708.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  709.   for ac_dir in $PATH; do
  710.     # Account for people who put trailing slashes in PATH elements.
  711.     case "$ac_dir/" in
  712.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  713.     *)
  714.       # OSF1 and SCO ODT 3.0 have their own names for install.
  715.       for ac_prog in ginstall installbsd scoinst install; do
  716.         if test -f $ac_dir/$ac_prog; then
  717.       if test $ac_prog = install &&
  718.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  719.         # AIX install.  It has an incompatible calling convention.
  720.         # OSF/1 installbsd also uses dspmsg, but is usable.
  721.         :
  722.       else
  723.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  724.         break 2
  725.       fi
  726.     fi
  727.       done
  728.       ;;
  729.     esac
  730.   done
  731.   IFS="$ac_save_IFS"
  732.  
  733. fi
  734.   if test "${ac_cv_path_install+set}" = set; then
  735.     INSTALL="$ac_cv_path_install"
  736.   else
  737.     # As a last resort, use the slow shell script.  We don't cache a
  738.     # path for INSTALL within a source directory, because that will
  739.     # break other packages using the cache if that directory is
  740.     # removed, or if the path is relative.
  741.     INSTALL="$ac_install_sh"
  742.   fi
  743. fi
  744. echo "$ac_t""$INSTALL" 1>&6
  745.  
  746. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  747. # It thinks the first close brace ends the variable substitution.
  748. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  749.  
  750. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  751.  
  752.  
  753. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  754.  
  755. echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
  756. echo "configure:757: checking whether build environment is sane" >&5
  757. # Just in case
  758. sleep 1
  759. echo timestamp > conftestfile
  760. # Do `set' in a subshell so we don't clobber the current shell's
  761. # arguments.  Must try -L first in case configure is actually a
  762. # symlink; some systems play weird games with the mod time of symlinks
  763. # (eg FreeBSD returns the mod time of the symlink's containing
  764. # directory).
  765. if (
  766.    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  767.    if test "$*" = "X"; then
  768.       # -L didn't work.
  769.       set X `ls -t $srcdir/configure conftestfile`
  770.    fi
  771.    if test "$*" != "X $srcdir/configure conftestfile" \
  772.       && test "$*" != "X conftestfile $srcdir/configure"; then
  773.  
  774.       # If neither matched, then we have a broken ls.  This can happen
  775.       # if, for instance, CONFIG_SHELL is bash and it inherits a
  776.       # broken ls alias from the environment.  This has actually
  777.       # happened.  Such a system could not be considered "sane".
  778.       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
  779. alias in your environment" 1>&2; exit 1; }
  780.    fi
  781.  
  782.    test "$2" = conftestfile
  783.    )
  784. then
  785.    # Ok.
  786.    :
  787. else
  788.    { echo "configure: error: newly created file is older than distributed files!
  789. Check your system clock" 1>&2; exit 1; }
  790. fi
  791. rm -f conftest*
  792. echo "$ac_t""yes" 1>&6
  793. if test "$program_transform_name" = s,x,x,; then
  794.   program_transform_name=
  795. else
  796.   # Double any \ or $.  echo might interpret backslashes.
  797.   cat <<\EOF_SED > conftestsed
  798. s,\\,\\\\,g; s,\$,$$,g
  799. EOF_SED
  800.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  801.   rm -f conftestsed
  802. fi
  803. test "$program_prefix" != NONE &&
  804.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  805. # Use a double $ so make ignores it.
  806. test "$program_suffix" != NONE &&
  807.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  808.  
  809. # sed with no file args requires a program.
  810. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  811.  
  812. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  813. echo "configure:814: checking whether ${MAKE-make} sets \${MAKE}" >&5
  814. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  815. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  816.   echo $ac_n "(cached) $ac_c" 1>&6
  817. else
  818.   cat > conftestmake <<\EOF
  819. all:
  820.     @echo 'ac_maketemp="${MAKE}"'
  821. EOF
  822. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  823. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  824. if test -n "$ac_maketemp"; then
  825.   eval ac_cv_prog_make_${ac_make}_set=yes
  826. else
  827.   eval ac_cv_prog_make_${ac_make}_set=no
  828. fi
  829. rm -f conftestmake
  830. fi
  831. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  832.   echo "$ac_t""yes" 1>&6
  833.   SET_MAKE=
  834. else
  835.   echo "$ac_t""no" 1>&6
  836.   SET_MAKE="MAKE=${MAKE-make}"
  837. fi
  838.  
  839.  
  840. PACKAGE=package
  841.  
  842. VERSION=version
  843.  
  844. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  845.   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
  846. fi
  847.  
  848.  
  849.  
  850. missing_dir=`cd $ac_aux_dir && pwd`
  851. echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
  852. echo "configure:853: checking for working aclocal" >&5
  853. # Run test in a subshell; some versions of sh will print an error if
  854. # an executable is not found, even if stderr is redirected.
  855. # Redirect stdin to placate older versions of autoconf.  Sigh.
  856. if (aclocal --version) < /dev/null > /dev/null 2>&1; then
  857.    ACLOCAL=aclocal
  858.    echo "$ac_t""found" 1>&6
  859. else
  860.    ACLOCAL="$missing_dir/missing aclocal"
  861.    echo "$ac_t""missing" 1>&6
  862. fi
  863.  
  864. echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
  865. echo "configure:866: checking for working autoconf" >&5
  866. # Run test in a subshell; some versions of sh will print an error if
  867. # an executable is not found, even if stderr is redirected.
  868. # Redirect stdin to placate older versions of autoconf.  Sigh.
  869. if (autoconf --version) < /dev/null > /dev/null 2>&1; then
  870.    AUTOCONF=autoconf
  871.    echo "$ac_t""found" 1>&6
  872. else
  873.    AUTOCONF="$missing_dir/missing autoconf"
  874.    echo "$ac_t""missing" 1>&6
  875. fi
  876.  
  877. echo $ac_n "checking for working automake""... $ac_c" 1>&6
  878. echo "configure:879: checking for working automake" >&5
  879. # Run test in a subshell; some versions of sh will print an error if
  880. # an executable is not found, even if stderr is redirected.
  881. # Redirect stdin to placate older versions of autoconf.  Sigh.
  882. if (automake --version) < /dev/null > /dev/null 2>&1; then
  883.    AUTOMAKE=automake
  884.    echo "$ac_t""found" 1>&6
  885. else
  886.    AUTOMAKE="$missing_dir/missing automake"
  887.    echo "$ac_t""missing" 1>&6
  888. fi
  889.  
  890. echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
  891. echo "configure:892: checking for working autoheader" >&5
  892. # Run test in a subshell; some versions of sh will print an error if
  893. # an executable is not found, even if stderr is redirected.
  894. # Redirect stdin to placate older versions of autoconf.  Sigh.
  895. if (autoheader --version) < /dev/null > /dev/null 2>&1; then
  896.    AUTOHEADER=autoheader
  897.    echo "$ac_t""found" 1>&6
  898. else
  899.    AUTOHEADER="$missing_dir/missing autoheader"
  900.    echo "$ac_t""missing" 1>&6
  901. fi
  902.  
  903. echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
  904. echo "configure:905: checking for working makeinfo" >&5
  905. # Run test in a subshell; some versions of sh will print an error if
  906. # an executable is not found, even if stderr is redirected.
  907. # Redirect stdin to placate older versions of autoconf.  Sigh.
  908. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
  909.    MAKEINFO=makeinfo
  910.    echo "$ac_t""found" 1>&6
  911. else
  912.    MAKEINFO="$missing_dir/missing makeinfo"
  913.    echo "$ac_t""missing" 1>&6
  914. fi
  915.  
  916.  
  917. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  918. echo "configure:919: checking whether ${MAKE-make} sets \${MAKE}" >&5
  919. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  920. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  921.   echo $ac_n "(cached) $ac_c" 1>&6
  922. else
  923.   cat > conftestmake <<\EOF
  924. all:
  925.     @echo 'ac_maketemp="${MAKE}"'
  926. EOF
  927. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  928. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  929. if test -n "$ac_maketemp"; then
  930.   eval ac_cv_prog_make_${ac_make}_set=yes
  931. else
  932.   eval ac_cv_prog_make_${ac_make}_set=no
  933. fi
  934. rm -f conftestmake
  935. fi
  936. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  937.   echo "$ac_t""yes" 1>&6
  938.   SET_MAKE=
  939. else
  940.   echo "$ac_t""no" 1>&6
  941.   SET_MAKE="MAKE=${MAKE-make}"
  942. fi
  943.  
  944. if false; then
  945. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  946. echo "configure:947: checking how to run the C preprocessor" >&5
  947. # On Suns, sometimes $CPP names a directory.
  948. if test -n "$CPP" && test -d "$CPP"; then
  949.   CPP=
  950. fi
  951. if test -z "$CPP"; then
  952. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  953.   echo $ac_n "(cached) $ac_c" 1>&6
  954. else
  955.     # This must be in double quotes, not single quotes, because CPP may get
  956.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  957.   CPP="${CC-cc} -E"
  958.   # On the NeXT, cc -E runs the code through the compiler's parser,
  959.   # not just through cpp.
  960.   cat > conftest.$ac_ext <<EOF
  961. #line 962 "configure"
  962. #include "confdefs.h"
  963. #include <assert.h>
  964. Syntax Error
  965. EOF
  966. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  967. { (eval echo configure:968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  968. ac_err=`grep -v '^ *+' conftest.out`
  969. if test -z "$ac_err"; then
  970.   :
  971. else
  972.   echo "$ac_err" >&5
  973.   echo "configure: failed program was:" >&5
  974.   cat conftest.$ac_ext >&5
  975.   rm -rf conftest*
  976.   CPP="${CC-cc} -E -traditional-cpp"
  977.   cat > conftest.$ac_ext <<EOF
  978. #line 979 "configure"
  979. #include "confdefs.h"
  980. #include <assert.h>
  981. Syntax Error
  982. EOF
  983. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  984. { (eval echo configure:985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  985. ac_err=`grep -v '^ *+' conftest.out`
  986. if test -z "$ac_err"; then
  987.   :
  988. else
  989.   echo "$ac_err" >&5
  990.   echo "configure: failed program was:" >&5
  991.   cat conftest.$ac_ext >&5
  992.   rm -rf conftest*
  993.   CPP=/lib/cpp
  994. fi
  995. rm -f conftest*
  996. fi
  997. rm -f conftest*
  998.   ac_cv_prog_CPP="$CPP"
  999. fi
  1000.   CPP="$ac_cv_prog_CPP"
  1001. else
  1002.   ac_cv_prog_CPP="$CPP"
  1003. fi
  1004. echo "$ac_t""$CPP" 1>&6
  1005.  
  1006. # If we find X, set shell vars x_includes and x_libraries to the
  1007. # paths, otherwise set no_x=yes.
  1008. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1009. # --without-x overrides everything else, but does not touch the cache.
  1010. echo $ac_n "checking for X""... $ac_c" 1>&6
  1011. echo "configure:1012: checking for X" >&5
  1012.  
  1013. # Check whether --with-x or --without-x was given.
  1014. if test "${with_x+set}" = set; then
  1015.   withval="$with_x"
  1016.   :
  1017. fi
  1018.  
  1019. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1020. if test "x$with_x" = xno; then
  1021.   # The user explicitly disabled X.
  1022.   have_x=disabled
  1023. else
  1024.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1025.     # Both variables are already set.
  1026.     have_x=yes
  1027.   else
  1028. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1029.   echo $ac_n "(cached) $ac_c" 1>&6
  1030. else
  1031.   # One or both of the vars are not set, and there is no cached value.
  1032. ac_x_includes=NO ac_x_libraries=NO
  1033. rm -fr conftestdir
  1034. if mkdir conftestdir; then
  1035.   cd conftestdir
  1036.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1037.   cat > Imakefile <<'EOF'
  1038. acfindx:
  1039.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1040. EOF
  1041.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1042.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1043.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1044.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1045.     for ac_extension in a so sl; do
  1046.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1047.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1048.         ac_im_usrlibdir=$ac_im_libdir; break
  1049.       fi
  1050.     done
  1051.     # Screen out bogus values from the imake configuration.  They are
  1052.     # bogus both because they are the default anyway, and because
  1053.     # using them would break gcc on systems where it needs fixed includes.
  1054.     case "$ac_im_incroot" in
  1055.     /usr/include) ;;
  1056.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1057.     esac
  1058.     case "$ac_im_usrlibdir" in
  1059.     /usr/lib | /lib) ;;
  1060.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1061.     esac
  1062.   fi
  1063.   cd ..
  1064.   rm -fr conftestdir
  1065. fi
  1066.  
  1067. if test "$ac_x_includes" = NO; then
  1068.   # Guess where to find include files, by looking for this one X11 .h file.
  1069.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1070.  
  1071.   # First, try using that file with no special directory specified.
  1072. cat > conftest.$ac_ext <<EOF
  1073. #line 1074 "configure"
  1074. #include "confdefs.h"
  1075. #include <$x_direct_test_include>
  1076. EOF
  1077. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1078. { (eval echo configure:1079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1079. ac_err=`grep -v '^ *+' conftest.out`
  1080. if test -z "$ac_err"; then
  1081.   rm -rf conftest*
  1082.   # We can compile using X headers with no special include directory.
  1083. ac_x_includes=
  1084. else
  1085.   echo "$ac_err" >&5
  1086.   echo "configure: failed program was:" >&5
  1087.   cat conftest.$ac_ext >&5
  1088.   rm -rf conftest*
  1089.   # Look for the header file in a standard set of common directories.
  1090. # Check X11 before X11Rn because it is often a symlink to the current release.
  1091.   for ac_dir in               \
  1092.     /usr/X11/include          \
  1093.     /usr/X11R6/include        \
  1094.     /usr/X11R5/include        \
  1095.     /usr/X11R4/include        \
  1096.                               \
  1097.     /usr/include/X11          \
  1098.     /usr/include/X11R6        \
  1099.     /usr/include/X11R5        \
  1100.     /usr/include/X11R4        \
  1101.                               \
  1102.     /usr/local/X11/include    \
  1103.     /usr/local/X11R6/include  \
  1104.     /usr/local/X11R5/include  \
  1105.     /usr/local/X11R4/include  \
  1106.                               \
  1107.     /usr/local/include/X11    \
  1108.     /usr/local/include/X11R6  \
  1109.     /usr/local/include/X11R5  \
  1110.     /usr/local/include/X11R4  \
  1111.                               \
  1112.     /usr/X386/include         \
  1113.     /usr/x386/include         \
  1114.     /usr/XFree86/include/X11  \
  1115.                               \
  1116.     /usr/include              \
  1117.     /usr/local/include        \
  1118.     /usr/unsupported/include  \
  1119.     /usr/athena/include       \
  1120.     /usr/local/x11r5/include  \
  1121.     /usr/lpp/Xamples/include  \
  1122.                               \
  1123.     /usr/openwin/include      \
  1124.     /usr/openwin/share/include \
  1125.     ; \
  1126.   do
  1127.     if test -r "$ac_dir/$x_direct_test_include"; then
  1128.       ac_x_includes=$ac_dir
  1129.       break
  1130.     fi
  1131.   done
  1132. fi
  1133. rm -f conftest*
  1134. fi # $ac_x_includes = NO
  1135.  
  1136. if test "$ac_x_libraries" = NO; then
  1137.   # Check for the libraries.
  1138.  
  1139.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  1140.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  1141.  
  1142.   # See if we find them without any special options.
  1143.   # Don't add to $LIBS permanently.
  1144.   ac_save_LIBS="$LIBS"
  1145.   LIBS="-l$x_direct_test_library $LIBS"
  1146. cat > conftest.$ac_ext <<EOF
  1147. #line 1148 "configure"
  1148. #include "confdefs.h"
  1149.  
  1150. int main() {
  1151. ${x_direct_test_function}()
  1152. ; return 0; }
  1153. EOF
  1154. if { (eval echo configure:1155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1155.   rm -rf conftest*
  1156.   LIBS="$ac_save_LIBS"
  1157. # We can link X programs with no special library path.
  1158. ac_x_libraries=
  1159. else
  1160.   echo "configure: failed program was:" >&5
  1161.   cat conftest.$ac_ext >&5
  1162.   rm -rf conftest*
  1163.   LIBS="$ac_save_LIBS"
  1164. # First see if replacing the include by lib works.
  1165. # Check X11 before X11Rn because it is often a symlink to the current release.
  1166. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1167.     /usr/X11/lib          \
  1168.     /usr/X11R6/lib        \
  1169.     /usr/X11R5/lib        \
  1170.     /usr/X11R4/lib        \
  1171.                           \
  1172.     /usr/lib/X11          \
  1173.     /usr/lib/X11R6        \
  1174.     /usr/lib/X11R5        \
  1175.     /usr/lib/X11R4        \
  1176.                           \
  1177.     /usr/local/X11/lib    \
  1178.     /usr/local/X11R6/lib  \
  1179.     /usr/local/X11R5/lib  \
  1180.     /usr/local/X11R4/lib  \
  1181.                           \
  1182.     /usr/local/lib/X11    \
  1183.     /usr/local/lib/X11R6  \
  1184.     /usr/local/lib/X11R5  \
  1185.     /usr/local/lib/X11R4  \
  1186.                           \
  1187.     /usr/X386/lib         \
  1188.     /usr/x386/lib         \
  1189.     /usr/XFree86/lib/X11  \
  1190.                           \
  1191.     /usr/lib              \
  1192.     /usr/local/lib        \
  1193.     /usr/unsupported/lib  \
  1194.     /usr/athena/lib       \
  1195.     /usr/local/x11r5/lib  \
  1196.     /usr/lpp/Xamples/lib  \
  1197.     /lib/usr/lib/X11      \
  1198.                           \
  1199.     /usr/openwin/lib      \
  1200.     /usr/openwin/share/lib \
  1201.     ; \
  1202. do
  1203.   for ac_extension in a so sl; do
  1204.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1205.       ac_x_libraries=$ac_dir
  1206.       break 2
  1207.     fi
  1208.   done
  1209. done
  1210. fi
  1211. rm -f conftest*
  1212. fi # $ac_x_libraries = NO
  1213.  
  1214. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  1215.   # Didn't find X anywhere.  Cache the known absence of X.
  1216.   ac_cv_have_x="have_x=no"
  1217. else
  1218.   # Record where we found X for the cache.
  1219.   ac_cv_have_x="have_x=yes \
  1220.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1221. fi
  1222. fi
  1223.   fi
  1224.   eval "$ac_cv_have_x"
  1225. fi # $with_x != no
  1226.  
  1227. if test "$have_x" != yes; then
  1228.   echo "$ac_t""$have_x" 1>&6
  1229.   no_x=yes
  1230. else
  1231.   # If each of the values was on the command line, it overrides each guess.
  1232.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1233.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1234.   # Update the cache value to reflect the command line values.
  1235.   ac_cv_have_x="have_x=yes \
  1236.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1237.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  1238. fi
  1239.  
  1240. if test "$no_x" = yes; then
  1241.   # Not all programs may use this symbol, but it does not hurt to define it.
  1242.   cat >> confdefs.h <<\EOF
  1243. #define X_DISPLAY_MISSING 1
  1244. EOF
  1245.  
  1246.   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  1247. else
  1248.   if test -n "$x_includes"; then
  1249.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  1250.   fi
  1251.  
  1252.   # It would also be nice to do this for all -L options, not just this one.
  1253.   if test -n "$x_libraries"; then
  1254.     X_LIBS="$X_LIBS -L$x_libraries"
  1255.     # For Solaris; some versions of Sun CC require a space after -R and
  1256.     # others require no space.  Words are not sufficient . . . .
  1257.     case "`(uname -sr) 2>/dev/null`" in
  1258.     "SunOS 5"*)
  1259.       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  1260. echo "configure:1261: checking whether -R must be followed by a space" >&5
  1261.       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  1262.       cat > conftest.$ac_ext <<EOF
  1263. #line 1264 "configure"
  1264. #include "confdefs.h"
  1265.  
  1266. int main() {
  1267.  
  1268. ; return 0; }
  1269. EOF
  1270. if { (eval echo configure:1271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1271.   rm -rf conftest*
  1272.   ac_R_nospace=yes
  1273. else
  1274.   echo "configure: failed program was:" >&5
  1275.   cat conftest.$ac_ext >&5
  1276.   rm -rf conftest*
  1277.   ac_R_nospace=no
  1278. fi
  1279. rm -f conftest*
  1280.       if test $ac_R_nospace = yes; then
  1281.     echo "$ac_t""no" 1>&6
  1282.     X_LIBS="$X_LIBS -R$x_libraries"
  1283.       else
  1284.     LIBS="$ac_xsave_LIBS -R $x_libraries"
  1285.     cat > conftest.$ac_ext <<EOF
  1286. #line 1287 "configure"
  1287. #include "confdefs.h"
  1288.  
  1289. int main() {
  1290.  
  1291. ; return 0; }
  1292. EOF
  1293. if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1294.   rm -rf conftest*
  1295.   ac_R_space=yes
  1296. else
  1297.   echo "configure: failed program was:" >&5
  1298.   cat conftest.$ac_ext >&5
  1299.   rm -rf conftest*
  1300.   ac_R_space=no
  1301. fi
  1302. rm -f conftest*
  1303.     if test $ac_R_space = yes; then
  1304.       echo "$ac_t""yes" 1>&6
  1305.       X_LIBS="$X_LIBS -R $x_libraries"
  1306.     else
  1307.       echo "$ac_t""neither works" 1>&6
  1308.     fi
  1309.       fi
  1310.       LIBS="$ac_xsave_LIBS"
  1311.     esac
  1312.   fi
  1313.  
  1314.   # Check for system-dependent libraries X programs must link with.
  1315.   # Do this before checking for the system-independent R6 libraries
  1316.   # (-lICE), since we may need -lsocket or whatever for X linking.
  1317.  
  1318.   if test "$ISC" = yes; then
  1319.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  1320.   else
  1321.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  1322.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  1323.     # the Alpha needs dnet_stub (dnet does not exist).
  1324.     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  1325. echo "configure:1326: checking for dnet_ntoa in -ldnet" >&5
  1326. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  1327. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1328.   echo $ac_n "(cached) $ac_c" 1>&6
  1329. else
  1330.   ac_save_LIBS="$LIBS"
  1331. LIBS="-ldnet  $LIBS"
  1332. cat > conftest.$ac_ext <<EOF
  1333. #line 1334 "configure"
  1334. #include "confdefs.h"
  1335. /* Override any gcc2 internal prototype to avoid an error.  */
  1336. /* We use char because int might match the return type of a gcc2
  1337.     builtin and then its argument prototype would still apply.  */
  1338. char dnet_ntoa();
  1339.  
  1340. int main() {
  1341. dnet_ntoa()
  1342. ; return 0; }
  1343. EOF
  1344. if { (eval echo configure:1345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1345.   rm -rf conftest*
  1346.   eval "ac_cv_lib_$ac_lib_var=yes"
  1347. else
  1348.   echo "configure: failed program was:" >&5
  1349.   cat conftest.$ac_ext >&5
  1350.   rm -rf conftest*
  1351.   eval "ac_cv_lib_$ac_lib_var=no"
  1352. fi
  1353. rm -f conftest*
  1354. LIBS="$ac_save_LIBS"
  1355.  
  1356. fi
  1357. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1358.   echo "$ac_t""yes" 1>&6
  1359.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  1360. else
  1361.   echo "$ac_t""no" 1>&6
  1362. fi
  1363.  
  1364.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  1365.       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  1366. echo "configure:1367: checking for dnet_ntoa in -ldnet_stub" >&5
  1367. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  1368. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1369.   echo $ac_n "(cached) $ac_c" 1>&6
  1370. else
  1371.   ac_save_LIBS="$LIBS"
  1372. LIBS="-ldnet_stub  $LIBS"
  1373. cat > conftest.$ac_ext <<EOF
  1374. #line 1375 "configure"
  1375. #include "confdefs.h"
  1376. /* Override any gcc2 internal prototype to avoid an error.  */
  1377. /* We use char because int might match the return type of a gcc2
  1378.     builtin and then its argument prototype would still apply.  */
  1379. char dnet_ntoa();
  1380.  
  1381. int main() {
  1382. dnet_ntoa()
  1383. ; return 0; }
  1384. EOF
  1385. if { (eval echo configure:1386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1386.   rm -rf conftest*
  1387.   eval "ac_cv_lib_$ac_lib_var=yes"
  1388. else
  1389.   echo "configure: failed program was:" >&5
  1390.   cat conftest.$ac_ext >&5
  1391.   rm -rf conftest*
  1392.   eval "ac_cv_lib_$ac_lib_var=no"
  1393. fi
  1394. rm -f conftest*
  1395. LIBS="$ac_save_LIBS"
  1396.  
  1397. fi
  1398. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1399.   echo "$ac_t""yes" 1>&6
  1400.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  1401. else
  1402.   echo "$ac_t""no" 1>&6
  1403. fi
  1404.  
  1405.     fi
  1406.  
  1407.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  1408.     # to get the SysV transport functions.
  1409.     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  1410.     # needs -lnsl.
  1411.     # The nsl library prevents programs from opening the X display
  1412.     # on Irix 5.2, according to dickey@clark.net.
  1413.     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  1414. echo "configure:1415: checking for gethostbyname" >&5
  1415. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  1416.   echo $ac_n "(cached) $ac_c" 1>&6
  1417. else
  1418.   cat > conftest.$ac_ext <<EOF
  1419. #line 1420 "configure"
  1420. #include "confdefs.h"
  1421. /* System header to define __stub macros and hopefully few prototypes,
  1422.     which can conflict with char gethostbyname(); below.  */
  1423. #include <assert.h>
  1424. /* Override any gcc2 internal prototype to avoid an error.  */
  1425. /* We use char because int might match the return type of a gcc2
  1426.     builtin and then its argument prototype would still apply.  */
  1427. char gethostbyname();
  1428.  
  1429. int main() {
  1430.  
  1431. /* The GNU C library defines this for functions which it implements
  1432.     to always fail with ENOSYS.  Some functions are actually named
  1433.     something starting with __ and the normal name is an alias.  */
  1434. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  1435. choke me
  1436. #else
  1437. gethostbyname();
  1438. #endif
  1439.  
  1440. ; return 0; }
  1441. EOF
  1442. if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1443.   rm -rf conftest*
  1444.   eval "ac_cv_func_gethostbyname=yes"
  1445. else
  1446.   echo "configure: failed program was:" >&5
  1447.   cat conftest.$ac_ext >&5
  1448.   rm -rf conftest*
  1449.   eval "ac_cv_func_gethostbyname=no"
  1450. fi
  1451. rm -f conftest*
  1452. fi
  1453.  
  1454. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  1455.   echo "$ac_t""yes" 1>&6
  1456.   :
  1457. else
  1458.   echo "$ac_t""no" 1>&6
  1459. fi
  1460.  
  1461.     if test $ac_cv_func_gethostbyname = no; then
  1462.       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  1463. echo "configure:1464: checking for gethostbyname in -lnsl" >&5
  1464. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  1465. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1466.   echo $ac_n "(cached) $ac_c" 1>&6
  1467. else
  1468.   ac_save_LIBS="$LIBS"
  1469. LIBS="-lnsl  $LIBS"
  1470. cat > conftest.$ac_ext <<EOF
  1471. #line 1472 "configure"
  1472. #include "confdefs.h"
  1473. /* Override any gcc2 internal prototype to avoid an error.  */
  1474. /* We use char because int might match the return type of a gcc2
  1475.     builtin and then its argument prototype would still apply.  */
  1476. char gethostbyname();
  1477.  
  1478. int main() {
  1479. gethostbyname()
  1480. ; return 0; }
  1481. EOF
  1482. if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1483.   rm -rf conftest*
  1484.   eval "ac_cv_lib_$ac_lib_var=yes"
  1485. else
  1486.   echo "configure: failed program was:" >&5
  1487.   cat conftest.$ac_ext >&5
  1488.   rm -rf conftest*
  1489.   eval "ac_cv_lib_$ac_lib_var=no"
  1490. fi
  1491. rm -f conftest*
  1492. LIBS="$ac_save_LIBS"
  1493.  
  1494. fi
  1495. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1496.   echo "$ac_t""yes" 1>&6
  1497.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  1498. else
  1499.   echo "$ac_t""no" 1>&6
  1500. fi
  1501.  
  1502.     fi
  1503.  
  1504.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  1505.     # socket/setsockopt and other routines are undefined under SCO ODT
  1506.     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  1507.     # on later versions), says simon@lia.di.epfl.ch: it contains
  1508.     # gethostby* variants that don't use the nameserver (or something).
  1509.     # -lsocket must be given before -lnsl if both are needed.
  1510.     # We assume that if connect needs -lnsl, so does gethostbyname.
  1511.     echo $ac_n "checking for connect""... $ac_c" 1>&6
  1512. echo "configure:1513: checking for connect" >&5
  1513. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  1514.   echo $ac_n "(cached) $ac_c" 1>&6
  1515. else
  1516.   cat > conftest.$ac_ext <<EOF
  1517. #line 1518 "configure"
  1518. #include "confdefs.h"
  1519. /* System header to define __stub macros and hopefully few prototypes,
  1520.     which can conflict with char connect(); below.  */
  1521. #include <assert.h>
  1522. /* Override any gcc2 internal prototype to avoid an error.  */
  1523. /* We use char because int might match the return type of a gcc2
  1524.     builtin and then its argument prototype would still apply.  */
  1525. char connect();
  1526.  
  1527. int main() {
  1528.  
  1529. /* The GNU C library defines this for functions which it implements
  1530.     to always fail with ENOSYS.  Some functions are actually named
  1531.     something starting with __ and the normal name is an alias.  */
  1532. #if defined (__stub_connect) || defined (__stub___connect)
  1533. choke me
  1534. #else
  1535. connect();
  1536. #endif
  1537.  
  1538. ; return 0; }
  1539. EOF
  1540. if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1541.   rm -rf conftest*
  1542.   eval "ac_cv_func_connect=yes"
  1543. else
  1544.   echo "configure: failed program was:" >&5
  1545.   cat conftest.$ac_ext >&5
  1546.   rm -rf conftest*
  1547.   eval "ac_cv_func_connect=no"
  1548. fi
  1549. rm -f conftest*
  1550. fi
  1551.  
  1552. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  1553.   echo "$ac_t""yes" 1>&6
  1554.   :
  1555. else
  1556.   echo "$ac_t""no" 1>&6
  1557. fi
  1558.  
  1559.     if test $ac_cv_func_connect = no; then
  1560.       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  1561. echo "configure:1562: checking for connect in -lsocket" >&5
  1562. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  1563. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1564.   echo $ac_n "(cached) $ac_c" 1>&6
  1565. else
  1566.   ac_save_LIBS="$LIBS"
  1567. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  1568. cat > conftest.$ac_ext <<EOF
  1569. #line 1570 "configure"
  1570. #include "confdefs.h"
  1571. /* Override any gcc2 internal prototype to avoid an error.  */
  1572. /* We use char because int might match the return type of a gcc2
  1573.     builtin and then its argument prototype would still apply.  */
  1574. char connect();
  1575.  
  1576. int main() {
  1577. connect()
  1578. ; return 0; }
  1579. EOF
  1580. if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1581.   rm -rf conftest*
  1582.   eval "ac_cv_lib_$ac_lib_var=yes"
  1583. else
  1584.   echo "configure: failed program was:" >&5
  1585.   cat conftest.$ac_ext >&5
  1586.   rm -rf conftest*
  1587.   eval "ac_cv_lib_$ac_lib_var=no"
  1588. fi
  1589. rm -f conftest*
  1590. LIBS="$ac_save_LIBS"
  1591.  
  1592. fi
  1593. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1594.   echo "$ac_t""yes" 1>&6
  1595.   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  1596. else
  1597.   echo "$ac_t""no" 1>&6
  1598. fi
  1599.  
  1600.     fi
  1601.  
  1602.     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  1603.     echo $ac_n "checking for remove""... $ac_c" 1>&6
  1604. echo "configure:1605: checking for remove" >&5
  1605. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  1606.   echo $ac_n "(cached) $ac_c" 1>&6
  1607. else
  1608.   cat > conftest.$ac_ext <<EOF
  1609. #line 1610 "configure"
  1610. #include "confdefs.h"
  1611. /* System header to define __stub macros and hopefully few prototypes,
  1612.     which can conflict with char remove(); below.  */
  1613. #include <assert.h>
  1614. /* Override any gcc2 internal prototype to avoid an error.  */
  1615. /* We use char because int might match the return type of a gcc2
  1616.     builtin and then its argument prototype would still apply.  */
  1617. char remove();
  1618.  
  1619. int main() {
  1620.  
  1621. /* The GNU C library defines this for functions which it implements
  1622.     to always fail with ENOSYS.  Some functions are actually named
  1623.     something starting with __ and the normal name is an alias.  */
  1624. #if defined (__stub_remove) || defined (__stub___remove)
  1625. choke me
  1626. #else
  1627. remove();
  1628. #endif
  1629.  
  1630. ; return 0; }
  1631. EOF
  1632. if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1633.   rm -rf conftest*
  1634.   eval "ac_cv_func_remove=yes"
  1635. else
  1636.   echo "configure: failed program was:" >&5
  1637.   cat conftest.$ac_ext >&5
  1638.   rm -rf conftest*
  1639.   eval "ac_cv_func_remove=no"
  1640. fi
  1641. rm -f conftest*
  1642. fi
  1643.  
  1644. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  1645.   echo "$ac_t""yes" 1>&6
  1646.   :
  1647. else
  1648.   echo "$ac_t""no" 1>&6
  1649. fi
  1650.  
  1651.     if test $ac_cv_func_remove = no; then
  1652.       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  1653. echo "configure:1654: checking for remove in -lposix" >&5
  1654. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  1655. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1656.   echo $ac_n "(cached) $ac_c" 1>&6
  1657. else
  1658.   ac_save_LIBS="$LIBS"
  1659. LIBS="-lposix  $LIBS"
  1660. cat > conftest.$ac_ext <<EOF
  1661. #line 1662 "configure"
  1662. #include "confdefs.h"
  1663. /* Override any gcc2 internal prototype to avoid an error.  */
  1664. /* We use char because int might match the return type of a gcc2
  1665.     builtin and then its argument prototype would still apply.  */
  1666. char remove();
  1667.  
  1668. int main() {
  1669. remove()
  1670. ; return 0; }
  1671. EOF
  1672. if { (eval echo configure:1673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1673.   rm -rf conftest*
  1674.   eval "ac_cv_lib_$ac_lib_var=yes"
  1675. else
  1676.   echo "configure: failed program was:" >&5
  1677.   cat conftest.$ac_ext >&5
  1678.   rm -rf conftest*
  1679.   eval "ac_cv_lib_$ac_lib_var=no"
  1680. fi
  1681. rm -f conftest*
  1682. LIBS="$ac_save_LIBS"
  1683.  
  1684. fi
  1685. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1686.   echo "$ac_t""yes" 1>&6
  1687.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  1688. else
  1689.   echo "$ac_t""no" 1>&6
  1690. fi
  1691.  
  1692.     fi
  1693.  
  1694.     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  1695.     echo $ac_n "checking for shmat""... $ac_c" 1>&6
  1696. echo "configure:1697: checking for shmat" >&5
  1697. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  1698.   echo $ac_n "(cached) $ac_c" 1>&6
  1699. else
  1700.   cat > conftest.$ac_ext <<EOF
  1701. #line 1702 "configure"
  1702. #include "confdefs.h"
  1703. /* System header to define __stub macros and hopefully few prototypes,
  1704.     which can conflict with char shmat(); below.  */
  1705. #include <assert.h>
  1706. /* Override any gcc2 internal prototype to avoid an error.  */
  1707. /* We use char because int might match the return type of a gcc2
  1708.     builtin and then its argument prototype would still apply.  */
  1709. char shmat();
  1710.  
  1711. int main() {
  1712.  
  1713. /* The GNU C library defines this for functions which it implements
  1714.     to always fail with ENOSYS.  Some functions are actually named
  1715.     something starting with __ and the normal name is an alias.  */
  1716. #if defined (__stub_shmat) || defined (__stub___shmat)
  1717. choke me
  1718. #else
  1719. shmat();
  1720. #endif
  1721.  
  1722. ; return 0; }
  1723. EOF
  1724. if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1725.   rm -rf conftest*
  1726.   eval "ac_cv_func_shmat=yes"
  1727. else
  1728.   echo "configure: failed program was:" >&5
  1729.   cat conftest.$ac_ext >&5
  1730.   rm -rf conftest*
  1731.   eval "ac_cv_func_shmat=no"
  1732. fi
  1733. rm -f conftest*
  1734. fi
  1735.  
  1736. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  1737.   echo "$ac_t""yes" 1>&6
  1738.   :
  1739. else
  1740.   echo "$ac_t""no" 1>&6
  1741. fi
  1742.  
  1743.     if test $ac_cv_func_shmat = no; then
  1744.       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  1745. echo "configure:1746: checking for shmat in -lipc" >&5
  1746. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  1747. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1748.   echo $ac_n "(cached) $ac_c" 1>&6
  1749. else
  1750.   ac_save_LIBS="$LIBS"
  1751. LIBS="-lipc  $LIBS"
  1752. cat > conftest.$ac_ext <<EOF
  1753. #line 1754 "configure"
  1754. #include "confdefs.h"
  1755. /* Override any gcc2 internal prototype to avoid an error.  */
  1756. /* We use char because int might match the return type of a gcc2
  1757.     builtin and then its argument prototype would still apply.  */
  1758. char shmat();
  1759.  
  1760. int main() {
  1761. shmat()
  1762. ; return 0; }
  1763. EOF
  1764. if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1765.   rm -rf conftest*
  1766.   eval "ac_cv_lib_$ac_lib_var=yes"
  1767. else
  1768.   echo "configure: failed program was:" >&5
  1769.   cat conftest.$ac_ext >&5
  1770.   rm -rf conftest*
  1771.   eval "ac_cv_lib_$ac_lib_var=no"
  1772. fi
  1773. rm -f conftest*
  1774. LIBS="$ac_save_LIBS"
  1775.  
  1776. fi
  1777. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1778.   echo "$ac_t""yes" 1>&6
  1779.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  1780. else
  1781.   echo "$ac_t""no" 1>&6
  1782. fi
  1783.  
  1784.     fi
  1785.   fi
  1786.  
  1787.   # Check for libraries that X11R6 Xt/Xaw programs need.
  1788.   ac_save_LDFLAGS="$LDFLAGS"
  1789.   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  1790.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  1791.   # check for ICE first), but we must link in the order -lSM -lICE or
  1792.   # we get undefined symbols.  So assume we have SM if we have ICE.
  1793.   # These have to be linked with before -lX11, unlike the other
  1794.   # libraries we check for below, so use a different variable.
  1795.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  1796.   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  1797. echo "configure:1798: checking for IceConnectionNumber in -lICE" >&5
  1798. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  1799. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1800.   echo $ac_n "(cached) $ac_c" 1>&6
  1801. else
  1802.   ac_save_LIBS="$LIBS"
  1803. LIBS="-lICE  $LIBS"
  1804. cat > conftest.$ac_ext <<EOF
  1805. #line 1806 "configure"
  1806. #include "confdefs.h"
  1807. /* Override any gcc2 internal prototype to avoid an error.  */
  1808. /* We use char because int might match the return type of a gcc2
  1809.     builtin and then its argument prototype would still apply.  */
  1810. char IceConnectionNumber();
  1811.  
  1812. int main() {
  1813. IceConnectionNumber()
  1814. ; return 0; }
  1815. EOF
  1816. if { (eval echo configure:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1817.   rm -rf conftest*
  1818.   eval "ac_cv_lib_$ac_lib_var=yes"
  1819. else
  1820.   echo "configure: failed program was:" >&5
  1821.   cat conftest.$ac_ext >&5
  1822.   rm -rf conftest*
  1823.   eval "ac_cv_lib_$ac_lib_var=no"
  1824. fi
  1825. rm -f conftest*
  1826. LIBS="$ac_save_LIBS"
  1827.  
  1828. fi
  1829. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1830.   echo "$ac_t""yes" 1>&6
  1831.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  1832. else
  1833.   echo "$ac_t""no" 1>&6
  1834. fi
  1835.  
  1836.   LDFLAGS="$ac_save_LDFLAGS"
  1837.  
  1838. fi
  1839.  
  1840.  
  1841.  
  1842. motif_includes=
  1843. motif_libraries=
  1844. # Check whether --with-motif or --without-motif was given.
  1845. if test "${with_motif+set}" = set; then
  1846.   withval="$with_motif"
  1847.   :
  1848. fi
  1849.  
  1850. if test "$with_motif" = "no"
  1851. then
  1852. motif_includes=no
  1853. motif_libraries=no
  1854. fi
  1855. # Check whether --with-motif-includes or --without-motif-includes was given.
  1856. if test "${with_motif_includes+set}" = set; then
  1857.   withval="$with_motif_includes"
  1858.   motif_includes="$withval"
  1859. fi
  1860.  
  1861. # Check whether --with-motif-libraries or --without-motif-libraries was given.
  1862. if test "${with_motif_libraries+set}" = set; then
  1863.   withval="$with_motif_libraries"
  1864.   motif_libraries="$withval"
  1865. fi
  1866.  
  1867. echo $ac_n "checking for Motif""... $ac_c" 1>&6
  1868. echo "configure:1869: checking for Motif" >&5
  1869. #
  1870. #
  1871. # Search the include files.
  1872. #
  1873. if test "$motif_includes" = ""; then
  1874. if eval "test \"`echo '$''{'ice_cv_motif_includes'+set}'`\" = set"; then
  1875.   echo $ac_n "(cached) $ac_c" 1>&6
  1876. else
  1877.   
  1878. ice_motif_save_LIBS="$LIBS"
  1879. ice_motif_save_CFLAGS="$CFLAGS"
  1880. ice_motif_save_CPPFLAGS="$CPPFLAGS"
  1881. ice_motif_save_LDFLAGS="$LDFLAGS"
  1882. #
  1883. LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
  1884. CFLAGS="$X_CFLAGS $CFLAGS"
  1885. CPPFLAGS="$X_CFLAGS $CPPFLAGS"
  1886. LDFLAGS="$X_LIBS $LDFLAGS"
  1887. #
  1888. cat > conftest.$ac_ext <<EOF
  1889. #line 1890 "configure"
  1890. #include "confdefs.h"
  1891. #include <Xm/Xm.h>
  1892. int main() {
  1893. int a;
  1894. ; return 0; }
  1895. EOF
  1896. if { (eval echo configure:1897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1897.   rm -rf conftest*
  1898.   
  1899. # Xm/Xm.h is in the standard search path.
  1900. ice_cv_motif_includes=
  1901.  
  1902. else
  1903.   echo "configure: failed program was:" >&5
  1904.   cat conftest.$ac_ext >&5
  1905.   rm -rf conftest*
  1906.   
  1907. # Xm/Xm.h is not in the standard search path.
  1908. # Locate it and put its directory in `motif_includes'
  1909. #
  1910. # /usr/include/Motif* are used on HP-UX (Motif).
  1911. # /usr/include/X11* are used on HP-UX (X and Athena).
  1912. # /usr/dt is used on Solaris (Motif).
  1913. # /usr/openwin is used on Solaris (X and Athena).
  1914. # Other directories are just guesses.
  1915. for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
  1916.            /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
  1917.            /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
  1918.            /usr/dt/include /usr/openwin/include \
  1919.            /usr/dt/*/include /opt/*/include /usr/include/Motif* \
  1920.        "${prefix}"/*/include /usr/*/include /usr/local/*/include \
  1921.        "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
  1922. if test -f "$dir/Xm/Xm.h"; then
  1923. ice_cv_motif_includes="$dir"
  1924. break
  1925. fi
  1926. done
  1927. if test "$ice_cv_motif_includes" = ""; then
  1928. ice_cv_motif_includes=no
  1929. fi
  1930.  
  1931. fi
  1932. rm -f conftest*
  1933. #
  1934. LIBS="$ice_motif_save_LIBS"
  1935. CFLAGS="$ice_motif_save_CFLAGS"
  1936. CPPFLAGS="$ice_motif_save_CPPFLAGS"
  1937. LDFLAGS="$ice_motif_save_LDFLAGS"
  1938.  
  1939. fi
  1940.  
  1941. motif_includes="$ice_cv_motif_includes"
  1942. fi
  1943. #
  1944. #
  1945. # Now for the libraries.
  1946. #
  1947. if test "$motif_libraries" = ""; then
  1948. if eval "test \"`echo '$''{'ice_cv_motif_libraries'+set}'`\" = set"; then
  1949.   echo $ac_n "(cached) $ac_c" 1>&6
  1950. else
  1951.   
  1952. ice_motif_save_LIBS="$LIBS"
  1953. ice_motif_save_CFLAGS="$CFLAGS"
  1954. ice_motif_save_CPPFLAGS="$CPPFLAGS"
  1955. ice_motif_save_LDFLAGS="$LDFLAGS"
  1956. #
  1957. LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
  1958. CFLAGS="$X_CFLAGS $CFLAGS"
  1959. CPPFLAGS="$X_CFLAGS $CPPFLAGS"
  1960. LDFLAGS="$X_LIBS $LDFLAGS"
  1961. #
  1962. # We use XtToolkitInitialize() here since it takes no arguments
  1963. # and thus also works with a C++ compiler.
  1964. cat > conftest.$ac_ext <<EOF
  1965. #line 1966 "configure"
  1966. #include "confdefs.h"
  1967.  
  1968. #include <X11/Intrinsic.h>
  1969. #include <Xm/Xm.h>
  1970.  
  1971. int main() {
  1972. XtToolkitInitialize();
  1973. ; return 0; }
  1974. EOF
  1975. if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1976.   rm -rf conftest*
  1977.   
  1978. # libXm.a is in the standard search path.
  1979. ice_cv_motif_libraries=
  1980.  
  1981. else
  1982.   echo "configure: failed program was:" >&5
  1983.   cat conftest.$ac_ext >&5
  1984.   rm -rf conftest*
  1985.   
  1986. # libXm.a is not in the standard search path.
  1987. # Locate it and put its directory in `motif_libraries'
  1988. #
  1989. # /usr/lib/Motif* are used on HP-UX (Motif).
  1990. # /usr/lib/X11* are used on HP-UX (X and Athena).
  1991. # /usr/dt is used on Solaris (Motif).
  1992. # /usr/lesstif is used on Linux (Lesstif).
  1993. # /usr/openwin is used on Solaris (X and Athena).
  1994. # Other directories are just guesses.
  1995. for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
  1996.        /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
  1997.        /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
  1998.            /usr/dt/lib /usr/openwin/lib \
  1999.        /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
  2000.            /usr/lesstif*/lib /usr/lib/Lesstif* \
  2001.        "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
  2002.        "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
  2003. if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
  2004. ice_cv_motif_libraries="$dir"
  2005. break
  2006. fi
  2007. done
  2008. if test "$ice_cv_motif_libraries" = ""; then
  2009. ice_cv_motif_libraries=no
  2010. fi
  2011.  
  2012. fi
  2013. rm -f conftest*
  2014. #
  2015. LIBS="$ice_motif_save_LIBS"
  2016. CFLAGS="$ice_motif_save_CFLAGS"
  2017. CPPFLAGS="$ice_motif_save_CPPFLAGS"
  2018. LDFLAGS="$ice_motif_save_LDFLAGS"
  2019.  
  2020. fi
  2021.  
  2022. #
  2023. motif_libraries="$ice_cv_motif_libraries"
  2024. fi
  2025. # Add Motif definitions to X flags
  2026. #
  2027. if test "$motif_includes" != "" && test "$motif_includes" != "$x_includes" && test "$motif_includes" != "no"
  2028. then
  2029. X_CFLAGS="-I$motif_includes $X_CFLAGS"
  2030. fi
  2031. if test "$motif_libraries" != "" && test "$motif_libraries" != "$x_libraries" && test "$motif_libraries" != "no"
  2032. then
  2033. case "$X_LIBS" in
  2034.   *-R\ *) X_LIBS="-L$motif_libraries -R $motif_libraries $X_LIBS";;
  2035.   *-R*)   X_LIBS="-L$motif_libraries -R$motif_libraries $X_LIBS";;
  2036.   *)      X_LIBS="-L$motif_libraries $X_LIBS";;
  2037. esac
  2038. fi
  2039. #
  2040. #
  2041. motif_libraries_result="$motif_libraries"
  2042. motif_includes_result="$motif_includes"
  2043. test "$motif_libraries_result" = "" && 
  2044.   motif_libraries_result="in default path"
  2045. test "$motif_includes_result" = "" && 
  2046.   motif_includes_result="in default path"
  2047. test "$motif_libraries_result" = "no" && 
  2048.   motif_libraries_result="(none)"
  2049. test "$motif_includes_result" = "no" && 
  2050.   motif_includes_result="(none)"
  2051. echo "$ac_t""libraries $motif_libraries_result, headers $motif_includes_result" 1>&6
  2052.  
  2053.  
  2054.  
  2055. athena_includes=
  2056. athena_libraries=
  2057. # Check whether --with-athena or --without-athena was given.
  2058. if test "${with_athena+set}" = set; then
  2059.   withval="$with_athena"
  2060.   :
  2061. fi
  2062.  
  2063. if test "$with_athena" = "no"
  2064. then
  2065. athena_includes=no
  2066. athena_libraries=no
  2067. fi
  2068. # Check whether --with-athena-includes or --without-athena-includes was given.
  2069. if test "${with_athena_includes+set}" = set; then
  2070.   withval="$with_athena_includes"
  2071.   athena_includes="$withval"
  2072. fi
  2073.  
  2074. # Check whether --with-athena-libraries or --without-athena-libraries was given.
  2075. if test "${with_athena_libraries+set}" = set; then
  2076.   withval="$with_athena_libraries"
  2077.   athena_libraries="$withval"
  2078. fi
  2079.  
  2080. echo $ac_n "checking for Athena""... $ac_c" 1>&6
  2081. echo "configure:2082: checking for Athena" >&5
  2082. #
  2083. #
  2084. # Search the include files.
  2085. #
  2086. if test "$athena_includes" = ""; then
  2087. if eval "test \"`echo '$''{'ice_cv_athena_includes'+set}'`\" = set"; then
  2088.   echo $ac_n "(cached) $ac_c" 1>&6
  2089. else
  2090.   
  2091. ice_athena_save_LIBS="$LIBS"
  2092. ice_athena_save_CFLAGS="$CFLAGS"
  2093. ice_athena_save_CPPFLAGS="$CPPFLAGS"
  2094. ice_athena_save_LDFLAGS="$LDFLAGS"
  2095. #
  2096. LIBS="$X_PRE_LIBS -lXaw -lXmu -lXext -lXt -lX11 $X_EXTRA_LIBS $LIBS"
  2097. CFLAGS="$X_CFLAGS $CFLAGS"
  2098. CPPFLAGS="$X_CFLAGS $CPPFLAGS"
  2099. LDFLAGS="$X_LIBS $LDFLAGS"
  2100. #
  2101. cat > conftest.$ac_ext <<EOF
  2102. #line 2103 "configure"
  2103. #include "confdefs.h"
  2104.  
  2105. #include <X11/Intrinsic.h>
  2106. #include <X11/Xaw/Text.h>
  2107.  
  2108. int main() {
  2109. int a;
  2110. ; return 0; }
  2111. EOF
  2112. if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2113.   rm -rf conftest*
  2114.   
  2115. # X11/Xaw/Text.h is in the standard search path.
  2116. ice_cv_athena_includes=
  2117.  
  2118. else
  2119.   echo "configure: failed program was:" >&5
  2120.   cat conftest.$ac_ext >&5
  2121.   rm -rf conftest*
  2122.   
  2123. # X11/Xaw/Text.h is not in the standard search path.
  2124. # Locate it and put its directory in `athena_includes'
  2125. #
  2126. # /usr/include/Motif* are used on HP-UX (Motif).
  2127. # /usr/include/X11* are used on HP-UX (X and Athena).
  2128. # /usr/dt is used on Solaris (Motif).
  2129. # /usr/openwin is used on Solaris (X and Athena).
  2130. # Other directories are just guesses.
  2131. for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
  2132.            /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
  2133.            /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
  2134.            /usr/dt/include /usr/openwin/include \
  2135.            /usr/dt/*/include /opt/*/include /usr/include/Motif* \
  2136.        "${prefix}"/*/include /usr/*/include /usr/local/*/include \
  2137.        "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
  2138. if test -f "$dir/X11/Xaw/Text.h"; then
  2139. ice_cv_athena_includes="$dir"
  2140. break
  2141. fi
  2142. done
  2143.  
  2144. fi
  2145. rm -f conftest*
  2146. #
  2147. LIBS="$ice_athena_save_LIBS"
  2148. CFLAGS="$ice_athena_save_CFLAGS"
  2149. CPPFLAGS="$ice_athena_save_CPPFLAGS"
  2150. LDFLAGS="$ice_athena_save_LDFLAGS"
  2151.  
  2152. fi
  2153.  
  2154. athena_includes="$ice_cv_athena_includes"
  2155. fi
  2156. #
  2157. #
  2158. # Now for the libraries.
  2159. #
  2160. if test "$athena_libraries" = ""; then
  2161. if eval "test \"`echo '$''{'ice_cv_athena_libraries'+set}'`\" = set"; then
  2162.   echo $ac_n "(cached) $ac_c" 1>&6
  2163. else
  2164.   
  2165. ice_athena_save_LIBS="$LIBS"
  2166. ice_athena_save_CFLAGS="$CFLAGS"
  2167. ice_athena_save_CPPFLAGS="$CPPFLAGS"
  2168. ice_athena_save_LDFLAGS="$LDFLAGS"
  2169. #
  2170. LIBS="$X_PRE_LIBS -lXaw -lXmu -lXext -lXt -lX11 $X_EXTRA_LIBS $LIBS"
  2171. CFLAGS="$X_CFLAGS $CFLAGS"
  2172. CPPFLAGS="$X_CFLAGS $CPPFLAGS"
  2173. LDFLAGS="$X_LIBS $LDFLAGS"
  2174. #
  2175. # We use XtToolkitInitialize() here since it takes no arguments
  2176. # and thus also works with a C++ compiler.
  2177. cat > conftest.$ac_ext <<EOF
  2178. #line 2179 "configure"
  2179. #include "confdefs.h"
  2180.  
  2181. #include <X11/Intrinsic.h>
  2182. #include <X11/Xaw/Text.h>
  2183.  
  2184. int main() {
  2185. XtToolkitInitialize();
  2186. ; return 0; }
  2187. EOF
  2188. if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2189.   rm -rf conftest*
  2190.   
  2191. # libXaw.a is in the standard search path.
  2192. ice_cv_athena_libraries=
  2193.  
  2194. else
  2195.   echo "configure: failed program was:" >&5
  2196.   cat conftest.$ac_ext >&5
  2197.   rm -rf conftest*
  2198.   
  2199. # libXaw.a is not in the standard search path.
  2200. # Locate it and put its directory in `athena_libraries'
  2201. #
  2202. #
  2203. # /usr/lib/Motif* are used on HP-UX (Motif).
  2204. # /usr/lib/X11* are used on HP-UX (X and Athena).
  2205. # /usr/dt is used on Solaris (Motif).
  2206. # /usr/openwin is used on Solaris (X and Athena).
  2207. # Other directories are just guesses.
  2208. for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
  2209.        /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
  2210.        /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
  2211.            /usr/dt/lib /usr/openwin/lib \
  2212.        /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
  2213.        "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
  2214.        "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
  2215. if test -d "$dir" && test "`ls $dir/libXaw.* 2> /dev/null`" != ""; then
  2216. ice_cv_athena_libraries="$dir"
  2217. break
  2218. fi
  2219. done
  2220.  
  2221. fi
  2222. rm -f conftest*
  2223. #
  2224. LIBS="$ice_athena_save_LIBS"
  2225. CFLAGS="$ice_athena_save_CFLAGS"
  2226. CPPFLAGS="$ice_athena_save_CPPFLAGS"
  2227. LDFLAGS="$ice_athena_save_LDFLAGS"
  2228.  
  2229. fi
  2230.  
  2231. #
  2232. athena_libraries="$ice_cv_athena_libraries"
  2233. fi
  2234. # Add Athena definitions to X flags
  2235. #
  2236. if test "$athena_includes" != "" && test "$athena_includes" != "$x_includes" && test "$athena_includes" != "no"
  2237. then
  2238. X_CFLAGS="-I$athena_includes $X_CFLAGS"
  2239. fi
  2240. if test "$athena_libraries" != "" && test "$athena_libraries" != "$x_libraries" && test "$athena_libraries" != "no"
  2241. then
  2242. case "$X_LIBS" in
  2243.   *-R\ *) X_LIBS="-L$athena_libraries -R $athena_libraries $X_LIBS";;
  2244.   *-R*)   X_LIBS="-L$athena_libraries -R$athena_libraries $X_LIBS";;
  2245.   *)      X_LIBS="-L$athena_libraries $X_LIBS";;
  2246. esac
  2247. fi
  2248. #
  2249. #
  2250. athena_libraries_result="$athena_libraries"
  2251. athena_includes_result="$athena_includes"
  2252. test "$athena_libraries_result" = "" && 
  2253.   athena_libraries_result="in default path"
  2254. test "$athena_includes_result" = "" && 
  2255.   athena_includes_result="in default path"
  2256. test "$athena_libraries_result" = "no" && 
  2257.   athena_libraries_result="(none)"
  2258. test "$athena_includes_result" = "no" && 
  2259.   athena_includes_result="(none)"
  2260. echo "$ac_t""libraries $athena_libraries_result, headers $athena_includes_result" 1>&6
  2261.  
  2262. fi
  2263. for ac_prog in $CCC c++ g++ gcc CC cxx cc++
  2264. do
  2265. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2266. set dummy $ac_prog; ac_word=$2
  2267. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2268. echo "configure:2269: checking for $ac_word" >&5
  2269. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  2270.   echo $ac_n "(cached) $ac_c" 1>&6
  2271. else
  2272.   if test -n "$CXX"; then
  2273.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  2274. else
  2275.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  2276.   for ac_dir in $PATH; do
  2277.     test -z "$ac_dir" && ac_dir=.
  2278.     if test -f $ac_dir/$ac_word; then
  2279.       ac_cv_prog_CXX="$ac_prog"
  2280.       break
  2281.     fi
  2282.   done
  2283.   IFS="$ac_save_ifs"
  2284. fi
  2285. fi
  2286. CXX="$ac_cv_prog_CXX"
  2287. if test -n "$CXX"; then
  2288.   echo "$ac_t""$CXX" 1>&6
  2289. else
  2290.   echo "$ac_t""no" 1>&6
  2291. fi
  2292.  
  2293. test -n "$CXX" && break
  2294. done
  2295. test -n "$CXX" || CXX="gcc"
  2296.  
  2297.  
  2298. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  2299. echo "configure:2300: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  2300.  
  2301. ac_ext=C
  2302. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2303. ac_cpp='$CXXCPP $CPPFLAGS'
  2304. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2305. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2306. cross_compiling=$ac_cv_prog_cxx_cross
  2307.  
  2308. cat > conftest.$ac_ext <<EOF
  2309. #line 2310 "configure"
  2310. #include "confdefs.h"
  2311. main(){return(0);}
  2312. EOF
  2313. if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2314.   ac_cv_prog_cxx_works=yes
  2315.   # If we can't run a trivial program, we are probably using a cross compiler.
  2316.   if (./conftest; exit) 2>/dev/null; then
  2317.     ac_cv_prog_cxx_cross=no
  2318.   else
  2319.     ac_cv_prog_cxx_cross=yes
  2320.   fi
  2321. else
  2322.   echo "configure: failed program was:" >&5
  2323.   cat conftest.$ac_ext >&5
  2324.   ac_cv_prog_cxx_works=no
  2325. fi
  2326. rm -fr conftest*
  2327. ac_ext=c
  2328. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2329. ac_cpp='$CPP $CPPFLAGS'
  2330. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2331. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2332. cross_compiling=$ac_cv_prog_cc_cross
  2333.  
  2334. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  2335. if test $ac_cv_prog_cxx_works = no; then
  2336.   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  2337. fi
  2338. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  2339. echo "configure:2340: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  2340. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  2341. cross_compiling=$ac_cv_prog_cxx_cross
  2342.  
  2343. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  2344. echo "configure:2345: checking whether we are using GNU C++" >&5
  2345. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  2346.   echo $ac_n "(cached) $ac_c" 1>&6
  2347. else
  2348.   cat > conftest.C <<EOF
  2349. #ifdef __GNUC__
  2350.   yes;
  2351. #endif
  2352. EOF
  2353. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  2354.   ac_cv_prog_gxx=yes
  2355. else
  2356.   ac_cv_prog_gxx=no
  2357. fi
  2358. fi
  2359.  
  2360. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  2361.  
  2362. if test $ac_cv_prog_gxx = yes; then
  2363.   GXX=yes
  2364.   ac_test_CXXFLAGS="${CXXFLAGS+set}"
  2365.   ac_save_CXXFLAGS="$CXXFLAGS"
  2366.   CXXFLAGS=
  2367.   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  2368. echo "configure:2369: checking whether ${CXX-g++} accepts -g" >&5
  2369. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  2370.   echo $ac_n "(cached) $ac_c" 1>&6
  2371. else
  2372.   echo 'void f(){}' > conftest.cc
  2373. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  2374.   ac_cv_prog_cxx_g=yes
  2375. else
  2376.   ac_cv_prog_cxx_g=no
  2377. fi
  2378. rm -f conftest*
  2379.  
  2380. fi
  2381.  
  2382. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  2383.   if test "$ac_test_CXXFLAGS" = set; then
  2384.     CXXFLAGS="$ac_save_CXXFLAGS"
  2385.   elif test $ac_cv_prog_cxx_g = yes; then
  2386.     CXXFLAGS="-g -O2"
  2387.   else
  2388.     CXXFLAGS="-O2"
  2389.   fi
  2390. else
  2391.   GXX=
  2392.   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
  2393. fi
  2394.  
  2395.  
  2396.  
  2397. if test "$CXX" = gcc; then
  2398.  
  2399. ac_ext=C
  2400. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2401. ac_cpp='$CXXCPP $CPPFLAGS'
  2402. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2403. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2404. cross_compiling=$ac_cv_prog_cxx_cross
  2405.  
  2406. ice_save_LIBS="$LIBS"
  2407. echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
  2408. echo "configure:2409: checking for sin in -lm" >&5
  2409. ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
  2410. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2411.   echo $ac_n "(cached) $ac_c" 1>&6
  2412. else
  2413.   ac_save_LIBS="$LIBS"
  2414. LIBS="-lm  $LIBS"
  2415. cat > conftest.$ac_ext <<EOF
  2416. #line 2417 "configure"
  2417. #include "confdefs.h"
  2418. /* Override any gcc2 internal prototype to avoid an error.  */
  2419. #ifdef __cplusplus
  2420. extern "C"
  2421. #endif
  2422. /* We use char because int might match the return type of a gcc2
  2423.     builtin and then its argument prototype would still apply.  */
  2424. char sin();
  2425.  
  2426. int main() {
  2427. sin()
  2428. ; return 0; }
  2429. EOF
  2430. if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2431.   rm -rf conftest*
  2432.   eval "ac_cv_lib_$ac_lib_var=yes"
  2433. else
  2434.   echo "configure: failed program was:" >&5
  2435.   cat conftest.$ac_ext >&5
  2436.   rm -rf conftest*
  2437.   eval "ac_cv_lib_$ac_lib_var=no"
  2438. fi
  2439. rm -f conftest*
  2440. LIBS="$ac_save_LIBS"
  2441.  
  2442. fi
  2443. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2444.   echo "$ac_t""yes" 1>&6
  2445.   LIBS="-lm $LIBS"
  2446. else
  2447.   echo "$ac_t""no" 1>&6
  2448. fi
  2449.  
  2450. echo $ac_n "checking for cout in -lstdc++""... $ac_c" 1>&6
  2451. echo "configure:2452: checking for cout in -lstdc++" >&5
  2452. ac_lib_var=`echo stdc++'_'cout | sed 'y%./+-%__p_%'`
  2453. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2454.   echo $ac_n "(cached) $ac_c" 1>&6
  2455. else
  2456.   ac_save_LIBS="$LIBS"
  2457. LIBS="-lstdc++  $LIBS"
  2458. cat > conftest.$ac_ext <<EOF
  2459. #line 2460 "configure"
  2460. #include "confdefs.h"
  2461. /* Override any gcc2 internal prototype to avoid an error.  */
  2462. #ifdef __cplusplus
  2463. extern "C"
  2464. #endif
  2465. /* We use char because int might match the return type of a gcc2
  2466.     builtin and then its argument prototype would still apply.  */
  2467. char cout();
  2468.  
  2469. int main() {
  2470. cout()
  2471. ; return 0; }
  2472. EOF
  2473. if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2474.   rm -rf conftest*
  2475.   eval "ac_cv_lib_$ac_lib_var=yes"
  2476. else
  2477.   echo "configure: failed program was:" >&5
  2478.   cat conftest.$ac_ext >&5
  2479.   rm -rf conftest*
  2480.   eval "ac_cv_lib_$ac_lib_var=no"
  2481. fi
  2482. rm -f conftest*
  2483. LIBS="$ac_save_LIBS"
  2484.  
  2485. fi
  2486. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2487.   echo "$ac_t""yes" 1>&6
  2488.   LIBS="-lstdc++ $LIBS"
  2489. else
  2490.   echo "$ac_t""no" 1>&6
  2491. fi
  2492.  
  2493. case "$LIBS" in
  2494. *-lstdc++*)
  2495. ;;
  2496. *)
  2497. echo $ac_n "checking for cout in -lg++""... $ac_c" 1>&6
  2498. echo "configure:2499: checking for cout in -lg++" >&5
  2499. ac_lib_var=`echo g++'_'cout | sed 'y%./+-%__p_%'`
  2500. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2501.   echo $ac_n "(cached) $ac_c" 1>&6
  2502. else
  2503.   ac_save_LIBS="$LIBS"
  2504. LIBS="-lg++  $LIBS"
  2505. cat > conftest.$ac_ext <<EOF
  2506. #line 2507 "configure"
  2507. #include "confdefs.h"
  2508. /* Override any gcc2 internal prototype to avoid an error.  */
  2509. #ifdef __cplusplus
  2510. extern "C"
  2511. #endif
  2512. /* We use char because int might match the return type of a gcc2
  2513.     builtin and then its argument prototype would still apply.  */
  2514. char cout();
  2515.  
  2516. int main() {
  2517. cout()
  2518. ; return 0; }
  2519. EOF
  2520. if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2521.   rm -rf conftest*
  2522.   eval "ac_cv_lib_$ac_lib_var=yes"
  2523. else
  2524.   echo "configure: failed program was:" >&5
  2525.   cat conftest.$ac_ext >&5
  2526.   rm -rf conftest*
  2527.   eval "ac_cv_lib_$ac_lib_var=no"
  2528. fi
  2529. rm -f conftest*
  2530. LIBS="$ac_save_LIBS"
  2531.  
  2532. fi
  2533. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2534.   echo "$ac_t""yes" 1>&6
  2535.   LIBS="-lg++ $LIBS"
  2536. else
  2537.   echo "$ac_t""no" 1>&6
  2538. fi
  2539.  
  2540. ;;
  2541. esac
  2542. ac_ext=c
  2543. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2544. ac_cpp='$CPP $CPPFLAGS'
  2545. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2546. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2547. cross_compiling=$ac_cv_prog_cc_cross
  2548.  
  2549. fi
  2550. echo $ac_n "checking whether the C++ compiler (${CXX}) compiles a simple program""... $ac_c" 1>&6
  2551. echo "configure:2552: checking whether the C++ compiler (${CXX}) compiles a simple program" >&5
  2552. if eval "test \"`echo '$''{'ice_cv_prog_cxx'+set}'`\" = set"; then
  2553.   echo $ac_n "(cached) $ac_c" 1>&6
  2554. else
  2555.   
  2556.  
  2557. ac_ext=C
  2558. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2559. ac_cpp='$CXXCPP $CPPFLAGS'
  2560. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2561. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2562. cross_compiling=$ac_cv_prog_cxx_cross
  2563.  
  2564. cat > conftest.$ac_ext <<EOF
  2565. #line 2566 "configure"
  2566. #include "confdefs.h"
  2567. #include <iostream.h>
  2568. int main() {
  2569. cout << "hello, world!";
  2570. ; return 0; }
  2571. EOF
  2572. if { (eval echo configure:2573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2573.   rm -rf conftest*
  2574.   ice_cv_prog_cxx=yes
  2575. else
  2576.   echo "configure: failed program was:" >&5
  2577.   cat conftest.$ac_ext >&5
  2578.   rm -rf conftest*
  2579.   ice_cv_prog_cxx=no
  2580. fi
  2581. rm -f conftest*
  2582. ac_ext=c
  2583. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2584. ac_cpp='$CPP $CPPFLAGS'
  2585. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2586. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2587. cross_compiling=$ac_cv_prog_cc_cross
  2588.  
  2589.  
  2590. fi
  2591.  
  2592. echo "$ac_t""$ice_cv_prog_cxx" 1>&6
  2593. if test "$ice_cv_prog_cxx" = no; then
  2594. { echo "configure: error: You must set the environment variable CXX to a working 
  2595.                   C++ compiler.  Also check the CXXFLAGS settings.
  2596.                   See the file 'config.log' for further diagnostics." 1>&2; exit 1; }
  2597. fi
  2598. ice_need_cxxlibs=no
  2599. case "$LIBS" in
  2600.   *-lstdc++*)
  2601.           case "$CXXLIBS" in
  2602.         *-lstdc++*)
  2603.                 ;;
  2604.         *)
  2605.            ice_need_cxxlibs=yes
  2606.            ;;
  2607.           esac
  2608.           ;;
  2609.   *-lg++*)
  2610.        case "$CXXLIBS" in
  2611.          *-lg++*)
  2612.               ;;
  2613.          *)
  2614.         ice_need_cxxlibs=yes
  2615.         ;;
  2616.          esac
  2617.          ;;
  2618. esac
  2619. if test "$ice_need_cxxlibs" = yes
  2620. then
  2621. CXXLIBS="$CXXLIBS $LIBS"
  2622. fi
  2623. LIBS="$ice_save_LIBS"
  2624.  
  2625. ac_ext=C
  2626. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2627. ac_cpp='$CXXCPP $CPPFLAGS'
  2628. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2629. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2630. cross_compiling=$ac_cv_prog_cxx_cross
  2631.  
  2632. # Avoid calling config.guess again.  In libiberty, this destroys dummy.c.
  2633. case "$ac_configure_args" in
  2634. *--host*) ;;
  2635. *) ac_configure_args="$ac_configure_args --host=$host";;
  2636. esac
  2637. ddd_have_termcap=false
  2638. ddd_have_libiberty=false
  2639. ddd_have_rx=false
  2640. ddd_have_rx=true
  2641. echo $ac_n "checking for xstrerror in -liberty""... $ac_c" 1>&6
  2642. echo "configure:2643: checking for xstrerror in -liberty" >&5
  2643. ac_lib_var=`echo iberty'_'xstrerror | sed 'y%./+-%__p_%'`
  2644. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2645.   echo $ac_n "(cached) $ac_c" 1>&6
  2646. else
  2647.   ac_save_LIBS="$LIBS"
  2648. LIBS="-liberty  $LIBS"
  2649. cat > conftest.$ac_ext <<EOF
  2650. #line 2651 "configure"
  2651. #include "confdefs.h"
  2652. /* Override any gcc2 internal prototype to avoid an error.  */
  2653. #ifdef __cplusplus
  2654. extern "C"
  2655. #endif
  2656. /* We use char because int might match the return type of a gcc2
  2657.     builtin and then its argument prototype would still apply.  */
  2658. char xstrerror();
  2659.  
  2660. int main() {
  2661. xstrerror()
  2662. ; return 0; }
  2663. EOF
  2664. if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2665.   rm -rf conftest*
  2666.   eval "ac_cv_lib_$ac_lib_var=yes"
  2667. else
  2668.   echo "configure: failed program was:" >&5
  2669.   cat conftest.$ac_ext >&5
  2670.   rm -rf conftest*
  2671.   eval "ac_cv_lib_$ac_lib_var=no"
  2672. fi
  2673. rm -f conftest*
  2674. LIBS="$ac_save_LIBS"
  2675.  
  2676. fi
  2677. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2678.   echo "$ac_t""yes" 1>&6
  2679.   ddd_have_libiberty=true
  2680. else
  2681.   echo "$ac_t""no" 1>&6
  2682. fi
  2683.  
  2684. ddd_have_termcap=false
  2685. for termlib in mytinfo ncurses curses termcap terminfo termlib; do
  2686.    echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
  2687. echo "configure:2688: checking for tgetent in -l${termlib}" >&5
  2688. ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
  2689. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2690.   echo $ac_n "(cached) $ac_c" 1>&6
  2691. else
  2692.   ac_save_LIBS="$LIBS"
  2693. LIBS="-l${termlib}  $LIBS"
  2694. cat > conftest.$ac_ext <<EOF
  2695. #line 2696 "configure"
  2696. #include "confdefs.h"
  2697. /* Override any gcc2 internal prototype to avoid an error.  */
  2698. #ifdef __cplusplus
  2699. extern "C"
  2700. #endif
  2701. /* We use char because int might match the return type of a gcc2
  2702.     builtin and then its argument prototype would still apply.  */
  2703. char tgetent();
  2704.  
  2705. int main() {
  2706. tgetent()
  2707. ; return 0; }
  2708. EOF
  2709. if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2710.   rm -rf conftest*
  2711.   eval "ac_cv_lib_$ac_lib_var=yes"
  2712. else
  2713.   echo "configure: failed program was:" >&5
  2714.   cat conftest.$ac_ext >&5
  2715.   rm -rf conftest*
  2716.   eval "ac_cv_lib_$ac_lib_var=no"
  2717. fi
  2718. rm -f conftest*
  2719. LIBS="$ac_save_LIBS"
  2720.  
  2721. fi
  2722. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2723.   echo "$ac_t""yes" 1>&6
  2724.   ddd_have_termcap=true; break
  2725. else
  2726.   echo "$ac_t""no" 1>&6
  2727. fi
  2728.  
  2729. done
  2730. echo $ac_n "checking for packages to be configured and built""... $ac_c" 1>&6
  2731. echo "configure:2732: checking for packages to be configured and built" >&5
  2732. ddd_subdirs="ddd"
  2733. test "$ddd_have_termcap"   != true && ddd_subdirs="termcap $ddd_subdirs"
  2734. test "$ddd_have_libiberty" != true && ddd_subdirs="libiberty $ddd_subdirs"
  2735. test "$ddd_have_rx"        != true && ddd_subdirs="librx $ddd_subdirs"
  2736. echo "$ac_t""$ddd_subdirs" 1>&6
  2737. subdirs="$ddd_subdirs"
  2738.  
  2739. trap '' 1 2 15
  2740. cat > confcache <<\EOF
  2741. # This file is a shell script that caches the results of configure
  2742. # tests run on this system so they can be shared between configure
  2743. # scripts and configure runs.  It is not useful on other systems.
  2744. # If it contains results you don't want to keep, you may remove or edit it.
  2745. #
  2746. # By default, configure uses ./config.cache as the cache file,
  2747. # creating it if it does not exist already.  You can give configure
  2748. # the --cache-file=FILE option to use a different cache file; that is
  2749. # what configure does when it calls configure scripts in
  2750. # subdirectories, so they share the cache.
  2751. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2752. # config.status only pays attention to the cache file if you give it the
  2753. # --recheck option to rerun configure.
  2754. #
  2755. EOF
  2756. # The following way of writing the cache mishandles newlines in values,
  2757. # but we know of no workaround that is simple, portable, and efficient.
  2758. # So, don't put newlines in cache variables' values.
  2759. # Ultrix sh set writes to stderr and can't be redirected directly,
  2760. # and sets the high bit in the cache file unless we assign to the vars.
  2761. (set) 2>&1 |
  2762.   case `(ac_space=' '; set) 2>&1` in
  2763.   *ac_space=\ *)
  2764.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2765.     # turns \\\\ into \\, and sed turns \\ into \).
  2766.     sed -n \
  2767.       -e "s/'/'\\\\''/g" \
  2768.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2769.     ;;
  2770.   *)
  2771.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  2772.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2773.     ;;
  2774.   esac >> confcache
  2775. if cmp -s $cache_file confcache; then
  2776.   :
  2777. else
  2778.   if test -w $cache_file; then
  2779.     echo "updating cache $cache_file"
  2780.     cat confcache > $cache_file
  2781.   else
  2782.     echo "not updating unwritable cache $cache_file"
  2783.   fi
  2784. fi
  2785. rm -f confcache
  2786.  
  2787. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2788.  
  2789. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2790. # Let make expand exec_prefix.
  2791. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2792.  
  2793. # Any assignment to VPATH causes Sun make to only execute
  2794. # the first set of double-colon rules, so remove it if not needed.
  2795. # If there is a colon in the path, we need to keep it.
  2796. if test "x$srcdir" = x.; then
  2797.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2798. fi
  2799.  
  2800. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2801.  
  2802. # Transform confdefs.h into DEFS.
  2803. # Protect against shell expansion while executing Makefile rules.
  2804. # Protect against Makefile macro expansion.
  2805. cat > conftest.defs <<\EOF
  2806. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
  2807. s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  2808. s%\[%\\&%g
  2809. s%\]%\\&%g
  2810. s%\$%$$%g
  2811. EOF
  2812. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  2813. rm -f conftest.defs
  2814.  
  2815.  
  2816. # Without the "./", some shells look in PATH for config.status.
  2817. : ${CONFIG_STATUS=./config.status}
  2818.  
  2819. echo creating $CONFIG_STATUS
  2820. rm -f $CONFIG_STATUS
  2821. cat > $CONFIG_STATUS <<EOF
  2822. #! /bin/sh
  2823. # Generated automatically by configure.
  2824. # Run this file to recreate the current configuration.
  2825. # This directory was configured as follows,
  2826. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2827. #
  2828. # $0 $ac_configure_args
  2829. #
  2830. # Compiler output produced by configure, useful for debugging
  2831. # configure, is in ./config.log if it exists.
  2832.  
  2833. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2834. for ac_option
  2835. do
  2836.   case "\$ac_option" in
  2837.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2838.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2839.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2840.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2841.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  2842.     exit 0 ;;
  2843.   -help | --help | --hel | --he | --h)
  2844.     echo "\$ac_cs_usage"; exit 0 ;;
  2845.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2846.   esac
  2847. done
  2848.  
  2849. ac_given_srcdir=$srcdir
  2850. ac_given_INSTALL="$INSTALL"
  2851.  
  2852. trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2853. EOF
  2854. cat >> $CONFIG_STATUS <<EOF
  2855.  
  2856. # Protect against being on the right side of a sed subst in config.status.
  2857. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2858.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2859. $ac_vpsub
  2860. $extrasub
  2861. s%@CFLAGS@%$CFLAGS%g
  2862. s%@CPPFLAGS@%$CPPFLAGS%g
  2863. s%@CXXFLAGS@%$CXXFLAGS%g
  2864. s%@DEFS@%$DEFS%g
  2865. s%@LDFLAGS@%$LDFLAGS%g
  2866. s%@LIBS@%$LIBS%g
  2867. s%@exec_prefix@%$exec_prefix%g
  2868. s%@prefix@%$prefix%g
  2869. s%@program_transform_name@%$program_transform_name%g
  2870. s%@bindir@%$bindir%g
  2871. s%@sbindir@%$sbindir%g
  2872. s%@libexecdir@%$libexecdir%g
  2873. s%@datadir@%$datadir%g
  2874. s%@sysconfdir@%$sysconfdir%g
  2875. s%@sharedstatedir@%$sharedstatedir%g
  2876. s%@localstatedir@%$localstatedir%g
  2877. s%@libdir@%$libdir%g
  2878. s%@includedir@%$includedir%g
  2879. s%@oldincludedir@%$oldincludedir%g
  2880. s%@infodir@%$infodir%g
  2881. s%@mandir@%$mandir%g
  2882. s%@host@%$host%g
  2883. s%@host_alias@%$host_alias%g
  2884. s%@host_cpu@%$host_cpu%g
  2885. s%@host_vendor@%$host_vendor%g
  2886. s%@host_os@%$host_os%g
  2887. s%@target@%$target%g
  2888. s%@target_alias@%$target_alias%g
  2889. s%@target_cpu@%$target_cpu%g
  2890. s%@target_vendor@%$target_vendor%g
  2891. s%@target_os@%$target_os%g
  2892. s%@build@%$build%g
  2893. s%@build_alias@%$build_alias%g
  2894. s%@build_cpu@%$build_cpu%g
  2895. s%@build_vendor@%$build_vendor%g
  2896. s%@build_os@%$build_os%g
  2897. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2898. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2899. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  2900. s%@PACKAGE@%$PACKAGE%g
  2901. s%@VERSION@%$VERSION%g
  2902. s%@ACLOCAL@%$ACLOCAL%g
  2903. s%@AUTOCONF@%$AUTOCONF%g
  2904. s%@AUTOMAKE@%$AUTOMAKE%g
  2905. s%@AUTOHEADER@%$AUTOHEADER%g
  2906. s%@MAKEINFO@%$MAKEINFO%g
  2907. s%@SET_MAKE@%$SET_MAKE%g
  2908. s%@CPP@%$CPP%g
  2909. s%@X_CFLAGS@%$X_CFLAGS%g
  2910. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  2911. s%@X_LIBS@%$X_LIBS%g
  2912. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  2913. s%@CXX@%$CXX%g
  2914. s%@CXXLIBS@%$CXXLIBS%g
  2915. s%@subdirs@%$subdirs%g
  2916.  
  2917. CEOF
  2918. EOF
  2919.  
  2920. cat >> $CONFIG_STATUS <<\EOF
  2921.  
  2922. # Split the substitutions into bite-sized pieces for seds with
  2923. # small command number limits, like on Digital OSF/1 and HP-UX.
  2924. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2925. ac_file=1 # Number of current file.
  2926. ac_beg=1 # First line for current file.
  2927. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2928. ac_more_lines=:
  2929. ac_sed_cmds=""
  2930. while $ac_more_lines; do
  2931.   if test $ac_beg -gt 1; then
  2932.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2933.   else
  2934.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2935.   fi
  2936.   if test ! -s conftest.s$ac_file; then
  2937.     ac_more_lines=false
  2938.     rm -f conftest.s$ac_file
  2939.   else
  2940.     if test -z "$ac_sed_cmds"; then
  2941.       ac_sed_cmds="sed -f conftest.s$ac_file"
  2942.     else
  2943.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2944.     fi
  2945.     ac_file=`expr $ac_file + 1`
  2946.     ac_beg=$ac_end
  2947.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2948.   fi
  2949. done
  2950. if test -z "$ac_sed_cmds"; then
  2951.   ac_sed_cmds=cat
  2952. fi
  2953. EOF
  2954.  
  2955. cat >> $CONFIG_STATUS <<EOF
  2956.  
  2957. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  2958. EOF
  2959. cat >> $CONFIG_STATUS <<\EOF
  2960. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2961.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2962.   case "$ac_file" in
  2963.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2964.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2965.   *) ac_file_in="${ac_file}.in" ;;
  2966.   esac
  2967.  
  2968.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2969.  
  2970.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2971.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2972.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2973.     # The file is in a subdirectory.
  2974.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2975.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2976.     # A "../" for each directory in $ac_dir_suffix.
  2977.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2978.   else
  2979.     ac_dir_suffix= ac_dots=
  2980.   fi
  2981.  
  2982.   case "$ac_given_srcdir" in
  2983.   .)  srcdir=.
  2984.       if test -z "$ac_dots"; then top_srcdir=.
  2985.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2986.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2987.   *) # Relative path.
  2988.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2989.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2990.   esac
  2991.  
  2992.   case "$ac_given_INSTALL" in
  2993.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2994.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2995.   esac
  2996.  
  2997.   echo creating "$ac_file"
  2998.   rm -f "$ac_file"
  2999.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3000.   case "$ac_file" in
  3001.   *Makefile*) ac_comsub="1i\\
  3002. # $configure_input" ;;
  3003.   *) ac_comsub= ;;
  3004.   esac
  3005.  
  3006.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3007.   sed -e "$ac_comsub
  3008. s%@configure_input@%$configure_input%g
  3009. s%@srcdir@%$srcdir%g
  3010. s%@top_srcdir@%$top_srcdir%g
  3011. s%@INSTALL@%$INSTALL%g
  3012. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3013. fi; done
  3014. rm -f conftest.s*
  3015.  
  3016. EOF
  3017. cat >> $CONFIG_STATUS <<EOF
  3018.  
  3019. EOF
  3020. cat >> $CONFIG_STATUS <<\EOF
  3021.  
  3022. exit 0
  3023. EOF
  3024. chmod +x $CONFIG_STATUS
  3025. rm -fr confdefs* $ac_clean_files
  3026. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3027.  
  3028. if test "$no_recursion" != yes; then
  3029.  
  3030.   # Remove --cache-file and --srcdir arguments so they do not pile up.
  3031.   ac_sub_configure_args=
  3032.   ac_prev=
  3033.   for ac_arg in $ac_configure_args; do
  3034.     if test -n "$ac_prev"; then
  3035.       ac_prev=
  3036.       continue
  3037.     fi
  3038.     case "$ac_arg" in
  3039.     -cache-file | --cache-file | --cache-fil | --cache-fi \
  3040.     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  3041.       ac_prev=cache_file ;;
  3042.     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  3043.     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  3044.       ;;
  3045.     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  3046.       ac_prev=srcdir ;;
  3047.     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  3048.       ;;
  3049.     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
  3050.     esac
  3051.   done
  3052.  
  3053.   for ac_config_dir in $ddd_subdirs; do
  3054.  
  3055.     # Do not complain, so a configure script can configure whichever
  3056.     # parts of a large source tree are present.
  3057.     if test ! -d $srcdir/$ac_config_dir; then
  3058.       continue
  3059.     fi
  3060.  
  3061.     echo configuring in $ac_config_dir
  3062.  
  3063.     case "$srcdir" in
  3064.     .) ;;
  3065.     *)
  3066.       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
  3067.       else
  3068.         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
  3069.       fi
  3070.       ;;
  3071.     esac
  3072.  
  3073.     ac_popdir=`pwd`
  3074.     cd $ac_config_dir
  3075.  
  3076.       # A "../" for each directory in /$ac_config_dir.
  3077.       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
  3078.  
  3079.     case "$srcdir" in
  3080.     .) # No --srcdir option.  We are building in place.
  3081.       ac_sub_srcdir=$srcdir ;;
  3082.     /*) # Absolute path.
  3083.       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
  3084.     *) # Relative path.
  3085.       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
  3086.     esac
  3087.  
  3088.     # Check for guested configure; otherwise get Cygnus style configure.
  3089.     if test -f $ac_sub_srcdir/configure; then
  3090.       ac_sub_configure=$ac_sub_srcdir/configure
  3091.     elif test -f $ac_sub_srcdir/configure.in; then
  3092.       ac_sub_configure=$ac_configure
  3093.     else
  3094.       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
  3095.       ac_sub_configure=
  3096.     fi
  3097.  
  3098.     # The recursion is here.
  3099.     if test -n "$ac_sub_configure"; then
  3100.  
  3101.       # Make the cache file name correct relative to the subdirectory.
  3102.       case "$cache_file" in
  3103.       /*) ac_sub_cache_file=$cache_file ;;
  3104.       *) # Relative path.
  3105.         ac_sub_cache_file="$ac_dots$cache_file" ;;
  3106.       esac
  3107.   case "$ac_given_INSTALL" in
  3108.         [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3109.         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3110.         esac
  3111.  
  3112.       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
  3113.       # The eval makes quoting arguments work.
  3114.       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
  3115.       then :
  3116.       else
  3117.         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
  3118.       fi
  3119.     fi
  3120.  
  3121.     cd $ac_popdir
  3122.   done
  3123. fi
  3124.  
  3125.