home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ptx-0.4-src.tgz / ptx-0.4-src.tar / fsf / ptx / configure < prev    next >
Text File  |  1996-10-01  |  58KB  |  2,000 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.10 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --with-dmalloc          use dmalloc, as in dmalloc.tar.gz from
  16.                           @/ftp.antaire.com:antaire/src/dmalloc."
  17.  
  18. # Initialize some variables set by options.
  19. # The variables have the same names as the options, with
  20. # dashes changed to underlines.
  21. build=NONE
  22. cache_file=./config.cache
  23. exec_prefix=NONE
  24. host=NONE
  25. no_create=
  26. nonopt=NONE
  27. no_recursion=
  28. prefix=NONE
  29. program_prefix=NONE
  30. program_suffix=NONE
  31. program_transform_name=s,x,x,
  32. silent=
  33. site=
  34. srcdir=
  35. target=NONE
  36. verbose=
  37. x_includes=NONE
  38. x_libraries=NONE
  39. bindir='${exec_prefix}/bin'
  40. sbindir='${exec_prefix}/sbin'
  41. libexecdir='${exec_prefix}/libexec'
  42. datadir='${prefix}/share'
  43. sysconfdir='${prefix}/etc'
  44. sharedstatedir='${prefix}/com'
  45. localstatedir='${prefix}/var'
  46. libdir='${exec_prefix}/lib'
  47. includedir='${prefix}/include'
  48. oldincludedir='/usr/include'
  49. infodir='${prefix}/info'
  50. guidedir='${prefix}/guide'
  51. psdir='${prefix}/ps'
  52. dvidir='${prefix}/dvi'
  53. mandir='${prefix}/man'
  54.  
  55. # Initialize some other variables.
  56. subdirs=
  57. MFLAGS= MAKEFLAGS=
  58.  
  59. ac_prev=
  60. for ac_option
  61. do
  62.  
  63.   # If the previous option needs an argument, assign it.
  64.   if test -n "$ac_prev"; then
  65.     eval "$ac_prev=\$ac_option"
  66.     ac_prev=
  67.     continue
  68.   fi
  69.  
  70.   case "$ac_option" in
  71.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  72.   *) ac_optarg= ;;
  73.   esac
  74.  
  75.   # Accept the important Cygnus configure options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.  
  79.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  80.     ac_prev=bindir ;;
  81.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  82.     bindir="$ac_optarg" ;;
  83.  
  84.   -build | --build | --buil | --bui | --bu)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  90.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  91.     ac_prev=cache_file ;;
  92.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  93.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  94.     cache_file="$ac_optarg" ;;
  95.  
  96.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  97.     ac_prev=datadir ;;
  98.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  99.   | --da=*)
  100.     datadir="$ac_optarg" ;;
  101.  
  102.   -disable-* | --disable-*)
  103.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  104.     # Reject names that are not valid shell variable names.
  105.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  106.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  107.     fi
  108.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  109.     eval "enable_${ac_feature}=no" ;;
  110.  
  111.   -enable-* | --enable-*)
  112.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  113.     # Reject names that are not valid shell variable names.
  114.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  115.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  116.     fi
  117.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  118.     case "$ac_option" in
  119.       *=*) ;;
  120.       *) ac_optarg=yes ;;
  121.     esac
  122.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  123.  
  124.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  125.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  126.   | --exec | --exe | --ex)
  127.     ac_prev=exec_prefix ;;
  128.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  129.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  130.   | --exec=* | --exe=* | --ex=*)
  131.     exec_prefix="$ac_optarg" ;;
  132.  
  133.   -gas | --gas | --ga | --g)
  134.     # Obsolete; use --with-gas.
  135.     with_gas=yes ;;
  136.  
  137.   -help | --help | --hel | --he)
  138.     # Omit some internal or obsolete options to make the list less imposing.
  139.     # This message is too long to be a string in the A/UX 3.1 sh.
  140.     cat << EOF
  141. Usage: configure [options] [host]
  142. Options: [defaults in brackets after descriptions]
  143. Configuration:
  144.   --cache-file=FILE       cache test results in FILE
  145.   --help                  print this message
  146.   --no-create             do not create output files
  147.   --quiet, --silent       do not print \`checking...' messages
  148.   --version               print the version of autoconf that created configure
  149. Directory and file names:
  150.   --prefix=PREFIX         install architecture-independent files in PREFIX
  151.                           [$ac_default_prefix]
  152.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  153.                           [same as prefix]
  154.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  155.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  156.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  157.   --datadir=DIR           read-only architecture-independent data in DIR
  158.                           [PREFIX/share]
  159.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  160.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  161.                           [PREFIX/com]
  162.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  163.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  164.   --includedir=DIR        C header files in DIR [PREFIX/include]
  165.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  166.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  167.   --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  168.   --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  169.   --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  170.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  171.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  172.   --program-prefix=PREFIX prepend PREFIX to installed program names
  173.   --program-suffix=SUFFIX append SUFFIX to installed program names
  174.   --program-transform-name=PROGRAM
  175.                           run sed PROGRAM on installed program names
  176. EOF
  177.     cat << EOF
  178. Host type:
  179.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  180.   --host=HOST             configure for HOST [guessed]
  181.   --target=TARGET         configure for TARGET [TARGET=HOST]
  182. Features and packages:
  183.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  184.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  185.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  186.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  187.   --x-includes=DIR        X include files are in DIR
  188.   --x-libraries=DIR       X library files are in DIR
  189. EOF
  190.     if test -n "$ac_help"; then
  191.       echo "--enable and --with options recognized:$ac_help"
  192.     fi
  193.     exit 0 ;;
  194.  
  195.   -host | --host | --hos | --ho)
  196.     ac_prev=host ;;
  197.   -host=* | --host=* | --hos=* | --ho=*)
  198.     host="$ac_optarg" ;;
  199.  
  200.   -includedir | --includedir | --includedi | --included | --include \
  201.   | --includ | --inclu | --incl | --inc)
  202.     ac_prev=includedir ;;
  203.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  204.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  205.     includedir="$ac_optarg" ;;
  206.  
  207.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  208.     ac_prev=infodir ;;
  209.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  210.     infodir="$ac_optarg" ;;
  211.  
  212.  -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  213.    ac_prev=guidedir ;;
  214.  -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  215.  
  216.  -psdir | --psdir | --psdi | --psd | --ps)
  217.    ac_prev=psdir ;;
  218.  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  219.  
  220.  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  221.    ac_prev=dvidir ;;
  222.  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  223.  
  224.   -libdir | --libdir | --libdi | --libd)
  225.     ac_prev=libdir ;;
  226.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  227.     libdir="$ac_optarg" ;;
  228.  
  229.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  230.   | --libexe | --libex | --libe)
  231.     ac_prev=libexecdir ;;
  232.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  233.   | --libexe=* | --libex=* | --libe=*)
  234.     libexecdir="$ac_optarg" ;;
  235.  
  236.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  237.   | --localstate | --localstat | --localsta | --localst \
  238.   | --locals | --local | --loca | --loc | --lo)
  239.     ac_prev=localstatedir ;;
  240.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  241.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  242.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  243.     localstatedir="$ac_optarg" ;;
  244.  
  245.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  246.     ac_prev=mandir ;;
  247.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  248.     mandir="$ac_optarg" ;;
  249.  
  250.   -nfp | --nfp | --nf)
  251.     # Obsolete; use --without-fp.
  252.     with_fp=no ;;
  253.  
  254.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  255.   | --no-cr | --no-c)
  256.     no_create=yes ;;
  257.  
  258.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  259.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  260.     no_recursion=yes ;;
  261.  
  262.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  263.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  264.   | --oldin | --oldi | --old | --ol | --o)
  265.     ac_prev=oldincludedir ;;
  266.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  267.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  268.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  269.     oldincludedir="$ac_optarg" ;;
  270.  
  271.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  272.     ac_prev=prefix ;;
  273.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  274.     prefix="$ac_optarg" ;;
  275.  
  276.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  277.   | --program-pre | --program-pr | --program-p)
  278.     ac_prev=program_prefix ;;
  279.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  280.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  281.     program_prefix="$ac_optarg" ;;
  282.  
  283.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  284.   | --program-suf | --program-su | --program-s)
  285.     ac_prev=program_suffix ;;
  286.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  287.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  288.     program_suffix="$ac_optarg" ;;
  289.  
  290.   -program-transform-name | --program-transform-name \
  291.   | --program-transform-nam | --program-transform-na \
  292.   | --program-transform-n | --program-transform- \
  293.   | --program-transform | --program-transfor \
  294.   | --program-transfo | --program-transf \
  295.   | --program-trans | --program-tran \
  296.   | --progr-tra | --program-tr | --program-t)
  297.     ac_prev=program_transform_name ;;
  298.   -program-transform-name=* | --program-transform-name=* \
  299.   | --program-transform-nam=* | --program-transform-na=* \
  300.   | --program-transform-n=* | --program-transform-=* \
  301.   | --program-transform=* | --program-transfor=* \
  302.   | --program-transfo=* | --program-transf=* \
  303.   | --program-trans=* | --program-tran=* \
  304.   | --progr-tra=* | --program-tr=* | --program-t=*)
  305.     program_transform_name="$ac_optarg" ;;
  306.  
  307.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  308.   | -silent | --silent | --silen | --sile | --sil)
  309.     silent=yes ;;
  310.  
  311.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  312.     ac_prev=sbindir ;;
  313.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  314.   | --sbi=* | --sb=*)
  315.     sbindir="$ac_optarg" ;;
  316.  
  317.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  318.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  319.   | --sharedst | --shareds | --shared | --share | --shar \
  320.   | --sha | --sh)
  321.     ac_prev=sharedstatedir ;;
  322.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  323.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  324.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  325.   | --sha=* | --sh=*)
  326.     sharedstatedir="$ac_optarg" ;;
  327.  
  328.   -site | --site | --sit)
  329.     ac_prev=site ;;
  330.   -site=* | --site=* | --sit=*)
  331.     site="$ac_optarg" ;;
  332.  
  333.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  334.     ac_prev=srcdir ;;
  335.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  336.     srcdir="$ac_optarg" ;;
  337.  
  338.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  339.   | --syscon | --sysco | --sysc | --sys | --sy)
  340.     ac_prev=sysconfdir ;;
  341.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  342.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  343.     sysconfdir="$ac_optarg" ;;
  344.  
  345.   -target | --target | --targe | --targ | --tar | --ta | --t)
  346.     ac_prev=target ;;
  347.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  348.     target="$ac_optarg" ;;
  349.  
  350.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  351.     verbose=yes ;;
  352.  
  353.   -version | --version | --versio | --versi | --vers)
  354.     echo "configure generated by autoconf version 2.10"
  355.     exit 0 ;;
  356.  
  357.   -with-* | --with-*)
  358.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  359.     # Reject names that are not valid shell variable names.
  360.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  361.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  362.     fi
  363.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  364.     case "$ac_option" in
  365.       *=*) ;;
  366.       *) ac_optarg=yes ;;
  367.     esac
  368.     eval "with_${ac_package}='$ac_optarg'" ;;
  369.  
  370.   -without-* | --without-*)
  371.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  372.     # Reject names that are not valid shell variable names.
  373.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  374.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  375.     fi
  376.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  377.     eval "with_${ac_package}=no" ;;
  378.  
  379.   --x)
  380.     # Obsolete; use --with-x.
  381.     with_x=yes ;;
  382.  
  383.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  384.   | --x-incl | --x-inc | --x-in | --x-i)
  385.     ac_prev=x_includes ;;
  386.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  387.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  388.     x_includes="$ac_optarg" ;;
  389.  
  390.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  391.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  392.     ac_prev=x_libraries ;;
  393.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  394.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  395.     x_libraries="$ac_optarg" ;;
  396.  
  397.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  398.     ;;
  399.  
  400.   *)
  401.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  402.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  403.     fi
  404.     if test "x$nonopt" != xNONE; then
  405.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  406.     fi
  407.     nonopt="$ac_option"
  408.     ;;
  409.  
  410.   esac
  411. done
  412.  
  413. if test -n "$ac_prev"; then
  414.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  415. fi
  416.  
  417. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  418.  
  419. # File descriptor usage:
  420. # 0 standard input
  421. # 1 file creation
  422. # 2 errors and warnings
  423. # 3 some systems may open it to /dev/tty
  424. # 4 used on the Kubota Titan
  425. # 6 checking for... messages and results
  426. # 5 compiler messages saved in config.log
  427. if test "$silent" = yes; then
  428.   exec 6>/dev/null
  429. else
  430.   exec 6>&1
  431. fi
  432. exec 5>./config.log
  433.  
  434. echo "\
  435. This file contains any messages produced by compilers while
  436. running configure, to aid debugging if configure makes a mistake.
  437. " 1>&5
  438.  
  439. # Strip out --no-create and --no-recursion so they do not pile up.
  440. # Also quote any args containing shell metacharacters.
  441. ac_configure_args=
  442. for ac_arg
  443. do
  444.   case "$ac_arg" in
  445.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  446.   | --no-cr | --no-c) ;;
  447.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  448.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  449.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  450.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  451.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  452.   esac
  453. done
  454.  
  455. # NLS nuisances.
  456. # Only set LANG and LC_ALL to C if already set.
  457. # These must not be set unconditionally because not all systems understand
  458. # e.g. LANG=C (notably SCO).
  459. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  460. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  461.  
  462. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  463. rm -rf conftest* confdefs.h
  464. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  465. echo > confdefs.h
  466.  
  467. # A filename unique to this package, relative to the directory that
  468. # configure is in, which we can look for to find out if srcdir is correct.
  469. ac_unique_file=ptx.c
  470.  
  471. # Find the source files, if location was not specified.
  472. if test -z "$srcdir"; then
  473.   ac_srcdir_defaulted=yes
  474.   # Try the directory containing this script, then its parent.
  475.   ac_prog=$0
  476.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  477.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  478.   srcdir=$ac_confdir
  479.   if test ! -r $srcdir/$ac_unique_file; then
  480.     srcdir=..
  481.   fi
  482. else
  483.   ac_srcdir_defaulted=no
  484. fi
  485. if test ! -r $srcdir/$ac_unique_file; then
  486.   if test "$ac_srcdir_defaulted" = yes; then
  487.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  488.   else
  489.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  490.   fi
  491. fi
  492. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  493.  
  494. # Prefer explicitly selected file to automatically selected ones.
  495. if test -z "$CONFIG_SITE"; then
  496.   if test "x$prefix" != xNONE; then
  497.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  498.   else
  499.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  500.   fi
  501. fi
  502. for ac_site_file in $CONFIG_SITE; do
  503.   if test -r "$ac_site_file"; then
  504.     echo "loading site script $ac_site_file"
  505.     . "$ac_site_file"
  506.   fi
  507. done
  508.  
  509. if test -r "$cache_file"; then
  510.   echo "loading cache $cache_file"
  511.   . $cache_file
  512. else
  513.   echo "creating cache $cache_file"
  514.   > $cache_file
  515. fi
  516.  
  517. ac_ext=c
  518. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  519. ac_cpp='$CPP $CPPFLAGS'
  520. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  521. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  522.  
  523. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  524.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  525.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  526.     ac_n= ac_c='
  527. ' ac_t='    '
  528.   else
  529.     ac_n=-n ac_c= ac_t=
  530.   fi
  531. else
  532.   ac_n= ac_c='\c' ac_t=
  533. fi
  534.  
  535.  
  536.  
  537. if test "$program_transform_name" = s,x,x,; then
  538.   program_transform_name=
  539. else
  540.   # Double any \ or $.  echo might interpret backslashes.
  541.   cat <<\EOF_SED > conftestsed
  542. s,\\,\\\\,g; s,\$,$$,g
  543. EOF_SED
  544.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  545.   rm -f conftestsed
  546. fi
  547. test "$program_prefix" != NONE &&
  548.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  549. # Use a double $ so make ignores it.
  550. test "$program_suffix" != NONE &&
  551.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  552.  
  553. # sed with no file args requires a program.
  554. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  555.  
  556.  
  557. PRODUCT=ptx
  558. VERSION=0.4
  559. cat >> confdefs.h <<EOF
  560. #define PRODUCT "$PRODUCT"
  561. EOF
  562.  
  563. cat >> confdefs.h <<EOF
  564. #define VERSION "$VERSION"
  565. EOF
  566.  
  567.  
  568.  
  569.  
  570. # Extract the first word of "gcc", so it can be a program name with args.
  571. set dummy gcc; ac_word=$2
  572. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  573. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  574.   echo $ac_n "(cached) $ac_c" 1>&6
  575. else
  576.   if test -n "$CC"; then
  577.   ac_cv_prog_CC="$CC" # Let the user override the test.
  578. else
  579.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  580.   for ac_dir in $PATH; do
  581.     test -z "$ac_dir" && ac_dir=.
  582.     if test -f $ac_dir/$ac_word; then
  583.       ac_cv_prog_CC="gcc"
  584.       break
  585.     fi
  586.   done
  587.   IFS="$ac_save_ifs"
  588. fi
  589. fi
  590. CC="$ac_cv_prog_CC"
  591. if test -n "$CC"; then
  592.   echo "$ac_t""$CC" 1>&6
  593. else
  594.   echo "$ac_t""no" 1>&6
  595. fi
  596.  
  597. if test -z "$CC"; then
  598.   # Extract the first word of "cc", so it can be a program name with args.
  599. set dummy cc; ac_word=$2
  600. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  601. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  602.   echo $ac_n "(cached) $ac_c" 1>&6
  603. else
  604.   if test -n "$CC"; then
  605.   ac_cv_prog_CC="$CC" # Let the user override the test.
  606. else
  607.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  608.   ac_prog_rejected=no
  609.   for ac_dir in $PATH; do
  610.     test -z "$ac_dir" && ac_dir=.
  611.     if test -f $ac_dir/$ac_word; then
  612.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  613.         ac_prog_rejected=yes
  614.     continue
  615.       fi
  616.       ac_cv_prog_CC="cc"
  617.       break
  618.     fi
  619.   done
  620.   IFS="$ac_save_ifs"
  621. if test $ac_prog_rejected = yes; then
  622.   # We found a bogon in the path, so make sure we never use it.
  623.   set dummy $ac_cv_prog_CC
  624.   shift
  625.   if test $# -gt 0; then
  626.     # We chose a different compiler from the bogus one.
  627.     # However, it has the same basename, so the bogon will be chosen
  628.     # first if we set CC to just the basename; use the full file name.
  629.     shift
  630.     set dummy "$ac_dir/$ac_word" "$@"
  631.     shift
  632.     ac_cv_prog_CC="$@"
  633.   fi
  634. fi
  635. fi
  636. fi
  637. CC="$ac_cv_prog_CC"
  638. if test -n "$CC"; then
  639.   echo "$ac_t""$CC" 1>&6
  640. else
  641.   echo "$ac_t""no" 1>&6
  642. fi
  643.  
  644.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  645. fi
  646.  
  647. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  648. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  649.   echo $ac_n "(cached) $ac_c" 1>&6
  650. else
  651.   cat > conftest.c <<EOF
  652. #ifdef __GNUC__
  653.   yes;
  654. #endif
  655. EOF
  656. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  657.   ac_cv_prog_gcc=yes
  658. else
  659.   ac_cv_prog_gcc=no
  660. fi
  661. fi
  662.  
  663. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  664. if test $ac_cv_prog_gcc = yes; then
  665.   GCC=yes
  666.   if test "${CFLAGS+set}" != set; then
  667.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  668. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  669.   echo $ac_n "(cached) $ac_c" 1>&6
  670. else
  671.   echo 'void f(){}' > conftest.c
  672. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  673.   ac_cv_prog_gcc_g=yes
  674. else
  675.   ac_cv_prog_gcc_g=no
  676. fi
  677. rm -f conftest*
  678.  
  679. fi
  680.  
  681. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  682.     if test $ac_cv_prog_gcc_g = yes; then
  683.       CFLAGS="-g -O2"
  684.     else
  685.       CFLAGS="-O2"
  686.     fi
  687.   fi
  688. else
  689.   GCC=
  690.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  691. fi
  692.  
  693. ac_aux_dir=
  694. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  695.   if test -f $ac_dir/install-sh; then
  696.     ac_aux_dir=$ac_dir
  697.     ac_install_sh="$ac_aux_dir/install-sh -c"
  698.     break
  699.   elif test -f $ac_dir/install.sh; then
  700.     ac_aux_dir=$ac_dir
  701.     ac_install_sh="$ac_aux_dir/install.sh -c"
  702.     break
  703.   fi
  704. done
  705. if test -z "$ac_aux_dir"; then
  706.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  707. fi
  708. ac_config_guess=$ac_aux_dir/config.guess
  709. ac_config_sub=$ac_aux_dir/config.sub
  710. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  711.  
  712. # Find a good install program.  We prefer a C program (faster),
  713. # so one script is as good as another.  But avoid the broken or
  714. # incompatible versions:
  715. # SysV /etc/install, /usr/sbin/install
  716. # SunOS /usr/etc/install
  717. # IRIX /sbin/install
  718. # AIX /bin/install
  719. # AmigaOS /c/install
  720. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  721. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  722. # ./install, which can be erroneously created by make from ./install.sh.
  723. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  724. if test -z "$INSTALL"; then
  725. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  726.   echo $ac_n "(cached) $ac_c" 1>&6
  727. else
  728.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  729.   for ac_dir in $PATH; do
  730.     # Account for people who put trailing slashes in PATH elements.
  731.     case "$ac_dir/" in
  732.     /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  733.     *)
  734.       # OSF1 and SCO ODT 3.0 have their own names for install.
  735.       for ac_prog in ginstall installbsd scoinst install; do
  736.         if test -f $ac_dir/$ac_prog; then
  737.       if test $ac_prog = install &&
  738.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  739.         # AIX install.  It has an incompatible calling convention.
  740.         # OSF/1 installbsd also uses dspmsg, but is usable.
  741.         :
  742.       else
  743.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  744.         break 2
  745.       fi
  746.     fi
  747.       done
  748.       ;;
  749.     esac
  750.   done
  751.   IFS="$ac_save_ifs"
  752.  
  753. fi
  754.   if test "${ac_cv_path_install+set}" = set; then
  755.     INSTALL="$ac_cv_path_install"
  756.   else
  757.     # As a last resort, use the slow shell script.  We don't cache a
  758.     # path for INSTALL within a source directory, because that will
  759.     # break other packages using the cache if that directory is
  760.     # removed, or if the path is relative.
  761.     INSTALL="$ac_install_sh"
  762.   fi
  763. fi
  764. echo "$ac_t""$INSTALL" 1>&6
  765.  
  766. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  767. # It thinks the first close brace ends the variable substitution.
  768. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  769.  
  770. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  771.  
  772. # Extract the first word of "ranlib", so it can be a program name with args.
  773. set dummy ranlib; ac_word=$2
  774. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  775. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  776.   echo $ac_n "(cached) $ac_c" 1>&6
  777. else
  778.   if test -n "$RANLIB"; then
  779.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  780. else
  781.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  782.   for ac_dir in $PATH; do
  783.     test -z "$ac_dir" && ac_dir=.
  784.     if test -f $ac_dir/$ac_word; then
  785.       ac_cv_prog_RANLIB="ranlib"
  786.       break
  787.     fi
  788.   done
  789.   IFS="$ac_save_ifs"
  790.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  791. fi
  792. fi
  793. RANLIB="$ac_cv_prog_RANLIB"
  794. if test -n "$RANLIB"; then
  795.   echo "$ac_t""$RANLIB" 1>&6
  796. else
  797.   echo "$ac_t""no" 1>&6
  798. fi
  799.  
  800.  
  801. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  802. # On Suns, sometimes $CPP names a directory.
  803. if test -n "$CPP" && test -d "$CPP"; then
  804.   CPP=
  805. fi
  806. if test -z "$CPP"; then
  807. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  808.   echo $ac_n "(cached) $ac_c" 1>&6
  809. else
  810.     # This must be in double quotes, not single quotes, because CPP may get
  811.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  812.   CPP="${CC-cc} -E"
  813.   # On the NeXT, cc -E runs the code through the compiler's parser,
  814.   # not just through cpp.
  815.   cat > conftest.$ac_ext <<EOF
  816. #line 817 "configure"
  817. #include "confdefs.h"
  818. #include <assert.h>
  819. Syntax Error
  820. EOF
  821. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  822. { (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  823. ac_err=`grep -v '^ *+' conftest.out`
  824. if test -z "$ac_err"; then
  825.   :
  826. else
  827.   echo "$ac_err" >&5
  828.   rm -rf conftest*
  829.   CPP="${CC-cc} -E -traditional-cpp"
  830.   cat > conftest.$ac_ext <<EOF
  831. #line 832 "configure"
  832. #include "confdefs.h"
  833. #include <assert.h>
  834. Syntax Error
  835. EOF
  836. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  837. { (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  838. ac_err=`grep -v '^ *+' conftest.out`
  839. if test -z "$ac_err"; then
  840.   :
  841. else
  842.   echo "$ac_err" >&5
  843.   rm -rf conftest*
  844.   CPP=/lib/cpp
  845. fi
  846. rm -f conftest*
  847. fi
  848. rm -f conftest*
  849.   ac_cv_prog_CPP="$CPP"
  850. fi
  851.   CPP="$ac_cv_prog_CPP"
  852. else
  853.   ac_cv_prog_CPP="$CPP"
  854. fi
  855. echo "$ac_t""$CPP" 1>&6
  856.  
  857. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  858. cat > conftest.$ac_ext <<EOF
  859. #line 860 "configure"
  860. #include "confdefs.h"
  861. #ifdef _AIX
  862.   yes
  863. #endif
  864.  
  865. EOF
  866. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  867.   egrep "yes" >/dev/null 2>&1; then
  868.   rm -rf conftest*
  869.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  870. #define _ALL_SOURCE 1
  871. EOF
  872.  
  873. else
  874.   rm -rf conftest*
  875.   echo "$ac_t""no" 1>&6
  876. fi
  877. rm -f conftest*
  878.  
  879.  
  880. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  881. if test -d /etc/conf/kconfig.d &&
  882.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  883. then
  884.   echo "$ac_t""yes" 1>&6
  885.   ISC=yes # If later tests want to check for ISC.
  886.   cat >> confdefs.h <<\EOF
  887. #define _POSIX_SOURCE 1
  888. EOF
  889.  
  890.   if test "$GCC" = yes; then
  891.     CC="$CC -posix"
  892.   else
  893.     CC="$CC -Xp"
  894.   fi
  895. else
  896.   echo "$ac_t""no" 1>&6
  897.   ISC=
  898. fi
  899.  
  900. ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  901. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  902. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  903.   echo $ac_n "(cached) $ac_c" 1>&6
  904. else
  905.   cat > conftest.$ac_ext <<EOF
  906. #line 907 "configure"
  907. #include "confdefs.h"
  908. #include <minix/config.h>
  909. EOF
  910. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  911. { (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  912. ac_err=`grep -v '^ *+' conftest.out`
  913. if test -z "$ac_err"; then
  914.   rm -rf conftest*
  915.   eval "ac_cv_header_$ac_safe=yes"
  916. else
  917.   echo "$ac_err" >&5
  918.   rm -rf conftest*
  919.   eval "ac_cv_header_$ac_safe=no"
  920. fi
  921. rm -f conftest*
  922. fi
  923. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  924.   echo "$ac_t""yes" 1>&6
  925.   MINIX=yes
  926. else
  927.   echo "$ac_t""no" 1>&6
  928. MINIX=
  929. fi
  930.  
  931. if test "$MINIX" = yes; then
  932.   cat >> confdefs.h <<\EOF
  933. #define _POSIX_SOURCE 1
  934. EOF
  935.  
  936.   cat >> confdefs.h <<\EOF
  937. #define _POSIX_1_SOURCE 2
  938. EOF
  939.  
  940.   cat >> confdefs.h <<\EOF
  941. #define _MINIX 1
  942. EOF
  943.  
  944. fi
  945.  
  946. # If we cannot run a trivial program, we must be cross compiling.
  947. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  948. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  949.   echo $ac_n "(cached) $ac_c" 1>&6
  950. else
  951.   if test "$cross_compiling" = yes; then
  952.   ac_cv_c_cross=yes
  953. else
  954. cat > conftest.$ac_ext <<EOF
  955. #line 956 "configure"
  956. #include "confdefs.h"
  957. main(){return(0);}
  958. EOF
  959. { (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  960. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  961.   ac_cv_c_cross=no
  962. else
  963.   ac_cv_c_cross=yes
  964. fi
  965. fi
  966. rm -fr conftest*
  967. fi
  968.  
  969. echo "$ac_t""$ac_cv_c_cross" 1>&6
  970. cross_compiling=$ac_cv_c_cross
  971.  
  972. if test $cross_compiling = no; then
  973.   echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
  974. if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  975.   echo $ac_n "(cached) $ac_c" 1>&6
  976. else
  977.   if test "$GCC" = yes; then
  978.   # GCC predefines this symbol on systems where it applies.
  979. cat > conftest.$ac_ext <<EOF
  980. #line 981 "configure"
  981. #include "confdefs.h"
  982. #ifdef __CHAR_UNSIGNED__
  983.   yes
  984. #endif
  985.  
  986. EOF
  987. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  988.   egrep "yes" >/dev/null 2>&1; then
  989.   rm -rf conftest*
  990.   ac_cv_c_char_unsigned=yes
  991. else
  992.   rm -rf conftest*
  993.   ac_cv_c_char_unsigned=no
  994. fi
  995. rm -f conftest*
  996.  
  997. else
  998. if test "$cross_compiling" = yes; then
  999.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1000. else
  1001. cat > conftest.$ac_ext <<EOF
  1002. #line 1003 "configure"
  1003. #include "confdefs.h"
  1004. /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  1005. #if !defined(__STDC__) || __STDC__ != 1
  1006. #define volatile
  1007. #endif
  1008. main() {
  1009.   volatile char c = 255; exit(c < 0);
  1010. }
  1011. EOF
  1012. { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1013. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1014.   ac_cv_c_char_unsigned=yes
  1015. else
  1016.   ac_cv_c_char_unsigned=no
  1017. fi
  1018. fi
  1019. rm -fr conftest*
  1020. fi
  1021. fi
  1022.  
  1023. echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  1024. if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  1025.   cat >> confdefs.h <<\EOF
  1026. #define __CHAR_UNSIGNED__ 1
  1027. EOF
  1028.  
  1029. fi
  1030.  
  1031. fi
  1032. echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  1033. if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
  1034.   echo $ac_n "(cached) $ac_c" 1>&6
  1035. else
  1036.   ac_cv_prog_cc_stdc=no
  1037. ac_save_CFLAGS="$CFLAGS"
  1038. # Don't try gcc -ansi; that turns off useful extensions and
  1039. # breaks some systems' header files.
  1040. # AIX            -qlanglvl=ansi
  1041. # Ultrix and OSF/1    -std1
  1042. # HP-UX            -Aa -D_HPUX_SOURCE
  1043. # SVR4            -Xc
  1044. for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
  1045. do
  1046.   CFLAGS="$ac_save_CFLAGS $ac_arg"
  1047.   cat > conftest.$ac_ext <<EOF
  1048. #line 1049 "configure"
  1049. #include "confdefs.h"
  1050. #if !defined(__STDC__) || __STDC__ != 1
  1051. choke me
  1052. #endif    
  1053.  
  1054. int main() { return 0; }
  1055. int t() {
  1056. int test (int i, double x);
  1057. struct s1 {int (*f) (int a);};
  1058. struct s2 {int (*f) (double a);};
  1059. ; return 0; }
  1060. EOF
  1061. if { (eval echo configure:1062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1062.   rm -rf conftest*
  1063.   ac_cv_prog_cc_stdc="$ac_arg"; break
  1064. fi
  1065. rm -f conftest*
  1066.  
  1067. done
  1068. CFLAGS="$ac_save_CFLAGS"
  1069.  
  1070. fi
  1071.  
  1072. echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
  1073. case "x$ac_cv_prog_cc_stdc" in
  1074.   x|xno) ;;
  1075.   *) CC="$CC $ac_cv_prog_cc_stdc" ;;
  1076. esac
  1077.  
  1078.  
  1079. echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
  1080. if test "$ac_cv_prog_cc_stdc" != no; then
  1081.   echo "$ac_t""yes" 1>&6
  1082.   cat >> confdefs.h <<\EOF
  1083. #define PROTOTYPES 1
  1084. EOF
  1085.  
  1086.   U= ANSI2KNR=
  1087. else
  1088.   echo "$ac_t""no" 1>&6
  1089.   U=_ ANSI2KNR=ansi2knr
  1090. fi
  1091.  
  1092. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1093. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1094.   echo $ac_n "(cached) $ac_c" 1>&6
  1095. else
  1096.   cat > conftest.$ac_ext <<EOF
  1097. #line 1098 "configure"
  1098. #include "confdefs.h"
  1099.  
  1100. int main() { return 0; }
  1101. int t() {
  1102.  
  1103. /* Ultrix mips cc rejects this.  */
  1104. typedef int charset[2]; const charset x;
  1105. /* SunOS 4.1.1 cc rejects this.  */
  1106. char const *const *ccp;
  1107. char **p;
  1108. /* NEC SVR4.0.2 mips cc rejects this.  */
  1109. struct point {int x, y;};
  1110. static struct point const zero = {0,0};
  1111. /* AIX XL C 1.02.0.0 rejects this.
  1112.    It does not let you subtract one const X* pointer from another in an arm
  1113.    of an if-expression whose if-part is not a constant expression */
  1114. const char *g = "string";
  1115. ccp = &g + (g ? g-g : 0);
  1116. /* HPUX 7.0 cc rejects these. */
  1117. ++ccp;
  1118. p = (char**) ccp;
  1119. ccp = (char const *const *) p;
  1120. { /* SCO 3.2v4 cc rejects this.  */
  1121.   char *t;
  1122.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1123.  
  1124.   *t++ = 0;
  1125. }
  1126. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1127.   int x[] = {25, 17};
  1128.   const int *foo = &x[0];
  1129.   ++foo;
  1130. }
  1131. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1132.   typedef const int *iptr;
  1133.   iptr p = 0;
  1134.   ++p;
  1135. }
  1136. { /* AIX XL C 1.02.0.0 rejects this saying
  1137.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1138.   struct s { int j; const int *ap[3]; };
  1139.   struct s *b; b->j = 5;
  1140. }
  1141. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1142.   const int foo = 10;
  1143. }
  1144.  
  1145. ; return 0; }
  1146. EOF
  1147. if { (eval echo configure:1148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1148.   rm -rf conftest*
  1149.   ac_cv_c_const=yes
  1150. else
  1151.   rm -rf conftest*
  1152.   ac_cv_c_const=no
  1153. fi
  1154. rm -f conftest*
  1155.  
  1156. fi
  1157.  
  1158. echo "$ac_t""$ac_cv_c_const" 1>&6
  1159. if test $ac_cv_c_const = no; then
  1160.   cat >> confdefs.h <<\EOF
  1161. #define const 
  1162. EOF
  1163.  
  1164. fi
  1165.  
  1166.  
  1167. for ac_hdr in string.h
  1168. do
  1169. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1170. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1171. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1172.   echo $ac_n "(cached) $ac_c" 1>&6
  1173. else
  1174.   cat > conftest.$ac_ext <<EOF
  1175. #line 1176 "configure"
  1176. #include "confdefs.h"
  1177. #include <$ac_hdr>
  1178. EOF
  1179. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1180. { (eval echo configure:1181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1181. ac_err=`grep -v '^ *+' conftest.out`
  1182. if test -z "$ac_err"; then
  1183.   rm -rf conftest*
  1184.   eval "ac_cv_header_$ac_safe=yes"
  1185. else
  1186.   echo "$ac_err" >&5
  1187.   rm -rf conftest*
  1188.   eval "ac_cv_header_$ac_safe=no"
  1189. fi
  1190. rm -f conftest*
  1191. fi
  1192. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1193.   echo "$ac_t""yes" 1>&6
  1194.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1195.   cat >> confdefs.h <<EOF
  1196. #define $ac_tr_hdr 1
  1197. EOF
  1198.  
  1199. else
  1200.   echo "$ac_t""no" 1>&6
  1201. fi
  1202. done
  1203.  
  1204. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1205. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1206.   echo $ac_n "(cached) $ac_c" 1>&6
  1207. else
  1208.   cat > conftest.$ac_ext <<EOF
  1209. #line 1210 "configure"
  1210. #include "confdefs.h"
  1211. #include <stdlib.h>
  1212. #include <stdarg.h>
  1213. #include <string.h>
  1214. #include <float.h>
  1215. EOF
  1216. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1217. { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1218. ac_err=`grep -v '^ *+' conftest.out`
  1219. if test -z "$ac_err"; then
  1220.   rm -rf conftest*
  1221.   ac_cv_header_stdc=yes
  1222. else
  1223.   echo "$ac_err" >&5
  1224.   rm -rf conftest*
  1225.   ac_cv_header_stdc=no
  1226. fi
  1227. rm -f conftest*
  1228.  
  1229. if test $ac_cv_header_stdc = yes; then
  1230.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1231. cat > conftest.$ac_ext <<EOF
  1232. #line 1233 "configure"
  1233. #include "confdefs.h"
  1234. #include <string.h>
  1235. EOF
  1236. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1237.   egrep "memchr" >/dev/null 2>&1; then
  1238.   :
  1239. else
  1240.   rm -rf conftest*
  1241.   ac_cv_header_stdc=no
  1242. fi
  1243. rm -f conftest*
  1244.  
  1245. fi
  1246.  
  1247. if test $ac_cv_header_stdc = yes; then
  1248.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1249. cat > conftest.$ac_ext <<EOF
  1250. #line 1251 "configure"
  1251. #include "confdefs.h"
  1252. #include <stdlib.h>
  1253. EOF
  1254. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1255.   egrep "free" >/dev/null 2>&1; then
  1256.   :
  1257. else
  1258.   rm -rf conftest*
  1259.   ac_cv_header_stdc=no
  1260. fi
  1261. rm -f conftest*
  1262.  
  1263. fi
  1264.  
  1265. if test $ac_cv_header_stdc = yes; then
  1266.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1267. if test "$cross_compiling" = yes; then
  1268.   :
  1269. else
  1270. cat > conftest.$ac_ext <<EOF
  1271. #line 1272 "configure"
  1272. #include "confdefs.h"
  1273. #include <ctype.h>
  1274. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1275. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1276. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1277. int main () { int i; for (i = 0; i < 256; i++)
  1278. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1279. exit (0); }
  1280.  
  1281. EOF
  1282. { (eval echo configure:1283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1283. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1284.   :
  1285. else
  1286.   ac_cv_header_stdc=no
  1287. fi
  1288. fi
  1289. rm -fr conftest*
  1290. fi
  1291. fi
  1292.  
  1293. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1294. if test $ac_cv_header_stdc = yes; then
  1295.   cat >> confdefs.h <<\EOF
  1296. #define STDC_HEADERS 1
  1297. EOF
  1298.  
  1299. fi
  1300.  
  1301.  
  1302. for ac_func in setchrclass strerror
  1303. do
  1304. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1305. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1306.   echo $ac_n "(cached) $ac_c" 1>&6
  1307. else
  1308.   cat > conftest.$ac_ext <<EOF
  1309. #line 1310 "configure"
  1310. #include "confdefs.h"
  1311. /* System header to define __stub macros and hopefully few prototypes,
  1312.     which can conflict with char $ac_func(); below.  */
  1313. #include <assert.h>
  1314. /* Override any gcc2 internal prototype to avoid an error.  */
  1315. /* We use char because int might match the return type of a gcc2
  1316.     builtin and then its argument prototype would still apply.  */
  1317. char $ac_func();
  1318.  
  1319. int main() { t(); return 0; }
  1320. int t() {
  1321.  
  1322. /* The GNU C library defines this for functions which it implements
  1323.     to always fail with ENOSYS.  Some functions are actually named
  1324.     something starting with __ and the normal name is an alias.  */
  1325. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1326. choke me
  1327. #else
  1328. $ac_func();
  1329. #endif
  1330.  
  1331. ; return 0; }
  1332. EOF
  1333. if { (eval echo configure:1334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1334.   rm -rf conftest*
  1335.   eval "ac_cv_func_$ac_func=yes"
  1336. else
  1337.   rm -rf conftest*
  1338.   eval "ac_cv_func_$ac_func=no"
  1339. fi
  1340. rm -f conftest*
  1341.  
  1342. fi
  1343. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1344.   echo "$ac_t""yes" 1>&6
  1345.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1346.   cat >> confdefs.h <<EOF
  1347. #define $ac_tr_func 1
  1348. EOF
  1349.  
  1350. else
  1351.   echo "$ac_t""no" 1>&6
  1352. fi
  1353. done
  1354.  
  1355. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1356. # for constant arguments.  Useless!
  1357. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  1358. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1359.   echo $ac_n "(cached) $ac_c" 1>&6
  1360. else
  1361.   cat > conftest.$ac_ext <<EOF
  1362. #line 1363 "configure"
  1363. #include "confdefs.h"
  1364. #include <alloca.h>
  1365. int main() { t(); return 0; }
  1366. int t() {
  1367. char *p = alloca(2 * sizeof(int));
  1368. ; return 0; }
  1369. EOF
  1370. if { (eval echo configure:1371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1371.   rm -rf conftest*
  1372.   ac_cv_header_alloca_h=yes
  1373. else
  1374.   rm -rf conftest*
  1375.   ac_cv_header_alloca_h=no
  1376. fi
  1377. rm -f conftest*
  1378.  
  1379. fi
  1380.  
  1381. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  1382. if test $ac_cv_header_alloca_h = yes; then
  1383.   cat >> confdefs.h <<\EOF
  1384. #define HAVE_ALLOCA_H 1
  1385. EOF
  1386.  
  1387. fi
  1388.  
  1389. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  1390. if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
  1391.   echo $ac_n "(cached) $ac_c" 1>&6
  1392. else
  1393.   cat > conftest.$ac_ext <<EOF
  1394. #line 1395 "configure"
  1395. #include "confdefs.h"
  1396.  
  1397. #ifdef __GNUC__
  1398. # define alloca __builtin_alloca
  1399. #else
  1400. # if HAVE_ALLOCA_H
  1401. #  include <alloca.h>
  1402. # else
  1403. #  ifdef _AIX
  1404.  #pragma alloca
  1405. #  else
  1406. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1407. char *alloca ();
  1408. #   endif
  1409. #  endif
  1410. # endif
  1411. #endif
  1412.  
  1413. int main() { t(); return 0; }
  1414. int t() {
  1415. char *p = (char *) alloca(1);
  1416. ; return 0; }
  1417. EOF
  1418. if { (eval echo configure:1419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1419.   rm -rf conftest*
  1420.   ac_cv_func_alloca=yes
  1421. else
  1422.   rm -rf conftest*
  1423.   ac_cv_func_alloca=no
  1424. fi
  1425. rm -f conftest*
  1426.  
  1427. fi
  1428.  
  1429. echo "$ac_t""$ac_cv_func_alloca" 1>&6
  1430. if test $ac_cv_func_alloca = yes; then
  1431.   cat >> confdefs.h <<\EOF
  1432. #define HAVE_ALLOCA 1
  1433. EOF
  1434.  
  1435. fi
  1436.  
  1437. if test $ac_cv_func_alloca = no; then
  1438.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1439.   # that cause trouble.  Some versions do not even contain alloca or
  1440.   # contain a buggy version.  If you still want to use their alloca,
  1441.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1442.   ALLOCA=alloca.o
  1443.   cat >> confdefs.h <<\EOF
  1444. #define C_ALLOCA 1
  1445. EOF
  1446.  
  1447.  
  1448. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  1449. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  1450.   echo $ac_n "(cached) $ac_c" 1>&6
  1451. else
  1452.   cat > conftest.$ac_ext <<EOF
  1453. #line 1454 "configure"
  1454. #include "confdefs.h"
  1455. #if defined(CRAY) && ! defined(CRAY2)
  1456. webecray
  1457. #else
  1458. wenotbecray
  1459. #endif
  1460.  
  1461. EOF
  1462. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1463.   egrep "webecray" >/dev/null 2>&1; then
  1464.   rm -rf conftest*
  1465.   ac_cv_os_cray=yes
  1466. else
  1467.   rm -rf conftest*
  1468.   ac_cv_os_cray=no
  1469. fi
  1470. rm -f conftest*
  1471.  
  1472. fi
  1473.  
  1474. echo "$ac_t""$ac_cv_os_cray" 1>&6
  1475. if test $ac_cv_os_cray = yes; then
  1476. for ac_func in _getb67 GETB67 getb67; do
  1477.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1478. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1479.   echo $ac_n "(cached) $ac_c" 1>&6
  1480. else
  1481.   cat > conftest.$ac_ext <<EOF
  1482. #line 1483 "configure"
  1483. #include "confdefs.h"
  1484. /* System header to define __stub macros and hopefully few prototypes,
  1485.     which can conflict with char $ac_func(); below.  */
  1486. #include <assert.h>
  1487. /* Override any gcc2 internal prototype to avoid an error.  */
  1488. /* We use char because int might match the return type of a gcc2
  1489.     builtin and then its argument prototype would still apply.  */
  1490. char $ac_func();
  1491.  
  1492. int main() { t(); return 0; }
  1493. int t() {
  1494.  
  1495. /* The GNU C library defines this for functions which it implements
  1496.     to always fail with ENOSYS.  Some functions are actually named
  1497.     something starting with __ and the normal name is an alias.  */
  1498. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1499. choke me
  1500. #else
  1501. $ac_func();
  1502. #endif
  1503.  
  1504. ; return 0; }
  1505. EOF
  1506. if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1507.   rm -rf conftest*
  1508.   eval "ac_cv_func_$ac_func=yes"
  1509. else
  1510.   rm -rf conftest*
  1511.   eval "ac_cv_func_$ac_func=no"
  1512. fi
  1513. rm -f conftest*
  1514.  
  1515. fi
  1516. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1517.   echo "$ac_t""yes" 1>&6
  1518.   cat >> confdefs.h <<EOF
  1519. #define CRAY_STACKSEG_END $ac_func
  1520. EOF
  1521.  
  1522.   break
  1523. else
  1524.   echo "$ac_t""no" 1>&6
  1525. fi
  1526.  
  1527. done
  1528. fi
  1529.  
  1530. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  1531. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1532.   echo $ac_n "(cached) $ac_c" 1>&6
  1533. else
  1534.   if test "$cross_compiling" = yes; then
  1535.   ac_cv_c_stack_direction=0
  1536. else
  1537. cat > conftest.$ac_ext <<EOF
  1538. #line 1539 "configure"
  1539. #include "confdefs.h"
  1540. find_stack_direction ()
  1541. {
  1542.   static char *addr = 0;
  1543.   auto char dummy;
  1544.   if (addr == 0)
  1545.     {
  1546.       addr = &dummy;
  1547.       return find_stack_direction ();
  1548.     }
  1549.   else
  1550.     return (&dummy > addr) ? 1 : -1;
  1551. }
  1552. main ()
  1553. {
  1554.   exit (find_stack_direction() < 0);
  1555. }
  1556. EOF
  1557. { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1558. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1559.   ac_cv_c_stack_direction=1
  1560. else
  1561.   ac_cv_c_stack_direction=-1
  1562. fi
  1563. fi
  1564. rm -fr conftest*
  1565. fi
  1566.  
  1567. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  1568. cat >> confdefs.h <<EOF
  1569. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1570. EOF
  1571.  
  1572. fi
  1573.  
  1574. echo $ac_n "checking for vprintf""... $ac_c" 1>&6
  1575. if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  1576.   echo $ac_n "(cached) $ac_c" 1>&6
  1577. else
  1578.   cat > conftest.$ac_ext <<EOF
  1579. #line 1580 "configure"
  1580. #include "confdefs.h"
  1581. /* System header to define __stub macros and hopefully few prototypes,
  1582.     which can conflict with char vprintf(); below.  */
  1583. #include <assert.h>
  1584. /* Override any gcc2 internal prototype to avoid an error.  */
  1585. /* We use char because int might match the return type of a gcc2
  1586.     builtin and then its argument prototype would still apply.  */
  1587. char vprintf();
  1588.  
  1589. int main() { t(); return 0; }
  1590. int t() {
  1591.  
  1592. /* The GNU C library defines this for functions which it implements
  1593.     to always fail with ENOSYS.  Some functions are actually named
  1594.     something starting with __ and the normal name is an alias.  */
  1595. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  1596. choke me
  1597. #else
  1598. vprintf();
  1599. #endif
  1600.  
  1601. ; return 0; }
  1602. EOF
  1603. if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1604.   rm -rf conftest*
  1605.   eval "ac_cv_func_vprintf=yes"
  1606. else
  1607.   rm -rf conftest*
  1608.   eval "ac_cv_func_vprintf=no"
  1609. fi
  1610. rm -f conftest*
  1611.  
  1612. fi
  1613. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  1614.   echo "$ac_t""yes" 1>&6
  1615.   cat >> confdefs.h <<\EOF
  1616. #define HAVE_VPRINTF 1
  1617. EOF
  1618.  
  1619. else
  1620.   echo "$ac_t""no" 1>&6
  1621. fi
  1622.  
  1623. if test "$ac_cv_func_vprintf" != yes; then
  1624. echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
  1625. if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  1626.   echo $ac_n "(cached) $ac_c" 1>&6
  1627. else
  1628.   cat > conftest.$ac_ext <<EOF
  1629. #line 1630 "configure"
  1630. #include "confdefs.h"
  1631. /* System header to define __stub macros and hopefully few prototypes,
  1632.     which can conflict with char _doprnt(); below.  */
  1633. #include <assert.h>
  1634. /* Override any gcc2 internal prototype to avoid an error.  */
  1635. /* We use char because int might match the return type of a gcc2
  1636.     builtin and then its argument prototype would still apply.  */
  1637. char _doprnt();
  1638.  
  1639. int main() { t(); return 0; }
  1640. int t() {
  1641.  
  1642. /* The GNU C library defines this for functions which it implements
  1643.     to always fail with ENOSYS.  Some functions are actually named
  1644.     something starting with __ and the normal name is an alias.  */
  1645. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  1646. choke me
  1647. #else
  1648. _doprnt();
  1649. #endif
  1650.  
  1651. ; return 0; }
  1652. EOF
  1653. if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1654.   rm -rf conftest*
  1655.   eval "ac_cv_func__doprnt=yes"
  1656. else
  1657.   rm -rf conftest*
  1658.   eval "ac_cv_func__doprnt=no"
  1659. fi
  1660. rm -f conftest*
  1661.  
  1662. fi
  1663. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  1664.   echo "$ac_t""yes" 1>&6
  1665.   cat >> confdefs.h <<\EOF
  1666. #define HAVE_DOPRNT 1
  1667. EOF
  1668.  
  1669. else
  1670.   echo "$ac_t""no" 1>&6
  1671. fi
  1672.  
  1673. fi
  1674.  
  1675.  
  1676. echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6
  1677. # Check whether --with-dmalloc or --without-dmalloc was given.
  1678. if test "${with_dmalloc+set}" = set; then
  1679.   withval="$with_dmalloc"
  1680.   if test "$withval" = yes; then
  1681.   echo "$ac_t""yes" 1>&6
  1682.   cat >> confdefs.h <<\EOF
  1683. #define WITH_DMALLOC 1
  1684. EOF
  1685.  
  1686.   LIBS="$LIBS -ldmalloc"
  1687.   LDFLAGS="$LDFLAGS -g"
  1688. else
  1689.   echo "$ac_t""no" 1>&6
  1690. fi
  1691. else
  1692.   echo "$ac_t""no" 1>&6
  1693. fi
  1694.  
  1695.  
  1696. trap '' 1 2 15
  1697. cat > confcache <<\EOF
  1698. # This file is a shell script that caches the results of configure
  1699. # tests run on this system so they can be shared between configure
  1700. # scripts and configure runs.  It is not useful on other systems.
  1701. # If it contains results you don't want to keep, you may remove or edit it.
  1702. #
  1703. # By default, configure uses ./config.cache as the cache file,
  1704. # creating it if it does not exist already.  You can give configure
  1705. # the --cache-file=FILE option to use a different cache file; that is
  1706. # what configure does when it calls configure scripts in
  1707. # subdirectories, so they share the cache.
  1708. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1709. # config.status only pays attention to the cache file if you give it the
  1710. # --recheck option to rerun configure.
  1711. #
  1712. EOF
  1713. # Ultrix sh set writes to stderr and can't be redirected directly,
  1714. # and sets the high bit in the cache file unless we assign to the vars.
  1715. (set) 2>&1 |
  1716.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1717.   >> confcache
  1718. if cmp -s $cache_file confcache; then
  1719.   :
  1720. else
  1721.   if test -w $cache_file; then
  1722.     echo "updating cache $cache_file"
  1723.     cat confcache > $cache_file
  1724.   else
  1725.     echo "not updating unwritable cache $cache_file"
  1726.   fi
  1727. fi
  1728. rm -f confcache
  1729.  
  1730. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1731.  
  1732. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1733. # Let make expand exec_prefix.
  1734. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1735.  
  1736. # Any assignment to VPATH causes Sun make to only execute
  1737. # the first set of double-colon rules, so remove it if not needed.
  1738. # If there is a colon in the path, we need to keep it.
  1739. if test "x$srcdir" = x.; then
  1740.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1741. fi
  1742.  
  1743. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1744.  
  1745. DEFS=-DHAVE_CONFIG_H
  1746.  
  1747. # Without the "./", some shells look in PATH for config.status.
  1748. : ${CONFIG_STATUS=./config.status}
  1749.  
  1750. echo creating $CONFIG_STATUS
  1751. # Some systems, like AmigaOS, won't allow you to remove a script that is
  1752. # being executed, so just move it out of the way instead.
  1753. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  1754. cat > $CONFIG_STATUS <<EOF
  1755. #! /bin/sh
  1756. # Generated automatically by configure.
  1757. # Run this file to recreate the current configuration.
  1758. # This directory was configured as follows,
  1759. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1760. #
  1761. # $0 $ac_configure_args
  1762. #
  1763. # Compiler output produced by configure, useful for debugging
  1764. # configure, is in ./config.log if it exists.
  1765.  
  1766. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1767. for ac_option
  1768. do
  1769.   case "\$ac_option" in
  1770.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1771.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1772.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1773.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1774.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  1775.     exit 0 ;;
  1776.   -help | --help | --hel | --he | --h)
  1777.     echo "\$ac_cs_usage"; exit 0 ;;
  1778.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1779.   esac
  1780. done
  1781.  
  1782. ac_given_srcdir=$srcdir
  1783. ac_given_INSTALL="$INSTALL"
  1784.  
  1785. trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1786. EOF
  1787. cat >> $CONFIG_STATUS <<EOF
  1788.  
  1789. # Protect against being on the right side of a sed subst in config.status.
  1790. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  1791.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  1792. $ac_vpsub
  1793. $extrasub
  1794. s%@CFLAGS@%$CFLAGS%g
  1795. s%@CPPFLAGS@%$CPPFLAGS%g
  1796. s%@CXXFLAGS@%$CXXFLAGS%g
  1797. s%@DEFS@%$DEFS%g
  1798. s%@LDFLAGS@%$LDFLAGS%g
  1799. s%@LIBS@%$LIBS%g
  1800. s%@exec_prefix@%$exec_prefix%g
  1801. s%@prefix@%$prefix%g
  1802. s%@program_transform_name@%$program_transform_name%g
  1803. s%@bindir@%$bindir%g
  1804. s%@sbindir@%$sbindir%g
  1805. s%@libexecdir@%$libexecdir%g
  1806. s%@datadir@%$datadir%g
  1807. s%@sysconfdir@%$sysconfdir%g
  1808. s%@sharedstatedir@%$sharedstatedir%g
  1809. s%@localstatedir@%$localstatedir%g
  1810. s%@libdir@%$libdir%g
  1811. s%@includedir@%$includedir%g
  1812. s%@oldincludedir@%$oldincludedir%g
  1813. s%@infodir@%$infodir%g
  1814. s%@guidedir@%$guidedir%g
  1815. s%@psdir@%$psdir%g
  1816. s%@dvidir@%$dvidir%g
  1817. s%@mandir@%$mandir%g
  1818. s%@PRODUCT@%$PRODUCT%g
  1819. s%@VERSION@%$VERSION%g
  1820. s%@CC@%$CC%g
  1821. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1822. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1823. s%@RANLIB@%$RANLIB%g
  1824. s%@CPP@%$CPP%g
  1825. s%@U@%$U%g
  1826. s%@ANSI2KNR@%$ANSI2KNR%g
  1827. s%@ALLOCA@%$ALLOCA%g
  1828.  
  1829. CEOF
  1830. EOF
  1831. cat >> $CONFIG_STATUS <<EOF
  1832.  
  1833. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  1834. EOF
  1835. cat >> $CONFIG_STATUS <<\EOF
  1836. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1837.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1838.   case "$ac_file" in
  1839.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1840.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1841.   *) ac_file_in="${ac_file}.in" ;;
  1842.   esac
  1843.  
  1844.   # Adjust relative srcdir, etc. for subdirectories.
  1845.  
  1846.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1847.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1848.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1849.     # The file is in a subdirectory.
  1850.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1851.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1852.     # A "../" for each directory in $ac_dir_suffix.
  1853.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1854.   else
  1855.     ac_dir_suffix= ac_dots=
  1856.   fi
  1857.  
  1858.   case "$ac_given_srcdir" in
  1859.   .)  srcdir=.
  1860.       if test -z "$ac_dots"; then top_srcdir=.
  1861.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1862.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1863.   *) # Relative path.
  1864.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1865.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1866.   esac
  1867.  
  1868.   case "$ac_given_INSTALL" in
  1869.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1870.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1871.   esac
  1872.   echo creating "$ac_file"
  1873.   rm -f "$ac_file"
  1874.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1875.   case "$ac_file" in
  1876.   *Makefile*) ac_comsub="1i\\
  1877. # $configure_input" ;;
  1878.   *) ac_comsub= ;;
  1879.   esac
  1880.   sed -e "$ac_comsub
  1881. s%@configure_input@%$configure_input%g
  1882. s%@srcdir@%$srcdir%g
  1883. s%@top_srcdir@%$top_srcdir%g
  1884. s%@INSTALL@%$INSTALL%g
  1885. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1886. fi; done
  1887. rm -f conftest.subs
  1888.  
  1889. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1890. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1891. #
  1892. # ac_d sets the value in "#define NAME VALUE" lines.
  1893. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1894. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1895. ac_dC='\3'
  1896. ac_dD='%g'
  1897. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1898. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1899. ac_uB='\([     ]\)%\1#\2define\3'
  1900. ac_uC=' '
  1901. ac_uD='\4%g'
  1902. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1903. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1904. ac_eB='$%\1#\2define\3'
  1905. ac_eC=' '
  1906. ac_eD='%g'
  1907.  
  1908. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1909. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1910.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1911.   case "$ac_file" in
  1912.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1913.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1914.   *) ac_file_in="${ac_file}.in" ;;
  1915.   esac
  1916.  
  1917.   echo creating $ac_file
  1918.  
  1919.   rm -f conftest.frag conftest.in conftest.out
  1920.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1921.  
  1922. EOF
  1923.  
  1924. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1925. # the proper values into config.h.in to produce config.h.  And first:
  1926. # Protect against being on the right side of a sed subst in config.status.
  1927. # Protect against being in an unquoted here document in config.status.
  1928. rm -f conftest.vals
  1929. cat > conftest.hdr <<\EOF
  1930. s/[\\&%]/\\&/g
  1931. s%[\\$`]%\\&%g
  1932. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1933. s%ac_d%ac_u%gp
  1934. s%ac_u%ac_e%gp
  1935. EOF
  1936. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1937. rm -f conftest.hdr
  1938.  
  1939. # This sed command replaces #undef with comments.  This is necessary, for
  1940. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1941. # on some systems where configure will not decide to define it.
  1942. cat >> conftest.vals <<\EOF
  1943. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1944. EOF
  1945.  
  1946. # Break up conftest.vals because some shells have a limit on
  1947. # the size of here documents, and old seds have small limits too.
  1948. # Maximum number of lines to put in a single here document.
  1949. ac_max_here_lines=12
  1950.  
  1951. rm -f conftest.tail
  1952. while :
  1953. do
  1954.   ac_lines=`grep -c . conftest.vals`
  1955.   # grep -c gives empty output for an empty file on some AIX systems.
  1956.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1957.   # Write a limited-size here document to conftest.frag.
  1958.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1959.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1960.   echo 'CEOF
  1961.   sed -f conftest.frag conftest.in > conftest.out
  1962.   rm -f conftest.in
  1963.   mv conftest.out conftest.in
  1964. ' >> $CONFIG_STATUS
  1965.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1966.   rm -f conftest.vals
  1967.   mv conftest.tail conftest.vals
  1968. done
  1969. rm -f conftest.vals
  1970.  
  1971. cat >> $CONFIG_STATUS <<\EOF
  1972.   rm -f conftest.frag conftest.h
  1973.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1974.   cat conftest.in >> conftest.h
  1975.   rm -f conftest.in
  1976.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1977.     echo "$ac_file is unchanged"
  1978.     rm -f conftest.h
  1979.   else
  1980.     # Remove last slash and all that follows it.  Not all systems have dirname.
  1981.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1982.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1983.       # The file is in a subdirectory.
  1984.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  1985.     fi
  1986.     rm -f $ac_file
  1987.     mv conftest.h $ac_file
  1988.   fi
  1989. fi; done
  1990.  
  1991.  
  1992. test -z "$CONFIG_HEADERS" || date > stamp-h
  1993. exit 0
  1994. EOF
  1995. chmod +x $CONFIG_STATUS
  1996. rm -f CONFIG.STATUS.old
  1997. rm -fr confdefs* $ac_clean_files
  1998. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1999.  
  2000.