home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / ft-beta.zip / freetype / configure < prev    next >
Text File  |  1997-10-06  |  90KB  |  2,883 lines

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