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