home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stlpt453.zip / STLport-4.5.3 / stlport / config / new_compiler / configure next >
Text File  |  2001-05-26  |  101KB  |  3,645 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. --enable-extension=<ext>"
  16. ac_help="$ac_help
  17. --enable-namespaces Use namespaces (default if posssible)
  18. --disable-namespaces Don't use namespaces support"
  19. ac_help="$ac_help
  20. --enable-exceptions Use exceptions support (default if posssible)
  21.  --disable-exceptions Don't use exceptions support"
  22. ac_help="$ac_help
  23. --enable-relops Separate rel_ops namespace for relational operators (default if posssible)
  24. --disable-relops No separate rel_ops namespace for relational operators"
  25. ac_help="$ac_help
  26. --enable-new-style-headers Use new-style headers (default)
  27. --disable-new-style-headers Don't use new-style headers"
  28. ac_help="$ac_help
  29. --enable-new-iostreams Use new iostreams (default)
  30. --disable-new-iostreams Don't use new iostreams"
  31. ac_help="$ac_help
  32. --enable-sgi-allocators : set default parameter to SGI-style default alloc, not allocator<T>
  33.  --disable-sgi-allocators : use allocator<T> if possible"
  34. ac_help="$ac_help
  35. --enable-malloc : set default alloc to malloc-based allocator ( malloc_alloc_template<instance_no>, alloc.h )
  36. --disable-malloc : choose (default) sgi node allocator (__alloc<threads,no>  alloc.h )"
  37. ac_help="$ac_help
  38. --enable-newalloc : set default alloc to new-based allocator ( new_alloc, alloc.h )
  39. --disable-newalloc : choose (default) sgi allocator (__alloc<threads,no>  alloc.h )"
  40. ac_help="$ac_help
  41. --enable-defalloc : make HP-style defalloc.h included in alloc.h )
  42. --disable-defalloc : leave defalloc.h alone"
  43. ac_help="$ac_help
  44. --enable-debugalloc : use debug versions of allocators
  45. --disable-debugalloc : not using debug allocators"
  46. ac_help="$ac_help
  47. --enable-abbrevs : use abbreviated class names internally for linker benefit (don't affect interface)
  48. --disable-abbrevs : don't use abbreviated names"
  49.  
  50. # Initialize some variables set by options.
  51. # The variables have the same names as the options, with
  52. # dashes changed to underlines.
  53. build=NONE
  54. cache_file=./config.cache
  55. exec_prefix=NONE
  56. host=NONE
  57. no_create=
  58. nonopt=NONE
  59. no_recursion=
  60. prefix=NONE
  61. program_prefix=NONE
  62. program_suffix=NONE
  63. program_transform_name=s,x,x,
  64. silent=
  65. site=
  66. srcdir=
  67. target=NONE
  68. verbose=
  69. x_includes=NONE
  70. x_libraries=NONE
  71. bindir='${exec_prefix}/bin'
  72. sbindir='${exec_prefix}/sbin'
  73. libexecdir='${exec_prefix}/libexec'
  74. datadir='${prefix}/share'
  75. sysconfdir='${prefix}/etc'
  76. sharedstatedir='${prefix}/com'
  77. localstatedir='${prefix}/var'
  78. libdir='${exec_prefix}/lib'
  79. includedir='${prefix}/include'
  80. oldincludedir='/usr/include'
  81. infodir='${prefix}/info'
  82. mandir='${prefix}/man'
  83.  
  84. # Initialize some other variables.
  85. subdirs=
  86. MFLAGS= MAKEFLAGS=
  87. # Maximum number of lines to put in a shell here document.
  88. ac_max_here_lines=12
  89.  
  90. ac_prev=
  91. for ac_option
  92. do
  93.  
  94.   # If the previous option needs an argument, assign it.
  95.   if test -n "$ac_prev"; then
  96.     eval "$ac_prev=\$ac_option"
  97.     ac_prev=
  98.     continue
  99.   fi
  100.  
  101.   case "$ac_option" in
  102.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  103.   *) ac_optarg= ;;
  104.   esac
  105.  
  106.   # Accept the important Cygnus configure options, so we can diagnose typos.
  107.  
  108.   case "$ac_option" in
  109.  
  110.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  111.     ac_prev=bindir ;;
  112.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  113.     bindir="$ac_optarg" ;;
  114.  
  115.   -build | --build | --buil | --bui | --bu)
  116.     ac_prev=build ;;
  117.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  118.     build="$ac_optarg" ;;
  119.  
  120.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  121.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  122.     ac_prev=cache_file ;;
  123.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  124.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  125.     cache_file="$ac_optarg" ;;
  126.  
  127.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  128.     ac_prev=datadir ;;
  129.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  130.   | --da=*)
  131.     datadir="$ac_optarg" ;;
  132.  
  133.   -disable-* | --disable-*)
  134.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  135.     # Reject names that are not valid shell variable names.
  136.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  137.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  138.     fi
  139.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  140.     eval "enable_${ac_feature}=no" ;;
  141.  
  142.   -enable-* | --enable-*)
  143.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  144.     # Reject names that are not valid shell variable names.
  145.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  146.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  147.     fi
  148.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  149.     case "$ac_option" in
  150.       *=*) ;;
  151.       *) ac_optarg=yes ;;
  152.     esac
  153.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  154.  
  155.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  156.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  157.   | --exec | --exe | --ex)
  158.     ac_prev=exec_prefix ;;
  159.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  160.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  161.   | --exec=* | --exe=* | --ex=*)
  162.     exec_prefix="$ac_optarg" ;;
  163.  
  164.   -gas | --gas | --ga | --g)
  165.     # Obsolete; use --with-gas.
  166.     with_gas=yes ;;
  167.  
  168.   -help | --help | --hel | --he)
  169.     # Omit some internal or obsolete options to make the list less imposing.
  170.     # This message is too long to be a string in the A/UX 3.1 sh.
  171.     cat << EOF
  172. Usage: configure [options] [host]
  173. Options: [defaults in brackets after descriptions]
  174. Configuration:
  175.   --cache-file=FILE       cache test results in FILE
  176.   --help                  print this message
  177.   --no-create             do not create output files
  178.   --quiet, --silent       do not print \`checking...' messages
  179.   --version               print the version of autoconf that created configure
  180. Directory and file names:
  181.   --prefix=PREFIX         install architecture-independent files in PREFIX
  182.                           [$ac_default_prefix]
  183.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  184.                           [same as prefix]
  185.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  186.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  187.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  188.   --datadir=DIR           read-only architecture-independent data in DIR
  189.                           [PREFIX/share]
  190.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  191.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  192.                           [PREFIX/com]
  193.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  194.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  195.   --includedir=DIR        C header files in DIR [PREFIX/include]
  196.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  197.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  198.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  199.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  200.   --program-prefix=PREFIX prepend PREFIX to installed program names
  201.   --program-suffix=SUFFIX append SUFFIX to installed program names
  202.   --program-transform-name=PROGRAM
  203.                           run sed PROGRAM on installed program names
  204. EOF
  205.     cat << EOF
  206. Host type:
  207.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  208.   --host=HOST             configure for HOST [guessed]
  209.   --target=TARGET         configure for TARGET [TARGET=HOST]
  210. Features and packages:
  211.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  212.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  213.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  214.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  215.   --x-includes=DIR        X include files are in DIR
  216.   --x-libraries=DIR       X library files are in DIR
  217. EOF
  218.     if test -n "$ac_help"; then
  219.       echo "--enable and --with options recognized:$ac_help"
  220.     fi
  221.     exit 0 ;;
  222.  
  223.   -host | --host | --hos | --ho)
  224.     ac_prev=host ;;
  225.   -host=* | --host=* | --hos=* | --ho=*)
  226.     host="$ac_optarg" ;;
  227.  
  228.   -includedir | --includedir | --includedi | --included | --include \
  229.   | --includ | --inclu | --incl | --inc)
  230.     ac_prev=includedir ;;
  231.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  232.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  233.     includedir="$ac_optarg" ;;
  234.  
  235.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  236.     ac_prev=infodir ;;
  237.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  238.     infodir="$ac_optarg" ;;
  239.  
  240.   -libdir | --libdir | --libdi | --libd)
  241.     ac_prev=libdir ;;
  242.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  243.     libdir="$ac_optarg" ;;
  244.  
  245.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  246.   | --libexe | --libex | --libe)
  247.     ac_prev=libexecdir ;;
  248.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  249.   | --libexe=* | --libex=* | --libe=*)
  250.     libexecdir="$ac_optarg" ;;
  251.  
  252.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  253.   | --localstate | --localstat | --localsta | --localst \
  254.   | --locals | --local | --loca | --loc | --lo)
  255.     ac_prev=localstatedir ;;
  256.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  257.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  258.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  259.     localstatedir="$ac_optarg" ;;
  260.  
  261.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  262.     ac_prev=mandir ;;
  263.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  264.     mandir="$ac_optarg" ;;
  265.  
  266.   -nfp | --nfp | --nf)
  267.     # Obsolete; use --without-fp.
  268.     with_fp=no ;;
  269.  
  270.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  271.   | --no-cr | --no-c)
  272.     no_create=yes ;;
  273.  
  274.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  275.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  276.     no_recursion=yes ;;
  277.  
  278.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  279.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  280.   | --oldin | --oldi | --old | --ol | --o)
  281.     ac_prev=oldincludedir ;;
  282.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  283.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  284.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  285.     oldincludedir="$ac_optarg" ;;
  286.  
  287.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  288.     ac_prev=prefix ;;
  289.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  290.     prefix="$ac_optarg" ;;
  291.  
  292.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  293.   | --program-pre | --program-pr | --program-p)
  294.     ac_prev=program_prefix ;;
  295.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  296.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  297.     program_prefix="$ac_optarg" ;;
  298.  
  299.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  300.   | --program-suf | --program-su | --program-s)
  301.     ac_prev=program_suffix ;;
  302.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  303.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  304.     program_suffix="$ac_optarg" ;;
  305.  
  306.   -program-transform-name | --program-transform-name \
  307.   | --program-transform-nam | --program-transform-na \
  308.   | --program-transform-n | --program-transform- \
  309.   | --program-transform | --program-transfor \
  310.   | --program-transfo | --program-transf \
  311.   | --program-trans | --program-tran \
  312.   | --progr-tra | --program-tr | --program-t)
  313.     ac_prev=program_transform_name ;;
  314.   -program-transform-name=* | --program-transform-name=* \
  315.   | --program-transform-nam=* | --program-transform-na=* \
  316.   | --program-transform-n=* | --program-transform-=* \
  317.   | --program-transform=* | --program-transfor=* \
  318.   | --program-transfo=* | --program-transf=* \
  319.   | --program-trans=* | --program-tran=* \
  320.   | --progr-tra=* | --program-tr=* | --program-t=*)
  321.     program_transform_name="$ac_optarg" ;;
  322.  
  323.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  324.   | -silent | --silent | --silen | --sile | --sil)
  325.     silent=yes ;;
  326.  
  327.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  328.     ac_prev=sbindir ;;
  329.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  330.   | --sbi=* | --sb=*)
  331.     sbindir="$ac_optarg" ;;
  332.  
  333.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  334.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  335.   | --sharedst | --shareds | --shared | --share | --shar \
  336.   | --sha | --sh)
  337.     ac_prev=sharedstatedir ;;
  338.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  339.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  340.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  341.   | --sha=* | --sh=*)
  342.     sharedstatedir="$ac_optarg" ;;
  343.  
  344.   -site | --site | --sit)
  345.     ac_prev=site ;;
  346.   -site=* | --site=* | --sit=*)
  347.     site="$ac_optarg" ;;
  348.  
  349.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  350.     ac_prev=srcdir ;;
  351.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  352.     srcdir="$ac_optarg" ;;
  353.  
  354.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  355.   | --syscon | --sysco | --sysc | --sys | --sy)
  356.     ac_prev=sysconfdir ;;
  357.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  358.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  359.     sysconfdir="$ac_optarg" ;;
  360.  
  361.   -target | --target | --targe | --targ | --tar | --ta | --t)
  362.     ac_prev=target ;;
  363.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  364.     target="$ac_optarg" ;;
  365.  
  366.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  367.     verbose=yes ;;
  368.  
  369.   -version | --version | --versio | --versi | --vers)
  370.     echo "configure generated by autoconf version 2.12"
  371.     exit 0 ;;
  372.  
  373.   -with-* | --with-*)
  374.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  375.     # Reject names that are not valid shell variable names.
  376.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  377.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  378.     fi
  379.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  380.     case "$ac_option" in
  381.       *=*) ;;
  382.       *) ac_optarg=yes ;;
  383.     esac
  384.     eval "with_${ac_package}='$ac_optarg'" ;;
  385.  
  386.   -without-* | --without-*)
  387.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  388.     # Reject names that are not valid shell variable names.
  389.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  390.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  391.     fi
  392.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  393.     eval "with_${ac_package}=no" ;;
  394.  
  395.   --x)
  396.     # Obsolete; use --with-x.
  397.     with_x=yes ;;
  398.  
  399.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  400.   | --x-incl | --x-inc | --x-in | --x-i)
  401.     ac_prev=x_includes ;;
  402.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  403.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  404.     x_includes="$ac_optarg" ;;
  405.  
  406.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  407.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  408.     ac_prev=x_libraries ;;
  409.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  410.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  411.     x_libraries="$ac_optarg" ;;
  412.  
  413.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  414.     ;;
  415.  
  416.   *)
  417.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  418.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  419.     fi
  420.     if test "x$nonopt" != xNONE; then
  421.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  422.     fi
  423.     nonopt="$ac_option"
  424.     ;;
  425.  
  426.   esac
  427. done
  428.  
  429. if test -n "$ac_prev"; then
  430.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  431. fi
  432.  
  433. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  434.  
  435. # File descriptor usage:
  436. # 0 standard input
  437. # 1 file creation
  438. # 2 errors and warnings
  439. # 3 some systems may open it to /dev/tty
  440. # 4 used on the Kubota Titan
  441. # 6 checking for... messages and results
  442. # 5 compiler messages saved in config.log
  443. if test "$silent" = yes; then
  444.   exec 6>/dev/null
  445. else
  446.   exec 6>&1
  447. fi
  448. exec 5>./config.log
  449.  
  450. echo "\
  451. This file contains any messages produced by compilers while
  452. running configure, to aid debugging if configure makes a mistake.
  453. " 1>&5
  454.  
  455. # Strip out --no-create and --no-recursion so they do not pile up.
  456. # Also quote any args containing shell metacharacters.
  457. ac_configure_args=
  458. for ac_arg
  459. do
  460.   case "$ac_arg" in
  461.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  462.   | --no-cr | --no-c) ;;
  463.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  464.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  465.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  466.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  467.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  468.   esac
  469. done
  470.  
  471. # NLS nuisances.
  472. # Only set these to C if already set.  These must not be set unconditionally
  473. # because not all systems understand e.g. LANG=C (notably SCO).
  474. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  475. # Non-C LC_CTYPE values break the ctype check.
  476. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  477. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  478. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  479. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  480.  
  481. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  482. rm -rf conftest* confdefs.h
  483. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  484. echo > confdefs.h
  485.  
  486. # A filename unique to this package, relative to the directory that
  487. # configure is in, which we can look for to find out if srcdir is correct.
  488. ac_unique_file=stlconf.h.in
  489.  
  490. # Find the source files, if location was not specified.
  491. if test -z "$srcdir"; then
  492.   ac_srcdir_defaulted=yes
  493.   # Try the directory containing this script, then its parent.
  494.   ac_prog=$0
  495.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  496.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  497.   srcdir=$ac_confdir
  498.   if test ! -r $srcdir/$ac_unique_file; then
  499.     srcdir=..
  500.   fi
  501. else
  502.   ac_srcdir_defaulted=no
  503. fi
  504. if test ! -r $srcdir/$ac_unique_file; then
  505.   if test "$ac_srcdir_defaulted" = yes; then
  506.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  507.   else
  508.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  509.   fi
  510. fi
  511. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  512.  
  513. # Prefer explicitly selected file to automatically selected ones.
  514. if test -z "$CONFIG_SITE"; then
  515.   if test "x$prefix" != xNONE; then
  516.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  517.   else
  518.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  519.   fi
  520. fi
  521. for ac_site_file in $CONFIG_SITE; do
  522.   if test -r "$ac_site_file"; then
  523.     echo "loading site script $ac_site_file"
  524.     . "$ac_site_file"
  525.   fi
  526. done
  527.  
  528.  
  529. ac_ext=c
  530. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  531. ac_cpp='$CPP $CPPFLAGS'
  532. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  533. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  534. cross_compiling=$ac_cv_prog_cc_cross
  535.  
  536. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  537.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  538.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  539.     ac_n= ac_c='
  540. ' ac_t='    '
  541.   else
  542.     ac_n=-n ac_c= ac_t=
  543.   fi
  544. else
  545.   ac_n= ac_c='\c' ac_t=
  546. fi
  547.  
  548.  
  549.  
  550.  
  551. echo "$ac_t""*** $0: STLport configuration utility ***" 1>&6
  552. if test "${CXXFLAGS}" = ""; then 
  553. echo "$ac_t""* Note: for best reliability - try \"CXXFLAGS=-treat_warnings_as_errors\" $0 " 1>&6
  554. echo "$ac_t""* Please don't forget specifying typical CXXFLAGS you'll be using - " 1>&6 
  555. echo "$ac_t""* such as that enabling exceptions handling" 1>&6
  556. fi
  557. echo "$ac_t""Please stand by while exploring compiler capabilities..." 1>&6
  558. echo "$ac_t""Be patient - that may take a while..." 1>&6
  559. echo "$ac_t""***" 1>&6
  560.  
  561. # utility function
  562. check_warning () {
  563.     warn_str=`tail -1 config.log | egrep -i "arning|\(W\)"`
  564.     if test "$warn_str" = ""; then
  565.       return 0
  566.     else
  567.      return 1
  568.     fi
  569. }
  570.  
  571.  
  572. # Check whether --enable-extension or --disable-extension was given.
  573. if test "${enable_extension+set}" = set; then
  574.   enableval="$enable_extension"
  575.   
  576. case "$enableval" in
  577.     no) echo "$ac_t""Info :.cpp used as extension for tests" 1>&6 
  578.         ac_ext=cpp 
  579.           ;;
  580.      *) echo "$ac_t""Argument : .$enableval used as extension" 1>&6 
  581.     ac_ext=$enableval
  582. esac
  583.  
  584. else
  585.   echo "$ac_t""Info : .cpp used as extension for tests" 1>&6 
  586.     ac_ext=cpp
  587.  
  588.  
  589. fi
  590.  
  591.  
  592. # Save that, as it is being redefined several times 
  593. use_ac_ext=$ac_ext
  594.  
  595. for ac_prog in $CCC c++ g++ gcc CC cxx cc++
  596. do
  597. # Extract the first word of "$ac_prog", so it can be a program name with args.
  598. set dummy $ac_prog; ac_word=$2
  599. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  600. echo "configure:601: checking for $ac_word" >&5
  601. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  602.   echo $ac_n "(cached) $ac_c" 1>&6
  603. else
  604.   if test -n "$CXX"; then
  605.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  606. else
  607.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  608.   for ac_dir in $PATH; do
  609.     test -z "$ac_dir" && ac_dir=.
  610.     if test -f $ac_dir/$ac_word; then
  611.       ac_cv_prog_CXX="$ac_prog"
  612.       break
  613.     fi
  614.   done
  615.   IFS="$ac_save_ifs"
  616. fi
  617. fi
  618. CXX="$ac_cv_prog_CXX"
  619. if test -n "$CXX"; then
  620.   echo "$ac_t""$CXX" 1>&6
  621. else
  622.   echo "$ac_t""no" 1>&6
  623. fi
  624.  
  625. test -n "$CXX" && break
  626. done
  627. test -n "$CXX" || CXX="gcc"
  628.  
  629.  
  630. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  631. echo "configure:632: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  632.  
  633. ac_ext=C
  634. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  635. ac_cpp='$CXXCPP $CPPFLAGS'
  636. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  637. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  638. cross_compiling=$ac_cv_prog_cxx_cross
  639.  
  640. cat > conftest.$ac_ext <<EOF
  641. #line 642 "configure"
  642. #include "confdefs.h"
  643. main(){return(0);}
  644. EOF
  645. if { (eval echo configure:646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  646.   ac_cv_prog_cxx_works=yes
  647.   # If we can't run a trivial program, we are probably using a cross compiler.
  648.   if (./conftest; exit) 2>/dev/null; then
  649.     ac_cv_prog_cxx_cross=no
  650.   else
  651.     ac_cv_prog_cxx_cross=yes
  652.   fi
  653. else
  654.   echo "configure: failed program was:" >&5
  655.   cat conftest.$ac_ext >&5
  656.   ac_cv_prog_cxx_works=no
  657. fi
  658. rm -fr conftest*
  659. ac_ext=c
  660. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  661. ac_cpp='$CPP $CPPFLAGS'
  662. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  663. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  664. cross_compiling=$ac_cv_prog_cc_cross
  665.  
  666. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  667. if test $ac_cv_prog_cxx_works = no; then
  668.   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  669. fi
  670. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  671. echo "configure:672: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  672. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  673. cross_compiling=$ac_cv_prog_cxx_cross
  674.  
  675. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  676. echo "configure:677: checking whether we are using GNU C++" >&5
  677. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  678.   echo $ac_n "(cached) $ac_c" 1>&6
  679. else
  680.   cat > conftest.C <<EOF
  681. #ifdef __GNUC__
  682.   yes;
  683. #endif
  684. EOF
  685. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  686.   ac_cv_prog_gxx=yes
  687. else
  688.   ac_cv_prog_gxx=no
  689. fi
  690. fi
  691.  
  692. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  693.  
  694. if test $ac_cv_prog_gxx = yes; then
  695.   GXX=yes
  696.   ac_test_CXXFLAGS="${CXXFLAGS+set}"
  697.   ac_save_CXXFLAGS="$CXXFLAGS"
  698.   CXXFLAGS=
  699.   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  700. echo "configure:701: checking whether ${CXX-g++} accepts -g" >&5
  701. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  702.   echo $ac_n "(cached) $ac_c" 1>&6
  703. else
  704.   echo 'void f(){}' > conftest.cc
  705. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  706.   ac_cv_prog_cxx_g=yes
  707. else
  708.   ac_cv_prog_cxx_g=no
  709. fi
  710. rm -f conftest*
  711.  
  712. fi
  713.  
  714. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  715.   if test "$ac_test_CXXFLAGS" = set; then
  716.     CXXFLAGS="$ac_save_CXXFLAGS"
  717.   elif test $ac_cv_prog_cxx_g = yes; then
  718.     CXXFLAGS="-g -O2"
  719.   else
  720.     CXXFLAGS="-O2"
  721.   fi
  722. else
  723.   GXX=
  724.   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
  725. fi
  726.  
  727. ac_ext=$use_ac_ext
  728.  
  729. ac_ext=C
  730. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  731. ac_cpp='$CXXCPP $CPPFLAGS'
  732. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  733. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  734. cross_compiling=$ac_cv_prog_cxx_cross
  735.  
  736. ac_ext=$use_ac_ext
  737.  
  738. echo $ac_n "checking size of int""... $ac_c" 1>&6
  739. echo "configure:740: checking size of int" >&5
  740. if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  741.   echo $ac_n "(cached) $ac_c" 1>&6
  742. else
  743.   if test "$cross_compiling" = yes; then
  744.   ac_cv_sizeof_int=4
  745. else
  746.   cat > conftest.$ac_ext <<EOF
  747. #line 748 "configure"
  748. #include "confdefs.h"
  749. #ifdef __cplusplus
  750. extern "C" void exit(int);
  751. #endif
  752. #include <stdio.h>
  753. main()
  754. {
  755.   FILE *f=fopen("conftestval", "w");
  756.   if (!f) exit(1);
  757.   fprintf(f, "%d\n", sizeof(int));
  758.   exit(0);
  759. }
  760. EOF
  761. if { (eval echo configure:762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  762. then
  763.   ac_cv_sizeof_int=`cat conftestval`
  764. else
  765.   echo "configure: failed program was:" >&5
  766.   cat conftest.$ac_ext >&5
  767.   rm -fr conftest*
  768.   ac_cv_sizeof_int=0
  769. fi
  770. rm -fr conftest*
  771. fi
  772.  
  773. fi
  774. echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  775. cat >> confdefs.h <<EOF
  776. #define SIZEOF_INT $ac_cv_sizeof_int
  777. EOF
  778.  
  779.  
  780. ac_ext=$use_ac_ext
  781.  
  782. if test "$ac_cv_sizeof_int" = "4"; then
  783.   cat >> confdefs.h <<EOF
  784. #define _STLP_UINT32_T unsigned int
  785. EOF
  786.  
  787. else
  788.   echo $ac_n "checking size of long""... $ac_c" 1>&6
  789. echo "configure:790: checking size of long" >&5
  790. if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  791.   echo $ac_n "(cached) $ac_c" 1>&6
  792. else
  793.   if test "$cross_compiling" = yes; then
  794.   ac_cv_sizeof_long=4
  795. else
  796.   cat > conftest.$ac_ext <<EOF
  797. #line 798 "configure"
  798. #include "confdefs.h"
  799. #ifdef __cplusplus
  800. extern "C" void exit(int);
  801. #endif
  802. #include <stdio.h>
  803. main()
  804. {
  805.   FILE *f=fopen("conftestval", "w");
  806.   if (!f) exit(1);
  807.   fprintf(f, "%d\n", sizeof(long));
  808.   exit(0);
  809. }
  810. EOF
  811. if { (eval echo configure:812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  812. then
  813.   ac_cv_sizeof_long=`cat conftestval`
  814. else
  815.   echo "configure: failed program was:" >&5
  816.   cat conftest.$ac_ext >&5
  817.   rm -fr conftest*
  818.   ac_cv_sizeof_long=0
  819. fi
  820. rm -fr conftest*
  821. fi
  822.  
  823. fi
  824. echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  825. cat >> confdefs.h <<EOF
  826. #define SIZEOF_LONG $ac_cv_sizeof_long
  827. EOF
  828.  
  829.  
  830.   ac_ext=$use_ac_ext
  831.   if test "$ac_cv_sizeof_long" = "4"; then
  832.     cat >> confdefs.h <<EOF
  833. #define _STLP_UINT32_T unsigned long
  834. EOF
  835.  
  836.   else
  837.       echo $ac_n "checking size of short""... $ac_c" 1>&6
  838. echo "configure:839: checking size of short" >&5
  839. if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  840.   echo $ac_n "(cached) $ac_c" 1>&6
  841. else
  842.   if test "$cross_compiling" = yes; then
  843.   ac_cv_sizeof_short=4
  844. else
  845.   cat > conftest.$ac_ext <<EOF
  846. #line 847 "configure"
  847. #include "confdefs.h"
  848. #ifdef __cplusplus
  849. extern "C" void exit(int);
  850. #endif
  851. #include <stdio.h>
  852. main()
  853. {
  854.   FILE *f=fopen("conftestval", "w");
  855.   if (!f) exit(1);
  856.   fprintf(f, "%d\n", sizeof(short));
  857.   exit(0);
  858. }
  859. EOF
  860. if { (eval echo configure:861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  861. then
  862.   ac_cv_sizeof_short=`cat conftestval`
  863. else
  864.   echo "configure: failed program was:" >&5
  865.   cat conftest.$ac_ext >&5
  866.   rm -fr conftest*
  867.   ac_cv_sizeof_short=0
  868. fi
  869. rm -fr conftest*
  870. fi
  871.  
  872. fi
  873. echo "$ac_t""$ac_cv_sizeof_short" 1>&6
  874. cat >> confdefs.h <<EOF
  875. #define SIZEOF_SHORT $ac_cv_sizeof_short
  876. EOF
  877.  
  878.  
  879.     if test "$ac_cv_sizeof_short" = "4"; then
  880.       cat >> confdefs.h <<EOF
  881. #define _STLP_UINT32_T unsigned short
  882. EOF
  883.  
  884.     else
  885.       { echo "configure: error: Cannot find any 32-bit integer type for your compiler" 1>&2; exit 1; }
  886.     fi
  887.   ac_ext=$use_ac_ext
  888.   fi
  889. fi
  890. ac_ext=$use_ac_ext
  891.  
  892.  
  893. if test "$ac_cv_c_cross" = "yes"; then
  894.   CXXFLAGS="${CXXFLAGS} -c"
  895. fi
  896.  
  897. ac_ext=$use_ac_ext
  898.  
  899. echo $ac_n "checking for basic STL compatibility""... $ac_c" 1>&6
  900. echo "configure:901: checking for basic STL compatibility" >&5
  901. cat > conftest.$ac_ext <<EOF
  902. #line 903 "configure"
  903. #include "confdefs.h"
  904.  
  905. template <class Arg1, class Arg2, class Result>
  906. struct binary_function {
  907.     typedef Arg1 first_argument_type;
  908.     typedef Arg2 second_argument_type;
  909.     typedef Result result_type;
  910. };      
  911. template <class T>
  912. struct plus : public binary_function<T, T, T> {
  913.     T operator()(const T& x, const T& y) const;
  914. };
  915.  
  916. template <class T>
  917. T plus<T>::operator()(const T& x, const T& y) const { return x + y; }
  918. plus<int> p;
  919.  
  920. int main() {
  921.  
  922. ; return 0; }
  923. EOF
  924. if { (eval echo configure:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  925.   rm -rf conftest*
  926.   ac_cv_compat="yes"
  927. else
  928.   echo "configure: failed program was:" >&5
  929.   cat conftest.$ac_ext >&5
  930.   rm -rf conftest*
  931.   { echo "configure: error: Your compiler won't be able to compile this implementation. Sorry." 1>&2; exit 1; } 
  932.  ac_cv_compat="no"
  933.  
  934. fi
  935. rm -f conftest*
  936. echo "$ac_t""$ac_cv_compat" 1>&6
  937.  
  938. echo $ac_n "checking for partial specialization syntax""... $ac_c" 1>&6
  939. echo "configure:940: checking for partial specialization syntax" >&5
  940. cat > conftest.$ac_ext <<EOF
  941. #line 942 "configure"
  942. #include "confdefs.h"
  943.  
  944.      template <class T> class fs_foo {};
  945.      template <> class fs_foo<int> {};
  946. int main() {
  947.  fs_foo<int> i;
  948. ; return 0; }
  949. EOF
  950. if { (eval echo configure:951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  951.   rm -rf conftest*
  952.     _FULL_SPEC="template <>" ac_cv_spec_syntax="yes"
  953. else
  954.   echo "configure: failed program was:" >&5
  955.   cat conftest.$ac_ext >&5
  956.   rm -rf conftest*
  957.     cat >> confdefs.h <<\EOF
  958. #define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
  959. EOF
  960.  ac_cv_spec_syntax="no" _FULL_SPEC=""
  961. fi
  962. rm -f conftest*
  963. echo "$ac_t""$ac_cv_spec_syntax" 1>&6
  964.  
  965. echo $ac_n "checking for bool keyword""... $ac_c" 1>&6
  966. echo "configure:967: checking for bool keyword" >&5
  967. cat > conftest.$ac_ext <<EOF
  968. #line 969 "configure"
  969. #include "confdefs.h"
  970. bool b_foo() { return true; }
  971. int main() {
  972. (void)b_foo();
  973. ; return 0; }
  974. EOF
  975. if { (eval echo configure:976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  976.   rm -rf conftest*
  977.   ac_cv_bool="yes"
  978. else
  979.   echo "configure: failed program was:" >&5
  980.   cat conftest.$ac_ext >&5
  981.   rm -rf conftest*
  982.   cat >> confdefs.h <<\EOF
  983. #define _STLP_NO_BOOL 1
  984. EOF
  985.  ac_cv_bool="no"
  986. fi
  987. rm -f conftest*
  988. echo "$ac_t""$ac_cv_bool" 1>&6
  989. if test "$ac_cv_bool" = "no"; then
  990.   echo $ac_n "checking for yvals.h header""... $ac_c" 1>&6
  991. echo "configure:992: checking for yvals.h header" >&5
  992.   cat > conftest.$ac_ext <<EOF
  993. #line 994 "configure"
  994. #include "confdefs.h"
  995. #include <yvals.h> 
  996.     extern bool aaa=true;
  997.    
  998. int main() {
  999.  
  1000. ; return 0; }
  1001. EOF
  1002. if { (eval echo configure:1003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1003.   rm -rf conftest*
  1004.   cat >> confdefs.h <<\EOF
  1005. #define _STLP_YVALS_H 1
  1006. EOF
  1007.  echo "$ac_t""yes" 1>&6 
  1008. else
  1009.   echo "configure: failed program was:" >&5
  1010.   cat conftest.$ac_ext >&5
  1011.   rm -rf conftest*
  1012.   
  1013.   echo "$ac_t""no" 1>&6
  1014.   echo $ac_n "checking whether bool is reserved word""... $ac_c" 1>&6
  1015. echo "configure:1016: checking whether bool is reserved word" >&5
  1016.   cat > conftest.$ac_ext <<EOF
  1017. #line 1018 "configure"
  1018. #include "confdefs.h"
  1019. typedef int bool;
  1020. int main() {
  1021.  
  1022. ; return 0; }
  1023. EOF
  1024. if { (eval echo configure:1025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1025.   rm -rf conftest*
  1026.   ac_cv_bool_reserved="no"
  1027. else
  1028.   echo "configure: failed program was:" >&5
  1029.   cat conftest.$ac_ext >&5
  1030.   rm -rf conftest*
  1031.   cat >> confdefs.h <<\EOF
  1032. #define _STLP_DONT_USE_BOOL_TYPEDEF 1
  1033. EOF
  1034.  ac_cv_bool_reserved="yes"
  1035. fi
  1036. rm -f conftest*
  1037.   echo "$ac_t""$ac_cv_bool_reserved" 1>&6
  1038.   
  1039. fi
  1040. rm -f conftest*
  1041. fi
  1042.  
  1043. echo $ac_n "checking for wchar_t type""... $ac_c" 1>&6
  1044. echo "configure:1045: checking for wchar_t type" >&5
  1045. cat > conftest.$ac_ext <<EOF
  1046. #line 1047 "configure"
  1047. #include "confdefs.h"
  1048.  #include <wchar.h>
  1049.       wchar_t wc_foo() { return 'a'; }
  1050. int main() {
  1051. (void)wc_foo();
  1052. ; return 0; }
  1053. EOF
  1054. if { (eval echo configure:1055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1055.   rm -rf conftest*
  1056.   ac_cv_wchar="yes"
  1057. else
  1058.   echo "configure: failed program was:" >&5
  1059.   cat conftest.$ac_ext >&5
  1060.   rm -rf conftest*
  1061.   cat >> confdefs.h <<\EOF
  1062. #define _STLP_NO_WCHAR_T 1
  1063. EOF
  1064.  ac_cv_wchar="no"
  1065. fi
  1066. rm -f conftest*
  1067. echo "$ac_t""$ac_cv_wchar" 1>&6
  1068.  
  1069. echo $ac_n "checking if wchar_t is unsigned short""... $ac_c" 1>&6
  1070. echo "configure:1071: checking if wchar_t is unsigned short" >&5
  1071. cat > conftest.$ac_ext <<EOF
  1072. #line 1073 "configure"
  1073. #include "confdefs.h"
  1074.  
  1075.      # include <wchar.h>
  1076.      template <class T> struct foo {};
  1077.      $_FULL_SPEC struct foo <wchar_t> {};
  1078.      typedef unsigned short u__short;
  1079.      $_FULL_SPEC struct foo <u__short> {};
  1080.      foo<wchar_t> f1;
  1081.      foo<u__short> f2;
  1082.     
  1083. int main() {
  1084.  
  1085. ; return 0; }
  1086. EOF
  1087. if { (eval echo configure:1088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1088.   rm -rf conftest*
  1089.   ac_cv_wchar_short="no"
  1090. else
  1091.   echo "configure: failed program was:" >&5
  1092.   cat conftest.$ac_ext >&5
  1093.   rm -rf conftest*
  1094.   cat >> confdefs.h <<\EOF
  1095. #define _STLP_WCHAR_T_IS_USHORT 1
  1096. EOF
  1097.  ac_cv_wchar_short="yes"
  1098. fi
  1099. rm -f conftest*
  1100. echo "$ac_t""$ac_cv_wchar_short" 1>&6
  1101.  
  1102. echo $ac_n "checking for long long type""... $ac_c" 1>&6
  1103. echo "configure:1104: checking for long long type" >&5
  1104. cat > conftest.$ac_ext <<EOF
  1105. #line 1106 "configure"
  1106. #include "confdefs.h"
  1107. long long ll_foo() { return 0; }
  1108. int main() {
  1109. (void)ll_foo();
  1110. ; return 0; }
  1111. EOF
  1112. if { (eval echo configure:1113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1113.   rm -rf conftest*
  1114.   cat >> confdefs.h <<\EOF
  1115. #define _STLP_LONG_LONG 1
  1116. EOF
  1117.  ac_cv_long_long="yes"
  1118. else
  1119.   echo "configure: failed program was:" >&5
  1120.   cat conftest.$ac_ext >&5
  1121.   rm -rf conftest*
  1122.   ac_cv_long_long="no"
  1123. fi
  1124. rm -f conftest*
  1125. echo "$ac_t""$ac_cv_long_long" 1>&6
  1126.  
  1127. echo $ac_n "checking for long double type""... $ac_c" 1>&6
  1128. echo "configure:1129: checking for long double type" >&5
  1129. cat > conftest.$ac_ext <<EOF
  1130. #line 1131 "configure"
  1131. #include "confdefs.h"
  1132. long double ld_foo() { return 0; }
  1133. int main() {
  1134. (void)ld_foo();
  1135. ; return 0; }
  1136. EOF
  1137. if { (eval echo configure:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1138.   rm -rf conftest*
  1139.   ac_cv_long_double="yes"
  1140. else
  1141.   echo "configure: failed program was:" >&5
  1142.   cat conftest.$ac_ext >&5
  1143.   rm -rf conftest*
  1144.   cat >> confdefs.h <<\EOF
  1145. #define _STLP_NO_LONG_DOUBLE 1
  1146. EOF
  1147.  ac_cv_long_double="no"
  1148. fi
  1149. rm -f conftest*
  1150. echo "$ac_t""$ac_cv_long_double" 1>&6
  1151.  
  1152. echo $ac_n "checking for typename keyword""... $ac_c" 1>&6
  1153. echo "configure:1154: checking for typename keyword" >&5
  1154. cat > conftest.$ac_ext <<EOF
  1155. #line 1156 "configure"
  1156. #include "confdefs.h"
  1157.  
  1158. template <class T1, class T2>
  1159. struct pair {
  1160.     typedef T1 first_type;
  1161.     typedef T2 second_type;
  1162. };
  1163.  
  1164. template <class Arg, class Result>
  1165. struct unary_function {
  1166.     typedef Arg argument_type;
  1167.     typedef Result result_type;
  1168. };
  1169.  
  1170. template <class Pair>
  1171. struct select2nd : public unary_function<Pair, typename Pair::second_type> {
  1172.   typedef typename Pair::first_type ignored_type;
  1173.   const typename Pair::second_type& operator()(const typename Pair::second_type& x,
  1174.                         const ignored_type& ) const
  1175.   {
  1176.     return x;
  1177.   }
  1178.   
  1179. };
  1180.     
  1181. int main() {
  1182.  
  1183.     typedef pair<int,int> tn_p;
  1184.     select2nd< tn_p > tn_s;
  1185.     (void)tn_s(1,5);
  1186.     
  1187. ; return 0; }
  1188. EOF
  1189. if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1190.   rm -rf conftest*
  1191.   __TYPENAME="typename" 
  1192.      ac_cv_typename="yes"
  1193. else
  1194.   echo "configure: failed program was:" >&5
  1195.   cat conftest.$ac_ext >&5
  1196.   rm -rf conftest*
  1197.   __TYPENAME="" 
  1198.      cat >> confdefs.h <<\EOF
  1199. #define _STLP_NEED_TYPENAME 1
  1200. EOF
  1201.  
  1202.      ac_cv_typename="no"
  1203. fi
  1204. rm -f conftest*
  1205. echo "$ac_t""$ac_cv_typename" 1>&6
  1206.  
  1207. echo $ac_n "checking for explicit keyword""... $ac_c" 1>&6
  1208. echo "configure:1209: checking for explicit keyword" >&5
  1209. cat > conftest.$ac_ext <<EOF
  1210. #line 1211 "configure"
  1211. #include "confdefs.h"
  1212. struct expl_Class { int a; explicit expl_Class(int t): a(t) {} };
  1213.     expl_Class c(1);
  1214.     
  1215. int main() {
  1216.  
  1217. ; return 0; }
  1218. EOF
  1219. if { (eval echo configure:1220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1220.   rm -rf conftest*
  1221.   ac_cv_explicit="yes"
  1222. else
  1223.   echo "configure: failed program was:" >&5
  1224.   cat conftest.$ac_ext >&5
  1225.   rm -rf conftest*
  1226.   cat >> confdefs.h <<\EOF
  1227. #define _STLP_NO_EXPLICIT 1
  1228. EOF
  1229.  ac_cv_explicit="no"
  1230. fi
  1231. rm -f conftest*
  1232. echo "$ac_t""$ac_cv_explicit" 1>&6
  1233.  
  1234. echo $ac_n "checking for mutable keyword""... $ac_c" 1>&6
  1235. echo "configure:1236: checking for mutable keyword" >&5
  1236. cat > conftest.$ac_ext <<EOF
  1237. #line 1238 "configure"
  1238. #include "confdefs.h"
  1239. struct mut_Class { mutable int a; void update() const { a=0; }  };
  1240.     mut_Class c;
  1241.     
  1242. int main() {
  1243. c.update()
  1244. ; return 0; }
  1245. EOF
  1246. if { (eval echo configure:1247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1247.   rm -rf conftest*
  1248.   ac_cv_mutable="yes"
  1249. else
  1250.   echo "configure: failed program was:" >&5
  1251.   cat conftest.$ac_ext >&5
  1252.   rm -rf conftest*
  1253.   cat >> confdefs.h <<\EOF
  1254. #define _STLP_NEED_MUTABLE 1
  1255. EOF
  1256.  ac_cv_mutable="no"
  1257. fi
  1258. rm -f conftest*
  1259. echo "$ac_t""$ac_cv_mutable" 1>&6
  1260.  
  1261. echo $ac_n "checking for new style casts""... $ac_c" 1>&6
  1262. echo "configure:1263: checking for new style casts" >&5
  1263. cat > conftest.$ac_ext <<EOF
  1264. #line 1265 "configure"
  1265. #include "confdefs.h"
  1266. struct ncast_Class { 
  1267.     int a; void update(int* i) { *i=a; }  };
  1268.     ncast_Class c;
  1269.     
  1270. int main() {
  1271.  
  1272.   const int a(5);
  1273.   c.update(const_cast<int*>(&a))
  1274.     
  1275. ; return 0; }
  1276. EOF
  1277. if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1278.   rm -rf conftest*
  1279.   ac_cv_new_cast="yes"
  1280. else
  1281.   echo "configure: failed program was:" >&5
  1282.   cat conftest.$ac_ext >&5
  1283.   rm -rf conftest*
  1284.   cat >> confdefs.h <<\EOF
  1285. #define _STLP_NO_NEW_STYLE_CASTS 1
  1286. EOF
  1287.  ac_cv_new_cast="no"
  1288. fi
  1289. rm -f conftest*
  1290. echo "$ac_t""$ac_cv_new_cast" 1>&6
  1291.  
  1292. echo $ac_n "checking for new-style C library headers""... $ac_c" 1>&6
  1293. echo "configure:1294: checking for new-style C library headers" >&5
  1294. cat > conftest.$ac_ext <<EOF
  1295. #line 1296 "configure"
  1296. #include "confdefs.h"
  1297.  
  1298.      #include <cctype>
  1299.      #include <cstddef>
  1300.      #include <cstdio>
  1301.      #include <cstdlib>
  1302.      #include <cstring>
  1303.      #include <cassert>
  1304.      #include <climits>
  1305.      #ifndef _STLP_NO_WCHAR_T
  1306.      #include <cwchar>
  1307.      #endif
  1308.        
  1309. int main() {
  1310.  
  1311. ; return 0; }
  1312. EOF
  1313. if { (eval echo configure:1314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1314.   rm -rf conftest*
  1315.   ac_cv_newheaders="yes"
  1316. else
  1317.   echo "configure: failed program was:" >&5
  1318.   cat conftest.$ac_ext >&5
  1319.   rm -rf conftest*
  1320.   cat >> confdefs.h <<\EOF
  1321. #define _STLP_HAS_NO_NEW_C_HEADERS 1
  1322. EOF
  1323.  ac_cv_newheaders="no"
  1324. fi
  1325. rm -f conftest*
  1326. echo "$ac_t""$ac_cv_newheaders" 1>&6
  1327.  
  1328. echo $ac_n "checking for new-style <new> header""... $ac_c" 1>&6
  1329. echo "configure:1330: checking for new-style <new> header" >&5
  1330. cat > conftest.$ac_ext <<EOF
  1331. #line 1332 "configure"
  1332. #include "confdefs.h"
  1333.  
  1334.      #include <new>
  1335.        
  1336. int main() {
  1337.  
  1338. ; return 0; }
  1339. EOF
  1340. if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1341.   rm -rf conftest*
  1342.   ac_cv_new_new="yes"
  1343. else
  1344.   echo "configure: failed program was:" >&5
  1345.   cat conftest.$ac_ext >&5
  1346.   rm -rf conftest*
  1347.   cat >> confdefs.h <<\EOF
  1348. #define _STLP_NO_NEW_NEW_HEADER 1
  1349. EOF
  1350.  ac_cv_new_new="no"
  1351. fi
  1352. rm -f conftest*
  1353. echo "$ac_t""$ac_cv_new_new" 1>&6
  1354.  
  1355.  
  1356. echo $ac_n "checking for member template methods""... $ac_c" 1>&6
  1357. echo "configure:1358: checking for member template methods" >&5
  1358. cat > conftest.$ac_ext <<EOF
  1359. #line 1360 "configure"
  1360. #include "confdefs.h"
  1361.  
  1362. template <class Result>
  1363. struct mt_foo {
  1364.     typedef Result result_type;
  1365.     template <class Arg> result_type operate(const Arg&) { return Result(); }
  1366. };      
  1367. mt_foo<int> p;
  1368.  
  1369. int main() {
  1370.  
  1371. (void)p.operate((char*)"aaa");
  1372.  
  1373. ; return 0; }
  1374. EOF
  1375. if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1376.   rm -rf conftest*
  1377.   ac_cv_member_templates="yes"
  1378. else
  1379.   echo "configure: failed program was:" >&5
  1380.   cat conftest.$ac_ext >&5
  1381.   rm -rf conftest*
  1382.   cat >> confdefs.h <<\EOF
  1383. #define _STLP_NO_MEMBER_TEMPLATES 1
  1384. EOF
  1385.  ac_cv_member_templates="no"
  1386.  
  1387. fi
  1388. rm -f conftest*
  1389. echo "$ac_t""$ac_cv_member_templates" 1>&6
  1390.  
  1391. echo $ac_n "checking for friend templates""... $ac_c" 1>&6
  1392. echo "configure:1393: checking for friend templates" >&5
  1393. cat > conftest.$ac_ext <<EOF
  1394. #line 1395 "configure"
  1395. #include "confdefs.h"
  1396.  
  1397.  
  1398. template <class Result2> class foo;
  1399.  
  1400. template <class Result>
  1401. struct ft_foo {
  1402.     typedef Result result_type;
  1403.     template <class Result2> friend class foo;
  1404. };      
  1405. ft_foo<int> p;
  1406.  
  1407. int main() {
  1408.  
  1409. ; return 0; }
  1410. EOF
  1411. if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1412.   rm -rf conftest*
  1413.   ac_cv_friend_templates="yes"
  1414. else
  1415.   echo "configure: failed program was:" >&5
  1416.   cat conftest.$ac_ext >&5
  1417.   rm -rf conftest*
  1418.   cat >> confdefs.h <<\EOF
  1419. #define _STLP_NO_FRIEND_TEMPLATES 1
  1420. EOF
  1421.  ac_cv_friend_templates="no"
  1422.  
  1423. fi
  1424. rm -f conftest*
  1425. echo "$ac_t""$ac_cv_friend_templates" 1>&6
  1426.  
  1427. echo $ac_n "checking for qualified friend templates""... $ac_c" 1>&6
  1428. echo "configure:1429: checking for qualified friend templates" >&5
  1429. cat > conftest.$ac_ext <<EOF
  1430. #line 1431 "configure"
  1431. #include "confdefs.h"
  1432.  
  1433.  
  1434. ${_TEST_STD_BEGIN}
  1435.  
  1436. template <class Result2> class foo;
  1437.  
  1438. template <class Result>
  1439. struct ft_foo {
  1440.     typedef Result result_type;
  1441.     template <class Result2> friend class $_TEST_STD::foo;
  1442. };      
  1443. ft_foo<int> p;
  1444. ${_TEST_STD_END}
  1445.  
  1446.  
  1447. int main() {
  1448.  
  1449. ; return 0; }
  1450. EOF
  1451. if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1452.   rm -rf conftest*
  1453.   ac_cv_qual_friend_templates="yes"
  1454. else
  1455.   echo "configure: failed program was:" >&5
  1456.   cat conftest.$ac_ext >&5
  1457.   rm -rf conftest*
  1458.   cat >> confdefs.h <<\EOF
  1459. #define _STLP_NO_QUALIFIED_FRIENDS 1
  1460. EOF
  1461.  ac_cv_qual_friend_templates="no"
  1462.  
  1463. fi
  1464. rm -f conftest*
  1465. echo "$ac_t""$ac_cv_qual_friend_templates" 1>&6
  1466.  
  1467. echo $ac_n "checking for member template keyword""... $ac_c" 1>&6
  1468. echo "configure:1469: checking for member template keyword" >&5
  1469. cat > conftest.$ac_ext <<EOF
  1470. #line 1471 "configure"
  1471. #include "confdefs.h"
  1472.  
  1473. template <class Result>
  1474. struct nt_foo {
  1475.     typedef Result result_type;
  1476.     template <class Arg> struct rebind {  typedef nt_foo<Arg> other; };
  1477. };
  1478.  
  1479. template <class _Tp, class _Allocator>
  1480. struct _Traits
  1481. {
  1482.   typedef typename _Allocator:: template rebind<_Tp> my_rebind; 
  1483.   typedef typename my_rebind::other allocator_type;
  1484. };
  1485.  
  1486. nt_foo<char> p;
  1487. _Traits< int, nt_foo<short> > pp;
  1488.  
  1489. int main() {
  1490.  
  1491. ; return 0; }
  1492. EOF
  1493. if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1494.   rm -rf conftest*
  1495.   ac_cv_member_template_keyword="yes"
  1496. else
  1497.   echo "configure: failed program was:" >&5
  1498.   cat conftest.$ac_ext >&5
  1499.   rm -rf conftest*
  1500.   cat >> confdefs.h <<\EOF
  1501. #define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
  1502. EOF
  1503.  ac_cv_member_template_keyword="no"
  1504.  
  1505. fi
  1506. rm -f conftest*
  1507. echo "$ac_t""$ac_cv_member_template_keyword" 1>&6
  1508.  
  1509. if test "$ac_cv_member_template_keyword" = "no"; then
  1510. echo $ac_n "checking for member template classes""... $ac_c" 1>&6
  1511. echo "configure:1512: checking for member template classes" >&5
  1512. cat > conftest.$ac_ext <<EOF
  1513. #line 1514 "configure"
  1514. #include "confdefs.h"
  1515.  
  1516. template <class Result>
  1517. struct nt_foo {
  1518.     typedef Result result_type;
  1519.     template <class Arg> struct rebind {  typedef nt_foo<Arg> other; };
  1520. };
  1521.  
  1522. template <class _Tp, class _Allocator>
  1523. struct _Traits
  1524. {
  1525.   typedef typename _Allocator::rebind<_Tp> my_rebind; 
  1526.   typedef typename my_rebind::other allocator_type;
  1527. };
  1528.  
  1529. nt_foo<char> p;
  1530. _Traits< int, nt_foo<short> > pp;
  1531.  
  1532. int main() {
  1533.  
  1534. ; return 0; }
  1535. EOF
  1536. if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1537.   rm -rf conftest*
  1538.   ac_cv_member_template_classes="yes"
  1539. else
  1540.   echo "configure: failed program was:" >&5
  1541.   cat conftest.$ac_ext >&5
  1542.   rm -rf conftest*
  1543.   cat >> confdefs.h <<\EOF
  1544. #define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
  1545. EOF
  1546.  ac_cv_member_template_classes="no"
  1547.  
  1548. fi
  1549. rm -f conftest*
  1550. echo "$ac_t""$ac_cv_member_template_classes" 1>&6
  1551. fi
  1552.  
  1553. echo $ac_n "checking for partial class specialization""... $ac_c" 1>&6
  1554. echo "configure:1555: checking for partial class specialization" >&5
  1555. cat > conftest.$ac_ext <<EOF
  1556. #line 1557 "configure"
  1557. #include "confdefs.h"
  1558.  
  1559. template <class Arg,class Result>
  1560. struct ps_foo {
  1561.     typedef Arg argument_type;
  1562.     typedef Result result_type;
  1563. };   
  1564.  
  1565. template<class Result>
  1566. struct ps_foo<Result*,Result*> {
  1567.     void bar() {}
  1568. };
  1569.  
  1570. template<class Result>
  1571. struct ps_foo<int*,Result> {
  1572.     void foo() {}
  1573. };
  1574.  
  1575. ps_foo<char*, char*> p;
  1576. ps_foo<int*, int> p1;
  1577.  
  1578. int main() {
  1579. p.bar();
  1580.  p1.foo();
  1581. ; return 0; }
  1582. EOF
  1583. if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1584.   rm -rf conftest*
  1585.   ac_cv_partial_spec="yes"
  1586. else
  1587.   echo "configure: failed program was:" >&5
  1588.   cat conftest.$ac_ext >&5
  1589.   rm -rf conftest*
  1590.   cat >> confdefs.h <<\EOF
  1591. #define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
  1592. EOF
  1593.  ac_cv_partial_spec="no"
  1594.  
  1595. fi
  1596. rm -f conftest*
  1597. echo "$ac_t""$ac_cv_partial_spec" 1>&6
  1598.  
  1599. if test "$ac_cv_partial_spec" = yes; then
  1600.  
  1601. echo $ac_n "checking if explicit args accepted on constructors of partial specialized classes""... $ac_c" 1>&6
  1602. echo "configure:1603: checking if explicit args accepted on constructors of partial specialized classes" >&5
  1603. cat > conftest.$ac_ext <<EOF
  1604. #line 1605 "configure"
  1605. #include "confdefs.h"
  1606.  
  1607. template <class Arg,class Result>
  1608. struct ps_foo {
  1609.     typedef Arg argument_type;
  1610.     typedef Result result_type;
  1611. };   
  1612.  
  1613. template<class Result>
  1614. struct ps_foo<Result*,Result*> {
  1615.     ps_foo<Result*,Result*>() {}
  1616.     void bar() {}
  1617. };
  1618.  
  1619. template<class Result>
  1620. struct ps_foo<int*,Result> {
  1621.     ps_foo<int*,Result*>() {}
  1622.     void bar() {}
  1623.  
  1624. };
  1625.  
  1626. ps_foo<char*, char*> p;
  1627. ps_foo<int*, int> p1;
  1628.  
  1629. int main() {
  1630. p.bar();
  1631.  p1.foo();
  1632. ; return 0; }
  1633. EOF
  1634. if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1635.   rm -rf conftest*
  1636.   cat >> confdefs.h <<\EOF
  1637. #define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS 1
  1638. EOF
  1639.  ac_cv_partial_spec_needs_args="yes"
  1640. else
  1641.   echo "configure: failed program was:" >&5
  1642.   cat conftest.$ac_ext >&5
  1643.   rm -rf conftest*
  1644.   ac_cv_partial_spec_needs_args="no"
  1645.  
  1646. fi
  1647. rm -f conftest*
  1648. echo "$ac_t""$ac_cv_partial_spec_needs_args" 1>&6
  1649.  
  1650. fi
  1651.  
  1652. if test ac_cv_partial_spec_needs_args=="no"; then
  1653.  
  1654. echo $ac_n "checking if explicit args accepted on constructors of explicitly specialized classes""... $ac_c" 1>&6
  1655. echo "configure:1656: checking if explicit args accepted on constructors of explicitly specialized classes" >&5
  1656. cat > conftest.$ac_ext <<EOF
  1657. #line 1658 "configure"
  1658. #include "confdefs.h"
  1659.  
  1660. template <class Arg,class Result>
  1661. struct ps_foo {
  1662.     typedef Arg argument_type;
  1663.     typedef Result result_type;
  1664.     void bar() {}    
  1665. };   
  1666.  
  1667. template<class Result>
  1668. struct ps_foo<int*,int> {
  1669.     ps_foo<Result*,Result*>() {}
  1670.     void foo() {}
  1671. };
  1672.  
  1673. ps_foo<char*, char*> p;
  1674. ps_foo<int*, int> p1;
  1675.  
  1676. int main() {
  1677. p.bar();
  1678.  p1.foo();
  1679. ; return 0; }
  1680. EOF
  1681. if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1682.   rm -rf conftest*
  1683.   cat >> confdefs.h <<\EOF
  1684. #define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS 1
  1685. EOF
  1686.  ac_cv_partial_spec_needs_args="yes"
  1687. else
  1688.   echo "configure: failed program was:" >&5
  1689.   cat conftest.$ac_ext >&5
  1690.   rm -rf conftest*
  1691.   ac_cv_partial_spec_needs_args="no"
  1692.  
  1693. fi
  1694. rm -f conftest*
  1695. echo "$ac_t""$ac_cv_partial_spec_needs_args" 1>&6
  1696.  
  1697. fi
  1698.  
  1699. echo $ac_n "checking for partial template function ordering""... $ac_c" 1>&6
  1700. echo "configure:1701: checking for partial template function ordering" >&5
  1701. cat > conftest.$ac_ext <<EOF
  1702. #line 1703 "configure"
  1703. #include "confdefs.h"
  1704.  
  1705.  
  1706. template <class Arg,class Result>
  1707. Result po_foo (const Arg& a,const Result&){ return (Result)a.nothing; }  
  1708.  
  1709. template <class T>
  1710. struct A {
  1711.     T a;
  1712.     A(int _a) : a(_a) {}
  1713. };
  1714.  
  1715. template<class T>
  1716. T po_foo (const A<T>& a, const A<T>& b){ return a.a; }   
  1717.  
  1718. int main() {
  1719.  
  1720.   A<int> po_a(0); A<int> po_b(1); (void)po_foo(po_b, po_a)
  1721.  
  1722. ; return 0; }
  1723. EOF
  1724. if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1725.   rm -rf conftest*
  1726.   ac_cv_partial_ord="yes"
  1727. else
  1728.   echo "configure: failed program was:" >&5
  1729.   cat conftest.$ac_ext >&5
  1730.   rm -rf conftest*
  1731.   cat >> confdefs.h <<\EOF
  1732. #define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
  1733. EOF
  1734.  ac_cv_partial_ord="no"
  1735.  
  1736. fi
  1737. rm -f conftest*
  1738. echo "$ac_t""$ac_cv_partial_ord" 1>&6
  1739.  
  1740. echo $ac_n "checking for method specialization""... $ac_c" 1>&6
  1741. echo "configure:1742: checking for method specialization" >&5
  1742. cat > conftest.$ac_ext <<EOF
  1743. #line 1744 "configure"
  1744. #include "confdefs.h"
  1745.  
  1746. template <class Arg,class Result>
  1747. struct ms_foo {
  1748.     typedef Arg argument_type;
  1749.     typedef Result result_type;
  1750.     inline void bar();
  1751. };   
  1752.  
  1753. template <class Arg,class Result>
  1754. inline void ms_foo<Arg,Result>::bar() {}
  1755.  
  1756. inline void ms_foo<int*,int>::bar() {}
  1757.  
  1758. ms_foo<char*, char*> p;
  1759. ms_foo<int*, int> p1;
  1760.  
  1761. int main() {
  1762. p.bar();
  1763.  p1.bar();
  1764. ; return 0; }
  1765. EOF
  1766. if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1767.   rm -rf conftest*
  1768.   ac_cv_method_spec="yes"
  1769. else
  1770.   echo "configure: failed program was:" >&5
  1771.   cat conftest.$ac_ext >&5
  1772.   rm -rf conftest*
  1773.   cat >> confdefs.h <<\EOF
  1774. #define _STLP_NO_METHOD_SPECIALIZATION 1
  1775. EOF
  1776.  ac_cv_method_spec="no"
  1777.  
  1778. fi
  1779. rm -f conftest*
  1780. echo "$ac_t""$ac_cv_method_spec" 1>&6
  1781.  
  1782. echo $ac_n "checking for lrand48 function""... $ac_c" 1>&6
  1783. echo "configure:1784: checking for lrand48 function" >&5
  1784. cat > conftest.$ac_ext <<EOF
  1785. #line 1786 "configure"
  1786. #include "confdefs.h"
  1787. #include <stdlib.h>
  1788. int main() {
  1789. long i = lrand48();
  1790. ; return 0; }
  1791. EOF
  1792. if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1793.   rm -rf conftest*
  1794.   cat >> confdefs.h <<\EOF
  1795. #define _STLP_RAND48 1
  1796. EOF
  1797.  ac_cv_func_lrand48="yes"
  1798. else
  1799.   echo "configure: failed program was:" >&5
  1800.   cat conftest.$ac_ext >&5
  1801.   rm -rf conftest*
  1802.   ac_cv_func_lrand48="no"
  1803. fi
  1804. rm -f conftest*
  1805. echo "$ac_t""$ac_cv_func_lrand48" 1>&6
  1806.  
  1807.  
  1808. echo $ac_n "checking for default template parameters""... $ac_c" 1>&6
  1809. echo "configure:1810: checking for default template parameters" >&5
  1810. cat > conftest.$ac_ext <<EOF
  1811. #line 1812 "configure"
  1812. #include "confdefs.h"
  1813. template <class T> struct less {}; 
  1814.      template <class T, class T1=less<T> > struct Class { T1 t1; };
  1815.      Class<int> cl;
  1816.      Class<int,less<short> > cl2;
  1817.     
  1818. int main() {
  1819.  
  1820. ; return 0; }
  1821. EOF
  1822. if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1823.   rm -rf conftest*
  1824.   ac_cv_default_template_param="yes"
  1825. else
  1826.   echo "configure: failed program was:" >&5
  1827.   cat conftest.$ac_ext >&5
  1828.   rm -rf conftest*
  1829.   cat >> confdefs.h <<\EOF
  1830. #define _STLP_LIMITED_DEFAULT_TEMPLATES 1
  1831. EOF
  1832.  ac_cv_default_template_param="no"
  1833. fi
  1834. rm -f conftest*
  1835. echo "$ac_t""$ac_cv_default_template_param" 1>&6
  1836. if test "$ac_cv_default_template_param" = "no"; then
  1837.   echo $ac_n "checking for default type parameters""... $ac_c" 1>&6
  1838. echo "configure:1839: checking for default type parameters" >&5
  1839.   cat > conftest.$ac_ext <<EOF
  1840. #line 1841 "configure"
  1841. #include "confdefs.h"
  1842.  
  1843. template <class T> struct less {
  1844.     typedef int int_t;
  1845.   }; 
  1846.  
  1847. template <class T, class T1=less<int> > 
  1848. struct Class { 
  1849. private:
  1850.        int a;
  1851. public:
  1852.        typedef Class<T,T1> self; 
  1853.        typedef $__TYPENAME T1::int_t int_t;
  1854.        self foo (const Class<T,T1>& t) { 
  1855.          if ( t.a==a ) return *this;
  1856.          else return t;
  1857.          } 
  1858. };
  1859.  
  1860. Class<int> cl;
  1861. Class<int,less<short> > cl2;
  1862.     
  1863. int main() {
  1864.  
  1865. ; return 0; }
  1866. EOF
  1867. if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1868.   rm -rf conftest*
  1869.   cat >> confdefs.h <<\EOF
  1870. #define _STLP_DEFAULT_TYPE_PARAM 1
  1871. EOF
  1872.  ac_cv_default_type_param="yes"
  1873. else
  1874.   echo "configure: failed program was:" >&5
  1875.   cat conftest.$ac_ext >&5
  1876.   rm -rf conftest*
  1877.   ac_cv_default_type_param="no"
  1878. fi
  1879. rm -f conftest*
  1880.   echo "$ac_t""$ac_cv_default_type_param" 1>&6
  1881.  
  1882. fi
  1883.  
  1884.  
  1885. echo $ac_n "checking for default non-type parameters""... $ac_c" 1>&6
  1886. echo "configure:1887: checking for default non-type parameters" >&5
  1887. cat > conftest.$ac_ext <<EOF
  1888. #line 1889 "configure"
  1889. #include "confdefs.h"
  1890.  
  1891. template <class T, int N=0 > 
  1892. struct Class { 
  1893. private:
  1894.        T* t;
  1895.        enum { t1=N };
  1896. public:
  1897.        int get_n() { return N; }
  1898. };
  1899.  
  1900. Class<int> cl;
  1901. Class<int, 2> cl2;
  1902.     
  1903. int main() {
  1904.  
  1905. ; return 0; }
  1906. EOF
  1907. if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1908.   rm -rf conftest*
  1909.   ac_cv_default_nontype_param="yes"
  1910. else
  1911.   echo "configure: failed program was:" >&5
  1912.   cat conftest.$ac_ext >&5
  1913.   rm -rf conftest*
  1914.   cat >> confdefs.h <<\EOF
  1915. #define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
  1916. EOF
  1917.  ac_cv_default_nontype_param="no"
  1918.     
  1919. fi
  1920. rm -f conftest*
  1921. echo "$ac_t""$ac_cv_default_nontype_param" 1>&6
  1922.  
  1923. echo $ac_n "checking for non-type parameter bug""... $ac_c" 1>&6
  1924. echo "configure:1925: checking for non-type parameter bug" >&5
  1925. cat > conftest.$ac_ext <<EOF
  1926. #line 1927 "configure"
  1927. #include "confdefs.h"
  1928.  
  1929. template <class T, int N> 
  1930. struct Class { 
  1931. private:
  1932.        T* t;
  1933.        enum { t1=N };
  1934. public:
  1935.        int get_n() { return N; }
  1936. };
  1937.  
  1938. template <class T, int N>
  1939. int operator==(const Class<T,N>& , const Class<T,N>& ) { return 0; }
  1940.  
  1941. Class<int, 1> cl;
  1942. Class<int, 1> cl2;
  1943. int i(cl==cl2);
  1944.     
  1945. int main() {
  1946.  
  1947. ; return 0; }
  1948. EOF
  1949. if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1950.   rm -rf conftest*
  1951.   ac_cv_nontype_param_bug="no"
  1952. else
  1953.   echo "configure: failed program was:" >&5
  1954.   cat conftest.$ac_ext >&5
  1955.   rm -rf conftest*
  1956.   cat >> confdefs.h <<\EOF
  1957. #define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
  1958. EOF
  1959.  ac_cv_nontype_param_bug="yes"
  1960.     
  1961. fi
  1962. rm -f conftest*
  1963. echo "$ac_t""$ac_cv_nontype_param_bug" 1>&6
  1964.  
  1965. echo $ac_n "checking for static data member templates""... $ac_c" 1>&6
  1966. echo "configure:1967: checking for static data member templates" >&5
  1967. cat > conftest.$ac_ext <<EOF
  1968. #line 1969 "configure"
  1969. #include "confdefs.h"
  1970. template <class T> struct Class { static int a; };
  1971.      template <class T> int Class<T>::a;
  1972. int main() {
  1973.  
  1974. ; return 0; }
  1975. EOF
  1976. if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1977.   rm -rf conftest*
  1978.   ac_cv_static_templates="yes"
  1979. else
  1980.   echo "configure: failed program was:" >&5
  1981.   cat conftest.$ac_ext >&5
  1982.   rm -rf conftest*
  1983.   cat >> confdefs.h <<\EOF
  1984. #define _STLP_NO_STATIC_TEMPLATE_DATA 1
  1985. EOF
  1986.  ac_cv_static_templates="no"
  1987. fi
  1988. rm -f conftest*
  1989. echo "$ac_t""$ac_cv_static_templates" 1>&6
  1990.  
  1991. if test "$ac_cv_static_templates" = no; then
  1992.  echo $ac_n "checking for weak attribute""... $ac_c" 1>&6
  1993. echo "configure:1994: checking for weak attribute" >&5
  1994.  cat > conftest.$ac_ext <<EOF
  1995. #line 1996 "configure"
  1996. #include "confdefs.h"
  1997. int a_w __attribute__((weak));
  1998. int main() {
  1999.  
  2000. ; return 0; }
  2001. EOF
  2002. if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2003.   rm -rf conftest*
  2004.   cat >> confdefs.h <<\EOF
  2005. #define _STLP_WEAK_ATTRIBUTE 1
  2006. EOF
  2007.  ac_cv_weak_attribute="yes"
  2008. else
  2009.   echo "configure: failed program was:" >&5
  2010.   cat conftest.$ac_ext >&5
  2011.   rm -rf conftest*
  2012.   ac_cv_weak_attribute="no"
  2013. fi
  2014. rm -f conftest*
  2015.  echo "$ac_t""$ac_cv_weak_attribute" 1>&6
  2016. fi
  2017.  
  2018. if test "$ac_cv_static_templates" = yes; then
  2019. echo $ac_n "checking for static array member size bug""... $ac_c" 1>&6
  2020. echo "configure:2021: checking for static array member size bug" >&5
  2021. cat > conftest.$ac_ext <<EOF
  2022. #line 2023 "configure"
  2023. #include "confdefs.h"
  2024. template <class T> struct Class { enum { sz=5 }; static int a[sz]; };
  2025.      template <class T> int Class<T>::a[Class<T>::sz];
  2026. int main() {
  2027.  
  2028. ; return 0; }
  2029. EOF
  2030. if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2031.   rm -rf conftest*
  2032.   ac_cv_static_array_bug="no"
  2033. else
  2034.   echo "configure: failed program was:" >&5
  2035.   cat conftest.$ac_ext >&5
  2036.   rm -rf conftest*
  2037.   cat >> confdefs.h <<\EOF
  2038. #define _STLP_STATIC_ARRAY_BUG 1
  2039. EOF
  2040.  ac_cv_static_array_bug="yes"
  2041. fi
  2042. rm -f conftest*
  2043. echo "$ac_t""$ac_cv_static_array_bug" 1>&6
  2044. fi
  2045.  
  2046. echo $ac_n "checking for static data member const initializer bug""... $ac_c" 1>&6
  2047. echo "configure:2048: checking for static data member const initializer bug" >&5
  2048. cat > conftest.$ac_ext <<EOF
  2049. #line 2050 "configure"
  2050. #include "confdefs.h"
  2051. template <class T> struct Class { static const int a = 1; };
  2052.      template <class T> const int Class<T>::a;
  2053. int main() {
  2054.  
  2055. ; return 0; }
  2056. EOF
  2057. if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2058.   rm -rf conftest*
  2059.   ac_cv_static_init_bug="no"
  2060. else
  2061.   echo "configure: failed program was:" >&5
  2062.   cat conftest.$ac_ext >&5
  2063.   rm -rf conftest*
  2064.   cat >> confdefs.h <<\EOF
  2065. #define _STLP_STATIC_CONST_INIT_BUG 1
  2066. EOF
  2067.  ac_cv_static_init_bug="yes"
  2068. fi
  2069. rm -f conftest*
  2070. echo "$ac_t""$ac_cv_static_init_bug" 1>&6
  2071.  
  2072. echo $ac_n "checking for namespaces support""... $ac_c" 1>&6
  2073. echo "configure:2074: checking for namespaces support" >&5
  2074. cat > conftest.$ac_ext <<EOF
  2075. #line 2076 "configure"
  2076. #include "confdefs.h"
  2077. class test_class {};
  2078.      namespace std { 
  2079.       using ::test_class;
  2080.       template <class T> struct Class { typedef T my_type; };
  2081.       typedef Class<int>::my_type int_type;
  2082.     }; 
  2083.     inline int ns_foo (std::int_type t) { 
  2084.       using namespace std; 
  2085.       int_type i =2;
  2086.       return i+t; 
  2087.     } 
  2088.      
  2089. int main() {
  2090. (void)ns_foo(1);
  2091. ; return 0; }
  2092. EOF
  2093. if { (eval echo configure:2094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2094.   rm -rf conftest*
  2095.   _TEST_STD="std"  _TEST_STD_BEGIN="namespace $_TEST_STD" _TEST_STD_END="namespace $_TEST_STD" ac_cv_namespaces="yes"
  2096. else
  2097.   echo "configure: failed program was:" >&5
  2098.   cat conftest.$ac_ext >&5
  2099.   rm -rf conftest*
  2100.   cat >> confdefs.h <<\EOF
  2101. #define _STLP_HAS_NO_NAMESPACES 1
  2102. EOF
  2103.  _TEST_STD="" _TEST_STD_BEGIN="" _TEST_STD_END="" ac_cv_namespaces="no"
  2104. fi
  2105. rm -f conftest*
  2106. echo "$ac_t""$ac_cv_namespaces" 1>&6
  2107.  
  2108. echo $ac_n "checking for broken "using" directive""... $ac_c" 1>&6
  2109. echo "configure:2110: checking for broken "using" directive" >&5
  2110. cat > conftest.$ac_ext <<EOF
  2111. #line 2112 "configure"
  2112. #include "confdefs.h"
  2113. namespace std { 
  2114.       template <class T> struct Class { typedef T my_type; };
  2115.       typedef Class<int>::my_type int_type;
  2116.       template <class T> void foo(T,int) {}
  2117.       template <class T> void foo(T,int,int) {}
  2118.     }; 
  2119.      using std::Class;
  2120.      using std::foo;
  2121.      
  2122. int main() {
  2123. (void)foo(1,1);
  2124. ; return 0; }
  2125. EOF
  2126. if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2127.   rm -rf conftest*
  2128.   ac_cv_broken_using="no"
  2129. else
  2130.   echo "configure: failed program was:" >&5
  2131.   cat conftest.$ac_ext >&5
  2132.   rm -rf conftest*
  2133.   ac_cv_broken_using="yes"
  2134. fi
  2135. rm -f conftest*
  2136. if test "$ac_cv_broken_using" = no; then
  2137. # check if no warnings have been issued
  2138.   if `check_warning` ; then
  2139.     ac_cv_broken_using=no
  2140.   else
  2141.    cat >> confdefs.h <<\EOF
  2142. #define _STLP_BROKEN_USING_DIRECTIVE 1
  2143. EOF
  2144.  
  2145.   fi
  2146. else
  2147.    cat >> confdefs.h <<\EOF
  2148. #define _STLP_BROKEN_USING_DIRECTIVE 1
  2149. EOF
  2150.  
  2151. fi
  2152. echo "$ac_t""$ac_cv_broken_using" 1>&6
  2153.  
  2154.  
  2155. if test "$ac_cv_namespaces" = yes; then
  2156. # Check whether --enable-namespaces or --disable-namespaces was given.
  2157. if test "${enable_namespaces+set}" = set; then
  2158.   enableval="$enable_namespaces"
  2159.   
  2160. case "$enableval" in
  2161.     no) cat >> confdefs.h <<\EOF
  2162. #define _STLP_NO_NAMESPACES 1
  2163. EOF
  2164.  
  2165.             _TEST_STD="" 
  2166.             _TEST_STD_BEGIN=""
  2167.             _TEST_STD_END=""
  2168.             echo "$ac_t""Config arg --disable-namespaces : code not put into namespace by user request" 1>&6;;
  2169.      *) echo "$ac_t""Config default: code put into namespace" 1>&6
  2170. esac
  2171.  
  2172. else
  2173.   echo "$ac_t""Config default: code put into namespace" 1>&6
  2174.  
  2175. fi
  2176.  
  2177. else
  2178.  echo "$ac_t""Compiler restriction : no namespaces support used" 1>&6
  2179. fi
  2180.  
  2181.  
  2182. echo $ac_n "checking for exceptions support""... $ac_c" 1>&6
  2183. echo "configure:2184: checking for exceptions support" >&5
  2184. cat > conftest.$ac_ext <<EOF
  2185. #line 2186 "configure"
  2186. #include "confdefs.h"
  2187. int ex_foo() { 
  2188.        try { 
  2189.          try { throw(1); } 
  2190.          catch (int a) { throw; } 
  2191.        } catch (...) {;} 
  2192.       return 0;
  2193.     }
  2194. int main() {
  2195. (void)ex_foo();
  2196. ; return 0; }
  2197. EOF
  2198. if { (eval echo configure:2199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2199.   rm -rf conftest*
  2200.   ac_cv_exceptions="yes"
  2201. else
  2202.   echo "configure: failed program was:" >&5
  2203.   cat conftest.$ac_ext >&5
  2204.   rm -rf conftest*
  2205.   cat >> confdefs.h <<\EOF
  2206. #define _STLP_HAS_NO_EXCEPTIONS 1
  2207. EOF
  2208.  ac_cv_exceptions="no"
  2209. fi
  2210. rm -f conftest*
  2211. echo "$ac_t""$ac_cv_exceptions" 1>&6
  2212.  
  2213. if test "$ac_cv_exceptions" = yes; then
  2214.  
  2215. echo $ac_n "checking if exceptions specification works""... $ac_c" 1>&6
  2216. echo "configure:2217: checking if exceptions specification works" >&5
  2217. cat > conftest.$ac_ext <<EOF
  2218. #line 2219 "configure"
  2219. #include "confdefs.h"
  2220. template <class T> inline int ex_spec_foo(const T&) throw () { return 0;} 
  2221. int main() {
  2222. (void)ex_spec_foo(5);
  2223. ; return 0; }
  2224. EOF
  2225. if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2226.   rm -rf conftest*
  2227.   ac_cv_exception_spec="yes"
  2228. else
  2229.   echo "configure: failed program was:" >&5
  2230.   cat conftest.$ac_ext >&5
  2231.   rm -rf conftest*
  2232.   cat >> confdefs.h <<\EOF
  2233. #define _STLP_NO_EXCEPTION_SPEC 1
  2234. EOF
  2235.  ac_cv_exception_spec="no"
  2236. fi
  2237. rm -f conftest*
  2238. echo "$ac_t""$ac_cv_exception_spec" 1>&6
  2239.  
  2240. echo $ac_n "checking if return is required after throw""... $ac_c" 1>&6
  2241. echo "configure:2242: checking if return is required after throw" >&5
  2242. cat > conftest.$ac_ext <<EOF
  2243. #line 2244 "configure"
  2244. #include "confdefs.h"
  2245. int ex_foo() { 
  2246.        try { 
  2247.          try { throw(1); } 
  2248.          catch (int a) { throw; } 
  2249.        } catch (...) {;} 
  2250.       return 0;
  2251.     }
  2252. int main() {
  2253. (void)ex_foo();
  2254. ; return 0; }
  2255. EOF
  2256. if { (eval echo configure:2257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2257.   rm -rf conftest*
  2258.   ac_cv_throw_return_bug="no"
  2259. else
  2260.   echo "configure: failed program was:" >&5
  2261.   cat conftest.$ac_ext >&5
  2262.   rm -rf conftest*
  2263.   cat >> confdefs.h <<\EOF
  2264. #define _STLP_THROW_RETURN_BUG 1
  2265. EOF
  2266.  ac_cv_throw_return_bug="yes"
  2267. fi
  2268. rm -f conftest*
  2269.  
  2270.     if test "$ac_cv_throw_return_bug" = no; then
  2271.     # check if no warnings have been issued
  2272.      if `check_warning` ; then
  2273.        ac_cv_throw_return_bug="no"
  2274.      else
  2275.        cat >> confdefs.h <<\EOF
  2276. #define _STLP_THROW_RETURN_BUG 1
  2277. EOF
  2278.  
  2279.        ac_cv_throw_return_bug="yes"
  2280.      fi
  2281.     fi
  2282. echo "$ac_t""$ac_cv_throw_return_bug" 1>&6
  2283.  
  2284. fi
  2285.  
  2286. echo $ac_n "checking for native <string> header with basic_string defined ""... $ac_c" 1>&6
  2287. echo "configure:2288: checking for native <string> header with basic_string defined " >&5
  2288. cat > conftest.$ac_ext <<EOF
  2289. #line 2290 "configure"
  2290. #include "confdefs.h"
  2291.  
  2292.      #include <string>
  2293.      # if !defined (_STLP_HAS_NO_NAMESPACES)
  2294.        using namespace $_TEST_STD;
  2295.      # endif
  2296.      basic_string<char, char_traits<char>, allocator<char> > bs;
  2297.      string bd = bs;
  2298.     
  2299. int main() {
  2300.  
  2301. ; return 0; }
  2302. EOF
  2303. if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2304.   rm -rf conftest*
  2305.    ac_cv_string_header="yes"
  2306. else
  2307.   echo "configure: failed program was:" >&5
  2308.   cat conftest.$ac_ext >&5
  2309.   rm -rf conftest*
  2310.    cat >> confdefs.h <<\EOF
  2311. #define _STLP_NO_STRING_HEADER 1
  2312. EOF
  2313.  ac_cv_string_header="no"
  2314.  
  2315. fi
  2316. rm -f conftest*
  2317. echo "$ac_t""$ac_cv_string_header" 1>&6
  2318.  
  2319. if test "$ac_cv_string_header" = yes; then
  2320. echo $ac_n "checking for native <stdexcept> header""... $ac_c" 1>&6
  2321. echo "configure:2322: checking for native <stdexcept> header" >&5
  2322. cat > conftest.$ac_ext <<EOF
  2323. #line 2324 "configure"
  2324. #include "confdefs.h"
  2325.  
  2326.      #include <stdexcept>
  2327.      # if !defined (_STLP_HAS_NO_NAMESPACES)
  2328.        using namespace $_TEST_STD;
  2329.      # endif
  2330.      string s;
  2331.      logic_error le(s);
  2332.      runtime_error re(s);
  2333.      domain_error de(s);
  2334.      invalid_argument ia(s);
  2335.      length_error lne(s);
  2336.      out_of_range or(s);
  2337.      range_error rne(s);
  2338.      overflow_error ove(s);
  2339.      underflow_error ue(s);
  2340.     
  2341. int main() {
  2342.  
  2343. ; return 0; }
  2344. EOF
  2345. if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2346.   rm -rf conftest*
  2347.   ac_cv_stdexcept_header="yes"
  2348. else
  2349.   echo "configure: failed program was:" >&5
  2350.   cat conftest.$ac_ext >&5
  2351.   rm -rf conftest*
  2352.   cat >> confdefs.h <<\EOF
  2353. #define _STLP_NO_STDEXCEPT_HEADER 1
  2354. EOF
  2355.  ac_cv_stdexcept_header="no"
  2356.  
  2357. fi
  2358. rm -f conftest*
  2359. echo "$ac_t""$ac_cv_stdexcept_header" 1>&6
  2360.  
  2361. echo $ac_n "checking for new iostreams""... $ac_c" 1>&6
  2362. echo "configure:2363: checking for new iostreams" >&5
  2363. cat > conftest.$ac_ext <<EOF
  2364. #line 2365 "configure"
  2365. #include "confdefs.h"
  2366.  
  2367.      #include <iosfwd>
  2368.      #include <iostream>
  2369.      # if !defined (_STLP_HAS_NO_NAMESPACES)
  2370.        using namespace $_TEST_STD;
  2371.      # endif
  2372.  
  2373.      template <class _Tp, class _Traits>
  2374.      void outp(basic_ostream<_Tp,_Traits>& o, char* str) {
  2375.          o<<str; 
  2376.         }
  2377.        
  2378. int main() {
  2379.  
  2380.     outp(cout, "Hello World\n")
  2381.     
  2382. ; return 0; }
  2383. EOF
  2384. if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2385.   rm -rf conftest*
  2386.   ac_cv_newstreams="yes"
  2387. else
  2388.   echo "configure: failed program was:" >&5
  2389.   cat conftest.$ac_ext >&5
  2390.   rm -rf conftest*
  2391.   cat >> confdefs.h <<\EOF
  2392. #define _STLP_HAS_NO_NEW_IOSTREAMS 1
  2393. EOF
  2394.  ac_cv_newstreams="no"
  2395. fi
  2396. rm -f conftest*
  2397. echo "$ac_t""$ac_cv_newstreams" 1>&6
  2398.  
  2399.  
  2400. fi
  2401.  
  2402. echo $ac_n "checking for <exception> header with class "exception" defined""... $ac_c" 1>&6
  2403. echo "configure:2404: checking for <exception> header with class "exception" defined" >&5
  2404. cat > conftest.$ac_ext <<EOF
  2405. #line 2406 "configure"
  2406. #include "confdefs.h"
  2407.  
  2408.      #include <exception>
  2409.      # if !defined (_STLP_HAS_NO_NAMESPACES)
  2410.        using namespace $_TEST_STD;
  2411.      # endif
  2412.      class my_exception: public $_TEST_STD::exception {};
  2413.      my_exception mm;
  2414.     
  2415. int main() {
  2416.  
  2417. ; return 0; }
  2418. EOF
  2419. if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2420.   rm -rf conftest*
  2421.   ac_cv_exception_header="yes"
  2422. else
  2423.   echo "configure: failed program was:" >&5
  2424.   cat conftest.$ac_ext >&5
  2425.   rm -rf conftest*
  2426.   cat >> confdefs.h <<\EOF
  2427. #define _STLP_NO_EXCEPTION_HEADER 1
  2428. EOF
  2429.  ac_cv_exception_header="no"
  2430.  
  2431. fi
  2432. rm -f conftest*
  2433. echo "$ac_t""$ac_cv_exception_header" 1>&6
  2434.  
  2435. echo $ac_n "checking builtin constructor bug""... $ac_c" 1>&6
  2436. echo "configure:2437: checking builtin constructor bug" >&5
  2437. if test "$cross_compiling" = yes; then
  2438.    cat >> confdefs.h <<\EOF
  2439. #define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
  2440. EOF
  2441.  ac_cv_builtin_c_bug="yes"
  2442.  
  2443. else
  2444.   cat > conftest.$ac_ext <<EOF
  2445. #line 2446 "configure"
  2446. #include "confdefs.h"
  2447. #ifdef __cplusplus
  2448. extern "C" void exit(int);
  2449. #endif
  2450.  
  2451. # ifdef _STLP_USE_NEW_STYLE_HEADERS
  2452. #  include <cassert>
  2453. #  include <cstdio>
  2454. #  include <cstring>
  2455. #  include <new>
  2456. # else
  2457. #  include <assert.h>
  2458. #  include <stdio.h>
  2459. #  include <string.h>
  2460. #  include <new.h>
  2461. # endif
  2462. int main(int, char**) {
  2463.     int i;
  2464.     double buf[1000];
  2465.     char* pc = (char*)buf;
  2466.     short* ps = (short*)buf;
  2467.     int* pi = (int*)buf;
  2468.     long* pl = (long*)buf;
  2469.     double* pd = (double*)buf;
  2470.     float* pf = (float*)buf;
  2471.     for (i=0; i<100; i++) {
  2472.            new(pc) char();
  2473.             assert(char()==0 && *pc==0);
  2474.         sprintf(pc,"lalala\n");
  2475.             new (ps) short();    
  2476.         assert(short()==0 && *ps ==0);
  2477.         sprintf(pc,"lalala\n");
  2478.             new (pi) int();
  2479.         assert(int()==0 && *pi == 0);
  2480.         sprintf(pc,"lalala\n");
  2481.             new (pl) long();    
  2482.         assert(long()==0 && *pl == 0);
  2483.         sprintf(pc,"lalala\n");
  2484.             new (pf) float();    
  2485.         assert(float()==0.0 && *pf == 0.0);
  2486.         sprintf(pc,"lalala\n");
  2487.             new (pd) double();    
  2488.         assert(double()==0.0 && *pd == 0.0);
  2489.         sprintf(pc,"lalala\n");
  2490.     }
  2491.   return 0;
  2492. }
  2493.  
  2494. EOF
  2495. if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2496. then
  2497.    ac_cv_builtin_c_bug="no"
  2498. else
  2499.   echo "configure: failed program was:" >&5
  2500.   cat conftest.$ac_ext >&5
  2501.   rm -fr conftest*
  2502.    cat >> confdefs.h <<\EOF
  2503. #define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
  2504. EOF
  2505.  ac_cv_builtin_c_bug="yes"
  2506. fi
  2507. rm -fr conftest*
  2508. fi
  2509.  
  2510. echo "$ac_t""$ac_cv_builtin_c_bug" 1>&6
  2511.  
  2512. echo $ac_n "checking for trivial constructor bug""... $ac_c" 1>&6
  2513. echo "configure:2514: checking for trivial constructor bug" >&5
  2514. cat > conftest.$ac_ext <<EOF
  2515. #line 2516 "configure"
  2516. #include "confdefs.h"
  2517. struct output_iterator_tag {};
  2518.      void tc_bug_foo(output_iterator_tag) {}
  2519.      inline void tc_test_foo()  { tc_bug_foo(output_iterator_tag()); }
  2520. int main() {
  2521. tc_test_foo();
  2522. ; return 0; }
  2523. EOF
  2524. if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2525.   rm -rf conftest*
  2526.   ac_cv_tc_bug="no"
  2527. else
  2528.   echo "configure: failed program was:" >&5
  2529.   cat conftest.$ac_ext >&5
  2530.   rm -rf conftest*
  2531.   cat >> confdefs.h <<\EOF
  2532. #define _STLP_TRIVIAL_CONSTRUCTOR_BUG 1
  2533. EOF
  2534.  ac_cv_tc_bug="yes"
  2535. fi
  2536. rm -f conftest*
  2537. echo "$ac_t""$ac_cv_tc_bug" 1>&6
  2538.  
  2539. echo $ac_n "checking for trivial destructor bug""... $ac_c" 1>&6
  2540. echo "configure:2541: checking for trivial destructor bug" >&5
  2541. cat > conftest.$ac_ext <<EOF
  2542. #line 2543 "configure"
  2543. #include "confdefs.h"
  2544. struct output_iterator_tag {output_iterator_tag() {} };
  2545.     output_iterator_tag* td_bug_bar ;
  2546.     
  2547. int main() {
  2548.  td_bug_bar->~output_iterator_tag();
  2549.      
  2550. ; return 0; }
  2551. EOF
  2552. if { (eval echo configure:2553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2553.   rm -rf conftest*
  2554.   ac_cv_td_bug="no"
  2555. else
  2556.   echo "configure: failed program was:" >&5
  2557.   cat conftest.$ac_ext >&5
  2558.   rm -rf conftest*
  2559.   cat >> confdefs.h <<\EOF
  2560. #define _STLP_TRIVIAL_DESTRUCTOR_BUG 1
  2561. EOF
  2562.  ac_cv_td_bug="yes"
  2563. fi
  2564. rm -f conftest*
  2565. echo "$ac_t""$ac_cv_td_bug" 1>&6
  2566.  
  2567. echo $ac_n "checking for explicit function template arguments""... $ac_c" 1>&6
  2568. echo "configure:2569: checking for explicit function template arguments" >&5
  2569. cat > conftest.$ac_ext <<EOF
  2570. #line 2571 "configure"
  2571. #include "confdefs.h"
  2572.   template <class T> class foo;
  2573.        template<class T> bool operator==(const foo<T>& lhs,const foo<T>& rhs);
  2574.       template <class T> class foo {
  2575.     private:
  2576.       T bar;
  2577.     friend bool operator== <> (const foo<T>&,const foo<T>&);
  2578.      };
  2579.      template<class T> bool operator==(const foo<T>& lhs,const foo<T>& rhs) {
  2580.     return  lhs.bar==rhs.bar;
  2581.      }
  2582. int main() {
  2583.  foo<int> f1, f2;
  2584.       int ret= (f1==f2) 
  2585. ; return 0; }
  2586. EOF
  2587. if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2588.   rm -rf conftest*
  2589.    _NULLARGS="<>" ac_cv_expl_fun_args="yes"
  2590. else
  2591.   echo "configure: failed program was:" >&5
  2592.   cat conftest.$ac_ext >&5
  2593.   rm -rf conftest*
  2594.    cat >> confdefs.h <<\EOF
  2595. #define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
  2596. EOF
  2597.  ac_cv_expl_fun_args="no" _NULLARGS=""
  2598. fi
  2599. rm -f conftest*
  2600. echo "$ac_t""$ac_cv_expl_fun_args" 1>&6
  2601.  
  2602. echo $ac_n "checking for template parameter baseclass matching""... $ac_c" 1>&6
  2603. echo "configure:2604: checking for template parameter baseclass matching" >&5
  2604. cat > conftest.$ac_ext <<EOF
  2605. #line 2606 "configure"
  2606. #include "confdefs.h"
  2607. struct output_iterator_tag {};
  2608.      struct derived1_tag : public output_iterator_tag {};
  2609.      struct derived2_tag : public derived1_tag {};
  2610.      template<class T> struct output_iterator { 
  2611.     public:
  2612.     output_iterator() {} 
  2613.     ~output_iterator() {} 
  2614.     friend inline int operator== $_NULLARGS (const output_iterator<T>&, 
  2615.                                       const output_iterator<T>&);
  2616.     };
  2617.      template<class T> inline int operator==(const output_iterator<T>&, 
  2618.                                           const output_iterator<T>&) {
  2619.        return 0;
  2620.      }
  2621.      template<class T> inline output_iterator_tag
  2622.      iterator_category(const output_iterator<T>&) {return output_iterator_tag();}
  2623.      template <class T>
  2624.      struct derived_iterator : public output_iterator<T> {
  2625.     public:
  2626.     derived_iterator() {} 
  2627.     ~derived_iterator() {}
  2628.     };
  2629.      template<class T> inline T select_foo(T t, output_iterator_tag) { return t;}     
  2630.      template<class T> inline int select_foo_2(T, T,
  2631.                                              output_iterator_tag) { return 0;}     
  2632.      template<class T> inline T tbase_foo(T pm )  { 
  2633.     derived_iterator<T> di1, di2; int i( di1==di2 && pm);
  2634.     return select_foo((int)1,iterator_category(derived_iterator<T>())); 
  2635.     }
  2636.     
  2637. int main() {
  2638.  (void)tbase_foo((int)1); 
  2639. ; return 0; }
  2640. EOF
  2641. if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2642.   rm -rf conftest*
  2643.   ac_cv_base_match="yes"
  2644. else
  2645.   echo "configure: failed program was:" >&5
  2646.   cat conftest.$ac_ext >&5
  2647.   rm -rf conftest*
  2648.   cat >> confdefs.h <<\EOF
  2649. #define _STLP_BASE_MATCH_BUG 1
  2650. EOF
  2651.  ac_cv_base_match="no"
  2652. fi
  2653. rm -f conftest*
  2654. echo "$ac_t""$ac_cv_base_match" 1>&6
  2655.  
  2656. echo $ac_n "checking for non-template parameter baseclass matching ""... $ac_c" 1>&6
  2657. echo "configure:2658: checking for non-template parameter baseclass matching " >&5
  2658. cat > conftest.$ac_ext <<EOF
  2659. #line 2660 "configure"
  2660. #include "confdefs.h"
  2661. struct output_iterator_tag {};
  2662.      struct derived1_tag : public output_iterator_tag {};
  2663.      struct derived2_tag : public derived1_tag {};
  2664.      struct derived3_tag : public derived2_tag {};
  2665.      template<class T> struct output_iterator { 
  2666.     public:
  2667.     output_iterator() {} 
  2668.     ~output_iterator() {} 
  2669.     };
  2670.      template<class T> inline output_iterator_tag
  2671.      iterator_category(const output_iterator<T>&) {return output_iterator_tag();}
  2672.      template <class T>
  2673.      struct derived_iterator : public output_iterator<T> {
  2674.     public:
  2675.     derived_iterator() {} 
  2676.     ~derived_iterator() {}
  2677.     };
  2678.      template<class T> inline int select_foo_2(T, T,
  2679.                                              output_iterator_tag) { return 0;}     
  2680.      template<class T> inline int select_foo_2(T, T,
  2681.                                              derived1_tag) { return 0;}     
  2682.      template<class T> inline void nont_base_foo(T pm )  { 
  2683.     derived_iterator<T> di1, di2; 
  2684.     (void)select_foo_2(di1, (const derived_iterator<T>&)di2, derived3_tag());
  2685.     }
  2686.     
  2687. int main() {
  2688.  nont_base_foo((int)1); 
  2689. ; return 0; }
  2690. EOF
  2691. if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2692.   rm -rf conftest*
  2693.   ac_cv_nont_base_match="yes"
  2694. else
  2695.   echo "configure: failed program was:" >&5
  2696.   cat conftest.$ac_ext >&5
  2697.   rm -rf conftest*
  2698.   cat >> confdefs.h <<\EOF
  2699. #define _STLP_NONTEMPL_BASE_MATCH_BUG 1
  2700. EOF
  2701.  ac_cv_nont_base_match="no"
  2702. fi
  2703. rm -f conftest*
  2704. echo "$ac_t""$ac_cv_nont_base_match" 1>&6
  2705.  
  2706. echo $ac_n "checking for nested type parameters bug""... $ac_c" 1>&6
  2707. echo "configure:2708: checking for nested type parameters bug" >&5
  2708. cat > conftest.$ac_ext <<EOF
  2709. #line 2710 "configure"
  2710. #include "confdefs.h"
  2711. template<class T> struct nt_o { typedef int ii; inline ii foo(ii);};
  2712.      template <class T> inline nt_o<T>::ii nt_o<T>::foo(ii) { return 0; }
  2713. int main() {
  2714.  
  2715. ; return 0; }
  2716. EOF
  2717. if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2718.   rm -rf conftest*
  2719.   ac_cv_nested_type_param_bug="no"
  2720. else
  2721.   echo "configure: failed program was:" >&5
  2722.   cat conftest.$ac_ext >&5
  2723.   rm -rf conftest*
  2724.   cat >> confdefs.h <<\EOF
  2725. #define _STLP_NESTED_TYPE_PARAM_BUG 1
  2726. EOF
  2727.  ac_cv_nested_type_param_bug="yes"
  2728. fi
  2729. rm -f conftest*
  2730. echo "$ac_t""$ac_cv_nested_type_param_bug" 1>&6
  2731.  
  2732.  
  2733. echo $ac_n "checking if inherited template typedefs broken completely""... $ac_c" 1>&6
  2734. echo "configure:2735: checking if inherited template typedefs broken completely" >&5
  2735. cat > conftest.$ac_ext <<EOF
  2736. #line 2737 "configure"
  2737. #include "confdefs.h"
  2738.  
  2739. template <class Arg1, class Arg2, class Result>
  2740. struct binary_function {
  2741.     typedef Arg1 first_argument_type;
  2742.     typedef Arg2 second_argument_type;
  2743.     typedef Result result_type;
  2744. };     
  2745.  
  2746. template <class T>
  2747. struct equal_to : public binary_function<T, T, int> {
  2748.     int operator()(const T& x, const T& y) const { return x == y; }
  2749. };
  2750.  
  2751. template <class Predicate> 
  2752. class binary_negate 
  2753.     : public binary_function<$__TYPENAME Predicate::first_argument_type,
  2754.                  $__TYPENAME Predicate::second_argument_type, 
  2755.                              int> {
  2756. protected:
  2757.     Predicate pred;
  2758. public:
  2759.     binary_negate(const Predicate& x = Predicate()) : pred(x) {}
  2760.     int operator() (const $__TYPENAME Predicate::first_argument_type& x, 
  2761.             const $__TYPENAME Predicate::second_argument_type& y) const {
  2762.     return !pred(x, y); 
  2763.     }
  2764. };
  2765.       typedef equal_to<int> eq_int;
  2766.       typedef binary_negate<equal_to<int> > int_negate;
  2767.       int_negate n;
  2768.  
  2769. int main() {
  2770.  
  2771.       (void)n(1,2);
  2772.     
  2773. ; return 0; }
  2774. EOF
  2775. if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2776.   rm -rf conftest*
  2777.   ac_cv_typebug="no"
  2778. else
  2779.   echo "configure: failed program was:" >&5
  2780.   cat conftest.$ac_ext >&5
  2781.   rm -rf conftest*
  2782.   cat >> confdefs.h <<\EOF
  2783. #define _STLP_BASE_TYPEDEF_BUG 1
  2784. EOF
  2785.  
  2786.      cat >> confdefs.h <<\EOF
  2787. #define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
  2788. EOF
  2789.  ac_cv_typebug="yes"
  2790. fi
  2791. rm -f conftest*
  2792. echo "$ac_t""$ac_cv_typebug" 1>&6
  2793.  
  2794. echo $ac_n "checking if inherited typedefs visible from outside""... $ac_c" 1>&6
  2795. echo "configure:2796: checking if inherited typedefs visible from outside" >&5
  2796. cat > conftest.$ac_ext <<EOF
  2797. #line 2798 "configure"
  2798. #include "confdefs.h"
  2799.  
  2800. template <class Arg1, class Arg2, class Result>
  2801. struct binary_function {
  2802.     typedef Arg1 first_argument_type;
  2803.     typedef Arg1 second_argument_type;
  2804.     typedef Result result_type;
  2805. };     
  2806.  
  2807.  
  2808. template <class T>
  2809. class plus : public binary_function<T, T, T> {
  2810. public:
  2811.     plus() {}
  2812.     plus(const T&) {}
  2813.     T operator()(const T& x, const T& y) const { return x + y; };
  2814. };
  2815.  
  2816. plus<int> p;
  2817. plus<int>::first_argument_type a;
  2818.  
  2819. int main() {
  2820.  
  2821. ; return 0; }
  2822. EOF
  2823. if { (eval echo configure:2824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2824.   rm -rf conftest*
  2825.   ac_cv_outside_typedef="yes"
  2826. else
  2827.   echo "configure: failed program was:" >&5
  2828.   cat conftest.$ac_ext >&5
  2829.   rm -rf conftest*
  2830.   cat >> confdefs.h <<\EOF
  2831. #define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
  2832. EOF
  2833.  ac_cv_outside_typedef="no"
  2834. fi
  2835. rm -f conftest*
  2836. echo "$ac_t""$ac_cv_outside_typedef" 1>&6
  2837.  
  2838. # fi
  2839.  
  2840. echo $ac_n "checking if private type static members initializable""... $ac_c" 1>&6
  2841. echo "configure:2842: checking if private type static members initializable" >&5
  2842. cat > conftest.$ac_ext <<EOF
  2843. #line 2844 "configure"
  2844. #include "confdefs.h"
  2845. struct p_Class { private: struct str_ { 
  2846.     int a; str_(int i) : a(i) {}}; static str_ my_int; 
  2847.      };
  2848.      p_Class::str_ p_Class::my_int(0); 
  2849.      
  2850. int main() {
  2851.  
  2852. ; return 0; }
  2853. EOF
  2854. if { (eval echo configure:2855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2855.   rm -rf conftest*
  2856.   ac_cv_private="yes"
  2857. else
  2858.   echo "configure: failed program was:" >&5
  2859.   cat conftest.$ac_ext >&5
  2860.   rm -rf conftest*
  2861.   cat >> confdefs.h <<\EOF
  2862. #define _STLP_UNINITIALIZABLE_PRIVATE 1
  2863. EOF
  2864.  ac_cv_private="no"
  2865. fi
  2866. rm -f conftest*
  2867. echo "$ac_t""$ac_cv_private" 1>&6
  2868.  
  2869.  
  2870. echo $ac_n "checking for const member constructor bug""... $ac_c" 1>&6
  2871. echo "configure:2872: checking for const member constructor bug" >&5
  2872. cat > conftest.$ac_ext <<EOF
  2873. #line 2874 "configure"
  2874. #include "confdefs.h"
  2875.  
  2876. template <class T1, class T2>
  2877. struct pair {
  2878.     T1 first;
  2879.     T2 second;
  2880.     pair(): first(T1()), second(T2()) {}
  2881.     pair(const pair<T1,T2>& o) : first(o.first), second(o.second) {}
  2882. };
  2883. pair< const int, const int > p;  
  2884.      
  2885. int main() {
  2886.  
  2887. ; return 0; }
  2888. EOF
  2889. if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2890.   rm -rf conftest*
  2891.   ac_cv_const_constructor_bug="no"
  2892. else
  2893.   echo "configure: failed program was:" >&5
  2894.   cat conftest.$ac_ext >&5
  2895.   rm -rf conftest*
  2896.   cat >> confdefs.h <<\EOF
  2897. #define _STLP_CONST_CONSTRUCTOR_BUG 1
  2898. EOF
  2899.  ac_cv_const_constructor_bug="yes"
  2900. fi
  2901. rm -f conftest*
  2902. echo "$ac_t""$ac_cv_const_constructor_bug" 1>&6
  2903.  
  2904. echo $ac_n "checking for loop inline problems""... $ac_c" 1>&6
  2905. echo "configure:2906: checking for loop inline problems" >&5
  2906. cat > conftest.$ac_ext <<EOF
  2907. #line 2908 "configure"
  2908. #include "confdefs.h"
  2909. inline int il_foo (int a) { 
  2910.       int i; for (i=0; i<a; i++) a+=a;  while (i>0) a-=3; return a; }
  2911. int main() {
  2912. (void)il_foo(2);
  2913. ; return 0; }
  2914. EOF
  2915. if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2916.   rm -rf conftest*
  2917.   ac_cv_inline_problems="no"
  2918. else
  2919.   echo "configure: failed program was:" >&5
  2920.   cat conftest.$ac_ext >&5
  2921.   rm -rf conftest*
  2922.   cat >> confdefs.h <<\EOF
  2923. #define _STLP_LOOP_INLINE_PROBLEMS 1
  2924. EOF
  2925.  ac_cv_inline_problems="yes"
  2926. fi
  2927. rm -f conftest*
  2928. if test "$ac_cv_inline_problems" = no; then
  2929. # check if no warnings have been issued
  2930.   if `check_warning` ; then
  2931.      ac_cv_inline_problems="no"
  2932.   else
  2933.    cat >> confdefs.h <<\EOF
  2934. #define _STLP_LOOP_INLINE_PROBLEMS 1
  2935. EOF
  2936.  
  2937.    ac_cv_inline_problems="yes"
  2938.   fi
  2939. fi
  2940. echo "$ac_t""$ac_cv_inline_problems" 1>&6
  2941.  
  2942.  
  2943. echo $ac_n "checking if arrow operator always get instantiated""... $ac_c" 1>&6
  2944. echo "configure:2945: checking if arrow operator always get instantiated" >&5
  2945. cat > conftest.$ac_ext <<EOF
  2946. #line 2947 "configure"
  2947. #include "confdefs.h"
  2948.  
  2949.      template <class T> struct um_foo { T* ptr; 
  2950.     T* operator ->() { return &(operator*());}
  2951.     T  operator *()  { return *ptr; }
  2952.      };
  2953.      template <class T>
  2954.     int operator == ( const um_foo<T>& x, const um_foo<T>& y)
  2955.     {
  2956.             return *x == *y;
  2957.     }
  2958.      struct um_tag { int a ; };
  2959.      um_foo<um_tag> f;
  2960.      um_foo<int> a;
  2961.      
  2962. int main() {
  2963.  
  2964.      int b(5); a.ptr=&b;
  2965. ; return 0; }
  2966. EOF
  2967. if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2968.   rm -rf conftest*
  2969.   ac_cv_unused_required="no"
  2970. else
  2971.   echo "configure: failed program was:" >&5
  2972.   cat conftest.$ac_ext >&5
  2973.   rm -rf conftest*
  2974.   cat >> confdefs.h <<\EOF
  2975. #define _STLP_NO_ARROW_OPERATOR 1
  2976. EOF
  2977.  ac_cv_unused_required="yes"
  2978.     
  2979. fi
  2980. rm -f conftest*
  2981. echo "$ac_t""$ac_cv_unused_required" 1>&6
  2982.  
  2983. echo $ac_n "checking for pointer-to-member parameter bug""... $ac_c" 1>&6
  2984. echo "configure:2985: checking for pointer-to-member parameter bug" >&5
  2985. cat > conftest.$ac_ext <<EOF
  2986. #line 2987 "configure"
  2987. #include "confdefs.h"
  2988.  
  2989. struct pmf_foo {
  2990.     int bar() { return 0; };
  2991. };
  2992.  
  2993. template <class Class, class Result> 
  2994. class mem_fun_t {
  2995. protected:
  2996.     typedef Result (Class::*fun_type)(void);
  2997.     fun_type ptr;
  2998. public:
  2999.     mem_fun_t() {}
  3000.     mem_fun_t(fun_type p) : ptr(p) {}
  3001.     Result operator()(Class* x) const { return (x->*ptr)();}
  3002. };
  3003.  
  3004. template <class Class, class Result>
  3005. inline mem_fun_t <Class, Result> 
  3006. mem_fun(Result (Class::*ptr)(void)) {
  3007.     return mem_fun_t<Class, Result>(ptr);
  3008. }
  3009.  
  3010. int main() {
  3011. pmf_foo pmf; (void)mem_fun(&pmf_foo::bar)(&pmf)
  3012. ; return 0; }
  3013. EOF
  3014. if { (eval echo configure:3015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3015.   rm -rf conftest*
  3016.   ac_cv_pmf_bug="no"
  3017. else
  3018.   echo "configure: failed program was:" >&5
  3019.   cat conftest.$ac_ext >&5
  3020.   rm -rf conftest*
  3021.   cat >> confdefs.h <<\EOF
  3022. #define _STLP_MEMBER_POINTER_PARAM_BUG 1
  3023. EOF
  3024.  ac_cv_pmf_bug="yes"
  3025. fi
  3026. rm -f conftest*
  3027. echo "$ac_t""$ac_cv_pmf_bug" 1>&6
  3028.  
  3029. echo $ac_n "checking if bad_alloc defined in <new>""... $ac_c" 1>&6
  3030. echo "configure:3031: checking if bad_alloc defined in <new>" >&5
  3031. cat > conftest.$ac_ext <<EOF
  3032. #line 3033 "configure"
  3033. #include "confdefs.h"
  3034.  
  3035.      #if !defined (_STLP_NO_NEW_STYLE_HEADERS)
  3036.      #include <new>
  3037.      #else
  3038.      #include <new.h>
  3039.      #endif
  3040.  
  3041.      # if !defined (_STLP_HAS_NO_NAMESPACES)
  3042.        using namespace $_TEST_STD;
  3043.      # endif
  3044.  
  3045.      bad_alloc badalloc_foo() { bad_alloc err; return err;}
  3046. int main() {
  3047. (void)badalloc_foo()
  3048. ; return 0; }
  3049. EOF
  3050. if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3051.   rm -rf conftest*
  3052.   ac_cv_bad_alloc="yes"
  3053. else
  3054.   echo "configure: failed program was:" >&5
  3055.   cat conftest.$ac_ext >&5
  3056.   rm -rf conftest*
  3057.   cat >> confdefs.h <<\EOF
  3058. #define _STLP_NO_BAD_ALLOC 1
  3059. EOF
  3060.  ac_cv_bad_alloc="no"
  3061. fi
  3062. rm -f conftest*
  3063. echo "$ac_t""$ac_cv_bad_alloc" 1>&6
  3064.  
  3065. echo $ac_n "checking for __type_traits automatic specialization""... $ac_c" 1>&6
  3066. echo "configure:3067: checking for __type_traits automatic specialization" >&5
  3067. cat > conftest.$ac_ext <<EOF
  3068. #line 3069 "configure"
  3069. #include "confdefs.h"
  3070. template <class T> int tt_foo(const T&) {
  3071.     typedef __type_traits<T> traits;
  3072.     return 0;
  3073.      }
  3074. int main() {
  3075. (void)tt_foo(5)
  3076. ; return 0; }
  3077. EOF
  3078. if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3079.   rm -rf conftest*
  3080.   cat >> confdefs.h <<\EOF
  3081. #define _STLP_AUTOMATIC_TYPE_TRAITS 1
  3082. EOF
  3083.  ac_cv_type_traits="yes"
  3084. else
  3085.   echo "configure: failed program was:" >&5
  3086.   cat conftest.$ac_ext >&5
  3087.   rm -rf conftest*
  3088.   ac_cv_type_traits="no"
  3089. fi
  3090. rm -f conftest*
  3091. echo "$ac_t""$ac_cv_type_traits" 1>&6
  3092.  
  3093.  
  3094. # package options - exceptions
  3095. echo "$ac_t""***" 1>&6
  3096. echo "$ac_t""$0: Setting implementation options..." 1>&6
  3097. echo "$ac_t""***" 1>&6
  3098.  
  3099. if test "$ac_cv_exceptions" = yes; then
  3100. # Check whether --enable-exceptions or --disable-exceptions was given.
  3101. if test "${enable_exceptions+set}" = set; then
  3102.   enableval="$enable_exceptions"
  3103.   
  3104. case "$enableval" in
  3105.            no) cat >> confdefs.h <<\EOF
  3106. #define _STLP_NO_EXCEPTIONS 1
  3107. EOF
  3108.  
  3109.                echo "$ac_t""Config arg --disable-exceptions : disabling exceptions by user request" 1>&6;;
  3110.            *)  echo "$ac_t""Config default: exceptions enabled" 1>&6
  3111. esac
  3112.  
  3113. else
  3114.   echo "$ac_t""Config default: exceptions enabled" 1>&6 
  3115.  
  3116. fi
  3117.  
  3118. else
  3119.  echo "$ac_t""Compiler restriction : no exceptions support used" 1>&6
  3120. fi
  3121.  
  3122. if test "$ac_cv_namespaces" = yes; then
  3123. # Check whether --enable-relops or --disable-relops was given.
  3124. if test "${enable_relops+set}" = set; then
  3125.   enableval="$enable_relops"
  3126.   
  3127. case "$enableval" in
  3128.     no) cat >> confdefs.h <<\EOF
  3129. #define _STLP_NO_RELOPS_NAMESPACE 1
  3130. EOF
  3131.  
  3132.             echo "$ac_t""Config arg --disable-relops : no std::rel_ops namespace by user request" 1>&6;;
  3133.      *) echo "$ac_t""Config default: Separate std::rel_ops namespace for relational operators" 1>&6
  3134. esac
  3135.  
  3136. else
  3137.   echo "$ac_t""Config default: Separate std::rel_ops namespace for relational operators" 1>&6
  3138.  
  3139. fi
  3140.  
  3141. else
  3142.  cat >> confdefs.h <<\EOF
  3143. #define _STLP_NO_RELOPS_NAMESPACE 1
  3144. EOF
  3145.  
  3146. fi
  3147.  
  3148. if test "$ac_cv_newheaders" = yes; then
  3149. # Check whether --enable-new-style-headers or --disable-new-style-headers was given.
  3150. if test "${enable_new_style_headers+set}" = set; then
  3151.   enableval="$enable_new_style_headers"
  3152.   
  3153. case "$enableval" in
  3154.     no) cat >> confdefs.h <<\EOF
  3155. #define _STLP_NO_NEW_STYLE_HEADERS 1
  3156. EOF
  3157.  
  3158.             echo "$ac_t""Config arg --disable-new-style-headers : not using new-style headers" 1>&6;;
  3159.      *) echo "$ac_t""Config default: using new-style headers" 1>&6
  3160. esac
  3161.  
  3162. else
  3163.   echo "$ac_t""Config default: using new-style headers" 1>&6
  3164.  
  3165. fi
  3166.  
  3167. else
  3168.  cat >> confdefs.h <<\EOF
  3169. #define _STLP_NO_NEW_STYLE_HEADERS 1
  3170. EOF
  3171.  
  3172. fi
  3173.  
  3174. if test "$ac_cv_newstreams" = yes; then
  3175. # Check whether --enable-new-iostreams or --disable-new-iostreams was given.
  3176. if test "${enable_new_iostreams+set}" = set; then
  3177.   enableval="$enable_new_iostreams"
  3178.   
  3179. case "$enableval" in
  3180.     no) cat >> confdefs.h <<\EOF
  3181. #define _STLP_NO_NEW_IOSTREAMS 1
  3182. EOF
  3183.  
  3184.             echo "$ac_t""Config arg --disable-new-iostreams : not using new iostreams" 1>&6;;
  3185.      *) echo "$ac_t""Config default: using new iostreams" 1>&6
  3186. esac
  3187.  
  3188. else
  3189.   echo "$ac_t""Config default: using new iostreams" 1>&6
  3190.  
  3191. fi
  3192.  
  3193. else
  3194.   cat >> confdefs.h <<\EOF
  3195. #define _STLP_NO_NEW_IOSTREAMS 1
  3196. EOF
  3197.  
  3198. fi
  3199.  
  3200. # Check whether --enable-sgi-allocators or --disable-sgi-allocators was given.
  3201. if test "${enable_sgi_allocators+set}" = set; then
  3202.   enableval="$enable_sgi_allocators"
  3203.   
  3204. case "$enableval" in
  3205.       yes ) echo "$ac_t""Config arg  --enable-sgi-allocators : SGI-style alloc as default allocator" 1>&6 
  3206.                 cat >> confdefs.h <<\EOF
  3207. #define _STLP_USE_RAW_SGI_ALLOCATORS 1
  3208. EOF
  3209. ;;
  3210.         * ) echo "$ac_t""Config default: using allocator<T> as default allocator if possible " 1>&6
  3211. esac
  3212.  
  3213. else
  3214.   
  3215.  echo "$ac_t""Config default: using allocator<T> as default allocator if possible" 1>&6
  3216.  
  3217.  
  3218. fi
  3219.  
  3220.  
  3221. # Check whether --enable-malloc or --disable-malloc was given.
  3222. if test "${enable_malloc+set}" = set; then
  3223.   enableval="$enable_malloc"
  3224.   
  3225. case "$enableval" in
  3226.       yes ) echo "$ac_t""Config arg  --enable-malloc : setting malloc_alloc as default alloc" 1>&6 
  3227.                 cat >> confdefs.h <<\EOF
  3228. #define _STLP_USE_MALLOC 1
  3229. EOF
  3230. ;;
  3231.         * ) echo "$ac_t""Config default: not using malloc_alloc as default alloc" 1>&6
  3232. esac
  3233.  
  3234. else
  3235.   
  3236.  echo "$ac_t""Config default: not using malloc_alloc as default alloc" 1>&6
  3237.  
  3238.  
  3239. fi
  3240.  
  3241.  
  3242. # Check whether --enable-newalloc or --disable-newalloc was given.
  3243. if test "${enable_newalloc+set}" = set; then
  3244.   enableval="$enable_newalloc"
  3245.   
  3246. case "$enableval" in
  3247.       yes ) echo "$ac_t""Config arg  --enable-newalloc : setting new_alloc as default alloc" 1>&6 
  3248.                 cat >> confdefs.h <<\EOF
  3249. #define _STLP_USE_NEWALLOC 1
  3250. EOF
  3251. ;;
  3252.         * )
  3253.                 echo "$ac_t""Config default: not using new_alloc as default alloc" 1>&6
  3254. esac
  3255.  
  3256. else
  3257.   
  3258.  echo "$ac_t""Config default: not using new_alloc as default alloc" 1>&6
  3259.  
  3260.  
  3261. fi
  3262.  
  3263.  
  3264. # Check whether --enable-defalloc or --disable-defalloc was given.
  3265. if test "${enable_defalloc+set}" = set; then
  3266.   enableval="$enable_defalloc"
  3267.   
  3268. case "$enableval" in
  3269.       no ) echo "$ac_t""Config arg --disable-defalloc : not including HP-style defalloc.h into alloc.h" 1>&6;;
  3270.  
  3271.       * ) echo "$ac_t""Config default : including HP-style defalloc.h into alloc.h" 1>&6 
  3272.                 cat >> confdefs.h <<\EOF
  3273. #define _STLP_USE_DEFALLOC 1
  3274. EOF
  3275.  
  3276. esac
  3277.  
  3278. else
  3279.   
  3280.           echo "$ac_t""Config default : not including HP-style defalloc.h into alloc.h" 1>&6
  3281.  
  3282.  
  3283. fi
  3284.  
  3285.  
  3286.  
  3287. # Check whether --enable-debugalloc or --disable-debugalloc was given.
  3288. if test "${enable_debugalloc+set}" = set; then
  3289.   enableval="$enable_debugalloc"
  3290.   
  3291. case "$enableval" in
  3292.       yes ) echo "$ac_t""Config arg --enable-debugalloc : use debug versions of allocators " 1>&6 
  3293.                 cat >> confdefs.h <<\EOF
  3294. #define _STLP_DEBUG_ALLOC 1
  3295. EOF
  3296. ;;
  3297.       * )
  3298.           echo "$ac_t""Config default : not using debug allocators" 1>&6
  3299. esac
  3300.  
  3301. else
  3302.   
  3303.           echo "$ac_t""Config default : not using debug allocators" 1>&6
  3304.  
  3305.  
  3306. fi
  3307.  
  3308.  
  3309.  
  3310. # Check whether --enable-abbrevs or --disable-abbrevs was given.
  3311. if test "${enable_abbrevs+set}" = set; then
  3312.   enableval="$enable_abbrevs"
  3313.   
  3314. case "$enableval" in
  3315.       yes ) echo "$ac_t""Config arg --enable-abbrevs : using abbreviated class names internally" 1>&6 
  3316.                 cat >> confdefs.h <<\EOF
  3317. #define _STLP_USE_ABBREVS 1
  3318. EOF
  3319. ;;
  3320.       * )
  3321.           echo "$ac_t""Config default : not using abbreviated class names internally" 1>&6
  3322. esac
  3323.  
  3324. else
  3325.   
  3326.           echo "$ac_t""Config default : not using abbreviated class names internally" 1>&6
  3327.  
  3328.  
  3329. fi
  3330.  
  3331.  
  3332.  
  3333. cat >> confdefs.h <<\EOF
  3334. #define __AUTO_CONFIGURED 1
  3335. EOF
  3336.  
  3337.  
  3338. echo "$ac_t""***" 1>&6
  3339. echo "$ac_t""$0: setting up headers..." 1>&6
  3340. echo "$ac_t""***" 1>&6
  3341. trap '' 1 2 15
  3342.  
  3343. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3344.  
  3345. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3346. # Let make expand exec_prefix.
  3347. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3348.  
  3349. # Any assignment to VPATH causes Sun make to only execute
  3350. # the first set of double-colon rules, so remove it if not needed.
  3351. # If there is a colon in the path, we need to keep it.
  3352. if test "x$srcdir" = x.; then
  3353.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3354. fi
  3355.  
  3356. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3357.  
  3358. DEFS=-DHAVE_CONFIG_H
  3359.  
  3360. # Without the "./", some shells look in PATH for config.status.
  3361. : ${CONFIG_STATUS=./config.status}
  3362.  
  3363. echo creating $CONFIG_STATUS
  3364. rm -f $CONFIG_STATUS
  3365. cat > $CONFIG_STATUS <<EOF
  3366. #! /bin/sh
  3367. # Generated automatically by configure.
  3368. # Run this file to recreate the current configuration.
  3369. # This directory was configured as follows,
  3370. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3371. #
  3372. # $0 $ac_configure_args
  3373. #
  3374. # Compiler output produced by configure, useful for debugging
  3375. # configure, is in ./config.log if it exists.
  3376.  
  3377. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3378. for ac_option
  3379. do
  3380.   case "\$ac_option" in
  3381.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3382.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3383.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3384.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3385.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  3386.     exit 0 ;;
  3387.   -help | --help | --hel | --he | --h)
  3388.     echo "\$ac_cs_usage"; exit 0 ;;
  3389.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3390.   esac
  3391. done
  3392.  
  3393. ac_given_srcdir=$srcdir
  3394.  
  3395. trap 'rm -fr `echo "stlconf.h stlconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3396. EOF
  3397. cat >> $CONFIG_STATUS <<EOF
  3398.  
  3399. # Protect against being on the right side of a sed subst in config.status.
  3400. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3401.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3402. $ac_vpsub
  3403. $extrasub
  3404. s%@CFLAGS@%$CFLAGS%g
  3405. s%@CPPFLAGS@%$CPPFLAGS%g
  3406. s%@CXXFLAGS@%$CXXFLAGS%g
  3407. s%@DEFS@%$DEFS%g
  3408. s%@LDFLAGS@%$LDFLAGS%g
  3409. s%@LIBS@%$LIBS%g
  3410. s%@exec_prefix@%$exec_prefix%g
  3411. s%@prefix@%$prefix%g
  3412. s%@program_transform_name@%$program_transform_name%g
  3413. s%@bindir@%$bindir%g
  3414. s%@sbindir@%$sbindir%g
  3415. s%@libexecdir@%$libexecdir%g
  3416. s%@datadir@%$datadir%g
  3417. s%@sysconfdir@%$sysconfdir%g
  3418. s%@sharedstatedir@%$sharedstatedir%g
  3419. s%@localstatedir@%$localstatedir%g
  3420. s%@libdir@%$libdir%g
  3421. s%@includedir@%$includedir%g
  3422. s%@oldincludedir@%$oldincludedir%g
  3423. s%@infodir@%$infodir%g
  3424. s%@mandir@%$mandir%g
  3425. s%@CXX@%$CXX%g
  3426.  
  3427. CEOF
  3428. EOF
  3429.  
  3430. cat >> $CONFIG_STATUS <<\EOF
  3431.  
  3432. # Split the substitutions into bite-sized pieces for seds with
  3433. # small command number limits, like on Digital OSF/1 and HP-UX.
  3434. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  3435. ac_file=1 # Number of current file.
  3436. ac_beg=1 # First line for current file.
  3437. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  3438. ac_more_lines=:
  3439. ac_sed_cmds=""
  3440. while $ac_more_lines; do
  3441.   if test $ac_beg -gt 1; then
  3442.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  3443.   else
  3444.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  3445.   fi
  3446.   if test ! -s conftest.s$ac_file; then
  3447.     ac_more_lines=false
  3448.     rm -f conftest.s$ac_file
  3449.   else
  3450.     if test -z "$ac_sed_cmds"; then
  3451.       ac_sed_cmds="sed -f conftest.s$ac_file"
  3452.     else
  3453.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  3454.     fi
  3455.     ac_file=`expr $ac_file + 1`
  3456.     ac_beg=$ac_end
  3457.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  3458.   fi
  3459. done
  3460. if test -z "$ac_sed_cmds"; then
  3461.   ac_sed_cmds=cat
  3462. fi
  3463. EOF
  3464.  
  3465. cat >> $CONFIG_STATUS <<EOF
  3466.  
  3467. CONFIG_FILES=\${CONFIG_FILES-"stlconf.h"}
  3468. EOF
  3469. cat >> $CONFIG_STATUS <<\EOF
  3470. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3471.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3472.   case "$ac_file" in
  3473.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3474.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3475.   *) ac_file_in="${ac_file}.in" ;;
  3476.   esac
  3477.  
  3478.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  3479.  
  3480.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3481.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3482.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3483.     # The file is in a subdirectory.
  3484.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3485.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3486.     # A "../" for each directory in $ac_dir_suffix.
  3487.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3488.   else
  3489.     ac_dir_suffix= ac_dots=
  3490.   fi
  3491.  
  3492.   case "$ac_given_srcdir" in
  3493.   .)  srcdir=.
  3494.       if test -z "$ac_dots"; then top_srcdir=.
  3495.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3496.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3497.   *) # Relative path.
  3498.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3499.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3500.   esac
  3501.  
  3502.  
  3503.   echo creating "$ac_file"
  3504.   rm -f "$ac_file"
  3505.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3506.   case "$ac_file" in
  3507.   *Makefile*) ac_comsub="1i\\
  3508. # $configure_input" ;;
  3509.   *) ac_comsub= ;;
  3510.   esac
  3511.  
  3512.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3513.   sed -e "$ac_comsub
  3514. s%@configure_input@%$configure_input%g
  3515. s%@srcdir@%$srcdir%g
  3516. s%@top_srcdir@%$top_srcdir%g
  3517. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3518. fi; done
  3519. rm -f conftest.s*
  3520.  
  3521. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3522. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3523. #
  3524. # ac_d sets the value in "#define NAME VALUE" lines.
  3525. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3526. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3527. ac_dC='\3'
  3528. ac_dD='%g'
  3529. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3530. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3531. ac_uB='\([     ]\)%\1#\2define\3'
  3532. ac_uC=' '
  3533. ac_uD='\4%g'
  3534. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3535. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3536. ac_eB='$%\1#\2define\3'
  3537. ac_eC=' '
  3538. ac_eD='%g'
  3539.  
  3540. if test "${CONFIG_HEADERS+set}" != set; then
  3541. EOF
  3542. cat >> $CONFIG_STATUS <<EOF
  3543.   CONFIG_HEADERS="stlconf.h"
  3544. EOF
  3545. cat >> $CONFIG_STATUS <<\EOF
  3546. fi
  3547. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3548.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3549.   case "$ac_file" in
  3550.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3551.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3552.   *) ac_file_in="${ac_file}.in" ;;
  3553.   esac
  3554.  
  3555.   echo creating $ac_file
  3556.  
  3557.   rm -f conftest.frag conftest.in conftest.out
  3558.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3559.   cat $ac_file_inputs > conftest.in
  3560.  
  3561. EOF
  3562.  
  3563. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3564. # the proper values into config.h.in to produce config.h.  And first:
  3565. # Protect against being on the right side of a sed subst in config.status.
  3566. # Protect against being in an unquoted here document in config.status.
  3567. rm -f conftest.vals
  3568. cat > conftest.hdr <<\EOF
  3569. s/[\\&%]/\\&/g
  3570. s%[\\$`]%\\&%g
  3571. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3572. s%ac_d%ac_u%gp
  3573. s%ac_u%ac_e%gp
  3574. EOF
  3575. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3576. rm -f conftest.hdr
  3577.  
  3578. # This sed command replaces #undef with comments.  This is necessary, for
  3579. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3580. # on some systems where configure will not decide to define it.
  3581. cat >> conftest.vals <<\EOF
  3582. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3583. EOF
  3584.  
  3585. # Break up conftest.vals because some shells have a limit on
  3586. # the size of here documents, and old seds have small limits too.
  3587.  
  3588. rm -f conftest.tail
  3589. while :
  3590. do
  3591.   ac_lines=`grep -c . conftest.vals`
  3592.   # grep -c gives empty output for an empty file on some AIX systems.
  3593.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3594.   # Write a limited-size here document to conftest.frag.
  3595.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3596.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3597.   echo 'CEOF
  3598.   sed -f conftest.frag conftest.in > conftest.out
  3599.   rm -f conftest.in
  3600.   mv conftest.out conftest.in
  3601. ' >> $CONFIG_STATUS
  3602.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3603.   rm -f conftest.vals
  3604.   mv conftest.tail conftest.vals
  3605. done
  3606. rm -f conftest.vals
  3607.  
  3608. cat >> $CONFIG_STATUS <<\EOF
  3609.   rm -f conftest.frag conftest.h
  3610.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3611.   cat conftest.in >> conftest.h
  3612.   rm -f conftest.in
  3613.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3614.     echo "$ac_file is unchanged"
  3615.     rm -f conftest.h
  3616.   else
  3617.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3618.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3619.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3620.       # The file is in a subdirectory.
  3621.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3622.     fi
  3623.     rm -f $ac_file
  3624.     mv conftest.h $ac_file
  3625.   fi
  3626. fi; done
  3627.  
  3628. EOF
  3629. cat >> $CONFIG_STATUS <<EOF
  3630.  
  3631. EOF
  3632. cat >> $CONFIG_STATUS <<\EOF
  3633.  
  3634. exit 0
  3635. EOF
  3636. chmod +x $CONFIG_STATUS
  3637. rm -fr confdefs* $ac_clean_files
  3638. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3639.  
  3640. echo "$ac_t""***" 1>&6
  3641. echo "$ac_t""$0: STLport configured for use with \"${CXX}\" compiler" 1>&6
  3642. echo "$ac_t""$0: To restore original settings - run \"./unconfigure\" or copy stlconf.h.in to stlconf.h." 1>&6
  3643. echo "$ac_t""***" 1>&6
  3644.  
  3645.