home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August / Chip_2001-08_cd1.bin / zkuste / linux / bin / mozilla-source-0.9.1.tar.bz2 / mozilla-source-0.9.1.tar / mozilla / configure < prev    next >
Text File  |  2001-05-29  |  400KB  |  14,179 lines

  1. #! /bin/sh
  2.  
  3. # Read in '.mozconfig' script to set the initial options.
  4. # See the mozconfig2configure script for more details.
  5. _AUTOCONF_TOOLS_DIR=`dirname $0`/./build/autoconf
  6. . $_AUTOCONF_TOOLS_DIR/mozconfig2configure
  7.  
  8. # Guess values for system-dependent variables and create Makefiles.
  9. # Generated automatically using autoconf version 2.13 
  10. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  11. #
  12. # This configure script is free software; the Free Software Foundation
  13. # gives unlimited permission to copy, distribute and modify it.
  14.  
  15. # Defaults:
  16. ac_help=
  17. ac_default_prefix=/usr/local
  18. # Any additions from configure.in:
  19. ac_default_prefix=`pwd`/dist
  20. ac_help="$ac_help
  21.   --disable-gcc-pipe      Disable -pipe check for gcc"
  22. ac_help="$ac_help
  23.   --with-x                use the X Window System"
  24. ac_help="$ac_help
  25.   --enable-toolkit=\$val   Enable \$val fe (defaults to gtk)"
  26. ac_help="$ac_help
  27.   --with-nspr-prefix=PFX  Prefix where NSPR is installed"
  28. ac_help="$ac_help
  29.   --with-nspr-exec-prefix=PFX
  30.                           Exec prefix where NSPR is installed"
  31. ac_help="$ac_help
  32.   --enable-xinerama       Enable Xinerama support
  33.                            ( not safe for Red Hat 7.0 ) "
  34. ac_help="$ac_help
  35.   --with-gtk              Enable GTK+ support "
  36. ac_help="$ac_help
  37.   --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)"
  38. ac_help="$ac_help
  39.   --with-gtk-exec-prefix=PFX 
  40.                           Exec prefix where GTK is installed (optional)"
  41. ac_help="$ac_help
  42.   --disable-gtktest       Do not try to compile and run a test GTK program"
  43. ac_help="$ac_help
  44.   --with-gdk-pixbuf-prefix=PFX   Prefix where GDK_PIXBUF is installed (optional)"
  45. ac_help="$ac_help
  46.   --with-gdk-pixbuf-exec-prefix=PFX Exec prefix where GDK_PIXBUF is installed (optional)"
  47. ac_help="$ac_help
  48.   --disable-gdk_pixbuftest       Do not try to compile and run a test GDK_PIXBUF program"
  49. ac_help="$ac_help
  50.   --with-java-supplement  Enable Blackwood Java Code"
  51. ac_help="$ac_help
  52.   --with-gle              GLE support (for debugging gtk widgets) "
  53. ac_help="$ac_help
  54.   --with-static-gtk       Link GTK statically if possible"
  55. ac_help="$ac_help
  56.   --with-xprint           Enable Xprint support "
  57. ac_help="$ac_help
  58.   --with-motif            Enable Motif support "
  59. ac_help="$ac_help
  60.   --with-static-motif     Link Motif statically if possible"
  61. ac_help="$ac_help
  62.   --with-xlib             Enable xlib support "
  63. ac_help="$ac_help
  64.   --with-qt               Enable Qt support "
  65. ac_help="$ac_help
  66.   --with-qtdir=\$dir       Specify Qt directory "
  67. ac_help="$ac_help
  68.   --with-static-qt        Link qt statically if possible"
  69. ac_help="$ac_help
  70.   --without-libIDL        Skip check for libIDL"
  71. ac_help="$ac_help
  72.   --with-libIDL-prefix=PFX
  73.                           Prefix where libIDL is installed (optional)"
  74. ac_help="$ac_help
  75.   --with-libIDL-exec-prefix=PFX
  76.                           Exec prefix where libIDL is installed (optional)"
  77. ac_help="$ac_help
  78.   --disable-libIDLtest    Do not try to compile and run a test libIDL program"
  79. ac_help="$ac_help
  80.   --with-glib-prefix=PFX  Prefix where GLIB is installed (optional)"
  81. ac_help="$ac_help
  82.   --with-glib-exec-prefix=PFX
  83.                           Exec prefix where GLIB is installed (optional)"
  84. ac_help="$ac_help
  85.   --disable-glibtest      Do not try to compile and run a test GLIB program"
  86. ac_help="$ac_help
  87.   --with-glib-prefix=PFX  Prefix where GLIB is installed (optional)"
  88. ac_help="$ac_help
  89.   --with-glib-exec-prefix=PFX
  90.                           Exec prefix where GLIB is installed (optional)"
  91. ac_help="$ac_help
  92.   --disable-glibtest      Do not try to compile and run a test GLIB program"
  93. ac_help="$ac_help
  94.   --with-pthreads         Force use of system pthread library with NSPR "
  95. ac_help="$ac_help
  96.   --disable-async-dns     Disable separate dns thread"
  97. ac_help="$ac_help
  98.   --disable-logging       Disable logging facilities"
  99. ac_help="$ac_help
  100.   --disable-build-xpfe    Disable building of mozilla/xpfe (BROKEN)"
  101. ac_help="$ac_help
  102.   --disable-mailnews      Disable building of mail & news components"
  103. ac_help="$ac_help
  104.   --disable-editor-api-log
  105.                           Disable editor logging"
  106. ac_help="$ac_help
  107.   --disable-ender-lite    Disable new lightweight text control frames"
  108. ac_help="$ac_help
  109.   --enable-trace-malloc   Enable malloc tracing"
  110. ac_help="$ac_help
  111.   --enable-reflow-perf    Enable reflow performance tracing"
  112. ac_help="$ac_help
  113.   --disable-tests         Do not build tests libraries & programs"
  114. ac_help="$ac_help
  115.   --disable-bidi           Disable bi-directional support"
  116. ac_help="$ac_help
  117.   --enable-monolithic-toolkit
  118.                           Link the toolkit into the app"
  119. ac_help="$ac_help
  120.   --enable-modules        Enable standalone build of specific modules"
  121. ac_help="$ac_help
  122.   --disable-pic-dso-cflags
  123.                           Do not generate PIC for shared libs"
  124. ac_help="$ac_help
  125.   --enable-crash-on-assert
  126.                           Make NS_ASSERTION crash on Unix"
  127. ac_help="$ac_help
  128.   --enable-lea            Enable Lea malloc "
  129. ac_help="$ac_help
  130.   --enable-optimize(=val) Enable compiler optimizations (val, ie. -O2) "
  131. ac_help="$ac_help
  132.   --disable-debug         Disable building with debug info"
  133. ac_help="$ac_help
  134.   --enable-strip-libs     Enable stripping of .so and .a libs "
  135. ac_help="$ac_help
  136.   --enable-elf-dynstr-gc  Enable elf dynstr garbage collector (opt builds only)"
  137. ac_help="$ac_help
  138.   --with-default-mozilla-five-home
  139.                           Set the default value for MOZILLA_FIVE_HOME"
  140. ac_help="$ac_help
  141.   --with-debug-modules    Enable/disable debug info for specific modules"
  142. ac_help="$ac_help
  143.   --with-dbgrinfo-modules Enable/disable debugger info for specific modules"
  144. ac_help="$ac_help
  145.   --enable-crypto         Enable crypto (Personal Security Manager)"
  146. ac_help="$ac_help
  147.   --enable-jsd            Enable JavaScript debug library"
  148. ac_help="$ac_help
  149.   --with-extensions       Enable extensions (dirs in extensions/)"
  150. ac_help="$ac_help
  151.   --disable-jar-packaging Disable jar packaging of chrome (Deprecated) "
  152. ac_help="$ac_help
  153.   --enable-chrome-format=[jar|flat|both]
  154.                           Select format of chrome files (defaults to jar)"
  155. ac_help="$ac_help
  156.   --disable-auto-deps     Do not automatically generate dependency info"
  157. ac_help="$ac_help
  158.   --disable-md            Do not use compiler-based dependencies "
  159. ac_help="$ac_help
  160.   --disable-pedantic      Issue all warnings demanded by strict ANSI C "
  161. ac_help="$ac_help
  162.   --enable-long-long-warning
  163.                           Pass -Wno-long-long to the compiler"
  164. ac_help="$ac_help
  165.   --disable-shared        Disable building of internal shared libs (BROKEN)"
  166. ac_help="$ac_help
  167.   --enable-cpp-rtti       Enable C++ RTTI "
  168. ac_help="$ac_help
  169.   --enable-cpp-exceptions Enable C++ exceptions "
  170. ac_help="$ac_help
  171.   --enable-ultrasparc     Enable UltraSPARC specific compiler options "
  172. ac_help="$ac_help
  173.   --enable-eazel-profiler Enable Corel/Eazel profiler"
  174. ac_help="$ac_help
  175.   --with-profile-modules  Enable/disable profiling for specific modules"
  176. ac_help="$ac_help
  177.   --enable-perf-metrics   Enable performance metrics"
  178. ac_help="$ac_help
  179.   --enable-insure         Enable insure++ instrumentation (linux only)"
  180. ac_help="$ac_help
  181.   --with-insure-dirs=\$dirs
  182.                           Dirs to instrument with insure "
  183. ac_help="$ac_help
  184.   --with-insure-exclude-dirs=\$dirs
  185.                           Dirs to not instrument with insure "
  186. ac_help="$ac_help
  187.   --enable-boehm          Enable the Boehm Garbage Collector"
  188. ac_help="$ac_help
  189.   --enable-logrefcnt      Enable Logging of refcounts (default=debug) "
  190. ac_help="$ac_help
  191.   --enable-leaky          Enable leaky memory tool"
  192. ac_help="$ac_help
  193.   --enable-jprof          Enable jprof profiling tool (pull tools/jprof)"
  194. ac_help="$ac_help
  195.   --enable-xpctools       Build JS profiling tool"
  196. ac_help="$ac_help
  197.   --enable-detect-webshell-leaks
  198.                           Enable detection of webshell leaks 
  199.                           (default=yes, unless --disable-debug is used)"
  200. ac_help="$ac_help
  201.   --disable-double-buffer Disable double buffering"
  202. ac_help="$ac_help
  203.   --enable-wrap-malloc    Wrap malloc calls (gnu linker only)"
  204. ac_help="$ac_help
  205.   --with-wrap-malloc=\$dir Location of malloc wrapper library"
  206. ac_help="$ac_help
  207.   --enable-efence         Link with Electric Fence"
  208. ac_help="$ac_help
  209.   --enable-homedir=\$val   Set the homedir to \$val"
  210. ac_help="$ac_help
  211.   --enable-idlc           Build idl tool "
  212. ac_help="$ac_help
  213.   --enable-xterm-updates  Update XTERM titles with current command."
  214. ac_help="$ac_help
  215.   --disable-ldap          Disable LDAP support"
  216. ac_help="$ac_help
  217.   --enable-ldap-experimental
  218.                           Enable LDAP experimental features"
  219. ac_help="$ac_help
  220.   --disable-xul           Disable XUL "
  221. ac_help="$ac_help
  222.   --enable-mathml         Enable MathML "
  223. ac_help="$ac_help
  224.   --enable-svg            Enable SVG "
  225. ac_help="$ac_help
  226.   --disable-verbose-config-defs
  227.                           Do not output the contents of config-defs.h"
  228. ac_help="$ac_help
  229.   --disable-new-cache     Disable new cache"
  230. ac_help="$ac_help
  231.   --disable-libpr0n       Disable new imagelib"
  232. ac_help="$ac_help
  233.   --disable-dtd-debug     Disable some DTD debuggin code in the parser)"
  234. ac_help="$ac_help
  235.   --with-os2emx=\$val      Build for OS/2 with emx+gcc, set to OMF or A.OUT"
  236. ac_help="$ac_help
  237.   --with-os2vacpp         Build for OS/2 with VAC++"
  238. ac_help="$ac_help
  239.   --enable-static         Enable building of internal static libs (BROKEN)"
  240. ac_help="$ac_help
  241.   --enable-static-components
  242.                           Build meta-component from specific components"
  243. ac_help="$ac_help
  244.   --with-jpeg[=\$dir]      Use system libjpeg [installed at prefix \$dir]"
  245. ac_help="$ac_help
  246.   --with-zlib[=\$dir]      Use system libz [installed at prefix \$dir]"
  247. ac_help="$ac_help
  248.   --with-png[=\$dir]       Use system libpng [installed at prefix \$dir]"
  249. ac_help="$ac_help
  250.   --with-mng[=\$dir]       Use system libmng [installed at prefix \$dir]"
  251. ac_help="$ac_help
  252.   --enable-fullcircle     Enable FullCircle/Talkback support"
  253. ac_help="$ac_help
  254.   --with-fullcircle=\$dir  Location of FullCircle headers and libraries"
  255.  
  256. # Initialize some variables set by options.
  257. # The variables have the same names as the options, with
  258. # dashes changed to underlines.
  259. build=NONE
  260. cache_file=./config.cache
  261. exec_prefix=NONE
  262. host=NONE
  263. no_create=
  264. nonopt=NONE
  265. no_recursion=
  266. prefix=NONE
  267. program_prefix=NONE
  268. program_suffix=NONE
  269. program_transform_name=s,x,x,
  270. silent=
  271. site=
  272. srcdir=
  273. target=NONE
  274. verbose=
  275. x_includes=NONE
  276. x_libraries=NONE
  277. bindir='${exec_prefix}/bin'
  278. sbindir='${exec_prefix}/sbin'
  279. libexecdir='${exec_prefix}/libexec'
  280. datadir='${prefix}/share'
  281. sysconfdir='${prefix}/etc'
  282. sharedstatedir='${prefix}/com'
  283. localstatedir='${prefix}/var'
  284. libdir='${exec_prefix}/lib'
  285. includedir='${prefix}/include'
  286. oldincludedir='/usr/include'
  287. infodir='${prefix}/info'
  288. mandir='${prefix}/man'
  289.  
  290. # Initialize some other variables.
  291. subdirs=
  292. MFLAGS= MAKEFLAGS=
  293. SHELL=${CONFIG_SHELL-/bin/sh}
  294. # Maximum number of lines to put in a shell here document.
  295. ac_max_here_lines=12
  296.  
  297. ac_prev=
  298. for ac_option
  299. do
  300.  
  301.   # If the previous option needs an argument, assign it.
  302.   if test -n "$ac_prev"; then
  303.     eval "$ac_prev=\$ac_option"
  304.     ac_prev=
  305.     continue
  306.   fi
  307.  
  308.   case "$ac_option" in
  309.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  310.   *) ac_optarg= ;;
  311.   esac
  312.  
  313.   # Accept the important Cygnus configure options, so we can diagnose typos.
  314.  
  315.   case "$ac_option" in
  316.  
  317.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  318.     ac_prev=bindir ;;
  319.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  320.     bindir="$ac_optarg" ;;
  321.  
  322.   -build | --build | --buil | --bui | --bu)
  323.     ac_prev=build ;;
  324.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  325.     build="$ac_optarg" ;;
  326.  
  327.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  328.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  329.     ac_prev=cache_file ;;
  330.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  331.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  332.     cache_file="$ac_optarg" ;;
  333.  
  334.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  335.     ac_prev=datadir ;;
  336.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  337.   | --da=*)
  338.     datadir="$ac_optarg" ;;
  339.  
  340.   -disable-* | --disable-*)
  341.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  342.     # Reject names that are not valid shell variable names.
  343.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  344.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  345.     fi
  346.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  347.     eval "enable_${ac_feature}=no" ;;
  348.  
  349.   -enable-* | --enable-*)
  350.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  351.     # Reject names that are not valid shell variable names.
  352.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  353.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  354.     fi
  355.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  356.     case "$ac_option" in
  357.       *=*) ;;
  358.       *) ac_optarg=yes ;;
  359.     esac
  360.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  361.  
  362.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  363.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  364.   | --exec | --exe | --ex)
  365.     ac_prev=exec_prefix ;;
  366.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  367.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  368.   | --exec=* | --exe=* | --ex=*)
  369.     exec_prefix="$ac_optarg" ;;
  370.  
  371.   -gas | --gas | --ga | --g)
  372.     # Obsolete; use --with-gas.
  373.     with_gas=yes ;;
  374.  
  375.   -help | --help | --hel | --he)
  376.     # Omit some internal or obsolete options to make the list less imposing.
  377.     # This message is too long to be a string in the A/UX 3.1 sh.
  378.     cat << EOF
  379. Usage: configure [options] [host]
  380. Options: [defaults in brackets after descriptions]
  381. Configuration:
  382.   --cache-file=FILE       cache test results in FILE
  383.   --help                  print this message
  384.   --no-create             do not create output files
  385.   --quiet, --silent       do not print \`checking...' messages
  386.   --version               print the version of autoconf that created configure
  387. Directory and file names:
  388.   --prefix=PREFIX         install architecture-independent files in PREFIX
  389.                           [$ac_default_prefix]
  390.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  391.                           [same as prefix]
  392.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  393.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  394.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  395.   --datadir=DIR           read-only architecture-independent data in DIR
  396.                           [PREFIX/share]
  397.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  398.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  399.                           [PREFIX/com]
  400.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  401.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  402.   --includedir=DIR        C header files in DIR [PREFIX/include]
  403.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  404.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  405.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  406.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  407.   --program-prefix=PREFIX prepend PREFIX to installed program names
  408.   --program-suffix=SUFFIX append SUFFIX to installed program names
  409.   --program-transform-name=PROGRAM
  410.                           run sed PROGRAM on installed program names
  411. EOF
  412.     cat << EOF
  413. Host type:
  414.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  415.   --host=HOST             configure for HOST [guessed]
  416.   --target=TARGET         configure for TARGET [TARGET=HOST]
  417. Features and packages:
  418.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  419.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  420.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  421.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  422.   --x-includes=DIR        X include files are in DIR
  423.   --x-libraries=DIR       X library files are in DIR
  424. EOF
  425.     if test -n "$ac_help"; then
  426.       echo "--enable and --with options recognized:$ac_help"
  427.     fi
  428.     exit 0 ;;
  429.  
  430.   -host | --host | --hos | --ho)
  431.     ac_prev=host ;;
  432.   -host=* | --host=* | --hos=* | --ho=*)
  433.     host="$ac_optarg" ;;
  434.  
  435.   -includedir | --includedir | --includedi | --included | --include \
  436.   | --includ | --inclu | --incl | --inc)
  437.     ac_prev=includedir ;;
  438.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  439.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  440.     includedir="$ac_optarg" ;;
  441.  
  442.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  443.     ac_prev=infodir ;;
  444.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  445.     infodir="$ac_optarg" ;;
  446.  
  447.   -libdir | --libdir | --libdi | --libd)
  448.     ac_prev=libdir ;;
  449.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  450.     libdir="$ac_optarg" ;;
  451.  
  452.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  453.   | --libexe | --libex | --libe)
  454.     ac_prev=libexecdir ;;
  455.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  456.   | --libexe=* | --libex=* | --libe=*)
  457.     libexecdir="$ac_optarg" ;;
  458.  
  459.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  460.   | --localstate | --localstat | --localsta | --localst \
  461.   | --locals | --local | --loca | --loc | --lo)
  462.     ac_prev=localstatedir ;;
  463.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  464.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  465.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  466.     localstatedir="$ac_optarg" ;;
  467.  
  468.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  469.     ac_prev=mandir ;;
  470.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  471.     mandir="$ac_optarg" ;;
  472.  
  473.   -nfp | --nfp | --nf)
  474.     # Obsolete; use --without-fp.
  475.     with_fp=no ;;
  476.  
  477.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  478.   | --no-cr | --no-c)
  479.     no_create=yes ;;
  480.  
  481.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  482.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  483.     no_recursion=yes ;;
  484.  
  485.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  486.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  487.   | --oldin | --oldi | --old | --ol | --o)
  488.     ac_prev=oldincludedir ;;
  489.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  490.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  491.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  492.     oldincludedir="$ac_optarg" ;;
  493.  
  494.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  495.     ac_prev=prefix ;;
  496.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  497.     prefix="$ac_optarg" ;;
  498.  
  499.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  500.   | --program-pre | --program-pr | --program-p)
  501.     ac_prev=program_prefix ;;
  502.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  503.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  504.     program_prefix="$ac_optarg" ;;
  505.  
  506.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  507.   | --program-suf | --program-su | --program-s)
  508.     ac_prev=program_suffix ;;
  509.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  510.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  511.     program_suffix="$ac_optarg" ;;
  512.  
  513.   -program-transform-name | --program-transform-name \
  514.   | --program-transform-nam | --program-transform-na \
  515.   | --program-transform-n | --program-transform- \
  516.   | --program-transform | --program-transfor \
  517.   | --program-transfo | --program-transf \
  518.   | --program-trans | --program-tran \
  519.   | --progr-tra | --program-tr | --program-t)
  520.     ac_prev=program_transform_name ;;
  521.   -program-transform-name=* | --program-transform-name=* \
  522.   | --program-transform-nam=* | --program-transform-na=* \
  523.   | --program-transform-n=* | --program-transform-=* \
  524.   | --program-transform=* | --program-transfor=* \
  525.   | --program-transfo=* | --program-transf=* \
  526.   | --program-trans=* | --program-tran=* \
  527.   | --progr-tra=* | --program-tr=* | --program-t=*)
  528.     program_transform_name="$ac_optarg" ;;
  529.  
  530.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  531.   | -silent | --silent | --silen | --sile | --sil)
  532.     silent=yes ;;
  533.  
  534.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  535.     ac_prev=sbindir ;;
  536.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  537.   | --sbi=* | --sb=*)
  538.     sbindir="$ac_optarg" ;;
  539.  
  540.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  541.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  542.   | --sharedst | --shareds | --shared | --share | --shar \
  543.   | --sha | --sh)
  544.     ac_prev=sharedstatedir ;;
  545.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  546.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  547.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  548.   | --sha=* | --sh=*)
  549.     sharedstatedir="$ac_optarg" ;;
  550.  
  551.   -site | --site | --sit)
  552.     ac_prev=site ;;
  553.   -site=* | --site=* | --sit=*)
  554.     site="$ac_optarg" ;;
  555.  
  556.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  557.     ac_prev=srcdir ;;
  558.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  559.     srcdir="$ac_optarg" ;;
  560.  
  561.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  562.   | --syscon | --sysco | --sysc | --sys | --sy)
  563.     ac_prev=sysconfdir ;;
  564.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  565.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  566.     sysconfdir="$ac_optarg" ;;
  567.  
  568.   -target | --target | --targe | --targ | --tar | --ta | --t)
  569.     ac_prev=target ;;
  570.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  571.     target="$ac_optarg" ;;
  572.  
  573.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  574.     verbose=yes ;;
  575.  
  576.   -version | --version | --versio | --versi | --vers)
  577.     echo "configure generated by autoconf version 2.13"
  578.     exit 0 ;;
  579.  
  580.   -with-* | --with-*)
  581.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  582.     # Reject names that are not valid shell variable names.
  583.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  584.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  585.     fi
  586.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  587.     case "$ac_option" in
  588.       *=*) ;;
  589.       *) ac_optarg=yes ;;
  590.     esac
  591.     eval "with_${ac_package}='$ac_optarg'" ;;
  592.  
  593.   -without-* | --without-*)
  594.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  595.     # Reject names that are not valid shell variable names.
  596.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  597.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  598.     fi
  599.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  600.     eval "with_${ac_package}=no" ;;
  601.  
  602.   --x)
  603.     # Obsolete; use --with-x.
  604.     with_x=yes ;;
  605.  
  606.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  607.   | --x-incl | --x-inc | --x-in | --x-i)
  608.     ac_prev=x_includes ;;
  609.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  610.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  611.     x_includes="$ac_optarg" ;;
  612.  
  613.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  614.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  615.     ac_prev=x_libraries ;;
  616.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  617.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  618.     x_libraries="$ac_optarg" ;;
  619.  
  620.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  621.     ;;
  622.  
  623.   *)
  624.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  625.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  626.     fi
  627.     if test "x$nonopt" != xNONE; then
  628.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  629.     fi
  630.     nonopt="$ac_option"
  631.     ;;
  632.  
  633.   esac
  634. done
  635.  
  636. if test -n "$ac_prev"; then
  637.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  638. fi
  639.  
  640. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  641.  
  642. # File descriptor usage:
  643. # 0 standard input
  644. # 1 file creation
  645. # 2 errors and warnings
  646. # 3 some systems may open it to /dev/tty
  647. # 4 used on the Kubota Titan
  648. # 6 checking for... messages and results
  649. # 5 compiler messages saved in config.log
  650. if test "$silent" = yes; then
  651.   exec 6>/dev/null
  652. else
  653.   exec 6>&1
  654. fi
  655. exec 5>./config.log
  656.  
  657. echo "\
  658. This file contains any messages produced by compilers while
  659. running configure, to aid debugging if configure makes a mistake.
  660. " 1>&5
  661.  
  662. # Strip out --no-create and --no-recursion so they do not pile up.
  663. # Also quote any args containing shell metacharacters.
  664. ac_configure_args=
  665. for ac_arg
  666. do
  667.   case "$ac_arg" in
  668.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  669.   | --no-cr | --no-c) ;;
  670.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  671.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  672.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  673.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  674.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  675.   esac
  676. done
  677.  
  678. # NLS nuisances.
  679. # Only set these to C if already set.  These must not be set unconditionally
  680. # because not all systems understand e.g. LANG=C (notably SCO).
  681. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  682. # Non-C LC_CTYPE values break the ctype check.
  683. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  684. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  685. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  686. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  687.  
  688. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  689. rm -rf conftest* confdefs.h
  690. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  691. echo > confdefs.h
  692.  
  693. # A filename unique to this package, relative to the directory that
  694. # configure is in, which we can look for to find out if srcdir is correct.
  695. ac_unique_file=config/config.mk
  696.  
  697. # Find the source files, if location was not specified.
  698. if test -z "$srcdir"; then
  699.   ac_srcdir_defaulted=yes
  700.   # Try the directory containing this script, then its parent.
  701.   ac_prog=$0
  702.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  703.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  704.   srcdir=$ac_confdir
  705.   if test ! -r $srcdir/$ac_unique_file; then
  706.     srcdir=..
  707.   fi
  708. else
  709.   ac_srcdir_defaulted=no
  710. fi
  711. if test ! -r $srcdir/$ac_unique_file; then
  712.   if test "$ac_srcdir_defaulted" = yes; then
  713.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  714.   else
  715.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  716.   fi
  717. fi
  718. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  719.  
  720. # Prefer explicitly selected file to automatically selected ones.
  721. if test -z "$CONFIG_SITE"; then
  722.   if test "x$prefix" != xNONE; then
  723.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  724.   else
  725.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  726.   fi
  727. fi
  728. for ac_site_file in $CONFIG_SITE; do
  729.   if test -r "$ac_site_file"; then
  730.     echo "loading site script $ac_site_file"
  731.     . "$ac_site_file"
  732.   fi
  733. done
  734.  
  735. if test -r "$cache_file"; then
  736.   echo "loading cache $cache_file"
  737.   . $cache_file
  738. else
  739.   echo "creating cache $cache_file"
  740.   > $cache_file
  741. fi
  742.  
  743. ac_ext=c
  744. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  745. ac_cpp='$CPP $CPPFLAGS'
  746. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  747. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  748. cross_compiling=$ac_cv_prog_cc_cross
  749.  
  750. ac_exeext=
  751. ac_objext=o
  752. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  753.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  754.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  755.     ac_n= ac_c='
  756. ' ac_t='    '
  757.   else
  758.     ac_n=-n ac_c= ac_t=
  759.   fi
  760. else
  761.   ac_n= ac_c='\c' ac_t=
  762. fi
  763.  
  764.  
  765. ac_aux_dir=
  766. for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
  767.   if test -f $ac_dir/install-sh; then
  768.     ac_aux_dir=$ac_dir
  769.     ac_install_sh="$ac_aux_dir/install-sh -c"
  770.     break
  771.   elif test -f $ac_dir/install.sh; then
  772.     ac_aux_dir=$ac_dir
  773.     ac_install_sh="$ac_aux_dir/install.sh -c"
  774.     break
  775.   fi
  776. done
  777. if test -z "$ac_aux_dir"; then
  778.   { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; exit 1; }
  779. fi
  780. ac_config_guess=$ac_aux_dir/config.guess
  781. ac_config_sub=$ac_aux_dir/config.sub
  782. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  783.  
  784.  
  785. # Do some error checking and defaulting for the host and target type.
  786. # The inputs are:
  787. #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
  788. #
  789. # The rules are:
  790. # 1. You are not allowed to specify --host, --target, and nonopt at the
  791. #    same time.
  792. # 2. Host defaults to nonopt.
  793. # 3. If nonopt is not specified, then host defaults to the current host,
  794. #    as determined by config.guess.
  795. # 4. Target and build default to nonopt.
  796. # 5. If nonopt is not specified, then target and build default to host.
  797.  
  798. # The aliases save the names the user supplied, while $host etc.
  799. # will get canonicalized.
  800. case $host---$target---$nonopt in
  801. NONE---*---* | *---NONE---* | *---*---NONE) ;;
  802. *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
  803. esac
  804.  
  805.  
  806. # Make sure we can run config.sub.
  807. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  808. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  809. fi
  810.  
  811. echo $ac_n "checking host system type""... $ac_c" 1>&6
  812. echo "configure:813: checking host system type" >&5
  813.  
  814. host_alias=$host
  815. case "$host_alias" in
  816. NONE)
  817.   case $nonopt in
  818.   NONE)
  819.     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  820.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  821.     fi ;;
  822.   *) host_alias=$nonopt ;;
  823.   esac ;;
  824. esac
  825.  
  826. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  827. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  828. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  829. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  830. echo "$ac_t""$host" 1>&6
  831.  
  832. echo $ac_n "checking target system type""... $ac_c" 1>&6
  833. echo "configure:834: checking target system type" >&5
  834.  
  835. target_alias=$target
  836. case "$target_alias" in
  837. NONE)
  838.   case $nonopt in
  839.   NONE) target_alias=$host_alias ;;
  840.   *) target_alias=$nonopt ;;
  841.   esac ;;
  842. esac
  843.  
  844. target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
  845. target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  846. target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  847. target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  848. echo "$ac_t""$target" 1>&6
  849.  
  850. echo $ac_n "checking build system type""... $ac_c" 1>&6
  851. echo "configure:852: checking build system type" >&5
  852.  
  853. build_alias=$build
  854. case "$build_alias" in
  855. NONE)
  856.   case $nonopt in
  857.   NONE) build_alias=$host_alias ;;
  858.   *) build_alias=$nonopt ;;
  859.   esac ;;
  860. esac
  861.  
  862. build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
  863. build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  864. build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  865. build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  866. echo "$ac_t""$build" 1>&6
  867.  
  868. test "$host_alias" != "$target_alias" &&
  869.   test "$program_prefix$program_suffix$program_transform_name" = \
  870.     NONENONEs,x,x, &&
  871.   program_prefix=${target_alias}-
  872.  
  873.  
  874. TARGET_CPU="${target_cpu}"
  875. TARGET_OS="${target_os}"
  876.  
  877. CFLAGS="${CFLAGS=}"
  878. CPPFLAGS="${CPPFLAGS=}"
  879. CXXFLAGS="${CXXFLAGS=}"
  880. LDFLAGS="${LDFLAGS=}"
  881. HOST_CFLAGS="${HOST_CFLAGS=}"
  882. HOST_CXXFLAGS="${HOST_CXXFLAGS=}"
  883. HOST_LDFLAGS="${HOST_LDFLAGS=}"
  884.  
  885. _SUBDIR_CC="$CC"
  886. _SUBDIR_CXX="$CXX"
  887. _SUBDIR_CFLAGS="$CFLAGS"
  888. _SUBDIR_CPPFLAGS="$CPPFLAGS"
  889. _SUBDIR_CXXFLAGS="$CFLAGS"
  890. _SUBDIR_LDFLAGS="$LDFLAGS"
  891. _SUBDIR_HOST_CC="$HOST_CC"
  892. _SUBDIR_HOST_CFLAGS="$HOST_CFLAGS"
  893. _SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS"
  894. _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
  895. _SUBDIR_CONFIG_ARGS="$ac_configure_args"
  896.  
  897. MOZJPEG=62
  898. MOZPNG=10009
  899. MOZMNG="((1<<16)|(0<<8)|(1))"
  900. NSPR_VERSION=4
  901.  
  902. GLIB_VERSION=1.2.0
  903. GTK_VERSION=1.2.0
  904. GDK_PIXBUF_VERSION=0.8.0
  905. LIBIDL_VERSION=0.6.3
  906. PERL_VERSION=5.004
  907. QT_VERSION=2.2.0
  908. QT_VERSION_NUM=220
  909.  
  910. MISSING_FULLCIRCLE=
  911. MISSING_MOTIF=
  912. MISSING_NSPR=
  913. MISSING_X=
  914.  
  915. USE_PTHREADS=
  916. _PTHREAD_LDFLAGS=""
  917.  
  918. _topsrcdir=`cd \`dirname $0\`; pwd`
  919. _objdir=`pwd`
  920. if test "$_topsrcdir" != "$_objdir"
  921. then
  922.   # Check for a couple representative files in the source tree
  923.   _conflict_files=
  924.   for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do
  925.     if test -f $file; then
  926.       _conflict_files="$_conflict_files $file"
  927.     fi
  928.   done
  929.   if test "$_conflict_files"; then
  930.     echo "***"
  931.     echo "*   Your source tree contains these files:"
  932.     for file in $_conflict_files; do
  933.       echo "*         $file"
  934.     done
  935.     cat 1>&2 <<-EOF
  936.     *   This indicates that you previously built in the source tree.
  937.     *   A source tree build can confuse the separate objdir build.
  938.     *
  939.     *   To clean up the source tree:
  940.     *     1. cd $_topsrcdir
  941.     *     2. gmake distclean
  942.     ***
  943.     EOF
  944.     exit 1
  945.     break
  946.   fi
  947. fi
  948. MOZ_BUILD_ROOT=`pwd`
  949.  
  950. if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then
  951.     echo "cross compiling from $host to $target"
  952.     cross_compiling=yes
  953.  
  954.     _SAVE_CC="$CC"
  955.     _SAVE_CFLAGS="$CFLAGS"
  956.     _SAVE_LDFLAGS="$LDFLAGS"
  957.  
  958.     echo $ac_n "checking for host c compiler""... $ac_c" 1>&6
  959. echo "configure:960: checking for host c compiler" >&5
  960.     if test -z "$HOST_CC"; then
  961.     for ac_prog in gcc cc /usr/ucb/cc icc
  962. do
  963. # Extract the first word of "$ac_prog", so it can be a program name with args.
  964. set dummy $ac_prog; ac_word=$2
  965. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  966. echo "configure:967: checking for $ac_word" >&5
  967. if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
  968.   echo $ac_n "(cached) $ac_c" 1>&6
  969. else
  970.   if test -n "$HOST_CC"; then
  971.   ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
  972. else
  973.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  974.   ac_dummy="$PATH"
  975.   for ac_dir in $ac_dummy; do
  976.     test -z "$ac_dir" && ac_dir=.
  977.     if test -f $ac_dir/$ac_word; then
  978.       ac_cv_prog_HOST_CC="$ac_prog"
  979.       break
  980.     fi
  981.   done
  982.   IFS="$ac_save_ifs"
  983. fi
  984. fi
  985. HOST_CC="$ac_cv_prog_HOST_CC"
  986. if test -n "$HOST_CC"; then
  987.   echo "$ac_t""$HOST_CC" 1>&6
  988. else
  989.   echo "$ac_t""no" 1>&6
  990. fi
  991.  
  992. test -n "$HOST_CC" && break
  993. done
  994. test -n "$HOST_CC" || HOST_CC=""""
  995.  
  996.     if test -z "$HOST_CC"; then
  997.         { echo "configure: error: no acceptable c compiler found in \$PATH" 1>&2; exit 1; }
  998.     fi
  999.     fi
  1000.     echo "$ac_t""$HOST_CC" 1>&6
  1001.     echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6
  1002. echo "configure:1003: checking for host c++ compiler" >&5
  1003.     if test -z "$HOST_CXX"; then
  1004.     for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl icc
  1005. do
  1006. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1007. set dummy $ac_prog; ac_word=$2
  1008. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1009. echo "configure:1010: checking for $ac_word" >&5
  1010. if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then
  1011.   echo $ac_n "(cached) $ac_c" 1>&6
  1012. else
  1013.   if test -n "$HOST_CXX"; then
  1014.   ac_cv_prog_HOST_CXX="$HOST_CXX" # Let the user override the test.
  1015. else
  1016.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1017.   ac_dummy="$PATH"
  1018.   for ac_dir in $ac_dummy; do
  1019.     test -z "$ac_dir" && ac_dir=.
  1020.     if test -f $ac_dir/$ac_word; then
  1021.       ac_cv_prog_HOST_CXX="$ac_prog"
  1022.       break
  1023.     fi
  1024.   done
  1025.   IFS="$ac_save_ifs"
  1026. fi
  1027. fi
  1028. HOST_CXX="$ac_cv_prog_HOST_CXX"
  1029. if test -n "$HOST_CXX"; then
  1030.   echo "$ac_t""$HOST_CXX" 1>&6
  1031. else
  1032.   echo "$ac_t""no" 1>&6
  1033. fi
  1034.  
  1035. test -n "$HOST_CXX" && break
  1036. done
  1037. test -n "$HOST_CXX" || HOST_CXX=""""
  1038.  
  1039.     if test -z "$HOST_CXX"; then
  1040.         { echo "configure: error: no acceptable c++ compiler found in \$PATH" 1>&2; exit 1; }
  1041.     fi
  1042.     fi
  1043.     echo "$ac_t""$HOST_CXX" 1>&6
  1044.  
  1045.     if test -z "$HOST_CFLAGS"; then
  1046.     HOST_CFLAGS="$CFLAGS"
  1047.     fi
  1048.     if test -z "$HOST_CXXFLAGS"; then
  1049.     HOST_CXXFLAGS="$CXXFLAGS"
  1050.     fi
  1051.     if test -z "$HOST_LDFLAGS"; then
  1052.     HOST_LDFLAGS="$LDFLAGS"
  1053.     fi
  1054.     if test -z "$HOST_RANLIB"; then
  1055.     # Extract the first word of "ranlib", so it can be a program name with args.
  1056. set dummy ranlib; ac_word=$2
  1057. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1058. echo "configure:1059: checking for $ac_word" >&5
  1059. if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then
  1060.   echo $ac_n "(cached) $ac_c" 1>&6
  1061. else
  1062.   if test -n "$HOST_RANLIB"; then
  1063.   ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test.
  1064. else
  1065.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1066.   ac_dummy="$PATH"
  1067.   for ac_dir in $ac_dummy; do
  1068.     test -z "$ac_dir" && ac_dir=.
  1069.     if test -f $ac_dir/$ac_word; then
  1070.       ac_cv_prog_HOST_RANLIB="ranlib"
  1071.       break
  1072.     fi
  1073.   done
  1074.   IFS="$ac_save_ifs"
  1075.   test -z "$ac_cv_prog_HOST_RANLIB" && ac_cv_prog_HOST_RANLIB=":"
  1076. fi
  1077. fi
  1078. HOST_RANLIB="$ac_cv_prog_HOST_RANLIB"
  1079. if test -n "$HOST_RANLIB"; then
  1080.   echo "$ac_t""$HOST_RANLIB" 1>&6
  1081. else
  1082.   echo "$ac_t""no" 1>&6
  1083. fi
  1084.  
  1085.     fi
  1086.     if test -z "$HOST_AR"; then
  1087.     # Extract the first word of "ar", so it can be a program name with args.
  1088. set dummy ar; ac_word=$2
  1089. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1090. echo "configure:1091: checking for $ac_word" >&5
  1091. if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then
  1092.   echo $ac_n "(cached) $ac_c" 1>&6
  1093. else
  1094.   if test -n "$HOST_AR"; then
  1095.   ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test.
  1096. else
  1097.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1098.   ac_dummy="$PATH"
  1099.   for ac_dir in $ac_dummy; do
  1100.     test -z "$ac_dir" && ac_dir=.
  1101.     if test -f $ac_dir/$ac_word; then
  1102.       ac_cv_prog_HOST_AR="ar"
  1103.       break
  1104.     fi
  1105.   done
  1106.   IFS="$ac_save_ifs"
  1107.   test -z "$ac_cv_prog_HOST_AR" && ac_cv_prog_HOST_AR=":"
  1108. fi
  1109. fi
  1110. HOST_AR="$ac_cv_prog_HOST_AR"
  1111. if test -n "$HOST_AR"; then
  1112.   echo "$ac_t""$HOST_AR" 1>&6
  1113. else
  1114.   echo "$ac_t""no" 1>&6
  1115. fi
  1116.  
  1117.     fi
  1118.     CC="$HOST_CC"
  1119.     CFLAGS="$HOST_CFLAGS"
  1120.     LDFLAGS="$HOST_LDFLAGS"
  1121.  
  1122.     echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
  1123. echo "configure:1124: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
  1124.     cat > conftest.$ac_ext <<EOF
  1125. #line 1126 "configure"
  1126. #include "confdefs.h"
  1127.  
  1128. int main() {
  1129. return(0);
  1130. ; return 0; }
  1131. EOF
  1132. if { (eval echo configure:1133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1133.   rm -rf conftest*
  1134.   ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6
  1135. else
  1136.   echo "configure: failed program was:" >&5
  1137.   cat conftest.$ac_ext >&5
  1138.   rm -rf conftest*
  1139.   { echo "configure: error: installation or configuration problem: host compiler $HOST_CC cannot create executables." 1>&2; exit 1; } 
  1140. fi
  1141. rm -f conftest*
  1142.  
  1143.     CC="$HOST_CXX"
  1144.     CFLAGS="$HOST_CXXFLAGS"
  1145.  
  1146.     echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
  1147. echo "configure:1148: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5
  1148.     cat > conftest.$ac_ext <<EOF
  1149. #line 1150 "configure"
  1150. #include "confdefs.h"
  1151.  
  1152. int main() {
  1153. return(0);
  1154. ; return 0; }
  1155. EOF
  1156. if { (eval echo configure:1157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1157.   rm -rf conftest*
  1158.   ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6
  1159. else
  1160.   echo "configure: failed program was:" >&5
  1161.   cat conftest.$ac_ext >&5
  1162.   rm -rf conftest*
  1163.   { echo "configure: error: installation or configuration problem: host compiler $HOST_CXX cannot create executables." 1>&2; exit 1; } 
  1164. fi
  1165. rm -f conftest*
  1166.     
  1167.     CC=$_SAVE_CC
  1168.     CFLAGS=$_SAVE_CFLAGS
  1169.     LDFLAGS=$_SAVE_LDFLAGS
  1170.  
  1171.     if test -z "$CC"; then
  1172.     for ac_prog in "${target_alias}-gcc" "${target}-gcc"
  1173. do
  1174. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1175. set dummy $ac_prog; ac_word=$2
  1176. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1177. echo "configure:1178: checking for $ac_word" >&5
  1178. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1179.   echo $ac_n "(cached) $ac_c" 1>&6
  1180. else
  1181.   if test -n "$CC"; then
  1182.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1183. else
  1184.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1185.   ac_dummy="$PATH"
  1186.   for ac_dir in $ac_dummy; do
  1187.     test -z "$ac_dir" && ac_dir=.
  1188.     if test -f $ac_dir/$ac_word; then
  1189.       ac_cv_prog_CC="$ac_prog"
  1190.       break
  1191.     fi
  1192.   done
  1193.   IFS="$ac_save_ifs"
  1194. fi
  1195. fi
  1196. CC="$ac_cv_prog_CC"
  1197. if test -n "$CC"; then
  1198.   echo "$ac_t""$CC" 1>&6
  1199. else
  1200.   echo "$ac_t""no" 1>&6
  1201. fi
  1202.  
  1203. test -n "$CC" && break
  1204. done
  1205. test -n "$CC" || CC=":"
  1206.  
  1207.     fi
  1208.     unset ac_cv_prog_CC
  1209.     # Extract the first word of "gcc", so it can be a program name with args.
  1210. set dummy gcc; ac_word=$2
  1211. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1212. echo "configure:1213: checking for $ac_word" >&5
  1213. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1214.   echo $ac_n "(cached) $ac_c" 1>&6
  1215. else
  1216.   if test -n "$CC"; then
  1217.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1218. else
  1219.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1220.   ac_dummy="$PATH"
  1221.   for ac_dir in $ac_dummy; do
  1222.     test -z "$ac_dir" && ac_dir=.
  1223.     if test -f $ac_dir/$ac_word; then
  1224.       ac_cv_prog_CC="gcc"
  1225.       break
  1226.     fi
  1227.   done
  1228.   IFS="$ac_save_ifs"
  1229. fi
  1230. fi
  1231. CC="$ac_cv_prog_CC"
  1232. if test -n "$CC"; then
  1233.   echo "$ac_t""$CC" 1>&6
  1234. else
  1235.   echo "$ac_t""no" 1>&6
  1236. fi
  1237.  
  1238. if test -z "$CC"; then
  1239.   # Extract the first word of "cc", so it can be a program name with args.
  1240. set dummy cc; ac_word=$2
  1241. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1242. echo "configure:1243: checking for $ac_word" >&5
  1243. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1244.   echo $ac_n "(cached) $ac_c" 1>&6
  1245. else
  1246.   if test -n "$CC"; then
  1247.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1248. else
  1249.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1250.   ac_prog_rejected=no
  1251.   ac_dummy="$PATH"
  1252.   for ac_dir in $ac_dummy; do
  1253.     test -z "$ac_dir" && ac_dir=.
  1254.     if test -f $ac_dir/$ac_word; then
  1255.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  1256.         ac_prog_rejected=yes
  1257.     continue
  1258.       fi
  1259.       ac_cv_prog_CC="cc"
  1260.       break
  1261.     fi
  1262.   done
  1263.   IFS="$ac_save_ifs"
  1264. if test $ac_prog_rejected = yes; then
  1265.   # We found a bogon in the path, so make sure we never use it.
  1266.   set dummy $ac_cv_prog_CC
  1267.   shift
  1268.   if test $# -gt 0; then
  1269.     # We chose a different compiler from the bogus one.
  1270.     # However, it has the same basename, so the bogon will be chosen
  1271.     # first if we set CC to just the basename; use the full file name.
  1272.     shift
  1273.     set dummy "$ac_dir/$ac_word" "$@"
  1274.     shift
  1275.     ac_cv_prog_CC="$@"
  1276.   fi
  1277. fi
  1278. fi
  1279. fi
  1280. CC="$ac_cv_prog_CC"
  1281. if test -n "$CC"; then
  1282.   echo "$ac_t""$CC" 1>&6
  1283. else
  1284.   echo "$ac_t""no" 1>&6
  1285. fi
  1286.  
  1287.   if test -z "$CC"; then
  1288.     case "`uname -s`" in
  1289.     *win32* | *WIN32*)
  1290.       # Extract the first word of "cl", so it can be a program name with args.
  1291. set dummy cl; ac_word=$2
  1292. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1293. echo "configure:1294: checking for $ac_word" >&5
  1294. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1295.   echo $ac_n "(cached) $ac_c" 1>&6
  1296. else
  1297.   if test -n "$CC"; then
  1298.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1299. else
  1300.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1301.   ac_dummy="$PATH"
  1302.   for ac_dir in $ac_dummy; do
  1303.     test -z "$ac_dir" && ac_dir=.
  1304.     if test -f $ac_dir/$ac_word; then
  1305.       ac_cv_prog_CC="cl"
  1306.       break
  1307.     fi
  1308.   done
  1309.   IFS="$ac_save_ifs"
  1310. fi
  1311. fi
  1312. CC="$ac_cv_prog_CC"
  1313. if test -n "$CC"; then
  1314.   echo "$ac_t""$CC" 1>&6
  1315. else
  1316.   echo "$ac_t""no" 1>&6
  1317. fi
  1318.  ;;
  1319.     esac
  1320.   fi
  1321.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  1322. fi
  1323.  
  1324. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  1325. echo "configure:1326: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  1326.  
  1327. ac_ext=c
  1328. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1329. ac_cpp='$CPP $CPPFLAGS'
  1330. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1331. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1332. cross_compiling=$ac_cv_prog_cc_cross
  1333.  
  1334. cat > conftest.$ac_ext << EOF
  1335.  
  1336. #line 1337 "configure"
  1337. #include "confdefs.h"
  1338.  
  1339. main(){return(0);}
  1340. EOF
  1341. if { (eval echo configure:1342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1342.   ac_cv_prog_cc_works=yes
  1343.   # If we can't run a trivial program, we are probably using a cross compiler.
  1344.   if (./conftest; exit) 2>/dev/null; then
  1345.     ac_cv_prog_cc_cross=no
  1346.   else
  1347.     ac_cv_prog_cc_cross=yes
  1348.   fi
  1349. else
  1350.   echo "configure: failed program was:" >&5
  1351.   cat conftest.$ac_ext >&5
  1352.   ac_cv_prog_cc_works=no
  1353. fi
  1354. rm -fr conftest*
  1355. ac_ext=c
  1356. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1357. ac_cpp='$CPP $CPPFLAGS'
  1358. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1359. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1360. cross_compiling=$ac_cv_prog_cc_cross
  1361.  
  1362. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  1363. if test $ac_cv_prog_cc_works = no; then
  1364.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  1365. fi
  1366. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  1367. echo "configure:1368: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  1368. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  1369. cross_compiling=$ac_cv_prog_cc_cross
  1370.  
  1371. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  1372. echo "configure:1373: checking whether we are using GNU C" >&5
  1373. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  1374.   echo $ac_n "(cached) $ac_c" 1>&6
  1375. else
  1376.   cat > conftest.c <<EOF
  1377. #ifdef __GNUC__
  1378.   yes;
  1379. #endif
  1380. EOF
  1381. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1382.   ac_cv_prog_gcc=yes
  1383. else
  1384.   ac_cv_prog_gcc=no
  1385. fi
  1386. fi
  1387.  
  1388. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  1389.  
  1390. if test $ac_cv_prog_gcc = yes; then
  1391.   GCC=yes
  1392. else
  1393.   GCC=
  1394. fi
  1395.  
  1396. ac_test_CFLAGS="${CFLAGS+set}"
  1397. ac_save_CFLAGS="$CFLAGS"
  1398. CFLAGS=
  1399. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  1400. echo "configure:1401: checking whether ${CC-cc} accepts -g" >&5
  1401. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  1402.   echo $ac_n "(cached) $ac_c" 1>&6
  1403. else
  1404.   echo 'void f(){}' > conftest.c
  1405. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  1406.   ac_cv_prog_cc_g=yes
  1407. else
  1408.   ac_cv_prog_cc_g=no
  1409. fi
  1410. rm -f conftest*
  1411.  
  1412. fi
  1413.  
  1414. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  1415. if test "$ac_test_CFLAGS" = set; then
  1416.   CFLAGS="$ac_save_CFLAGS"
  1417. elif test $ac_cv_prog_cc_g = yes; then
  1418.   if test "$GCC" = yes; then
  1419.     CFLAGS="-g -O2"
  1420.   else
  1421.     CFLAGS="-g"
  1422.   fi
  1423. else
  1424.   if test "$GCC" = yes; then
  1425.     CFLAGS="-O2"
  1426.   else
  1427.     CFLAGS=
  1428.   fi
  1429. fi
  1430.  
  1431.     if test -z "$CXX"; then
  1432.     for ac_prog in "${target_alias}-g++" "${target}-g++"
  1433. do
  1434. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1435. set dummy $ac_prog; ac_word=$2
  1436. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1437. echo "configure:1438: checking for $ac_word" >&5
  1438. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  1439.   echo $ac_n "(cached) $ac_c" 1>&6
  1440. else
  1441.   if test -n "$CXX"; then
  1442.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  1443. else
  1444.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1445.   ac_dummy="$PATH"
  1446.   for ac_dir in $ac_dummy; do
  1447.     test -z "$ac_dir" && ac_dir=.
  1448.     if test -f $ac_dir/$ac_word; then
  1449.       ac_cv_prog_CXX="$ac_prog"
  1450.       break
  1451.     fi
  1452.   done
  1453.   IFS="$ac_save_ifs"
  1454. fi
  1455. fi
  1456. CXX="$ac_cv_prog_CXX"
  1457. if test -n "$CXX"; then
  1458.   echo "$ac_t""$CXX" 1>&6
  1459. else
  1460.   echo "$ac_t""no" 1>&6
  1461. fi
  1462.  
  1463. test -n "$CXX" && break
  1464. done
  1465. test -n "$CXX" || CXX=":"
  1466.  
  1467.     fi
  1468.     unset ac_cv_prog_CXX
  1469.     for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  1470. do
  1471. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1472. set dummy $ac_prog; ac_word=$2
  1473. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1474. echo "configure:1475: checking for $ac_word" >&5
  1475. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  1476.   echo $ac_n "(cached) $ac_c" 1>&6
  1477. else
  1478.   if test -n "$CXX"; then
  1479.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  1480. else
  1481.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1482.   ac_dummy="$PATH"
  1483.   for ac_dir in $ac_dummy; do
  1484.     test -z "$ac_dir" && ac_dir=.
  1485.     if test -f $ac_dir/$ac_word; then
  1486.       ac_cv_prog_CXX="$ac_prog"
  1487.       break
  1488.     fi
  1489.   done
  1490.   IFS="$ac_save_ifs"
  1491. fi
  1492. fi
  1493. CXX="$ac_cv_prog_CXX"
  1494. if test -n "$CXX"; then
  1495.   echo "$ac_t""$CXX" 1>&6
  1496. else
  1497.   echo "$ac_t""no" 1>&6
  1498. fi
  1499.  
  1500. test -n "$CXX" && break
  1501. done
  1502. test -n "$CXX" || CXX="gcc"
  1503.  
  1504.  
  1505. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  1506. echo "configure:1507: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  1507.  
  1508. ac_ext=C
  1509. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1510. ac_cpp='$CXXCPP $CPPFLAGS'
  1511. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1512. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1513. cross_compiling=$ac_cv_prog_cxx_cross
  1514.  
  1515. cat > conftest.$ac_ext << EOF
  1516.  
  1517. #line 1518 "configure"
  1518. #include "confdefs.h"
  1519.  
  1520. int main(){return(0);}
  1521. EOF
  1522. if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1523.   ac_cv_prog_cxx_works=yes
  1524.   # If we can't run a trivial program, we are probably using a cross compiler.
  1525.   if (./conftest; exit) 2>/dev/null; then
  1526.     ac_cv_prog_cxx_cross=no
  1527.   else
  1528.     ac_cv_prog_cxx_cross=yes
  1529.   fi
  1530. else
  1531.   echo "configure: failed program was:" >&5
  1532.   cat conftest.$ac_ext >&5
  1533.   ac_cv_prog_cxx_works=no
  1534. fi
  1535. rm -fr conftest*
  1536. ac_ext=c
  1537. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1538. ac_cpp='$CPP $CPPFLAGS'
  1539. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1540. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1541. cross_compiling=$ac_cv_prog_cc_cross
  1542.  
  1543. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  1544. if test $ac_cv_prog_cxx_works = no; then
  1545.   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  1546. fi
  1547. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  1548. echo "configure:1549: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  1549. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  1550. cross_compiling=$ac_cv_prog_cxx_cross
  1551.  
  1552. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  1553. echo "configure:1554: checking whether we are using GNU C++" >&5
  1554. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  1555.   echo $ac_n "(cached) $ac_c" 1>&6
  1556. else
  1557.   cat > conftest.C <<EOF
  1558. #ifdef __GNUC__
  1559.   yes;
  1560. #endif
  1561. EOF
  1562. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1563.   ac_cv_prog_gxx=yes
  1564. else
  1565.   ac_cv_prog_gxx=no
  1566. fi
  1567. fi
  1568.  
  1569. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  1570.  
  1571. if test $ac_cv_prog_gxx = yes; then
  1572.   GXX=yes
  1573. else
  1574.   GXX=
  1575. fi
  1576.  
  1577. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  1578. ac_save_CXXFLAGS="$CXXFLAGS"
  1579. CXXFLAGS=
  1580. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  1581. echo "configure:1582: checking whether ${CXX-g++} accepts -g" >&5
  1582. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  1583.   echo $ac_n "(cached) $ac_c" 1>&6
  1584. else
  1585.   echo 'void f(){}' > conftest.cc
  1586. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  1587.   ac_cv_prog_cxx_g=yes
  1588. else
  1589.   ac_cv_prog_cxx_g=no
  1590. fi
  1591. rm -f conftest*
  1592.  
  1593. fi
  1594.  
  1595. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  1596. if test "$ac_test_CXXFLAGS" = set; then
  1597.   CXXFLAGS="$ac_save_CXXFLAGS"
  1598. elif test $ac_cv_prog_cxx_g = yes; then
  1599.   if test "$GXX" = yes; then
  1600.     CXXFLAGS="-g -O2"
  1601.   else
  1602.     CXXFLAGS="-g"
  1603.   fi
  1604. else
  1605.   if test "$GXX" = yes; then
  1606.     CXXFLAGS="-O2"
  1607.   else
  1608.     CXXFLAGS=
  1609.   fi
  1610. fi
  1611.  
  1612.     if test -z "$RANLIB"; then
  1613.     for ac_prog in "${target_alias}-ranlib" "${target}-ranlib"
  1614. do
  1615. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1616. set dummy $ac_prog; ac_word=$2
  1617. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1618. echo "configure:1619: checking for $ac_word" >&5
  1619. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1620.   echo $ac_n "(cached) $ac_c" 1>&6
  1621. else
  1622.   if test -n "$RANLIB"; then
  1623.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1624. else
  1625.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1626.   ac_dummy="$PATH"
  1627.   for ac_dir in $ac_dummy; do
  1628.     test -z "$ac_dir" && ac_dir=.
  1629.     if test -f $ac_dir/$ac_word; then
  1630.       ac_cv_prog_RANLIB="$ac_prog"
  1631.       break
  1632.     fi
  1633.   done
  1634.   IFS="$ac_save_ifs"
  1635. fi
  1636. fi
  1637. RANLIB="$ac_cv_prog_RANLIB"
  1638. if test -n "$RANLIB"; then
  1639.   echo "$ac_t""$RANLIB" 1>&6
  1640. else
  1641.   echo "$ac_t""no" 1>&6
  1642. fi
  1643.  
  1644. test -n "$RANLIB" && break
  1645. done
  1646. test -n "$RANLIB" || RANLIB=":"
  1647.  
  1648.     fi
  1649.     if test -z "$AR"; then
  1650.     for ac_prog in "${target_alias}-ar" "${target}-ar"
  1651. do
  1652. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1653. set dummy $ac_prog; ac_word=$2
  1654. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1655. echo "configure:1656: checking for $ac_word" >&5
  1656. if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  1657.   echo $ac_n "(cached) $ac_c" 1>&6
  1658. else
  1659.   if test -n "$AR"; then
  1660.   ac_cv_prog_AR="$AR" # Let the user override the test.
  1661. else
  1662.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1663.   ac_dummy="$PATH"
  1664.   for ac_dir in $ac_dummy; do
  1665.     test -z "$ac_dir" && ac_dir=.
  1666.     if test -f $ac_dir/$ac_word; then
  1667.       ac_cv_prog_AR="$ac_prog"
  1668.       break
  1669.     fi
  1670.   done
  1671.   IFS="$ac_save_ifs"
  1672. fi
  1673. fi
  1674. AR="$ac_cv_prog_AR"
  1675. if test -n "$AR"; then
  1676.   echo "$ac_t""$AR" 1>&6
  1677. else
  1678.   echo "$ac_t""no" 1>&6
  1679. fi
  1680.  
  1681. test -n "$AR" && break
  1682. done
  1683. test -n "$AR" || AR=":"
  1684.  
  1685.     fi
  1686.     if test -z "$AS"; then
  1687.     for ac_prog in "${target_alias}-as" "${target}-as"
  1688. do
  1689. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1690. set dummy $ac_prog; ac_word=$2
  1691. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1692. echo "configure:1693: checking for $ac_word" >&5
  1693. if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
  1694.   echo $ac_n "(cached) $ac_c" 1>&6
  1695. else
  1696.   if test -n "$AS"; then
  1697.   ac_cv_prog_AS="$AS" # Let the user override the test.
  1698. else
  1699.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1700.   ac_dummy="$PATH"
  1701.   for ac_dir in $ac_dummy; do
  1702.     test -z "$ac_dir" && ac_dir=.
  1703.     if test -f $ac_dir/$ac_word; then
  1704.       ac_cv_prog_AS="$ac_prog"
  1705.       break
  1706.     fi
  1707.   done
  1708.   IFS="$ac_save_ifs"
  1709. fi
  1710. fi
  1711. AS="$ac_cv_prog_AS"
  1712. if test -n "$AS"; then
  1713.   echo "$ac_t""$AS" 1>&6
  1714. else
  1715.   echo "$ac_t""no" 1>&6
  1716. fi
  1717.  
  1718. test -n "$AS" && break
  1719. done
  1720. test -n "$AS" || AS=":"
  1721.  
  1722.     fi
  1723.     if test -z "$LD"; then
  1724.     for ac_prog in "${target_alias}-ld" "${target}-ld"
  1725. do
  1726. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1727. set dummy $ac_prog; ac_word=$2
  1728. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1729. echo "configure:1730: checking for $ac_word" >&5
  1730. if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
  1731.   echo $ac_n "(cached) $ac_c" 1>&6
  1732. else
  1733.   if test -n "$LD"; then
  1734.   ac_cv_prog_LD="$LD" # Let the user override the test.
  1735. else
  1736.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1737.   ac_dummy="$PATH"
  1738.   for ac_dir in $ac_dummy; do
  1739.     test -z "$ac_dir" && ac_dir=.
  1740.     if test -f $ac_dir/$ac_word; then
  1741.       ac_cv_prog_LD="$ac_prog"
  1742.       break
  1743.     fi
  1744.   done
  1745.   IFS="$ac_save_ifs"
  1746. fi
  1747. fi
  1748. LD="$ac_cv_prog_LD"
  1749. if test -n "$LD"; then
  1750.   echo "$ac_t""$LD" 1>&6
  1751. else
  1752.   echo "$ac_t""no" 1>&6
  1753. fi
  1754.  
  1755. test -n "$LD" && break
  1756. done
  1757. test -n "$LD" || LD=":"
  1758.  
  1759.     fi
  1760.     if test -z "$STRIP"; then
  1761.     for ac_prog in "${target_alias}-strip" "${target}-strip"
  1762. do
  1763. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1764. set dummy $ac_prog; ac_word=$2
  1765. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1766. echo "configure:1767: checking for $ac_word" >&5
  1767. if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  1768.   echo $ac_n "(cached) $ac_c" 1>&6
  1769. else
  1770.   if test -n "$STRIP"; then
  1771.   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
  1772. else
  1773.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1774.   ac_dummy="$PATH"
  1775.   for ac_dir in $ac_dummy; do
  1776.     test -z "$ac_dir" && ac_dir=.
  1777.     if test -f $ac_dir/$ac_word; then
  1778.       ac_cv_prog_STRIP="$ac_prog"
  1779.       break
  1780.     fi
  1781.   done
  1782.   IFS="$ac_save_ifs"
  1783. fi
  1784. fi
  1785. STRIP="$ac_cv_prog_STRIP"
  1786. if test -n "$STRIP"; then
  1787.   echo "$ac_t""$STRIP" 1>&6
  1788. else
  1789.   echo "$ac_t""no" 1>&6
  1790. fi
  1791.  
  1792. test -n "$STRIP" && break
  1793. done
  1794. test -n "$STRIP" || STRIP=":"
  1795.  
  1796.     fi
  1797.     if test -z "$DLLTOOL"; then
  1798.     for ac_prog in "${target_alias}-dlltool" "${target}-dlltool"
  1799. do
  1800. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1801. set dummy $ac_prog; ac_word=$2
  1802. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1803. echo "configure:1804: checking for $ac_word" >&5
  1804. if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
  1805.   echo $ac_n "(cached) $ac_c" 1>&6
  1806. else
  1807.   if test -n "$DLLTOOL"; then
  1808.   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
  1809. else
  1810.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1811.   ac_dummy="$PATH"
  1812.   for ac_dir in $ac_dummy; do
  1813.     test -z "$ac_dir" && ac_dir=.
  1814.     if test -f $ac_dir/$ac_word; then
  1815.       ac_cv_prog_DLLTOOL="$ac_prog"
  1816.       break
  1817.     fi
  1818.   done
  1819.   IFS="$ac_save_ifs"
  1820. fi
  1821. fi
  1822. DLLTOOL="$ac_cv_prog_DLLTOOL"
  1823. if test -n "$DLLTOOL"; then
  1824.   echo "$ac_t""$DLLTOOL" 1>&6
  1825. else
  1826.   echo "$ac_t""no" 1>&6
  1827. fi
  1828.  
  1829. test -n "$DLLTOOL" && break
  1830. done
  1831. test -n "$DLLTOOL" || DLLTOOL=":"
  1832.  
  1833.     fi
  1834.     if test -z "$WINDRES"; then
  1835.     for ac_prog in "${target_alias}-windres" "${target}-windres"
  1836. do
  1837. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1838. set dummy $ac_prog; ac_word=$2
  1839. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1840. echo "configure:1841: checking for $ac_word" >&5
  1841. if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  1842.   echo $ac_n "(cached) $ac_c" 1>&6
  1843. else
  1844.   if test -n "$WINDRES"; then
  1845.   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
  1846. else
  1847.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1848.   ac_dummy="$PATH"
  1849.   for ac_dir in $ac_dummy; do
  1850.     test -z "$ac_dir" && ac_dir=.
  1851.     if test -f $ac_dir/$ac_word; then
  1852.       ac_cv_prog_WINDRES="$ac_prog"
  1853.       break
  1854.     fi
  1855.   done
  1856.   IFS="$ac_save_ifs"
  1857. fi
  1858. fi
  1859. WINDRES="$ac_cv_prog_WINDRES"
  1860. if test -n "$WINDRES"; then
  1861.   echo "$ac_t""$WINDRES" 1>&6
  1862. else
  1863.   echo "$ac_t""no" 1>&6
  1864. fi
  1865.  
  1866. test -n "$WINDRES" && break
  1867. done
  1868. test -n "$WINDRES" || WINDRES=":"
  1869.  
  1870.     fi
  1871.     cat >> confdefs.h <<\EOF
  1872. #define CROSS_COMPILE 1
  1873. EOF
  1874.  
  1875. else
  1876.     # Extract the first word of "gcc", so it can be a program name with args.
  1877. set dummy gcc; ac_word=$2
  1878. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1879. echo "configure:1880: checking for $ac_word" >&5
  1880. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1881.   echo $ac_n "(cached) $ac_c" 1>&6
  1882. else
  1883.   if test -n "$CC"; then
  1884.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1885. else
  1886.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1887.   ac_dummy="$PATH"
  1888.   for ac_dir in $ac_dummy; do
  1889.     test -z "$ac_dir" && ac_dir=.
  1890.     if test -f $ac_dir/$ac_word; then
  1891.       ac_cv_prog_CC="gcc"
  1892.       break
  1893.     fi
  1894.   done
  1895.   IFS="$ac_save_ifs"
  1896. fi
  1897. fi
  1898. CC="$ac_cv_prog_CC"
  1899. if test -n "$CC"; then
  1900.   echo "$ac_t""$CC" 1>&6
  1901. else
  1902.   echo "$ac_t""no" 1>&6
  1903. fi
  1904.  
  1905. if test -z "$CC"; then
  1906.   # Extract the first word of "cc", so it can be a program name with args.
  1907. set dummy cc; ac_word=$2
  1908. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1909. echo "configure:1910: checking for $ac_word" >&5
  1910. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1911.   echo $ac_n "(cached) $ac_c" 1>&6
  1912. else
  1913.   if test -n "$CC"; then
  1914.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1915. else
  1916.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1917.   ac_prog_rejected=no
  1918.   ac_dummy="$PATH"
  1919.   for ac_dir in $ac_dummy; do
  1920.     test -z "$ac_dir" && ac_dir=.
  1921.     if test -f $ac_dir/$ac_word; then
  1922.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  1923.         ac_prog_rejected=yes
  1924.     continue
  1925.       fi
  1926.       ac_cv_prog_CC="cc"
  1927.       break
  1928.     fi
  1929.   done
  1930.   IFS="$ac_save_ifs"
  1931. if test $ac_prog_rejected = yes; then
  1932.   # We found a bogon in the path, so make sure we never use it.
  1933.   set dummy $ac_cv_prog_CC
  1934.   shift
  1935.   if test $# -gt 0; then
  1936.     # We chose a different compiler from the bogus one.
  1937.     # However, it has the same basename, so the bogon will be chosen
  1938.     # first if we set CC to just the basename; use the full file name.
  1939.     shift
  1940.     set dummy "$ac_dir/$ac_word" "$@"
  1941.     shift
  1942.     ac_cv_prog_CC="$@"
  1943.   fi
  1944. fi
  1945. fi
  1946. fi
  1947. CC="$ac_cv_prog_CC"
  1948. if test -n "$CC"; then
  1949.   echo "$ac_t""$CC" 1>&6
  1950. else
  1951.   echo "$ac_t""no" 1>&6
  1952. fi
  1953.  
  1954.   if test -z "$CC"; then
  1955.     case "`uname -s`" in
  1956.     *win32* | *WIN32*)
  1957.       # Extract the first word of "cl", so it can be a program name with args.
  1958. set dummy cl; ac_word=$2
  1959. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1960. echo "configure:1961: checking for $ac_word" >&5
  1961. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1962.   echo $ac_n "(cached) $ac_c" 1>&6
  1963. else
  1964.   if test -n "$CC"; then
  1965.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1966. else
  1967.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1968.   ac_dummy="$PATH"
  1969.   for ac_dir in $ac_dummy; do
  1970.     test -z "$ac_dir" && ac_dir=.
  1971.     if test -f $ac_dir/$ac_word; then
  1972.       ac_cv_prog_CC="cl"
  1973.       break
  1974.     fi
  1975.   done
  1976.   IFS="$ac_save_ifs"
  1977. fi
  1978. fi
  1979. CC="$ac_cv_prog_CC"
  1980. if test -n "$CC"; then
  1981.   echo "$ac_t""$CC" 1>&6
  1982. else
  1983.   echo "$ac_t""no" 1>&6
  1984. fi
  1985.  ;;
  1986.     esac
  1987.   fi
  1988.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  1989. fi
  1990.  
  1991. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  1992. echo "configure:1993: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  1993.  
  1994. ac_ext=c
  1995. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1996. ac_cpp='$CPP $CPPFLAGS'
  1997. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1998. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1999. cross_compiling=$ac_cv_prog_cc_cross
  2000.  
  2001. cat > conftest.$ac_ext << EOF
  2002.  
  2003. #line 2004 "configure"
  2004. #include "confdefs.h"
  2005.  
  2006. main(){return(0);}
  2007. EOF
  2008. if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2009.   ac_cv_prog_cc_works=yes
  2010.   # If we can't run a trivial program, we are probably using a cross compiler.
  2011.   if (./conftest; exit) 2>/dev/null; then
  2012.     ac_cv_prog_cc_cross=no
  2013.   else
  2014.     ac_cv_prog_cc_cross=yes
  2015.   fi
  2016. else
  2017.   echo "configure: failed program was:" >&5
  2018.   cat conftest.$ac_ext >&5
  2019.   ac_cv_prog_cc_works=no
  2020. fi
  2021. rm -fr conftest*
  2022. ac_ext=c
  2023. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2024. ac_cpp='$CPP $CPPFLAGS'
  2025. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2026. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2027. cross_compiling=$ac_cv_prog_cc_cross
  2028.  
  2029. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  2030. if test $ac_cv_prog_cc_works = no; then
  2031.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  2032. fi
  2033. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  2034. echo "configure:2035: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  2035. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  2036. cross_compiling=$ac_cv_prog_cc_cross
  2037.  
  2038. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  2039. echo "configure:2040: checking whether we are using GNU C" >&5
  2040. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  2041.   echo $ac_n "(cached) $ac_c" 1>&6
  2042. else
  2043.   cat > conftest.c <<EOF
  2044. #ifdef __GNUC__
  2045.   yes;
  2046. #endif
  2047. EOF
  2048. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  2049.   ac_cv_prog_gcc=yes
  2050. else
  2051.   ac_cv_prog_gcc=no
  2052. fi
  2053. fi
  2054.  
  2055. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  2056.  
  2057. if test $ac_cv_prog_gcc = yes; then
  2058.   GCC=yes
  2059. else
  2060.   GCC=
  2061. fi
  2062.  
  2063. ac_test_CFLAGS="${CFLAGS+set}"
  2064. ac_save_CFLAGS="$CFLAGS"
  2065. CFLAGS=
  2066. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  2067. echo "configure:2068: checking whether ${CC-cc} accepts -g" >&5
  2068. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  2069.   echo $ac_n "(cached) $ac_c" 1>&6
  2070. else
  2071.   echo 'void f(){}' > conftest.c
  2072. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  2073.   ac_cv_prog_cc_g=yes
  2074. else
  2075.   ac_cv_prog_cc_g=no
  2076. fi
  2077. rm -f conftest*
  2078.  
  2079. fi
  2080.  
  2081. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  2082. if test "$ac_test_CFLAGS" = set; then
  2083.   CFLAGS="$ac_save_CFLAGS"
  2084. elif test $ac_cv_prog_cc_g = yes; then
  2085.   if test "$GCC" = yes; then
  2086.     CFLAGS="-g -O2"
  2087.   else
  2088.     CFLAGS="-g"
  2089.   fi
  2090. else
  2091.   if test "$GCC" = yes; then
  2092.     CFLAGS="-O2"
  2093.   else
  2094.     CFLAGS=
  2095.   fi
  2096. fi
  2097.  
  2098.     for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  2099. do
  2100. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2101. set dummy $ac_prog; ac_word=$2
  2102. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2103. echo "configure:2104: checking for $ac_word" >&5
  2104. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  2105.   echo $ac_n "(cached) $ac_c" 1>&6
  2106. else
  2107.   if test -n "$CXX"; then
  2108.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  2109. else
  2110.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2111.   ac_dummy="$PATH"
  2112.   for ac_dir in $ac_dummy; do
  2113.     test -z "$ac_dir" && ac_dir=.
  2114.     if test -f $ac_dir/$ac_word; then
  2115.       ac_cv_prog_CXX="$ac_prog"
  2116.       break
  2117.     fi
  2118.   done
  2119.   IFS="$ac_save_ifs"
  2120. fi
  2121. fi
  2122. CXX="$ac_cv_prog_CXX"
  2123. if test -n "$CXX"; then
  2124.   echo "$ac_t""$CXX" 1>&6
  2125. else
  2126.   echo "$ac_t""no" 1>&6
  2127. fi
  2128.  
  2129. test -n "$CXX" && break
  2130. done
  2131. test -n "$CXX" || CXX="gcc"
  2132.  
  2133.  
  2134. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  2135. echo "configure:2136: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  2136.  
  2137. ac_ext=C
  2138. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2139. ac_cpp='$CXXCPP $CPPFLAGS'
  2140. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2141. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2142. cross_compiling=$ac_cv_prog_cxx_cross
  2143.  
  2144. cat > conftest.$ac_ext << EOF
  2145.  
  2146. #line 2147 "configure"
  2147. #include "confdefs.h"
  2148.  
  2149. int main(){return(0);}
  2150. EOF
  2151. if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2152.   ac_cv_prog_cxx_works=yes
  2153.   # If we can't run a trivial program, we are probably using a cross compiler.
  2154.   if (./conftest; exit) 2>/dev/null; then
  2155.     ac_cv_prog_cxx_cross=no
  2156.   else
  2157.     ac_cv_prog_cxx_cross=yes
  2158.   fi
  2159. else
  2160.   echo "configure: failed program was:" >&5
  2161.   cat conftest.$ac_ext >&5
  2162.   ac_cv_prog_cxx_works=no
  2163. fi
  2164. rm -fr conftest*
  2165. ac_ext=c
  2166. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2167. ac_cpp='$CPP $CPPFLAGS'
  2168. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2169. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2170. cross_compiling=$ac_cv_prog_cc_cross
  2171.  
  2172. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  2173. if test $ac_cv_prog_cxx_works = no; then
  2174.   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  2175. fi
  2176. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  2177. echo "configure:2178: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  2178. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  2179. cross_compiling=$ac_cv_prog_cxx_cross
  2180.  
  2181. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  2182. echo "configure:2183: checking whether we are using GNU C++" >&5
  2183. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  2184.   echo $ac_n "(cached) $ac_c" 1>&6
  2185. else
  2186.   cat > conftest.C <<EOF
  2187. #ifdef __GNUC__
  2188.   yes;
  2189. #endif
  2190. EOF
  2191. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  2192.   ac_cv_prog_gxx=yes
  2193. else
  2194.   ac_cv_prog_gxx=no
  2195. fi
  2196. fi
  2197.  
  2198. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  2199.  
  2200. if test $ac_cv_prog_gxx = yes; then
  2201.   GXX=yes
  2202. else
  2203.   GXX=
  2204. fi
  2205.  
  2206. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  2207. ac_save_CXXFLAGS="$CXXFLAGS"
  2208. CXXFLAGS=
  2209. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  2210. echo "configure:2211: checking whether ${CXX-g++} accepts -g" >&5
  2211. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  2212.   echo $ac_n "(cached) $ac_c" 1>&6
  2213. else
  2214.   echo 'void f(){}' > conftest.cc
  2215. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  2216.   ac_cv_prog_cxx_g=yes
  2217. else
  2218.   ac_cv_prog_cxx_g=no
  2219. fi
  2220. rm -f conftest*
  2221.  
  2222. fi
  2223.  
  2224. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  2225. if test "$ac_test_CXXFLAGS" = set; then
  2226.   CXXFLAGS="$ac_save_CXXFLAGS"
  2227. elif test $ac_cv_prog_cxx_g = yes; then
  2228.   if test "$GXX" = yes; then
  2229.     CXXFLAGS="-g -O2"
  2230.   else
  2231.     CXXFLAGS="-g"
  2232.   fi
  2233. else
  2234.   if test "$GXX" = yes; then
  2235.     CXXFLAGS="-O2"
  2236.   else
  2237.     CXXFLAGS=
  2238.   fi
  2239. fi
  2240.  
  2241.     # Extract the first word of "ranlib", so it can be a program name with args.
  2242. set dummy ranlib; ac_word=$2
  2243. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2244. echo "configure:2245: checking for $ac_word" >&5
  2245. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  2246.   echo $ac_n "(cached) $ac_c" 1>&6
  2247. else
  2248.   if test -n "$RANLIB"; then
  2249.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  2250. else
  2251.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2252.   ac_dummy="$PATH"
  2253.   for ac_dir in $ac_dummy; do
  2254.     test -z "$ac_dir" && ac_dir=.
  2255.     if test -f $ac_dir/$ac_word; then
  2256.       ac_cv_prog_RANLIB="ranlib"
  2257.       break
  2258.     fi
  2259.   done
  2260.   IFS="$ac_save_ifs"
  2261.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  2262. fi
  2263. fi
  2264. RANLIB="$ac_cv_prog_RANLIB"
  2265. if test -n "$RANLIB"; then
  2266.   echo "$ac_t""$RANLIB" 1>&6
  2267. else
  2268.   echo "$ac_t""no" 1>&6
  2269. fi
  2270.  
  2271.     for ac_prog in as
  2272. do
  2273. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2274. set dummy $ac_prog; ac_word=$2
  2275. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2276. echo "configure:2277: checking for $ac_word" >&5
  2277. if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
  2278.   echo $ac_n "(cached) $ac_c" 1>&6
  2279. else
  2280.   case "$AS" in
  2281.   /*)
  2282.   ac_cv_path_AS="$AS" # Let the user override the test with a path.
  2283.   ;;
  2284.   ?:/*)             
  2285.   ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
  2286.   ;;
  2287.   *)
  2288.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2289.   ac_dummy="$PATH"
  2290.   for ac_dir in $ac_dummy; do 
  2291.     test -z "$ac_dir" && ac_dir=.
  2292.     if test -f $ac_dir/$ac_word; then
  2293.       ac_cv_path_AS="$ac_dir/$ac_word"
  2294.       break
  2295.     fi
  2296.   done
  2297.   IFS="$ac_save_ifs"
  2298.   ;;
  2299. esac
  2300. fi
  2301. AS="$ac_cv_path_AS"
  2302. if test -n "$AS"; then
  2303.   echo "$ac_t""$AS" 1>&6
  2304. else
  2305.   echo "$ac_t""no" 1>&6
  2306. fi
  2307.  
  2308. test -n "$AS" && break
  2309. done
  2310. test -n "$AS" || AS="$CC"
  2311.  
  2312.     for ac_prog in ar
  2313. do
  2314. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2315. set dummy $ac_prog; ac_word=$2
  2316. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2317. echo "configure:2318: checking for $ac_word" >&5
  2318. if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
  2319.   echo $ac_n "(cached) $ac_c" 1>&6
  2320. else
  2321.   case "$AR" in
  2322.   /*)
  2323.   ac_cv_path_AR="$AR" # Let the user override the test with a path.
  2324.   ;;
  2325.   ?:/*)             
  2326.   ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
  2327.   ;;
  2328.   *)
  2329.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2330.   ac_dummy="$PATH"
  2331.   for ac_dir in $ac_dummy; do 
  2332.     test -z "$ac_dir" && ac_dir=.
  2333.     if test -f $ac_dir/$ac_word; then
  2334.       ac_cv_path_AR="$ac_dir/$ac_word"
  2335.       break
  2336.     fi
  2337.   done
  2338.   IFS="$ac_save_ifs"
  2339.   ;;
  2340. esac
  2341. fi
  2342. AR="$ac_cv_path_AR"
  2343. if test -n "$AR"; then
  2344.   echo "$ac_t""$AR" 1>&6
  2345. else
  2346.   echo "$ac_t""no" 1>&6
  2347. fi
  2348.  
  2349. test -n "$AR" && break
  2350. done
  2351. test -n "$AR" || AR=":"
  2352.  
  2353.     for ac_prog in ld
  2354. do
  2355. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2356. set dummy $ac_prog; ac_word=$2
  2357. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2358. echo "configure:2359: checking for $ac_word" >&5
  2359. if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
  2360.   echo $ac_n "(cached) $ac_c" 1>&6
  2361. else
  2362.   case "$LD" in
  2363.   /*)
  2364.   ac_cv_path_LD="$LD" # Let the user override the test with a path.
  2365.   ;;
  2366.   ?:/*)             
  2367.   ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
  2368.   ;;
  2369.   *)
  2370.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2371.   ac_dummy="$PATH"
  2372.   for ac_dir in $ac_dummy; do 
  2373.     test -z "$ac_dir" && ac_dir=.
  2374.     if test -f $ac_dir/$ac_word; then
  2375.       ac_cv_path_LD="$ac_dir/$ac_word"
  2376.       break
  2377.     fi
  2378.   done
  2379.   IFS="$ac_save_ifs"
  2380.   ;;
  2381. esac
  2382. fi
  2383. LD="$ac_cv_path_LD"
  2384. if test -n "$LD"; then
  2385.   echo "$ac_t""$LD" 1>&6
  2386. else
  2387.   echo "$ac_t""no" 1>&6
  2388. fi
  2389.  
  2390. test -n "$LD" && break
  2391. done
  2392. test -n "$LD" || LD=":"
  2393.  
  2394.     for ac_prog in strip
  2395. do
  2396. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2397. set dummy $ac_prog; ac_word=$2
  2398. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2399. echo "configure:2400: checking for $ac_word" >&5
  2400. if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
  2401.   echo $ac_n "(cached) $ac_c" 1>&6
  2402. else
  2403.   case "$STRIP" in
  2404.   /*)
  2405.   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
  2406.   ;;
  2407.   ?:/*)             
  2408.   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a dos path.
  2409.   ;;
  2410.   *)
  2411.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2412.   ac_dummy="$PATH"
  2413.   for ac_dir in $ac_dummy; do 
  2414.     test -z "$ac_dir" && ac_dir=.
  2415.     if test -f $ac_dir/$ac_word; then
  2416.       ac_cv_path_STRIP="$ac_dir/$ac_word"
  2417.       break
  2418.     fi
  2419.   done
  2420.   IFS="$ac_save_ifs"
  2421.   ;;
  2422. esac
  2423. fi
  2424. STRIP="$ac_cv_path_STRIP"
  2425. if test -n "$STRIP"; then
  2426.   echo "$ac_t""$STRIP" 1>&6
  2427. else
  2428.   echo "$ac_t""no" 1>&6
  2429. fi
  2430.  
  2431. test -n "$STRIP" && break
  2432. done
  2433. test -n "$STRIP" || STRIP=":"
  2434.  
  2435.     for ac_prog in dlltool
  2436. do
  2437. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2438. set dummy $ac_prog; ac_word=$2
  2439. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2440. echo "configure:2441: checking for $ac_word" >&5
  2441. if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL'+set}'`\" = set"; then
  2442.   echo $ac_n "(cached) $ac_c" 1>&6
  2443. else
  2444.   case "$DLLTOOL" in
  2445.   /*)
  2446.   ac_cv_path_DLLTOOL="$DLLTOOL" # Let the user override the test with a path.
  2447.   ;;
  2448.   ?:/*)             
  2449.   ac_cv_path_DLLTOOL="$DLLTOOL" # Let the user override the test with a dos path.
  2450.   ;;
  2451.   *)
  2452.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2453.   ac_dummy="$PATH"
  2454.   for ac_dir in $ac_dummy; do 
  2455.     test -z "$ac_dir" && ac_dir=.
  2456.     if test -f $ac_dir/$ac_word; then
  2457.       ac_cv_path_DLLTOOL="$ac_dir/$ac_word"
  2458.       break
  2459.     fi
  2460.   done
  2461.   IFS="$ac_save_ifs"
  2462.   ;;
  2463. esac
  2464. fi
  2465. DLLTOOL="$ac_cv_path_DLLTOOL"
  2466. if test -n "$DLLTOOL"; then
  2467.   echo "$ac_t""$DLLTOOL" 1>&6
  2468. else
  2469.   echo "$ac_t""no" 1>&6
  2470. fi
  2471.  
  2472. test -n "$DLLTOOL" && break
  2473. done
  2474. test -n "$DLLTOOL" || DLLTOOL=":"
  2475.  
  2476.     if test -z "$HOST_CC"; then
  2477.     HOST_CC="$CC"
  2478.     fi
  2479.     if test -z "$HOST_CFLAGS"; then
  2480.     HOST_CFLAGS="$CFLAGS"
  2481.     fi
  2482.     if test -z "$HOST_CXX"; then
  2483.     HOST_CXX="$CXX"
  2484.     fi
  2485.     if test -z "$HOST_CXXFLAGS"; then
  2486.     HOST_CXXFLAGS="$CXXFLAGS"
  2487.     fi
  2488.     if test -z "$HOST_LDFLAGS"; then
  2489.     HOST_LDFLAGS="$LDFLAGS"
  2490.     fi
  2491.     if test -z "$HOST_RANLIB"; then
  2492.     HOST_RANLIB="$RANLIB"
  2493.     fi
  2494.     if test -z "$HOST_AR"; then
  2495.     HOST_AR="$AR"
  2496.     fi
  2497. fi
  2498.  
  2499. if test "$CC" != "icc"; then
  2500.     if test "x$CC" != xcc; then
  2501.   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
  2502. echo "configure:2503: checking whether $CC and cc understand -c and -o together" >&5
  2503. else
  2504.   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
  2505. echo "configure:2506: checking whether cc understands -c and -o together" >&5
  2506. fi
  2507. set dummy $CC; ac_cc="`echo $2 |
  2508.                sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
  2509. if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
  2510.   echo $ac_n "(cached) $ac_c" 1>&6
  2511. else
  2512.   echo 'foo(){}' > conftest.c
  2513. # Make sure it works both with $CC and with simple cc.
  2514. # We do the test twice because some compilers refuse to overwrite an
  2515. # existing .o file with -o, though they will create one.
  2516. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
  2517. if { (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
  2518.    test -f conftest.o && { (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
  2519. then
  2520.   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
  2521.   if test "x$CC" != xcc; then
  2522.     # Test first that cc exists at all.
  2523.     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
  2524.       ac_try='cc -c conftest.c -o conftest.o 1>&5'
  2525.       if { (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
  2526.      test -f conftest.o && { (eval echo configure:2527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
  2527.       then
  2528.         # cc works too.
  2529.         :
  2530.       else
  2531.         # cc exists but doesn't like -o.
  2532.         eval ac_cv_prog_cc_${ac_cc}_c_o=no
  2533.       fi
  2534.     fi
  2535.   fi
  2536. else
  2537.   eval ac_cv_prog_cc_${ac_cc}_c_o=no
  2538. fi
  2539. rm -f conftest*
  2540.  
  2541. fi
  2542. if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
  2543.   echo "$ac_t""yes" 1>&6
  2544. else
  2545.   echo "$ac_t""no" 1>&6
  2546.   cat >> confdefs.h <<\EOF
  2547. #define NO_MINUS_C_MINUS_O 1
  2548. EOF
  2549.  
  2550. fi
  2551.  
  2552.     if grep "NO_MINUS_C_MINUS_O 1" ./confdefs.h >/dev/null; then
  2553.         USING_HCC=1
  2554.         _OLDCC=$CC
  2555.         _OLDCXX=$CXX
  2556.         CC="${srcdir}/build/hcc '$CC'"
  2557.         CXX="${srcdir}/build/hcpp '$CXX'"
  2558.     fi
  2559. fi
  2560.  
  2561. GNU_AS=
  2562. GNU_CC=
  2563. GNU_CXX=
  2564. if test "$GCC" = "yes"; then
  2565.     GNU_CC=1
  2566. fi
  2567. if test "$GXX" = "yes"; then
  2568.     GNU_CXX=1
  2569. fi
  2570. if test "`echo | $AS -V 2>&1 | grep -c GNU`" != "0"; then
  2571.     GNU_AS=1
  2572. fi
  2573. rm -f a.out
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579. # Check whether --enable-gcc-pipe or --disable-gcc-pipe was given.
  2580. if test "${enable_gcc_pipe+set}" = set; then
  2581.   enableval="$enable_gcc_pipe"
  2582.   if test "$enableval" = "no"; then
  2583.     NO_GCC_PIPE=1
  2584.   elif test "$enableval" = "yes"; then
  2585.     :
  2586.   else
  2587.     { echo "configure: error: Option, gcc-pipe, does not take an argument ($enableval)." 1>&2; exit 1; }
  2588.   fi
  2589. fi
  2590.  
  2591.  
  2592. echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
  2593. echo "configure:2594: checking for gcc -pipe support" >&5
  2594.  
  2595. if test -n "$NO_GCC_PIPE"; then
  2596.     echo "$ac_t""disabled" 1>&6
  2597. elif test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
  2598.     echo '#include <stdio.h>' > dummy-hello.c
  2599.     echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c
  2600.     ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
  2601.     cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
  2602.     if test $? = 0; then
  2603.         _res_as_stdin="yes"
  2604.     else
  2605.         _res_as_stdin="no"
  2606.     fi
  2607.     if test "$_res_as_stdin" = "yes"; then
  2608.         _SAVE_CFLAGS=$CFLAGS
  2609.         CFLAGS="$CFLAGS -pipe"
  2610.         cat > conftest.$ac_ext <<EOF
  2611. #line 2612 "configure"
  2612. #include "confdefs.h"
  2613.  #include <stdio.h> 
  2614. int main() {
  2615. printf("Hello World\n");
  2616. ; return 0; }
  2617. EOF
  2618. if { (eval echo configure:2619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2619.   rm -rf conftest*
  2620.   _res_gcc_pipe="yes"
  2621. else
  2622.   echo "configure: failed program was:" >&5
  2623.   cat conftest.$ac_ext >&5
  2624.   rm -rf conftest*
  2625.   _res_gcc_pipe="no" 
  2626. fi
  2627. rm -f conftest*
  2628.         CFLAGS=$_SAVE_CFLAGS
  2629.     fi
  2630.     if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
  2631.         _res="yes";
  2632.         CFLAGS="$CFLAGS -pipe"
  2633.         CXXFLAGS="$CXXFLAGS -pipe"
  2634.     else
  2635.         _res="no"
  2636.     fi
  2637.     rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
  2638.     echo "$ac_t""$_res" 1>&6
  2639. else
  2640.     echo "$ac_t""no" 1>&6
  2641. fi
  2642.  
  2643. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2644. echo "configure:2645: checking how to run the C preprocessor" >&5
  2645. # On Suns, sometimes $CPP names a directory.
  2646. if test -n "$CPP" && test -d "$CPP"; then
  2647.   CPP=
  2648. fi
  2649. if test -z "$CPP"; then
  2650. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  2651.   echo $ac_n "(cached) $ac_c" 1>&6
  2652. else
  2653.     # This must be in double quotes, not single quotes, because CPP may get
  2654.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  2655.   CPP="${CC-cc} -E"
  2656.   # On the NeXT, cc -E runs the code through the compiler's parser,
  2657.   # not just through cpp.
  2658.   cat > conftest.$ac_ext <<EOF
  2659. #line 2660 "configure"
  2660. #include "confdefs.h"
  2661. #include <assert.h>
  2662. Syntax Error
  2663. EOF
  2664. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2665. { (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2666. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2667. if test -z "$ac_err"; then
  2668.   :
  2669. else
  2670.   echo "$ac_err" >&5
  2671.   echo "configure: failed program was:" >&5
  2672.   cat conftest.$ac_ext >&5
  2673.   rm -rf conftest*
  2674.   CPP="${CC-cc} -E -traditional-cpp"
  2675.   cat > conftest.$ac_ext <<EOF
  2676. #line 2677 "configure"
  2677. #include "confdefs.h"
  2678. #include <assert.h>
  2679. Syntax Error
  2680. EOF
  2681. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2682. { (eval echo configure:2683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2683. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2684. if test -z "$ac_err"; then
  2685.   :
  2686. else
  2687.   echo "$ac_err" >&5
  2688.   echo "configure: failed program was:" >&5
  2689.   cat conftest.$ac_ext >&5
  2690.   rm -rf conftest*
  2691.   CPP="${CC-cc} -nologo -E"
  2692.   cat > conftest.$ac_ext <<EOF
  2693. #line 2694 "configure"
  2694. #include "confdefs.h"
  2695. #include <assert.h>
  2696. Syntax Error
  2697. EOF
  2698. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2699. { (eval echo configure:2700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2700. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2701. if test -z "$ac_err"; then
  2702.   :
  2703. else
  2704.   echo "$ac_err" >&5
  2705.   echo "configure: failed program was:" >&5
  2706.   cat conftest.$ac_ext >&5
  2707.   rm -rf conftest*
  2708.   CPP=/lib/cpp
  2709. fi
  2710. rm -f conftest*
  2711. fi
  2712. rm -f conftest*
  2713. fi
  2714. rm -f conftest*
  2715.   ac_cv_prog_CPP="$CPP"
  2716. fi
  2717.   CPP="$ac_cv_prog_CPP"
  2718. else
  2719.   ac_cv_prog_CPP="$CPP"
  2720. fi
  2721. echo "$ac_t""$CPP" 1>&6
  2722.  
  2723. echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
  2724. echo "configure:2725: checking how to run the C++ preprocessor" >&5
  2725. if test -z "$CXXCPP"; then
  2726. if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
  2727.   echo $ac_n "(cached) $ac_c" 1>&6
  2728. else
  2729.   ac_ext=C
  2730. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2731. ac_cpp='$CXXCPP $CPPFLAGS'
  2732. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2733. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2734. cross_compiling=$ac_cv_prog_cxx_cross
  2735.   CXXCPP="${CXX-g++} -E"
  2736.   cat > conftest.$ac_ext <<EOF
  2737. #line 2738 "configure"
  2738. #include "confdefs.h"
  2739. #include <stdlib.h>
  2740. EOF
  2741. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2742. { (eval echo configure:2743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2743. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2744. if test -z "$ac_err"; then
  2745.   :
  2746. else
  2747.   echo "$ac_err" >&5
  2748.   echo "configure: failed program was:" >&5
  2749.   cat conftest.$ac_ext >&5
  2750.   rm -rf conftest*
  2751.   CXXCPP=/lib/cpp
  2752. fi
  2753. rm -f conftest*
  2754.   ac_cv_prog_CXXCPP="$CXXCPP"
  2755. ac_ext=c
  2756. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2757. ac_cpp='$CPP $CPPFLAGS'
  2758. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2759. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2760. cross_compiling=$ac_cv_prog_cc_cross
  2761. fi
  2762. fi
  2763. CXXCPP="$ac_cv_prog_CXXCPP"
  2764. echo "$ac_t""$CXXCPP" 1>&6
  2765.  
  2766. # Find a good install program.  We prefer a C program (faster),
  2767. # so one script is as good as another.  But avoid the broken or
  2768. # incompatible versions:
  2769. # SysV /etc/install, /usr/sbin/install
  2770. # SunOS /usr/etc/install
  2771. # IRIX /sbin/install
  2772. # AIX /bin/install
  2773. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  2774. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  2775. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  2776. # ./install, which can be erroneously created by make from ./install.sh.
  2777. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  2778. echo "configure:2779: checking for a BSD compatible install" >&5
  2779. if test -z "$INSTALL"; then
  2780. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  2781.   echo $ac_n "(cached) $ac_c" 1>&6
  2782. else
  2783.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS=":"
  2784.   for ac_dir in $PATH; do
  2785.     # Account for people who put trailing slashes in PATH elements.
  2786.     case "$ac_dir/" in
  2787.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  2788.     *)
  2789.       # OSF1 and SCO ODT 3.0 have their own names for install.
  2790.       # Don't use installbsd from OSF since it installs stuff as root
  2791.       # by default.
  2792.       for ac_prog in ginstall scoinst install; do
  2793.         if test -f $ac_dir/$ac_prog; then
  2794.       if test $ac_prog = install &&
  2795.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  2796.         # AIX install.  It has an incompatible calling convention.
  2797.         :
  2798.       else
  2799.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  2800.         break 2
  2801.       fi
  2802.     fi
  2803.       done
  2804.       ;;
  2805.     esac
  2806.   done
  2807.   IFS="$ac_save_IFS"
  2808.  
  2809. fi
  2810.   if test "${ac_cv_path_install+set}" = set; then
  2811.     INSTALL="$ac_cv_path_install"
  2812.   else
  2813.     # As a last resort, use the slow shell script.  We don't cache a
  2814.     # path for INSTALL within a source directory, because that will
  2815.     # break other packages using the cache if that directory is
  2816.     # removed, or if the path is relative.
  2817.     INSTALL="$ac_install_sh"
  2818.   fi
  2819. fi
  2820. echo "$ac_t""$INSTALL" 1>&6
  2821.  
  2822. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  2823. # It thinks the first close brace ends the variable substitution.
  2824. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  2825.  
  2826. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  2827.  
  2828. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  2829.  
  2830. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  2831. echo "configure:2832: checking whether ln -s works" >&5
  2832. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  2833.   echo $ac_n "(cached) $ac_c" 1>&6
  2834. else
  2835.   rm -f conftestdata
  2836. if ln -s X conftestdata 2>/dev/null
  2837. then
  2838.   rm -f conftestdata
  2839.   ac_cv_prog_LN_S="ln -s"
  2840. else
  2841.   ac_cv_prog_LN_S=ln
  2842. fi
  2843. fi
  2844. LN_S="$ac_cv_prog_LN_S"
  2845. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  2846.   echo "$ac_t""yes" 1>&6
  2847. else
  2848.   echo "$ac_t""no" 1>&6
  2849. fi
  2850.  
  2851. for ac_prog in gawk mawk nawk awk
  2852. do
  2853. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2854. set dummy $ac_prog; ac_word=$2
  2855. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2856. echo "configure:2857: checking for $ac_word" >&5
  2857. if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  2858.   echo $ac_n "(cached) $ac_c" 1>&6
  2859. else
  2860.   if test -n "$AWK"; then
  2861.   ac_cv_prog_AWK="$AWK" # Let the user override the test.
  2862. else
  2863.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2864.   ac_dummy="$PATH"
  2865.   for ac_dir in $ac_dummy; do
  2866.     test -z "$ac_dir" && ac_dir=.
  2867.     if test -f $ac_dir/$ac_word; then
  2868.       ac_cv_prog_AWK="$ac_prog"
  2869.       break
  2870.     fi
  2871.   done
  2872.   IFS="$ac_save_ifs"
  2873. fi
  2874. fi
  2875. AWK="$ac_cv_prog_AWK"
  2876. if test -n "$AWK"; then
  2877.   echo "$ac_t""$AWK" 1>&6
  2878. else
  2879.   echo "$ac_t""no" 1>&6
  2880. fi
  2881.  
  2882. test -n "$AWK" && break
  2883. done
  2884.  
  2885. for ac_prog in xemacs lemacs emacs
  2886. do
  2887. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2888. set dummy $ac_prog; ac_word=$2
  2889. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2890. echo "configure:2891: checking for $ac_word" >&5
  2891. if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then
  2892.   echo $ac_n "(cached) $ac_c" 1>&6
  2893. else
  2894.   case "$EMACS" in
  2895.   /*)
  2896.   ac_cv_path_EMACS="$EMACS" # Let the user override the test with a path.
  2897.   ;;
  2898.   ?:/*)             
  2899.   ac_cv_path_EMACS="$EMACS" # Let the user override the test with a dos path.
  2900.   ;;
  2901.   *)
  2902.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2903.   ac_dummy="$PATH"
  2904.   for ac_dir in $ac_dummy; do 
  2905.     test -z "$ac_dir" && ac_dir=.
  2906.     if test -f $ac_dir/$ac_word; then
  2907.       ac_cv_path_EMACS="$ac_dir/$ac_word"
  2908.       break
  2909.     fi
  2910.   done
  2911.   IFS="$ac_save_ifs"
  2912.   ;;
  2913. esac
  2914. fi
  2915. EMACS="$ac_cv_path_EMACS"
  2916. if test -n "$EMACS"; then
  2917.   echo "$ac_t""$EMACS" 1>&6
  2918. else
  2919.   echo "$ac_t""no" 1>&6
  2920. fi
  2921.  
  2922. test -n "$EMACS" && break
  2923. done
  2924. test -n "$EMACS" || EMACS=":"
  2925.  
  2926. for ac_prog in $PERL perl5 perl 
  2927. do
  2928. # Extract the first word of "$ac_prog", so it can be a program name with args.
  2929. set dummy $ac_prog; ac_word=$2
  2930. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2931. echo "configure:2932: checking for $ac_word" >&5
  2932. if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
  2933.   echo $ac_n "(cached) $ac_c" 1>&6
  2934. else
  2935.   case "$PERL" in
  2936.   /*)
  2937.   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  2938.   ;;
  2939.   ?:/*)             
  2940.   ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  2941.   ;;
  2942.   *)
  2943.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  2944.   ac_dummy="$PATH"
  2945.   for ac_dir in $ac_dummy; do 
  2946.     test -z "$ac_dir" && ac_dir=.
  2947.     if test -f $ac_dir/$ac_word; then
  2948.       ac_cv_path_PERL="$ac_dir/$ac_word"
  2949.       break
  2950.     fi
  2951.   done
  2952.   IFS="$ac_save_ifs"
  2953.   ;;
  2954. esac
  2955. fi
  2956. PERL="$ac_cv_path_PERL"
  2957. if test -n "$PERL"; then
  2958.   echo "$ac_t""$PERL" 1>&6
  2959. else
  2960.   echo "$ac_t""no" 1>&6
  2961. fi
  2962.  
  2963. test -n "$PERL" && break
  2964. done
  2965.  
  2966. if test -z "$PERL" || test "$PERL" = ":"; then
  2967.     { echo "configure: error: perl not found in \$PATH" 1>&2; exit 1; }
  2968. fi
  2969.  
  2970. echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6
  2971. echo "configure:2972: checking for minimum required perl version >= $PERL_VERSION" >&5
  2972. _perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5`
  2973. _perl_res=$?
  2974. echo "$ac_t""$_perl_version" 1>&6
  2975.  
  2976. if test "$_perl_res" != 0; then
  2977.     { echo "configure: error: Perl $PERL_VERSION or higher is required." 1>&2; exit 1; }
  2978. fi
  2979.  
  2980. echo $ac_n "checking for full perl installation""... $ac_c" 1>&6
  2981. echo "configure:2982: checking for full perl installation" >&5
  2982. _perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5`
  2983. _perl_res=$?
  2984. if test "$_perl_res" != 0; then
  2985.     echo "$ac_t""no" 1>&6
  2986.     { echo "configure: error: Cannot find Config.pm or \$Config{archlib}.  A full perl installation is required." 1>&2; exit 1; }
  2987. else
  2988.     echo "$ac_t""yes" 1>&6    
  2989. fi
  2990.  
  2991. # Extract the first word of "whoami", so it can be a program name with args.
  2992. set dummy whoami; ac_word=$2
  2993. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  2994. echo "configure:2995: checking for $ac_word" >&5
  2995. if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
  2996.   echo $ac_n "(cached) $ac_c" 1>&6
  2997. else
  2998.   case "$WHOAMI" in
  2999.   /*)
  3000.   ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
  3001.   ;;
  3002.   ?:/*)             
  3003.   ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a dos path.
  3004.   ;;
  3005.   *)
  3006.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  3007.   ac_dummy="$PATH"
  3008.   for ac_dir in $ac_dummy; do 
  3009.     test -z "$ac_dir" && ac_dir=.
  3010.     if test -f $ac_dir/$ac_word; then
  3011.       ac_cv_path_WHOAMI="$ac_dir/$ac_word"
  3012.       break
  3013.     fi
  3014.   done
  3015.   IFS="$ac_save_ifs"
  3016.   test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI=":"
  3017.   ;;
  3018. esac
  3019. fi
  3020. WHOAMI="$ac_cv_path_WHOAMI"
  3021. if test -n "$WHOAMI"; then
  3022.   echo "$ac_t""$WHOAMI" 1>&6
  3023. else
  3024.   echo "$ac_t""no" 1>&6
  3025. fi
  3026.  
  3027. # Extract the first word of "autoconf", so it can be a program name with args.
  3028. set dummy autoconf; ac_word=$2
  3029. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3030. echo "configure:3031: checking for $ac_word" >&5
  3031. if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
  3032.   echo $ac_n "(cached) $ac_c" 1>&6
  3033. else
  3034.   case "$AUTOCONF" in
  3035.   /*)
  3036.   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
  3037.   ;;
  3038.   ?:/*)             
  3039.   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
  3040.   ;;
  3041.   *)
  3042.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  3043.   ac_dummy="$PATH"
  3044.   for ac_dir in $ac_dummy; do 
  3045.     test -z "$ac_dir" && ac_dir=.
  3046.     if test -f $ac_dir/$ac_word; then
  3047.       ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
  3048.       break
  3049.     fi
  3050.   done
  3051.   IFS="$ac_save_ifs"
  3052.   test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF=":"
  3053.   ;;
  3054. esac
  3055. fi
  3056. AUTOCONF="$ac_cv_path_AUTOCONF"
  3057. if test -n "$AUTOCONF"; then
  3058.   echo "$ac_t""$AUTOCONF" 1>&6
  3059. else
  3060.   echo "$ac_t""no" 1>&6
  3061. fi
  3062.  
  3063. # Extract the first word of "unzip", so it can be a program name with args.
  3064. set dummy unzip; ac_word=$2
  3065. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3066. echo "configure:3067: checking for $ac_word" >&5
  3067. if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then
  3068.   echo $ac_n "(cached) $ac_c" 1>&6
  3069. else
  3070.   case "$UNZIP" in
  3071.   /*)
  3072.   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
  3073.   ;;
  3074.   ?:/*)             
  3075.   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a dos path.
  3076.   ;;
  3077.   *)
  3078.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  3079.   ac_dummy="$PATH"
  3080.   for ac_dir in $ac_dummy; do 
  3081.     test -z "$ac_dir" && ac_dir=.
  3082.     if test -f $ac_dir/$ac_word; then
  3083.       ac_cv_path_UNZIP="$ac_dir/$ac_word"
  3084.       break
  3085.     fi
  3086.   done
  3087.   IFS="$ac_save_ifs"
  3088.   test -z "$ac_cv_path_UNZIP" && ac_cv_path_UNZIP=":"
  3089.   ;;
  3090. esac
  3091. fi
  3092. UNZIP="$ac_cv_path_UNZIP"
  3093. if test -n "$UNZIP"; then
  3094.   echo "$ac_t""$UNZIP" 1>&6
  3095. else
  3096.   echo "$ac_t""no" 1>&6
  3097. fi
  3098.  
  3099. for ac_prog in zip
  3100. do
  3101. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3102. set dummy $ac_prog; ac_word=$2
  3103. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3104. echo "configure:3105: checking for $ac_word" >&5
  3105. if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then
  3106.   echo $ac_n "(cached) $ac_c" 1>&6
  3107. else
  3108.   case "$ZIP" in
  3109.   /*)
  3110.   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
  3111.   ;;
  3112.   ?:/*)             
  3113.   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a dos path.
  3114.   ;;
  3115.   *)
  3116.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  3117.   ac_dummy="$PATH"
  3118.   for ac_dir in $ac_dummy; do 
  3119.     test -z "$ac_dir" && ac_dir=.
  3120.     if test -f $ac_dir/$ac_word; then
  3121.       ac_cv_path_ZIP="$ac_dir/$ac_word"
  3122.       break
  3123.     fi
  3124.   done
  3125.   IFS="$ac_save_ifs"
  3126.   ;;
  3127. esac
  3128. fi
  3129. ZIP="$ac_cv_path_ZIP"
  3130. if test -n "$ZIP"; then
  3131.   echo "$ac_t""$ZIP" 1>&6
  3132. else
  3133.   echo "$ac_t""no" 1>&6
  3134. fi
  3135.  
  3136. test -n "$ZIP" && break
  3137. done
  3138.  
  3139. if test -z "$ZIP" || test "$ZIP" = ":"; then
  3140.     echo "configure: warning: zip not found in \$PATH. Disabling jar packaging" 1>&2
  3141.     MOZ_DISABLE_JAR_PACKAGING=1
  3142. fi
  3143. # Extract the first word of "makedepend", so it can be a program name with args.
  3144. set dummy makedepend; ac_word=$2
  3145. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3146. echo "configure:3147: checking for $ac_word" >&5
  3147. if eval "test \"`echo '$''{'ac_cv_path_SYSTEM_MAKEDEPEND'+set}'`\" = set"; then
  3148.   echo $ac_n "(cached) $ac_c" 1>&6
  3149. else
  3150.   case "$SYSTEM_MAKEDEPEND" in
  3151.   /*)
  3152.   ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a path.
  3153.   ;;
  3154.   ?:/*)             
  3155.   ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a dos path.
  3156.   ;;
  3157.   *)
  3158.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  3159.   ac_dummy="$PATH"
  3160.   for ac_dir in $ac_dummy; do 
  3161.     test -z "$ac_dir" && ac_dir=.
  3162.     if test -f $ac_dir/$ac_word; then
  3163.       ac_cv_path_SYSTEM_MAKEDEPEND="$ac_dir/$ac_word"
  3164.       break
  3165.     fi
  3166.   done
  3167.   IFS="$ac_save_ifs"
  3168.   ;;
  3169. esac
  3170. fi
  3171. SYSTEM_MAKEDEPEND="$ac_cv_path_SYSTEM_MAKEDEPEND"
  3172. if test -n "$SYSTEM_MAKEDEPEND"; then
  3173.   echo "$ac_t""$SYSTEM_MAKEDEPEND" 1>&6
  3174. else
  3175.   echo "$ac_t""no" 1>&6
  3176. fi
  3177.  
  3178. # Extract the first word of "xargs", so it can be a program name with args.
  3179. set dummy xargs; ac_word=$2
  3180. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3181. echo "configure:3182: checking for $ac_word" >&5
  3182. if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then
  3183.   echo $ac_n "(cached) $ac_c" 1>&6
  3184. else
  3185.   case "$XARGS" in
  3186.   /*)
  3187.   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
  3188.   ;;
  3189.   ?:/*)             
  3190.   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a dos path.
  3191.   ;;
  3192.   *)
  3193.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  3194.   ac_dummy="$PATH"
  3195.   for ac_dir in $ac_dummy; do 
  3196.     test -z "$ac_dir" && ac_dir=.
  3197.     if test -f $ac_dir/$ac_word; then
  3198.       ac_cv_path_XARGS="$ac_dir/$ac_word"
  3199.       break
  3200.     fi
  3201.   done
  3202.   IFS="$ac_save_ifs"
  3203.   ;;
  3204. esac
  3205. fi
  3206. XARGS="$ac_cv_path_XARGS"
  3207. if test -n "$XARGS"; then
  3208.   echo "$ac_t""$XARGS" 1>&6
  3209. else
  3210.   echo "$ac_t""no" 1>&6
  3211. fi
  3212.  
  3213.  
  3214. for ac_prog in gmake make
  3215. do
  3216. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3217. set dummy $ac_prog; ac_word=$2
  3218. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3219. echo "configure:3220: checking for $ac_word" >&5
  3220. if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
  3221.   echo $ac_n "(cached) $ac_c" 1>&6
  3222. else
  3223.   case "$MAKE" in
  3224.   /*)
  3225.   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
  3226.   ;;
  3227.   ?:/*)             
  3228.   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a dos path.
  3229.   ;;
  3230.   *)
  3231.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  3232.   ac_dummy="$PATH"
  3233.   for ac_dir in $ac_dummy; do 
  3234.     test -z "$ac_dir" && ac_dir=.
  3235.     if test -f $ac_dir/$ac_word; then
  3236.       ac_cv_path_MAKE="$ac_dir/$ac_word"
  3237.       break
  3238.     fi
  3239.   done
  3240.   IFS="$ac_save_ifs"
  3241.   ;;
  3242. esac
  3243. fi
  3244. MAKE="$ac_cv_path_MAKE"
  3245. if test -n "$MAKE"; then
  3246.   echo "$ac_t""$MAKE" 1>&6
  3247. else
  3248.   echo "$ac_t""no" 1>&6
  3249. fi
  3250.  
  3251. test -n "$MAKE" && break
  3252. done
  3253. test -n "$MAKE" || MAKE=":"
  3254.  
  3255. _make_try=`$MAKE --version 2>/dev/null`
  3256. if test ! "$_make_try"
  3257. then
  3258.     echo
  3259.     echo "*** $MAKE is not GNU Make.  You will not be able to build Mozilla without GNU Make."
  3260.     echo
  3261.     exit 1
  3262. fi
  3263. _make_vers=`$MAKE --version | grep Make | $AWK '{ print \$4 }' | sed 's/,//'`
  3264. if test "$_make_vers" = "3.77"
  3265. then
  3266.     echo
  3267.     echo "*** Found GNU Make 3.77.  This version is known to have problems with the"
  3268.     echo "*** wildcard function in certain circumstances.  You may experience infinite"
  3269.     echo "*** looping while building Mozilla with 3.77.  If this happens, you can"
  3270.     echo "*** either downgrade to 3.76.1 or try configuring with --disable-md."
  3271.     echo
  3272. fi
  3273.  
  3274. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  3275. echo "configure:3276: checking whether ${MAKE-make} sets \${MAKE}" >&5
  3276. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  3277. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  3278.   echo $ac_n "(cached) $ac_c" 1>&6
  3279. else
  3280.   cat > conftestmake <<\EOF
  3281. all:
  3282.     @echo 'ac_maketemp="${MAKE}"'
  3283. EOF
  3284. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3285. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  3286. if test -n "$ac_maketemp"; then
  3287.   eval ac_cv_prog_make_${ac_make}_set=yes
  3288. else
  3289.   eval ac_cv_prog_make_${ac_make}_set=no
  3290. fi
  3291. rm -f conftestmake
  3292. fi
  3293. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  3294.   echo "$ac_t""yes" 1>&6
  3295.   SET_MAKE=
  3296. else
  3297.   echo "$ac_t""no" 1>&6
  3298.   SET_MAKE="MAKE=${MAKE-make}"
  3299. fi
  3300.  
  3301.  
  3302. # If we find X, set shell vars x_includes and x_libraries to the
  3303. # paths, otherwise set no_x=yes.
  3304. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3305. # --without-x overrides everything else, but does not touch the cache.
  3306. echo $ac_n "checking for X""... $ac_c" 1>&6
  3307. echo "configure:3308: checking for X" >&5
  3308.  
  3309. # Check whether --with-x or --without-x was given.
  3310. if test "${with_x+set}" = set; then
  3311.   withval="$with_x"
  3312.   :
  3313. fi
  3314.  
  3315. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  3316. if test "x$with_x" = xno; then
  3317.   # The user explicitly disabled X.
  3318.   have_x=disabled
  3319. else
  3320.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3321.     # Both variables are already set.
  3322.     have_x=yes
  3323.   else
  3324. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  3325.   echo $ac_n "(cached) $ac_c" 1>&6
  3326. else
  3327.   # One or both of the vars are not set, and there is no cached value.
  3328. ac_x_includes=NO ac_x_libraries=NO
  3329. rm -fr conftestdir
  3330. if mkdir conftestdir; then
  3331.   cd conftestdir
  3332.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3333.   cat > Imakefile <<'EOF'
  3334. acfindx:
  3335.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3336. EOF
  3337.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3338.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3339.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3340.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3341.     for ac_extension in a so sl; do
  3342.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3343.         test -f $ac_im_libdir/libX11.$ac_extension; then
  3344.         ac_im_usrlibdir=$ac_im_libdir; break
  3345.       fi
  3346.     done
  3347.     # Screen out bogus values from the imake configuration.  They are
  3348.     # bogus both because they are the default anyway, and because
  3349.     # using them would break gcc on systems where it needs fixed includes.
  3350.     case "$ac_im_incroot" in
  3351.     /usr/include) ;;
  3352.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3353.     esac
  3354.     case "$ac_im_usrlibdir" in
  3355.     /usr/lib | /lib) ;;
  3356.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3357.     esac
  3358.   fi
  3359.   cd ..
  3360.   rm -fr conftestdir
  3361. fi
  3362.  
  3363. if test "$ac_x_includes" = NO; then
  3364.   # Guess where to find include files, by looking for this one X11 .h file.
  3365.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3366.  
  3367.   # First, try using that file with no special directory specified.
  3368. cat > conftest.$ac_ext <<EOF
  3369. #line 3370 "configure"
  3370. #include "confdefs.h"
  3371. #include <$x_direct_test_include>
  3372. EOF
  3373. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3374. { (eval echo configure:3375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3375. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3376. if test -z "$ac_err"; then
  3377.   rm -rf conftest*
  3378.   # We can compile using X headers with no special include directory.
  3379. ac_x_includes=
  3380. else
  3381.   echo "$ac_err" >&5
  3382.   echo "configure: failed program was:" >&5
  3383.   cat conftest.$ac_ext >&5
  3384.   rm -rf conftest*
  3385.   # Look for the header file in a standard set of common directories.
  3386. # Check X11 before X11Rn because it is often a symlink to the current release.
  3387.   for ac_dir in               \
  3388.     /usr/X11/include          \
  3389.     /usr/X11R6/include        \
  3390.     /usr/X11R5/include        \
  3391.     /usr/X11R4/include        \
  3392.                               \
  3393.     /usr/include/X11          \
  3394.     /usr/include/X11R6        \
  3395.     /usr/include/X11R5        \
  3396.     /usr/include/X11R4        \
  3397.                               \
  3398.     /usr/local/X11/include    \
  3399.     /usr/local/X11R6/include  \
  3400.     /usr/local/X11R5/include  \
  3401.     /usr/local/X11R4/include  \
  3402.                               \
  3403.     /usr/local/include/X11    \
  3404.     /usr/local/include/X11R6  \
  3405.     /usr/local/include/X11R5  \
  3406.     /usr/local/include/X11R4  \
  3407.                               \
  3408.     /usr/X386/include         \
  3409.     /usr/x386/include         \
  3410.     /usr/XFree86/include/X11  \
  3411.                               \
  3412.     /usr/include              \
  3413.     /usr/local/include        \
  3414.     /usr/unsupported/include  \
  3415.     /usr/athena/include       \
  3416.     /usr/local/x11r5/include  \
  3417.     /usr/lpp/Xamples/include  \
  3418.                               \
  3419.     /usr/openwin/include      \
  3420.     /usr/openwin/share/include \
  3421.     ; \
  3422.   do
  3423.     if test -r "$ac_dir/$x_direct_test_include"; then
  3424.       ac_x_includes=$ac_dir
  3425.       break
  3426.     fi
  3427.   done
  3428. fi
  3429. rm -f conftest*
  3430. fi # $ac_x_includes = NO
  3431.  
  3432. if test "$ac_x_libraries" = NO; then
  3433.   # Check for the libraries.
  3434.  
  3435.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3436.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3437.  
  3438.   # See if we find them without any special options.
  3439.   # Don't add to $LIBS permanently.
  3440.   ac_save_LIBS="$LIBS"
  3441.   LIBS="-l$x_direct_test_library $LIBS"
  3442. cat > conftest.$ac_ext <<EOF
  3443. #line 3444 "configure"
  3444. #include "confdefs.h"
  3445.  
  3446. int main() {
  3447. ${x_direct_test_function}()
  3448. ; return 0; }
  3449. EOF
  3450. if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3451.   rm -rf conftest*
  3452.   LIBS="$ac_save_LIBS"
  3453. # We can link X programs with no special library path.
  3454. ac_x_libraries=
  3455. else
  3456.   echo "configure: failed program was:" >&5
  3457.   cat conftest.$ac_ext >&5
  3458.   rm -rf conftest*
  3459.   LIBS="$ac_save_LIBS"
  3460. # First see if replacing the include by lib works.
  3461. # Check X11 before X11Rn because it is often a symlink to the current release.
  3462. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3463.     /usr/X11/lib          \
  3464.     /usr/X11R6/lib        \
  3465.     /usr/X11R5/lib        \
  3466.     /usr/X11R4/lib        \
  3467.                           \
  3468.     /usr/lib/X11          \
  3469.     /usr/lib/X11R6        \
  3470.     /usr/lib/X11R5        \
  3471.     /usr/lib/X11R4        \
  3472.                           \
  3473.     /usr/local/X11/lib    \
  3474.     /usr/local/X11R6/lib  \
  3475.     /usr/local/X11R5/lib  \
  3476.     /usr/local/X11R4/lib  \
  3477.                           \
  3478.     /usr/local/lib/X11    \
  3479.     /usr/local/lib/X11R6  \
  3480.     /usr/local/lib/X11R5  \
  3481.     /usr/local/lib/X11R4  \
  3482.                           \
  3483.     /usr/X386/lib         \
  3484.     /usr/x386/lib         \
  3485.     /usr/XFree86/lib/X11  \
  3486.                           \
  3487.     /usr/lib              \
  3488.     /usr/local/lib        \
  3489.     /usr/unsupported/lib  \
  3490.     /usr/athena/lib       \
  3491.     /usr/local/x11r5/lib  \
  3492.     /usr/lpp/Xamples/lib  \
  3493.     /lib/usr/lib/X11      \
  3494.                           \
  3495.     /usr/openwin/lib      \
  3496.     /usr/openwin/share/lib \
  3497.     ; \
  3498. do
  3499.   for ac_extension in a so sl; do
  3500.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3501.       ac_x_libraries=$ac_dir
  3502.       break 2
  3503.     fi
  3504.   done
  3505. done
  3506. fi
  3507. rm -f conftest*
  3508. fi # $ac_x_libraries = NO
  3509.  
  3510. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  3511.   # Didn't find X anywhere.  Cache the known absence of X.
  3512.   ac_cv_have_x="have_x=no"
  3513. else
  3514.   # Record where we found X for the cache.
  3515.   ac_cv_have_x="have_x=yes \
  3516.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3517. fi
  3518. fi
  3519.   fi
  3520.   eval "$ac_cv_have_x"
  3521. fi # $with_x != no
  3522.  
  3523. if test "$have_x" != yes; then
  3524.   echo "$ac_t""$have_x" 1>&6
  3525.   no_x=yes
  3526. else
  3527.   # If each of the values was on the command line, it overrides each guess.
  3528.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3529.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3530.   # Update the cache value to reflect the command line values.
  3531.   ac_cv_have_x="have_x=yes \
  3532.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3533.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3534. fi
  3535.  
  3536. if test "$no_x" = yes; then
  3537.   # Not all programs may use this symbol, but it does not hurt to define it.
  3538.   cat >> confdefs.h <<\EOF
  3539. #define X_DISPLAY_MISSING 1
  3540. EOF
  3541.  
  3542.   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  3543. else
  3544.   if test -n "$x_includes"; then
  3545.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  3546.   fi
  3547.  
  3548.   # It would also be nice to do this for all -L options, not just this one.
  3549.   if test -n "$x_libraries"; then
  3550.     X_LIBS="$X_LIBS -L$x_libraries"
  3551.     # For Solaris; some versions of Sun CC require a space after -R and
  3552.     # others require no space.  Words are not sufficient . . . .
  3553.     case "`(uname -sr) 2>/dev/null`" in
  3554.     "SunOS 5"*)
  3555.       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  3556. echo "configure:3557: checking whether -R must be followed by a space" >&5
  3557.       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  3558.       cat > conftest.$ac_ext <<EOF
  3559. #line 3560 "configure"
  3560. #include "confdefs.h"
  3561.  
  3562. int main() {
  3563.  
  3564. ; return 0; }
  3565. EOF
  3566. if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3567.   rm -rf conftest*
  3568.   ac_R_nospace=yes
  3569. else
  3570.   echo "configure: failed program was:" >&5
  3571.   cat conftest.$ac_ext >&5
  3572.   rm -rf conftest*
  3573.   ac_R_nospace=no
  3574. fi
  3575. rm -f conftest*
  3576.       if test $ac_R_nospace = yes; then
  3577.     echo "$ac_t""no" 1>&6
  3578.     X_LIBS="$X_LIBS -R$x_libraries"
  3579.       else
  3580.     LIBS="$ac_xsave_LIBS -R $x_libraries"
  3581.     cat > conftest.$ac_ext <<EOF
  3582. #line 3583 "configure"
  3583. #include "confdefs.h"
  3584.  
  3585. int main() {
  3586.  
  3587. ; return 0; }
  3588. EOF
  3589. if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3590.   rm -rf conftest*
  3591.   ac_R_space=yes
  3592. else
  3593.   echo "configure: failed program was:" >&5
  3594.   cat conftest.$ac_ext >&5
  3595.   rm -rf conftest*
  3596.   ac_R_space=no
  3597. fi
  3598. rm -f conftest*
  3599.     if test $ac_R_space = yes; then
  3600.       echo "$ac_t""yes" 1>&6
  3601.       X_LIBS="$X_LIBS -R $x_libraries"
  3602.     else
  3603.       echo "$ac_t""neither works" 1>&6
  3604.     fi
  3605.       fi
  3606.       LIBS="$ac_xsave_LIBS"
  3607.     esac
  3608.   fi
  3609.  
  3610.   # Check for system-dependent libraries X programs must link with.
  3611.   # Do this before checking for the system-independent R6 libraries
  3612.   # (-lICE), since we may need -lsocket or whatever for X linking.
  3613.  
  3614.   if test "$ISC" = yes; then
  3615.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  3616.   else
  3617.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  3618.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  3619.     # the Alpha needs dnet_stub (dnet does not exist).
  3620.     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  3621. echo "configure:3622: checking for dnet_ntoa in -ldnet" >&5
  3622. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3623. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3624.   echo $ac_n "(cached) $ac_c" 1>&6
  3625. else
  3626.   ac_save_LIBS="$LIBS"
  3627. LIBS="-ldnet  $LIBS"
  3628. cat > conftest.$ac_ext <<EOF
  3629. #line 3630 "configure"
  3630. #include "confdefs.h"
  3631. /* Override any gcc2 internal prototype to avoid an error.  */
  3632. /* We use char because int might match the return type of a gcc2
  3633.     builtin and then its argument prototype would still apply.  */
  3634. char dnet_ntoa();
  3635.  
  3636. int main() {
  3637. dnet_ntoa()
  3638. ; return 0; }
  3639. EOF
  3640. if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3641.   rm -rf conftest*
  3642.   eval "ac_cv_lib_$ac_lib_var=yes"
  3643. else
  3644.   echo "configure: failed program was:" >&5
  3645.   cat conftest.$ac_ext >&5
  3646.   rm -rf conftest*
  3647.   eval "ac_cv_lib_$ac_lib_var=no"
  3648. fi
  3649. rm -f conftest*
  3650. LIBS="$ac_save_LIBS"
  3651.  
  3652. fi
  3653. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3654.   echo "$ac_t""yes" 1>&6
  3655.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  3656. else
  3657.   echo "$ac_t""no" 1>&6
  3658. fi
  3659.  
  3660.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  3661.       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  3662. echo "configure:3663: checking for dnet_ntoa in -ldnet_stub" >&5
  3663. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  3664. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3665.   echo $ac_n "(cached) $ac_c" 1>&6
  3666. else
  3667.   ac_save_LIBS="$LIBS"
  3668. LIBS="-ldnet_stub  $LIBS"
  3669. cat > conftest.$ac_ext <<EOF
  3670. #line 3671 "configure"
  3671. #include "confdefs.h"
  3672. /* Override any gcc2 internal prototype to avoid an error.  */
  3673. /* We use char because int might match the return type of a gcc2
  3674.     builtin and then its argument prototype would still apply.  */
  3675. char dnet_ntoa();
  3676.  
  3677. int main() {
  3678. dnet_ntoa()
  3679. ; return 0; }
  3680. EOF
  3681. if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3682.   rm -rf conftest*
  3683.   eval "ac_cv_lib_$ac_lib_var=yes"
  3684. else
  3685.   echo "configure: failed program was:" >&5
  3686.   cat conftest.$ac_ext >&5
  3687.   rm -rf conftest*
  3688.   eval "ac_cv_lib_$ac_lib_var=no"
  3689. fi
  3690. rm -f conftest*
  3691. LIBS="$ac_save_LIBS"
  3692.  
  3693. fi
  3694. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3695.   echo "$ac_t""yes" 1>&6
  3696.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  3697. else
  3698.   echo "$ac_t""no" 1>&6
  3699. fi
  3700.  
  3701.     fi
  3702.  
  3703.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  3704.     # to get the SysV transport functions.
  3705.     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  3706.     # needs -lnsl.
  3707.     # The nsl library prevents programs from opening the X display
  3708.     # on Irix 5.2, according to dickey@clark.net.
  3709.     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3710. echo "configure:3711: checking for gethostbyname" >&5
  3711. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  3712.   echo $ac_n "(cached) $ac_c" 1>&6
  3713. else
  3714.   cat > conftest.$ac_ext <<EOF
  3715. #line 3716 "configure"
  3716. #include "confdefs.h"
  3717. /* System header to define __stub macros and hopefully few prototypes,
  3718.     which can conflict with char gethostbyname(); below.  */
  3719. #include <assert.h>
  3720. /* Override any gcc2 internal prototype to avoid an error.  */
  3721. /* We use char because int might match the return type of a gcc2
  3722.     builtin and then its argument prototype would still apply.  */
  3723. char gethostbyname();
  3724.  
  3725. int main() {
  3726.  
  3727. /* The GNU C library defines this for functions which it implements
  3728.     to always fail with ENOSYS.  Some functions are actually named
  3729.     something starting with __ and the normal name is an alias.  */
  3730. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3731. choke me
  3732. #else
  3733. gethostbyname();
  3734. #endif
  3735.  
  3736. ; return 0; }
  3737. EOF
  3738. if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3739.   rm -rf conftest*
  3740.   eval "ac_cv_func_gethostbyname=yes"
  3741. else
  3742.   echo "configure: failed program was:" >&5
  3743.   cat conftest.$ac_ext >&5
  3744.   rm -rf conftest*
  3745.   eval "ac_cv_func_gethostbyname=no"
  3746. fi
  3747. rm -f conftest*
  3748. fi
  3749.  
  3750. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3751.   echo "$ac_t""yes" 1>&6
  3752.   :
  3753. else
  3754.   echo "$ac_t""no" 1>&6
  3755. fi
  3756.  
  3757.     if test $ac_cv_func_gethostbyname = no; then
  3758.       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  3759. echo "configure:3760: checking for gethostbyname in -lnsl" >&5
  3760. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  3761. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3762.   echo $ac_n "(cached) $ac_c" 1>&6
  3763. else
  3764.   ac_save_LIBS="$LIBS"
  3765. LIBS="-lnsl  $LIBS"
  3766. cat > conftest.$ac_ext <<EOF
  3767. #line 3768 "configure"
  3768. #include "confdefs.h"
  3769. /* Override any gcc2 internal prototype to avoid an error.  */
  3770. /* We use char because int might match the return type of a gcc2
  3771.     builtin and then its argument prototype would still apply.  */
  3772. char gethostbyname();
  3773.  
  3774. int main() {
  3775. gethostbyname()
  3776. ; return 0; }
  3777. EOF
  3778. if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3779.   rm -rf conftest*
  3780.   eval "ac_cv_lib_$ac_lib_var=yes"
  3781. else
  3782.   echo "configure: failed program was:" >&5
  3783.   cat conftest.$ac_ext >&5
  3784.   rm -rf conftest*
  3785.   eval "ac_cv_lib_$ac_lib_var=no"
  3786. fi
  3787. rm -f conftest*
  3788. LIBS="$ac_save_LIBS"
  3789.  
  3790. fi
  3791. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3792.   echo "$ac_t""yes" 1>&6
  3793.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  3794. else
  3795.   echo "$ac_t""no" 1>&6
  3796. fi
  3797.  
  3798.     fi
  3799.  
  3800.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  3801.     # socket/setsockopt and other routines are undefined under SCO ODT
  3802.     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  3803.     # on later versions), says simon@lia.di.epfl.ch: it contains
  3804.     # gethostby* variants that don't use the nameserver (or something).
  3805.     # -lsocket must be given before -lnsl if both are needed.
  3806.     # We assume that if connect needs -lnsl, so does gethostbyname.
  3807.     echo $ac_n "checking for connect""... $ac_c" 1>&6
  3808. echo "configure:3809: checking for connect" >&5
  3809. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  3810.   echo $ac_n "(cached) $ac_c" 1>&6
  3811. else
  3812.   cat > conftest.$ac_ext <<EOF
  3813. #line 3814 "configure"
  3814. #include "confdefs.h"
  3815. /* System header to define __stub macros and hopefully few prototypes,
  3816.     which can conflict with char connect(); below.  */
  3817. #include <assert.h>
  3818. /* Override any gcc2 internal prototype to avoid an error.  */
  3819. /* We use char because int might match the return type of a gcc2
  3820.     builtin and then its argument prototype would still apply.  */
  3821. char connect();
  3822.  
  3823. int main() {
  3824.  
  3825. /* The GNU C library defines this for functions which it implements
  3826.     to always fail with ENOSYS.  Some functions are actually named
  3827.     something starting with __ and the normal name is an alias.  */
  3828. #if defined (__stub_connect) || defined (__stub___connect)
  3829. choke me
  3830. #else
  3831. connect();
  3832. #endif
  3833.  
  3834. ; return 0; }
  3835. EOF
  3836. if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3837.   rm -rf conftest*
  3838.   eval "ac_cv_func_connect=yes"
  3839. else
  3840.   echo "configure: failed program was:" >&5
  3841.   cat conftest.$ac_ext >&5
  3842.   rm -rf conftest*
  3843.   eval "ac_cv_func_connect=no"
  3844. fi
  3845. rm -f conftest*
  3846. fi
  3847.  
  3848. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  3849.   echo "$ac_t""yes" 1>&6
  3850.   :
  3851. else
  3852.   echo "$ac_t""no" 1>&6
  3853. fi
  3854.  
  3855.     if test $ac_cv_func_connect = no; then
  3856.       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  3857. echo "configure:3858: checking for connect in -lsocket" >&5
  3858. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  3859. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3860.   echo $ac_n "(cached) $ac_c" 1>&6
  3861. else
  3862.   ac_save_LIBS="$LIBS"
  3863. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  3864. cat > conftest.$ac_ext <<EOF
  3865. #line 3866 "configure"
  3866. #include "confdefs.h"
  3867. /* Override any gcc2 internal prototype to avoid an error.  */
  3868. /* We use char because int might match the return type of a gcc2
  3869.     builtin and then its argument prototype would still apply.  */
  3870. char connect();
  3871.  
  3872. int main() {
  3873. connect()
  3874. ; return 0; }
  3875. EOF
  3876. if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3877.   rm -rf conftest*
  3878.   eval "ac_cv_lib_$ac_lib_var=yes"
  3879. else
  3880.   echo "configure: failed program was:" >&5
  3881.   cat conftest.$ac_ext >&5
  3882.   rm -rf conftest*
  3883.   eval "ac_cv_lib_$ac_lib_var=no"
  3884. fi
  3885. rm -f conftest*
  3886. LIBS="$ac_save_LIBS"
  3887.  
  3888. fi
  3889. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3890.   echo "$ac_t""yes" 1>&6
  3891.   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  3892. else
  3893.   echo "$ac_t""no" 1>&6
  3894. fi
  3895.  
  3896.     fi
  3897.  
  3898.     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  3899.     echo $ac_n "checking for remove""... $ac_c" 1>&6
  3900. echo "configure:3901: checking for remove" >&5
  3901. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  3902.   echo $ac_n "(cached) $ac_c" 1>&6
  3903. else
  3904.   cat > conftest.$ac_ext <<EOF
  3905. #line 3906 "configure"
  3906. #include "confdefs.h"
  3907. /* System header to define __stub macros and hopefully few prototypes,
  3908.     which can conflict with char remove(); below.  */
  3909. #include <assert.h>
  3910. /* Override any gcc2 internal prototype to avoid an error.  */
  3911. /* We use char because int might match the return type of a gcc2
  3912.     builtin and then its argument prototype would still apply.  */
  3913. char remove();
  3914.  
  3915. int main() {
  3916.  
  3917. /* The GNU C library defines this for functions which it implements
  3918.     to always fail with ENOSYS.  Some functions are actually named
  3919.     something starting with __ and the normal name is an alias.  */
  3920. #if defined (__stub_remove) || defined (__stub___remove)
  3921. choke me
  3922. #else
  3923. remove();
  3924. #endif
  3925.  
  3926. ; return 0; }
  3927. EOF
  3928. if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3929.   rm -rf conftest*
  3930.   eval "ac_cv_func_remove=yes"
  3931. else
  3932.   echo "configure: failed program was:" >&5
  3933.   cat conftest.$ac_ext >&5
  3934.   rm -rf conftest*
  3935.   eval "ac_cv_func_remove=no"
  3936. fi
  3937. rm -f conftest*
  3938. fi
  3939.  
  3940. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  3941.   echo "$ac_t""yes" 1>&6
  3942.   :
  3943. else
  3944.   echo "$ac_t""no" 1>&6
  3945. fi
  3946.  
  3947.     if test $ac_cv_func_remove = no; then
  3948.       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  3949. echo "configure:3950: checking for remove in -lposix" >&5
  3950. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  3951. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3952.   echo $ac_n "(cached) $ac_c" 1>&6
  3953. else
  3954.   ac_save_LIBS="$LIBS"
  3955. LIBS="-lposix  $LIBS"
  3956. cat > conftest.$ac_ext <<EOF
  3957. #line 3958 "configure"
  3958. #include "confdefs.h"
  3959. /* Override any gcc2 internal prototype to avoid an error.  */
  3960. /* We use char because int might match the return type of a gcc2
  3961.     builtin and then its argument prototype would still apply.  */
  3962. char remove();
  3963.  
  3964. int main() {
  3965. remove()
  3966. ; return 0; }
  3967. EOF
  3968. if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3969.   rm -rf conftest*
  3970.   eval "ac_cv_lib_$ac_lib_var=yes"
  3971. else
  3972.   echo "configure: failed program was:" >&5
  3973.   cat conftest.$ac_ext >&5
  3974.   rm -rf conftest*
  3975.   eval "ac_cv_lib_$ac_lib_var=no"
  3976. fi
  3977. rm -f conftest*
  3978. LIBS="$ac_save_LIBS"
  3979.  
  3980. fi
  3981. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3982.   echo "$ac_t""yes" 1>&6
  3983.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  3984. else
  3985.   echo "$ac_t""no" 1>&6
  3986. fi
  3987.  
  3988.     fi
  3989.  
  3990.     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  3991.     echo $ac_n "checking for shmat""... $ac_c" 1>&6
  3992. echo "configure:3993: checking for shmat" >&5
  3993. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  3994.   echo $ac_n "(cached) $ac_c" 1>&6
  3995. else
  3996.   cat > conftest.$ac_ext <<EOF
  3997. #line 3998 "configure"
  3998. #include "confdefs.h"
  3999. /* System header to define __stub macros and hopefully few prototypes,
  4000.     which can conflict with char shmat(); below.  */
  4001. #include <assert.h>
  4002. /* Override any gcc2 internal prototype to avoid an error.  */
  4003. /* We use char because int might match the return type of a gcc2
  4004.     builtin and then its argument prototype would still apply.  */
  4005. char shmat();
  4006.  
  4007. int main() {
  4008.  
  4009. /* The GNU C library defines this for functions which it implements
  4010.     to always fail with ENOSYS.  Some functions are actually named
  4011.     something starting with __ and the normal name is an alias.  */
  4012. #if defined (__stub_shmat) || defined (__stub___shmat)
  4013. choke me
  4014. #else
  4015. shmat();
  4016. #endif
  4017.  
  4018. ; return 0; }
  4019. EOF
  4020. if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4021.   rm -rf conftest*
  4022.   eval "ac_cv_func_shmat=yes"
  4023. else
  4024.   echo "configure: failed program was:" >&5
  4025.   cat conftest.$ac_ext >&5
  4026.   rm -rf conftest*
  4027.   eval "ac_cv_func_shmat=no"
  4028. fi
  4029. rm -f conftest*
  4030. fi
  4031.  
  4032. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  4033.   echo "$ac_t""yes" 1>&6
  4034.   :
  4035. else
  4036.   echo "$ac_t""no" 1>&6
  4037. fi
  4038.  
  4039.     if test $ac_cv_func_shmat = no; then
  4040.       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  4041. echo "configure:4042: checking for shmat in -lipc" >&5
  4042. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  4043. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4044.   echo $ac_n "(cached) $ac_c" 1>&6
  4045. else
  4046.   ac_save_LIBS="$LIBS"
  4047. LIBS="-lipc  $LIBS"
  4048. cat > conftest.$ac_ext <<EOF
  4049. #line 4050 "configure"
  4050. #include "confdefs.h"
  4051. /* Override any gcc2 internal prototype to avoid an error.  */
  4052. /* We use char because int might match the return type of a gcc2
  4053.     builtin and then its argument prototype would still apply.  */
  4054. char shmat();
  4055.  
  4056. int main() {
  4057. shmat()
  4058. ; return 0; }
  4059. EOF
  4060. if { (eval echo configure:4061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4061.   rm -rf conftest*
  4062.   eval "ac_cv_lib_$ac_lib_var=yes"
  4063. else
  4064.   echo "configure: failed program was:" >&5
  4065.   cat conftest.$ac_ext >&5
  4066.   rm -rf conftest*
  4067.   eval "ac_cv_lib_$ac_lib_var=no"
  4068. fi
  4069. rm -f conftest*
  4070. LIBS="$ac_save_LIBS"
  4071.  
  4072. fi
  4073. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4074.   echo "$ac_t""yes" 1>&6
  4075.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  4076. else
  4077.   echo "$ac_t""no" 1>&6
  4078. fi
  4079.  
  4080.     fi
  4081.   fi
  4082.  
  4083.   # Check for libraries that X11R6 Xt/Xaw programs need.
  4084.   ac_save_LDFLAGS="$LDFLAGS"
  4085.   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  4086.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  4087.   # check for ICE first), but we must link in the order -lSM -lICE or
  4088.   # we get undefined symbols.  So assume we have SM if we have ICE.
  4089.   # These have to be linked with before -lX11, unlike the other
  4090.   # libraries we check for below, so use a different variable.
  4091.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  4092.   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  4093. echo "configure:4094: checking for IceConnectionNumber in -lICE" >&5
  4094. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  4095. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4096.   echo $ac_n "(cached) $ac_c" 1>&6
  4097. else
  4098.   ac_save_LIBS="$LIBS"
  4099. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  4100. cat > conftest.$ac_ext <<EOF
  4101. #line 4102 "configure"
  4102. #include "confdefs.h"
  4103. /* Override any gcc2 internal prototype to avoid an error.  */
  4104. /* We use char because int might match the return type of a gcc2
  4105.     builtin and then its argument prototype would still apply.  */
  4106. char IceConnectionNumber();
  4107.  
  4108. int main() {
  4109. IceConnectionNumber()
  4110. ; return 0; }
  4111. EOF
  4112. if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4113.   rm -rf conftest*
  4114.   eval "ac_cv_lib_$ac_lib_var=yes"
  4115. else
  4116.   echo "configure: failed program was:" >&5
  4117.   cat conftest.$ac_ext >&5
  4118.   rm -rf conftest*
  4119.   eval "ac_cv_lib_$ac_lib_var=no"
  4120. fi
  4121. rm -f conftest*
  4122. LIBS="$ac_save_LIBS"
  4123.  
  4124. fi
  4125. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4126.   echo "$ac_t""yes" 1>&6
  4127.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  4128. else
  4129.   echo "$ac_t""no" 1>&6
  4130. fi
  4131.  
  4132.   LDFLAGS="$ac_save_LDFLAGS"
  4133.  
  4134. fi
  4135.  
  4136.  
  4137. if test "$no_x" != "yes"; then
  4138.     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  4139. fi
  4140.  
  4141. AR_FLAGS='cr $@'
  4142. AR_LIST='$(AR) t'
  4143. AR_EXTRACT='$(AR) x'
  4144. AR_DELETE='$(AR) d'
  4145. AS='$(CC)'
  4146. AS_DASH_C_FLAG='-c'
  4147. DLL_SUFFIX=.so
  4148. OBJ_SUFFIX=o
  4149. LIB_SUFFIX=a
  4150. TARGET_MD_ARCH=unix
  4151. DIRENT_INO=d_ino
  4152.  
  4153. MOZ_JPEG_CFLAGS=
  4154. MOZ_JPEG_LIBS='-L$(DIST)/lib -lmozjpeg'
  4155. MOZ_ZLIB_CFLAGS=
  4156. MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz'
  4157. MOZ_PNG_CFLAGS=
  4158. MOZ_PNG_LIBS='-L$(DIST)/lib -lmozpng'
  4159. MOZ_MNG_CFLAGS=
  4160. MOZ_MNG_LIBS='-L$(DIST)/lib -lmozmng'
  4161.  
  4162. MOZ_JS_LIBS='-L$(DIST)/bin -lmozjs'
  4163. XPCOM_LIBS='-L$(DIST)/bin -lxpcom'
  4164.  
  4165. MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/bin $(NSPR_LIBS)'
  4166. MOZ_COMPONENT_XPCOM_LIBS='-L$(DIST)/bin -lxpcom'
  4167.  
  4168. if test -n "$CROSS_COMPILE"; then
  4169.     OS_TARGET="${target_os}"
  4170.     OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
  4171.     OS_RELEASE=
  4172.     OS_TEST="${target_cpu}"
  4173.     case "${target_os}" in
  4174.         linux*)       OS_ARCH=Linux ;;
  4175.         solaris*)     OS_ARCH=SunOS OS_RELEASE=5 ;;
  4176.         openvms*)     OS_TARGET=`uname -s`
  4177.                       OS_ARCH=`uname -s | sed -e 's|/|_|g'`
  4178.                       OS_RELEASE=`uname -r`
  4179.                       OS_TEST=`uname -Wh`;;
  4180.     esac
  4181. else
  4182.     OS_TARGET=`uname -s`
  4183.     OS_ARCH=`uname -s | sed -e 's|/|_|g'`
  4184.     OS_RELEASE=`uname -r`
  4185.     OS_TEST=`uname -m`
  4186. fi
  4187. _COMPILER_PREFIX=
  4188.  
  4189. if test "$GNU_CC"; then
  4190.     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
  4191.     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
  4192.     DSO_LDOPTS='-shared -Wl,-h -Wl,$@'
  4193.     DSO_CFLAGS=''
  4194.     DSO_PIC_CFLAGS='-fPIC'
  4195.  
  4196.     # Turn on GNU specific features
  4197.     # -Wall - turn on all warnings
  4198.     # -pedantic - make compiler warn about non-ANSI stuff, and
  4199.     #             be a little bit stricter
  4200.     # Warnings slamm took out for now (these were giving more noise than help):
  4201.     # -Wbad-function-cast - warns when casting a function to a new return type
  4202.     # -Wconversion - complained when char's or short's were used a function args
  4203.     # -Wshadow - removed because it generates more noise than help --pete
  4204.     _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith -Wcast-align"
  4205.  
  4206.         _PEDANTIC=1
  4207.     _IGNORE_LONG_LONG_WARNINGS=1
  4208.  
  4209.     _DEFINES_CFLAGS='-include $(DEPTH)/config-defs.h -DMOZILLA_CLIENT'
  4210.     _USE_CPP_INCLUDE_FLAG=1
  4211. else
  4212.     MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
  4213.     MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
  4214.     DSO_LDOPTS='-shared -h $@'
  4215.     DSO_CFLAGS=''
  4216.     DSO_PIC_CFLAGS='-KPIC'
  4217.     _DEFINES_CFLAGS='$(ACDEFINES) -DMOZILLA_CLIENT'
  4218. fi
  4219.  
  4220. if test "$GNU_CXX"; then
  4221.     # Turn on GNU specific features
  4222.     _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth"
  4223.  
  4224.         if test ! "$QTDIR"; then
  4225.         _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS}"
  4226.     fi
  4227.  
  4228.     _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/config-defs.h'
  4229.     _USE_CPP_INCLUDE_FLAG=1
  4230. else
  4231.     _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT $(ACDEFINES)'
  4232. fi
  4233.  
  4234. MKSHLIB_FORCE_ALL=
  4235. MKSHLIB_UNFORCE_ALL=
  4236. if test "$GNU_CC"; then
  4237.   echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6
  4238. echo "configure:4239: checking whether ld has archive extraction flags" >&5
  4239.   if eval "test \"`echo '$''{'ac_cv_mkshlib_force_and_unforce'+set}'`\" = set"; then
  4240.   echo $ac_n "(cached) $ac_c" 1>&6
  4241. else
  4242.   _SAVE_LDFLAGS=$LDFLAGS; _SAVE_LIBS=$LIBS
  4243.     ac_cv_mkshlib_force_and_unforce="no"
  4244.     exec 3<&0 <<LOOP_INPUT
  4245.     force="-Wl,--whole-archive";   unforce="-Wl,--no-whole-archive"
  4246.     force="-Wl,-z -Wl,allextract"; unforce="-Wl,-z -Wl,defaultextract"
  4247.     force="-Wl,-all";              unforce="-Wl,-none"
  4248. LOOP_INPUT
  4249.     while read line
  4250.     do
  4251.       eval $line
  4252.       LDFLAGS=$force
  4253.       LIBS=$unforce
  4254.       cat > conftest.$ac_ext <<EOF
  4255. #line 4256 "configure"
  4256. #include "confdefs.h"
  4257.  
  4258. int main() {
  4259.  
  4260. ; return 0; }
  4261. EOF
  4262. if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4263.   rm -rf conftest*
  4264.   ac_cv_mkshlib_force_and_unforce=$line; break
  4265. else
  4266.   echo "configure: failed program was:" >&5
  4267.   cat conftest.$ac_ext >&5
  4268. fi
  4269. rm -f conftest*
  4270.     done
  4271.     exec 0<&3 3<&-
  4272.     LDFLAGS=$_SAVE_LDFLAGS; LIBS=$_SAVE_LIBS
  4273.    
  4274. fi
  4275.  
  4276.   if test "$ac_cv_mkshlib_force_and_unforce" = "no"; then
  4277.     echo "$ac_t""no" 1>&6
  4278.   else
  4279.     echo "$ac_t""yes" 1>&6
  4280.     eval $ac_cv_mkshlib_force_and_unforce
  4281.     MKSHLIB_FORCE_ALL=$force
  4282.     MKSHLIB_UNFORCE_ALL=$unforce
  4283.   fi
  4284. fi
  4285.  
  4286. case "$host" in
  4287. *-linux*)
  4288.     HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
  4289.     ;;
  4290.  
  4291. *-osf*)
  4292.     HOST_NSPR_MDCPUCFG='\"md/_osf1.cfg\"'
  4293.     ;;
  4294.  
  4295. esac
  4296.  
  4297.  
  4298. case "$target" in
  4299. *-solaris*)
  4300.     if test ! "$GNU_CC" && test ! -z "`${CC} -V 2>&1 | head -1 | grep '4.2'`"; then
  4301.         { echo "configure: error: SUNWspro4.2 is too old.  Use a newer version or gcc." 1>&2; exit 1; }
  4302.     fi
  4303.     ;;
  4304. esac
  4305.  
  4306. case "$target" in
  4307. *-aix*)
  4308.     if test ! "$GNU_CC"; then
  4309.         # DSO_LDOPTS='-ldl -bM:SRE -p1 -brtl -bso -bexpall -bnoentry'
  4310.         DSO_LDOPTS='-ldl -p1 -brtl -bso -bsymbolic -bnortllib'
  4311.         DSO_CFLAGS='-qflag=w:w'
  4312.         DSO_PIC_CFLAGS='-DPIC'
  4313.     fi
  4314.     case "${target_os}" in
  4315.     aix4.1*)
  4316.         DLL_SUFFIX='_shr.a'
  4317.         ;;
  4318.     esac
  4319.     MKSHLIB='$(AIX_SHLIB_BIN) $(DSO_LDOPTS) -o $@'
  4320.     MKCSHLIB='$(AIX_SHLIB_BIN) $(DSO_LDOPTS) -o $@'
  4321.     cat >> confdefs.h <<\EOF
  4322. #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
  4323. EOF
  4324.  
  4325.     ;;
  4326.  
  4327. *-beos*)
  4328.     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
  4329.     DSO_LDOPTS='-nostart -Wl,-h -Wl,$@'
  4330.     TK_LIBS='-lbe -lroot'
  4331.     LIBS="$LIBS -lbe"
  4332.     echo $ac_n "checking for main in -lbind""... $ac_c" 1>&6
  4333. echo "configure:4334: checking for main in -lbind" >&5
  4334. ac_lib_var=`echo bind'_'main | sed 'y%./+-%__p_%'`
  4335. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4336.   echo $ac_n "(cached) $ac_c" 1>&6
  4337. else
  4338.   ac_save_LIBS="$LIBS"
  4339. LIBS="-lbind  $LIBS"
  4340. cat > conftest.$ac_ext <<EOF
  4341. #line 4342 "configure"
  4342. #include "confdefs.h"
  4343.  
  4344. int main() {
  4345. main()
  4346. ; return 0; }
  4347. EOF
  4348. if { (eval echo configure:4349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4349.   rm -rf conftest*
  4350.   eval "ac_cv_lib_$ac_lib_var=yes"
  4351. else
  4352.   echo "configure: failed program was:" >&5
  4353.   cat conftest.$ac_ext >&5
  4354.   rm -rf conftest*
  4355.   eval "ac_cv_lib_$ac_lib_var=no"
  4356. fi
  4357. rm -f conftest*
  4358. LIBS="$ac_save_LIBS"
  4359.  
  4360. fi
  4361. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4362.   echo "$ac_t""yes" 1>&6
  4363.   LIBS="$LIBS -lbind"
  4364. else
  4365.   echo "$ac_t""no" 1>&6
  4366. fi
  4367.  
  4368.     _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar"
  4369.     _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy"
  4370.     ;;
  4371.  
  4372. *-bsdi*)
  4373.         _PEDANTIC=
  4374.     _IGNORE_LONG_LONG_WARNINGS=
  4375.     case $OS_RELEASE in
  4376.     4.*)
  4377.             STRIP="$STRIP -d"
  4378.             ;;
  4379.     *)
  4380.         DSO_CFLAGS=''
  4381.         DSO_LDOPTS='-r'
  4382.         _WARNINGS_CFLAGS="-Wall"
  4383.         _WARNINGS_CXXFLAGS="-Wall"
  4384.         # The test above doesn't work properly, at least on 3.1.
  4385.         MKSHLIB_FORCE_ALL=''
  4386.         MKSHLIB_UNFORCE_ALL=''
  4387.     ;;
  4388.     esac
  4389.     ;;
  4390.  
  4391. *-freebsd*)
  4392.     if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` != "elf"; then
  4393.     DLL_SUFFIX=".so.1.0"
  4394.     DSO_LDOPTS="-shared"
  4395.     fi
  4396.     if test ! "$GNU_CC"; then
  4397.     DSO_LDOPTS="-Bshareable $DSO_LDOPTS"
  4398.     fi
  4399. # Can't have force w/o an unforce.
  4400. #    # Hack for FreeBSD 2.2
  4401. #    if test -z "$MKSHLIB_FORCE_ALL"; then
  4402. #    MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive'
  4403. #    MKSHLIB_UNFORCE_ALL=''
  4404. #    fi
  4405.     ;; 
  4406.  
  4407. *-hpux*)
  4408.     DLL_SUFFIX=".sl"
  4409.     if test ! "$GNU_CC"; then
  4410.         DSO_LDOPTS='-b -Wl,+s -L$(DIST)/bin'
  4411.         DSO_CFLAGS=""
  4412.         DSO_PIC_CFLAGS="+Z"
  4413.         MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
  4414.         MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
  4415.     else
  4416.         DSO_LDOPTS='-b -E +s -L$(DIST)/bin -L$(DIST)/lib'
  4417.         MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
  4418.         MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
  4419.     fi
  4420.     MOZ_POST_PROGRAM_COMMAND='chatr +s enable'
  4421.     cat >> confdefs.h <<\EOF
  4422. #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
  4423. EOF
  4424.  
  4425.     ;;
  4426.  
  4427. *-irix5*)
  4428.     cat >> confdefs.h <<\EOF
  4429. #define IRIX 1
  4430. EOF
  4431.  
  4432.     DSO_LDOPTS='-elf -shared'
  4433.     if test "$GNU_CC"; then
  4434.        MKSHLIB_FORCE_ALL='-Wl,-all'
  4435.        MKSHLIB_UNFORCE_ALL='-Wl,-none'
  4436.     else
  4437.        MKSHLIB_FORCE_ALL='-all'
  4438.        MKSHLIB_UNFORCE_ALL='-none'
  4439.     fi
  4440.     ;;
  4441.  
  4442. *-irix6*)
  4443.     cat >> confdefs.h <<\EOF
  4444. #define IRIX 1
  4445. EOF
  4446.  
  4447.             USE_N32=1
  4448.     DSO_LDOPTS='-elf -shared'
  4449.     MKSHLIB='$(CCC) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
  4450.     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
  4451.     if test "$GNU_CC"; then
  4452.        MKSHLIB_FORCE_ALL='-Wl,-all'
  4453.        MKSHLIB_UNFORCE_ALL='-Wl,-none'
  4454.        _WARNINGS_CFLAGS="-Wall"
  4455.        _WARNINGS_CXXFLAGS="-Wall"
  4456.     else
  4457.        MKSHLIB_FORCE_ALL='-all'
  4458.        MKSHLIB_UNFORCE_ALL='-none'
  4459.        AR_LIST="$AR t"
  4460.        AR_EXTRACT="$AR x"
  4461.        AR_DELETE="$AR d"
  4462.        AR='$(CXX) -ar'
  4463.        AR_FLAGS='-o $@'
  4464.        CFLAGS="$CFLAGS -woff 3262"
  4465.        CXXFLAGS="$CXXFLAGS -woff 3262"
  4466.        if test -n "$USE_N32"; then
  4467.        ASFLAGS="$ASFLAGS -n32"
  4468.        CFLAGS="$CFLAGS -n32"
  4469.        CXXFLAGS="$CXXFLAGS -n32"
  4470.        LDFLAGS="$LDFLAGS -n32"
  4471.        fi
  4472.        cat >> confdefs.h <<\EOF
  4473. #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
  4474. EOF
  4475.  
  4476.     fi
  4477.     ;;
  4478.  
  4479. *-*linux*)
  4480.     cat >> confdefs.h <<\EOF
  4481. #define _POSIX_SOURCE 1
  4482. EOF
  4483.  
  4484.     cat >> confdefs.h <<\EOF
  4485. #define _SVID_SOURCE 1
  4486. EOF
  4487.  
  4488.     TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
  4489.     LIBS="$LIBS -lc"
  4490.  
  4491.     case "${host_cpu}" in
  4492.     alpha*)
  4493.         CFLAGS="$CFLAGS -mieee"
  4494.         CXXFLAGS="$CXXFLAGS -mieee"
  4495.     ;;
  4496.     i?86)
  4497.         USE_ELF_DYNSTR_GC=1
  4498.     ;;
  4499.     esac
  4500.     ;;
  4501.  
  4502. *-mingw*)
  4503.     cat >> confdefs.h <<\EOF
  4504. #define _WINDOWS 1
  4505. EOF
  4506.  
  4507.     cat >> confdefs.h <<\EOF
  4508. #define WIN32_LEAN_AND_MEAN 1
  4509. EOF
  4510.  
  4511.     cat >> confdefs.h <<\EOF
  4512. #define NONAMELESSUNION 1
  4513. EOF
  4514.  
  4515.     CFLAGS="$(CFLAGS) -fvtable-thunks"
  4516.     CXXFLAGS="$(CXXFLAGS) -fvtable-thunks"
  4517.     TARGET_MD_ARCH=win32
  4518.     if test -z "$GNU_CC"; then
  4519.     OBJ_SUFFIX=obj
  4520.     LIB_SUFFIX=lib
  4521.     DLL_SUFFIX=.dll
  4522.     fi
  4523.     MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $(LIBRARY_NAME).dll --output-lib $@'
  4524.     MKCSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $(LIBRARY_NAME).dll --output-lib $@'
  4525.     MKSHLIB_FORCE_ALL=
  4526.     MKSHLIB_UNFORCE_ALL=
  4527.     DSO_LDOPTS=
  4528.     DSO_CFLAGS=
  4529.     DSO_PIC_CFLAGS=
  4530.     OS_TARGET=WINNT
  4531.         TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
  4532.     
  4533.     case "$target" in
  4534.     i?86-*)
  4535.     cat >> confdefs.h <<\EOF
  4536. #define _X86_ 1
  4537. EOF
  4538.  
  4539.     ;;
  4540.     alpha-*)
  4541.     cat >> confdefs.h <<\EOF
  4542. #define _ALPHA_ 1
  4543. EOF
  4544.  
  4545.     ;;
  4546.     mips-*)
  4547.     cat >> confdefs.h <<\EOF
  4548. #define _MIPS_ 1
  4549. EOF
  4550.  
  4551.     ;;
  4552.     *)
  4553.     cat >> confdefs.h <<\EOF
  4554. #define _CPU_ARCH_NOT_DEFINED 1
  4555. EOF
  4556.  
  4557.     ;;
  4558.     esac
  4559.     ;;
  4560.  
  4561. *-netbsd*)
  4562.     DSO_CFLAGS=''
  4563.     CFLAGS="$CFLAGS -Dunix"
  4564.     CXXFLAGS="$CXXFLAGS -Dunix"
  4565.     if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
  4566.         DLL_SUFFIX=".so"
  4567.         DSO_PIC_CFLAGS='-fPIC -DPIC'
  4568.         DSO_LDOPTS='-shared -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX)'
  4569.     BIN_FLAGS='-Wl,--export-dynamic'
  4570.     else
  4571.         DSO_PIC_CFLAGS='-fPIC -DPIC'
  4572.         DLL_SUFFIX=".so.1.0"
  4573.         DSO_LDOPTS='-shared'
  4574.     fi
  4575.     # This will fail on a.out systems prior to 1.5.1_ALPHA.
  4576.     MKSHLIB_FORCE_ALL='-Wl,--whole-archive'
  4577.     MKSHLIB_UNFORCE_ALL='-Wl,--no-whole-archive'
  4578.     if test "$LIBRUNPATH"; then
  4579.     DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
  4580.     fi
  4581.     ;;
  4582.  
  4583. *-nto*) 
  4584.     CFLAGS="$CFLAGS -DNTO -D_QNX_SOURCE -D_POSIX_C_SOURCE=199506 -D_i386"
  4585.     CXXFLAGS="$CXXFLAGS -DNTO -D_QNX_SOURCE -D_POSIX_C_SOURCE=199506 -D_i386"
  4586.     _WARNINGS_CFLAGS='-w'
  4587.     _WARNINGS_CXXFLAGS='-w'
  4588.     OS_TARGET="NTO"
  4589.     MOZ_OPTIMIZE_FLAGS="-O1"
  4590.     MOZ_DEBUG_FLAGS="-gstabs"
  4591.     DSO_LDOPTS="-M $DSO_LDOPTS"
  4592.     DSO_CFLAGS=''
  4593.     DSO_PIC_CFLAGS="-shared -Wc,-fPIC -DPIC"
  4594.     MKSHLIB='qcc -Vgcc_ntox86 $(DSO_LDOPTS) -o $@'
  4595.     MKCSHLIB='qcc -Vgcc_ntox86 $(DSO_LDOPTS) -o $@'
  4596.     AR='qcc -Vgcc_ntox86'
  4597.     AR_FLAGS='-M -a $@'
  4598.     AR_LIST='ar t'
  4599.     AR_EXTRACT='ar x'
  4600.     AR_DELETE='ar d'
  4601.     _DEFINES_CFLAGS='-Wp,-include,$(DEPTH)/config-defs.h -DMOZILLA_CLIENT'
  4602.     _DEFINES_CXXFLAGS='-Wp,-include,$(DEPTH)/config-defs.h -DMOZILLA_CLIENT'
  4603.     _PREPROCESSOR_PREFIX="-Wp,"
  4604.     _COMPILER_PREFIX="-Wc,"
  4605.     _LINKER_PREFIX="-Wl,"      
  4606.     USE_PTHREADS=1
  4607.     _PTHREAD_LDFLAGS=""
  4608.     LIBS="$LIBS -L/usr/lib -lsocket -lm -lstdc++"
  4609.     HAVE_DEV_ZERO=1
  4610.     ;;
  4611.  
  4612. *-openbsd*)
  4613.     DLL_SUFFIX=".so.1.0"
  4614.     DSO_CFLAGS=''
  4615.     DSO_PIC_CFLAGS='-fPIC'
  4616.     DSO_LDOPTS='-shared -h $@'
  4617.     MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
  4618.     MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
  4619.     if $CC -E - -dM </dev/null | grep -v __ELF__ >/dev/null; then
  4620.     DSO_LDOPTS="-Bshareable /usr/lib/c++rt0.o"
  4621.     fi
  4622.     if test "$LIBRUNPATH"; then
  4623.     DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
  4624.     fi
  4625.     ;;
  4626.  
  4627. *-openvms*) 
  4628.     if test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then
  4629.         _OPENVMS_CROSS_COMPILE=1
  4630.     fi
  4631.     MISSING_NSPR="yes"
  4632.     cat >> confdefs.h <<\EOF
  4633. #define NO_PW_GECOS 1
  4634. EOF
  4635.  
  4636.     cat >> confdefs.h <<\EOF
  4637. #define NO_UDSOCK 1
  4638. EOF
  4639.  
  4640.     USE_PTHREADS=1
  4641.     ;;
  4642.  
  4643.  
  4644. *-*-os2*)
  4645.     MOZ_BUILD_ROOT=`pwd -D`
  4646.     USE_SHORT_LIBNAME=1
  4647.     BIN_SUFFIX='.exe'
  4648.     OBJ_SUFFIX=obj
  4649.     LIB_SUFFIX=lib
  4650.     DLL_SUFFIX=.dll
  4651.     DLLTOOL=''
  4652.     LD='$(CC)'
  4653.     DSO_CFLAGS=''
  4654.     DSO_PIC_CFLAGS=''
  4655.     MOZ_JPEG_LIBS='$(DIST)/lib/mozjpeg.$(LIB_SUFFIX)'
  4656.     MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)'
  4657.     MOZ_PNG_LIBS='$(DIST)/lib/mozpng.$(LIB_SUFFIX)'
  4658.     MOZ_MNG_LIBS='$(DIST)/lib/mozmng.$(LIB_SUFFIX)'
  4659.     MOZ_JS_LIBS='$(DIST)/lib/mozjs.lib'
  4660.     OS_ARCH=OS2
  4661.     OS_TARGET=OS2
  4662.  
  4663.     case "$target" in
  4664.     *-*-os2_emx)
  4665.         _PEDANTIC=''
  4666.         AR=emxomfar
  4667.         AR_FLAGS='-p256 r $@'
  4668.         CFLAGS="-Zmtd -Zomf $CFLAGS"
  4669.         CXXFLAGS="-Zmtd -Zomf $CXXFLAGS"
  4670.         DSO_LDOPTS='-Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO'
  4671.         BIN_FLAGS='-Zlinker /PM:VIO -Zlinker /ST:0x30000'
  4672.         IMPLIB='emximp -o'
  4673.         FILTER='emxexp'
  4674.         cat >> confdefs.h <<\EOF
  4675. #define OS2 1
  4676. EOF
  4677.  
  4678.         cat >> confdefs.h <<\EOF
  4679. #define XP_OS2_EMX 1
  4680. EOF
  4681.  
  4682.         cat >> confdefs.h <<\EOF
  4683. #define OS2EMX_PLAIN_CHAR 1
  4684. EOF
  4685.  
  4686.         MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/lib $(NSPR_LIBS)'
  4687.         MOZ_COMPONENT_XPCOM_LIBS='-L$(DIST)/lib $(DIST)/lib/xpcom.lib'
  4688.         XPCOM_LIBS='-L$(DIST)/lib -lxpcom'
  4689.         ;;
  4690.  
  4691.     *-*-os2_vacpp)
  4692. #        MOZ_BUILD_ROOT="$ROOT"`pwd -D`
  4693.         AR=-ilib
  4694.         AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
  4695.         AR_LIST='/L'
  4696.         AR_EXTRACT='-*'
  4697.         AR_DELETE='-'
  4698.         LD='-ilink'
  4699.         TARGET_MD_ARCH=os2
  4700.         CFLAGS="/Q /qlibansi /Gd /Gm /Su4 /Mp /Tl-"
  4701.         CXXFLAGS="/Q /qlibansi /Gd /Gm /Su4 /Mp /Tl-"
  4702.         LDFLAGS="/FREE /DE /NOE /LINENUMBERS /nologo"
  4703.         DSO_LDOPTS=''
  4704.         IMPLIB='implib /NOL /NOI'
  4705.         FILTER='cppfilt -q -B -P'
  4706.         cat >> confdefs.h <<\EOF
  4707. #define NO_ANSI_KEYWORDS 1
  4708. EOF
  4709.  
  4710.         cat >> confdefs.h <<\EOF
  4711. #define OS2 4
  4712. EOF
  4713.  
  4714.         cat >> confdefs.h <<\EOF
  4715. #define _X86_ 1
  4716. EOF
  4717.  
  4718.         cat >> confdefs.h <<\EOF
  4719. #define XP_OS2_VACPP 1
  4720. EOF
  4721.  
  4722.         cat >> confdefs.h <<\EOF
  4723. #define TCPV40HDRS 1
  4724. EOF
  4725.  
  4726.         cat >> confdefs.h <<\EOF
  4727. #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
  4728. EOF
  4729.  
  4730.         cat >> confdefs.h <<\EOF
  4731. #define STDC_HEADERS 1
  4732. EOF
  4733.  
  4734.         MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
  4735.         MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
  4736.         XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
  4737.         MKSHLIB='$(LD) $(DSO_LDOPTS)'
  4738.         MKCSHLIB='$(LD) $(DSO_LDOPTS)'
  4739.         ;;
  4740.     esac
  4741.     ;;
  4742.  
  4743. alpha*-*-osf*)
  4744.     if test "$GNU_CC"; then
  4745.     DSO_LDOPTS='-shared -Wl,-soname -Wl,$@'
  4746.     else
  4747.     MOZ_DEBUG_FLAGS='-g3'
  4748.     ASFLAGS='-I$(topsrcdir)/xpcom/reflect/xptcall/public -g -std1'
  4749.     CFLAGS="$CFLAGS -std1 -ieee"
  4750.     CXXFLAGS="$CXXFLAGS "'-noexceptions -ieee  -ptr $(DIST)/cxx_repository'
  4751.     DSO_LDOPTS='-shared -msym -expect_unresolved \* -soname $@ -update_registry $(DIST)/so_locations'
  4752.     DSO_CFLAGS=
  4753.     DSO_PIC_CFLAGS=
  4754.     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
  4755.     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
  4756.     MKSHLIB_FORCE_ALL='-all'
  4757.     MKSHLIB_UNFORCE_ALL='-none'
  4758.         cat >> confdefs.h <<\EOF
  4759. #define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
  4760. EOF
  4761.  
  4762.     cat >> confdefs.h <<\EOF
  4763. #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
  4764. EOF
  4765.  
  4766.     fi
  4767.     cat >> confdefs.h <<\EOF
  4768. #define NEED_USLEEP_PROTOTYPE 1
  4769. EOF
  4770.  
  4771.     ;;
  4772.  
  4773. *-qnx*) 
  4774.     DIRENT_INO=d_stat.st_ino
  4775.         cat >> confdefs.h <<\EOF
  4776. #define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
  4777. EOF
  4778.  
  4779.     cat >> confdefs.h <<\EOF
  4780. #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
  4781. EOF
  4782.  
  4783.     if test "$no_x" = "yes"; then
  4784.     MOZ_WIDGET_TOOLKIT='photon'
  4785.     TK_CFLAGS='-I/usr/nto/include/photon'
  4786.     TK_LIBS='-lphoton -lphrender'
  4787.     cat >> confdefs.h <<\EOF
  4788. #define NO_X11 1
  4789. EOF
  4790.  
  4791.     fi
  4792.     ;;
  4793.  
  4794. *-rhapsody*) 
  4795.     DLL_SUFFIX=".dylib"
  4796.     DSO_LDOPTS='-compatibility_version 1 -current_version 1'
  4797.     cat >> confdefs.h <<\EOF
  4798. #define NO_X11 1
  4799. EOF
  4800.  
  4801.     cat >> confdefs.h <<\EOF
  4802. #define DARWIN 1
  4803. EOF
  4804.  
  4805.     cat >> confdefs.h <<\EOF
  4806. #define RHAPSODY 1
  4807. EOF
  4808.  
  4809.     cat >> confdefs.h <<\EOF
  4810. #define TARGET_CARBON 1
  4811. EOF
  4812.  
  4813.     cat >> confdefs.h <<\EOF
  4814. #define TARGET_API_MAC_CARBON 1
  4815. EOF
  4816.  
  4817.     ENABLE_TESTS=
  4818.     MOZ_WIDGET_TOOLKIT='mac'
  4819.     TK_LIBS='/System/Library/Frameworks/Carbon.framework/Carbon'
  4820.     CFLAGS="$CFLAGS -traditional-cpp -fno-common -I/System/Library/Frameworks/Carbon.framework/Headers"
  4821.     CXXFLAGS="$CXXFLAGS -traditional-cpp -fno-common -I/System/Library/Frameworks/Carbon.framework/Headers"
  4822.     MKSHLIB='$(CXX) $(CXXFLAGS) -arch ppc $(DSO_LDOPTS) -o $@'
  4823.     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
  4824.     MKSHLIB_FORCE_ALL=''
  4825.     MKSHLIB_UNFORCE_ALL=''
  4826.     ;;
  4827.  
  4828. *-sco*) 
  4829.     cat >> confdefs.h <<\EOF
  4830. #define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
  4831. EOF
  4832.  
  4833.     cat >> confdefs.h <<\EOF
  4834. #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
  4835. EOF
  4836.  
  4837.     CXXFLAGS="$CXXFLAGS -I/usr/include/CC"
  4838.     if test ! "$GNU_CC"; then
  4839.        DSO_LDOPTS='-G -h $@'
  4840.     fi
  4841.     ;;
  4842.  
  4843. *-solaris*) 
  4844.     cat >> confdefs.h <<\EOF
  4845. #define BROKEN_QSORT 1
  4846. EOF
  4847.  
  4848.     TARGET_NSPR_MDCPUCFG='\"md/_solaris32.cfg\"'
  4849.     SYSTEM_MAKEDEPEND=
  4850.     if test -z "$GNU_CC"; then
  4851.        NS_USE_NATIVE=1
  4852.        cat >> confdefs.h <<\EOF
  4853. #define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
  4854. EOF
  4855.  
  4856.        LDFLAGS='-xildoff'
  4857.        MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
  4858.        MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
  4859.        MKSHLIB_FORCE_ALL='-Qoption ld -z,allextract'
  4860.        MKSHLIB_UNFORCE_ALL=''
  4861.        DSO_LDOPTS='-G -Qoption ld -z,muldefs -h $@'
  4862.        AR_LIST="$AR t"
  4863.        AR_EXTRACT="$AR x"
  4864.        AR_DELETE="$AR d"
  4865.        AR='$(CXX) -xar'
  4866.        AR_FLAGS='-o $@'
  4867.        AS='/usr/ccs/bin/as'
  4868.        ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0"
  4869.        AS_DASH_C_FLAG=''
  4870.     else
  4871.        ASFLAGS="$ASFLAGS -fPIC"
  4872.        MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
  4873.        MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
  4874.        DSO_LDOPTS='-G -h $@'
  4875.        _WARNINGS_CFLAGS=''
  4876.        _WARNINGS_CXXFLAGS=''
  4877.        if test "$OS_RELEASE" = "5.3"; then
  4878.       cat >> confdefs.h <<\EOF
  4879. #define MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES 1
  4880. EOF
  4881.  
  4882.        fi
  4883.     fi
  4884.     if test "$OS_RELEASE" = "5.5.1"; then
  4885.        cat >> confdefs.h <<\EOF
  4886. #define NEED_USLEEP_PROTOTYPE 1
  4887. EOF
  4888.  
  4889.     fi
  4890.     ;;
  4891.  
  4892. *-sunos*) 
  4893.     DSO_LDOPTS='-Bdynamic'
  4894.     MKSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
  4895.     MKCSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
  4896.     cat >> confdefs.h <<\EOF
  4897. #define SUNOS4 1
  4898. EOF
  4899.  
  4900.     cat >> confdefs.h <<\EOF
  4901. #define SPRINTF_RETURNS_STRING 1
  4902. EOF
  4903.  
  4904.     case "$(target_os)" in
  4905.     sunos4.1*)
  4906.         DLL_SUFFIX='.so.1.0'
  4907.         ;;
  4908.     esac
  4909.     ;;
  4910.  
  4911. *-sysv4.2uw7*) 
  4912.     NSPR_LIBS="-lnspr$NSPR_VERSION -lplc$NSPR_VERSION -lplds$NSPR_VERSION -L/usr/ccs/lib -lcrt"
  4913.     ;;
  4914.  
  4915. esac
  4916.  
  4917. cat >> confdefs.h <<EOF
  4918. #define D_INO $DIRENT_INO
  4919. EOF
  4920.  
  4921.  
  4922. NO_LD_ARCHIVE_FLAGS=
  4923. if test -z "$MKSHLIB_FORCE_ALL"; then
  4924.     NO_LD_ARCHIVE_FLAGS=1
  4925. fi
  4926. case "$target" in
  4927. *-*-os2_*)
  4928.     NO_LD_ARCHIVE_FLAGS=
  4929.     ;;
  4930. *-aix4.3*)
  4931.     NO_LD_ARCHIVE_FLAGS=
  4932.     ;;
  4933. *-openvms*)
  4934.     NO_LD_ARCHIVE_FLAGS=
  4935.     ;;
  4936. esac
  4937.  
  4938.  
  4939. XLDFLAGS="$X_LIBS"
  4940. XLIBS="$X_EXTRA_LIBS"
  4941.  
  4942. if test "$no_x" != "yes"
  4943. then
  4944.     XLIBS="-lX11 $XLIBS"
  4945.     _SAVE_LDFLAGS="$LDFLAGS"
  4946.     LDFLAGS="$XLDFLAGS $LDFLAGS"
  4947.     echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6
  4948. echo "configure:4949: checking for XDrawLines in -lX11" >&5
  4949. ac_lib_var=`echo X11'_'XDrawLines | sed 'y%./+-%__p_%'`
  4950. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4951.   echo $ac_n "(cached) $ac_c" 1>&6
  4952. else
  4953.   ac_save_LIBS="$LIBS"
  4954. LIBS="-lX11 $XLIBS $LIBS"
  4955. cat > conftest.$ac_ext <<EOF
  4956. #line 4957 "configure"
  4957. #include "confdefs.h"
  4958. /* Override any gcc2 internal prototype to avoid an error.  */
  4959. /* We use char because int might match the return type of a gcc2
  4960.     builtin and then its argument prototype would still apply.  */
  4961. char XDrawLines();
  4962.  
  4963. int main() {
  4964. XDrawLines()
  4965. ; return 0; }
  4966. EOF
  4967. if { (eval echo configure:4968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4968.   rm -rf conftest*
  4969.   eval "ac_cv_lib_$ac_lib_var=yes"
  4970. else
  4971.   echo "configure: failed program was:" >&5
  4972.   cat conftest.$ac_ext >&5
  4973.   rm -rf conftest*
  4974.   eval "ac_cv_lib_$ac_lib_var=no"
  4975. fi
  4976. rm -f conftest*
  4977. LIBS="$ac_save_LIBS"
  4978.  
  4979. fi
  4980. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4981.   echo "$ac_t""yes" 1>&6
  4982.   X11_LIBS="-lX11"
  4983. else
  4984.   echo "$ac_t""no" 1>&6
  4985. MISSING_X="$MISSING_X -lX11"
  4986. fi
  4987.  
  4988.     echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6
  4989. echo "configure:4990: checking for XextAddDisplay in -lXext" >&5
  4990. ac_lib_var=`echo Xext'_'XextAddDisplay | sed 'y%./+-%__p_%'`
  4991. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4992.   echo $ac_n "(cached) $ac_c" 1>&6
  4993. else
  4994.   ac_save_LIBS="$LIBS"
  4995. LIBS="-lXext $XLIBS $LIBS"
  4996. cat > conftest.$ac_ext <<EOF
  4997. #line 4998 "configure"
  4998. #include "confdefs.h"
  4999. /* Override any gcc2 internal prototype to avoid an error.  */
  5000. /* We use char because int might match the return type of a gcc2
  5001.     builtin and then its argument prototype would still apply.  */
  5002. char XextAddDisplay();
  5003.  
  5004. int main() {
  5005. XextAddDisplay()
  5006. ; return 0; }
  5007. EOF
  5008. if { (eval echo configure:5009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5009.   rm -rf conftest*
  5010.   eval "ac_cv_lib_$ac_lib_var=yes"
  5011. else
  5012.   echo "configure: failed program was:" >&5
  5013.   cat conftest.$ac_ext >&5
  5014.   rm -rf conftest*
  5015.   eval "ac_cv_lib_$ac_lib_var=no"
  5016. fi
  5017. rm -f conftest*
  5018. LIBS="$ac_save_LIBS"
  5019.  
  5020. fi
  5021. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5022.   echo "$ac_t""yes" 1>&6
  5023.   XEXT_LIBS="-lXext"
  5024. else
  5025.   echo "$ac_t""no" 1>&6
  5026. MISSING_X="$MISSING_X -lXext"
  5027. fi
  5028.  
  5029.     echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6
  5030. echo "configure:5031: checking for IceFlush in -lICE" >&5
  5031. ac_lib_var=`echo ICE'_'IceFlush | sed 'y%./+-%__p_%'`
  5032. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5033.   echo $ac_n "(cached) $ac_c" 1>&6
  5034. else
  5035.   ac_save_LIBS="$LIBS"
  5036. LIBS="-lICE $XLIBS $LIBS"
  5037. cat > conftest.$ac_ext <<EOF
  5038. #line 5039 "configure"
  5039. #include "confdefs.h"
  5040. /* Override any gcc2 internal prototype to avoid an error.  */
  5041. /* We use char because int might match the return type of a gcc2
  5042.     builtin and then its argument prototype would still apply.  */
  5043. char IceFlush();
  5044.  
  5045. int main() {
  5046. IceFlush()
  5047. ; return 0; }
  5048. EOF
  5049. if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5050.   rm -rf conftest*
  5051.   eval "ac_cv_lib_$ac_lib_var=yes"
  5052. else
  5053.   echo "configure: failed program was:" >&5
  5054.   cat conftest.$ac_ext >&5
  5055.   rm -rf conftest*
  5056.   eval "ac_cv_lib_$ac_lib_var=no"
  5057. fi
  5058. rm -f conftest*
  5059. LIBS="$ac_save_LIBS"
  5060.  
  5061. fi
  5062. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5063.   echo "$ac_t""yes" 1>&6
  5064.   XICE_LIBS="-lICE"
  5065. else
  5066.   echo "$ac_t""no" 1>&6
  5067. fi
  5068.  
  5069.     echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6
  5070. echo "configure:5071: checking for SmcCloseConnection in -lSM" >&5
  5071. ac_lib_var=`echo SM'_'SmcCloseConnection | sed 'y%./+-%__p_%'`
  5072. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5073.   echo $ac_n "(cached) $ac_c" 1>&6
  5074. else
  5075.   ac_save_LIBS="$LIBS"
  5076. LIBS="-lSM $XLIBS $LIBS"
  5077. cat > conftest.$ac_ext <<EOF
  5078. #line 5079 "configure"
  5079. #include "confdefs.h"
  5080. /* Override any gcc2 internal prototype to avoid an error.  */
  5081. /* We use char because int might match the return type of a gcc2
  5082.     builtin and then its argument prototype would still apply.  */
  5083. char SmcCloseConnection();
  5084.  
  5085. int main() {
  5086. SmcCloseConnection()
  5087. ; return 0; }
  5088. EOF
  5089. if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5090.   rm -rf conftest*
  5091.   eval "ac_cv_lib_$ac_lib_var=yes"
  5092. else
  5093.   echo "configure: failed program was:" >&5
  5094.   cat conftest.$ac_ext >&5
  5095.   rm -rf conftest*
  5096.   eval "ac_cv_lib_$ac_lib_var=no"
  5097. fi
  5098. rm -f conftest*
  5099. LIBS="$ac_save_LIBS"
  5100.  
  5101. fi
  5102. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5103.   echo "$ac_t""yes" 1>&6
  5104.   XSM_LIBS="-lSM"
  5105. else
  5106.   echo "$ac_t""no" 1>&6
  5107. fi
  5108.  
  5109.     echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6
  5110. echo "configure:5111: checking for XtFree in -lXt" >&5
  5111. ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'`
  5112. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5113.   echo $ac_n "(cached) $ac_c" 1>&6
  5114. else
  5115.   ac_save_LIBS="$LIBS"
  5116. LIBS="-lXt $X_PRE_LIBS $XLIBS $LIBS"
  5117. cat > conftest.$ac_ext <<EOF
  5118. #line 5119 "configure"
  5119. #include "confdefs.h"
  5120. /* Override any gcc2 internal prototype to avoid an error.  */
  5121. /* We use char because int might match the return type of a gcc2
  5122.     builtin and then its argument prototype would still apply.  */
  5123. char XtFree();
  5124.  
  5125. int main() {
  5126. XtFree()
  5127. ; return 0; }
  5128. EOF
  5129. if { (eval echo configure:5130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5130.   rm -rf conftest*
  5131.   eval "ac_cv_lib_$ac_lib_var=yes"
  5132. else
  5133.   echo "configure: failed program was:" >&5
  5134.   cat conftest.$ac_ext >&5
  5135.   rm -rf conftest*
  5136.   eval "ac_cv_lib_$ac_lib_var=no"
  5137. fi
  5138. rm -f conftest*
  5139. LIBS="$ac_save_LIBS"
  5140.  
  5141. fi
  5142. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5143.   echo "$ac_t""yes" 1>&6
  5144.    XT_LIBS="-lXt"
  5145. else
  5146.   echo "$ac_t""no" 1>&6
  5147. MISSING_X="$MISSING_X -lXt"
  5148. fi
  5149.  
  5150.     echo $ac_n "checking for XmuLookupString in -lXmu""... $ac_c" 1>&6
  5151. echo "configure:5152: checking for XmuLookupString in -lXmu" >&5
  5152. ac_lib_var=`echo Xmu'_'XmuLookupString | sed 'y%./+-%__p_%'`
  5153. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5154.   echo $ac_n "(cached) $ac_c" 1>&6
  5155. else
  5156.   ac_save_LIBS="$LIBS"
  5157. LIBS="-lXmu $X_PRE_LIBS $XLIBS $XT_LIBS $XEXT_LIBS $LIBS"
  5158. cat > conftest.$ac_ext <<EOF
  5159. #line 5160 "configure"
  5160. #include "confdefs.h"
  5161. /* Override any gcc2 internal prototype to avoid an error.  */
  5162. /* We use char because int might match the return type of a gcc2
  5163.     builtin and then its argument prototype would still apply.  */
  5164. char XmuLookupString();
  5165.  
  5166. int main() {
  5167. XmuLookupString()
  5168. ; return 0; }
  5169. EOF
  5170. if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5171.   rm -rf conftest*
  5172.   eval "ac_cv_lib_$ac_lib_var=yes"
  5173. else
  5174.   echo "configure: failed program was:" >&5
  5175.   cat conftest.$ac_ext >&5
  5176.   rm -rf conftest*
  5177.   eval "ac_cv_lib_$ac_lib_var=no"
  5178. fi
  5179. rm -f conftest*
  5180. LIBS="$ac_save_LIBS"
  5181.  
  5182. fi
  5183. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5184.   echo "$ac_t""yes" 1>&6
  5185.   XMU_LIBS="-lXmu"
  5186. else
  5187.   echo "$ac_t""no" 1>&6
  5188. MISSING_X="$MISSING_X -lXmu"
  5189. fi
  5190.  
  5191.  
  5192.                         echo $ac_n "checking for XineramaIsActive in -lXinerama""... $ac_c" 1>&6
  5193. echo "configure:5194: checking for XineramaIsActive in -lXinerama" >&5
  5194. ac_lib_var=`echo Xinerama'_'XineramaIsActive | sed 'y%./+-%__p_%'`
  5195. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5196.   echo $ac_n "(cached) $ac_c" 1>&6
  5197. else
  5198.   ac_save_LIBS="$LIBS"
  5199. LIBS="-lXinerama $XLIBS $XEXT_LIBS $LIBS"
  5200. cat > conftest.$ac_ext <<EOF
  5201. #line 5202 "configure"
  5202. #include "confdefs.h"
  5203. /* Override any gcc2 internal prototype to avoid an error.  */
  5204. /* We use char because int might match the return type of a gcc2
  5205.     builtin and then its argument prototype would still apply.  */
  5206. char XineramaIsActive();
  5207.  
  5208. int main() {
  5209. XineramaIsActive()
  5210. ; return 0; }
  5211. EOF
  5212. if { (eval echo configure:5213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5213.   rm -rf conftest*
  5214.   eval "ac_cv_lib_$ac_lib_var=yes"
  5215. else
  5216.   echo "configure: failed program was:" >&5
  5217.   cat conftest.$ac_ext >&5
  5218.   rm -rf conftest*
  5219.   eval "ac_cv_lib_$ac_lib_var=no"
  5220. fi
  5221. rm -f conftest*
  5222. LIBS="$ac_save_LIBS"
  5223.  
  5224. fi
  5225. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5226.   echo "$ac_t""yes" 1>&6
  5227.   MOZ_XINERAMA_LIBS="-lXinerama"
  5228. else
  5229.   echo "$ac_t""no" 1>&6
  5230. fi
  5231.  
  5232.     ac_safe=`echo "X11/extensions/Xinerama.h" | sed 'y%./+-%__p_%'`
  5233. echo $ac_n "checking for X11/extensions/Xinerama.h""... $ac_c" 1>&6
  5234. echo "configure:5235: checking for X11/extensions/Xinerama.h" >&5
  5235. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5236.   echo $ac_n "(cached) $ac_c" 1>&6
  5237. else
  5238.   cat > conftest.$ac_ext <<EOF
  5239. #line 5240 "configure"
  5240. #include "confdefs.h"
  5241. #include <X11/extensions/Xinerama.h>
  5242. EOF
  5243. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5244. { (eval echo configure:5245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5245. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5246. if test -z "$ac_err"; then
  5247.   rm -rf conftest*
  5248.   eval "ac_cv_header_$ac_safe=yes"
  5249. else
  5250.   echo "$ac_err" >&5
  5251.   echo "configure: failed program was:" >&5
  5252.   cat conftest.$ac_ext >&5
  5253.   rm -rf conftest*
  5254.   eval "ac_cv_header_$ac_safe=no"
  5255. fi
  5256. rm -f conftest*
  5257. fi
  5258. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5259.   echo "$ac_t""yes" 1>&6
  5260.   :
  5261. else
  5262.   echo "$ac_t""no" 1>&6
  5263. fi
  5264.  
  5265.  
  5266.                         echo $ac_n "checking for XieFloGeometry in -lXIE""... $ac_c" 1>&6
  5267. echo "configure:5268: checking for XieFloGeometry in -lXIE" >&5
  5268. ac_lib_var=`echo XIE'_'XieFloGeometry | sed 'y%./+-%__p_%'`
  5269. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5270.   echo $ac_n "(cached) $ac_c" 1>&6
  5271. else
  5272.   ac_save_LIBS="$LIBS"
  5273. LIBS="-lXIE $XLIBS $XEXT_LIBS $LIBS"
  5274. cat > conftest.$ac_ext <<EOF
  5275. #line 5276 "configure"
  5276. #include "confdefs.h"
  5277. /* Override any gcc2 internal prototype to avoid an error.  */
  5278. /* We use char because int might match the return type of a gcc2
  5279.     builtin and then its argument prototype would still apply.  */
  5280. char XieFloGeometry();
  5281.  
  5282. int main() {
  5283. XieFloGeometry()
  5284. ; return 0; }
  5285. EOF
  5286. if { (eval echo configure:5287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5287.   rm -rf conftest*
  5288.   eval "ac_cv_lib_$ac_lib_var=yes"
  5289. else
  5290.   echo "configure: failed program was:" >&5
  5291.   cat conftest.$ac_ext >&5
  5292.   rm -rf conftest*
  5293.   eval "ac_cv_lib_$ac_lib_var=no"
  5294. fi
  5295. rm -f conftest*
  5296. LIBS="$ac_save_LIBS"
  5297.  
  5298. fi
  5299. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5300.   echo "$ac_t""yes" 1>&6
  5301.   MOZ_XIE_LIBS="-lXIE"
  5302. else
  5303.   echo "$ac_t""no" 1>&6
  5304. fi
  5305.  
  5306.     ac_safe=`echo "X11/extensions/XIElib.h" | sed 'y%./+-%__p_%'`
  5307. echo $ac_n "checking for X11/extensions/XIElib.h""... $ac_c" 1>&6
  5308. echo "configure:5309: checking for X11/extensions/XIElib.h" >&5
  5309. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5310.   echo $ac_n "(cached) $ac_c" 1>&6
  5311. else
  5312.   cat > conftest.$ac_ext <<EOF
  5313. #line 5314 "configure"
  5314. #include "confdefs.h"
  5315. #include <X11/extensions/XIElib.h>
  5316. EOF
  5317. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5318. { (eval echo configure:5319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5319. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5320. if test -z "$ac_err"; then
  5321.   rm -rf conftest*
  5322.   eval "ac_cv_header_$ac_safe=yes"
  5323. else
  5324.   echo "$ac_err" >&5
  5325.   echo "configure: failed program was:" >&5
  5326.   cat conftest.$ac_ext >&5
  5327.   rm -rf conftest*
  5328.   eval "ac_cv_header_$ac_safe=no"
  5329. fi
  5330. rm -f conftest*
  5331. fi
  5332. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5333.   echo "$ac_t""yes" 1>&6
  5334.   :
  5335. else
  5336.   echo "$ac_t""no" 1>&6
  5337. fi
  5338.  
  5339.  
  5340.     if test "$MOZ_XIE_LIBS"; then
  5341.                         case $target in
  5342.         *-hpux*)
  5343.         ;;
  5344.         *)
  5345.         HAVE_XIE=1
  5346.         ;;
  5347.     esac
  5348.     fi
  5349.  
  5350.     LDFLAGS="$_SAVE_LDFLAGS"
  5351.  
  5352.                                 # Check whether --enable-toolkit or --disable-toolkit was given.
  5353. if test "${enable_toolkit+set}" = set; then
  5354.   enableval="$enable_toolkit"
  5355.       if test "$enableval" = "motif" \
  5356.             -o "$enableval" = "gtk" \
  5357.             -o "$enableval" = "qt" \
  5358.             -o "$enableval" = "xlib"
  5359.         then
  5360.                                        MOZ_WIDGET_TOOLKIT=`echo "$enableval" | sed -e "s/,.*$//"`
  5361.         else
  5362.              { echo "configure: error: Toolkit must be Xlib" 1>&2; exit 1; }
  5363.         fi
  5364. else
  5365.       MOZ_WIDGET_TOOLKIT="gtk" 
  5366. fi
  5367.  
  5368. fi # $no_x
  5369.  
  5370.  
  5371.  
  5372. # Check whether --with-nspr-prefix or --without-nspr-prefix was given.
  5373. if test "${with_nspr_prefix+set}" = set; then
  5374.   withval="$with_nspr_prefix"
  5375.   nspr_config_prefix="$withval"
  5376. else
  5377.   nspr_config_prefix=""
  5378. fi
  5379.  
  5380.  
  5381. # Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given.
  5382. if test "${with_nspr_exec_prefix+set}" = set; then
  5383.   withval="$with_nspr_exec_prefix"
  5384.   nspr_config_exec_prefix="$withval"
  5385. else
  5386.   nspr_config_exec_prefix=""
  5387. fi
  5388.  
  5389.  
  5390.     if test -n "$nspr_config_exec_prefix"; then
  5391.         nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
  5392.         if test -z "$NSPR_CONFIG"; then
  5393.             NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
  5394.         fi
  5395.     fi
  5396.     if test -n "$nspr_config_prefix"; then
  5397.         nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
  5398.         if test -z "$NSPR_CONFIG"; then
  5399.             NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
  5400.         fi
  5401.     fi
  5402.  
  5403.     unset ac_cv_path_NSPR_CONFIG
  5404.     # Extract the first word of "nspr-config", so it can be a program name with args.
  5405. set dummy nspr-config; ac_word=$2
  5406. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5407. echo "configure:5408: checking for $ac_word" >&5
  5408. if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then
  5409.   echo $ac_n "(cached) $ac_c" 1>&6
  5410. else
  5411.   case "$NSPR_CONFIG" in
  5412.   /*)
  5413.   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path.
  5414.   ;;
  5415.   ?:/*)             
  5416.   ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path.
  5417.   ;;
  5418.   *)
  5419.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  5420.   ac_dummy="$PATH"
  5421.   for ac_dir in $ac_dummy; do 
  5422.     test -z "$ac_dir" && ac_dir=.
  5423.     if test -f $ac_dir/$ac_word; then
  5424.       ac_cv_path_NSPR_CONFIG="$ac_dir/$ac_word"
  5425.       break
  5426.     fi
  5427.   done
  5428.   IFS="$ac_save_ifs"
  5429.   test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no"
  5430.   ;;
  5431. esac
  5432. fi
  5433. NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG"
  5434. if test -n "$NSPR_CONFIG"; then
  5435.   echo "$ac_t""$NSPR_CONFIG" 1>&6
  5436. else
  5437.   echo "$ac_t""no" 1>&6
  5438. fi
  5439.  
  5440.     min_nspr_version=4.0.0
  5441.     echo $ac_n "checking for NSPR - version >= $min_nspr_version (skipping)""... $ac_c" 1>&6
  5442. echo "configure:5443: checking for NSPR - version >= $min_nspr_version (skipping)" >&5
  5443.  
  5444.     no_nspr=""
  5445.     if test "$NSPR_CONFIG" = "no"; then
  5446.         no_nspr="yes"
  5447.     else
  5448.         NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
  5449.         NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
  5450.  
  5451.                 nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
  5452.             sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  5453.         nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
  5454.             sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  5455.         nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
  5456.             sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  5457.     fi
  5458.  
  5459.     if test -z "$no_nspr"; then
  5460.         echo "$ac_t""yes" 1>&6
  5461.         MOZ_NATIVE_NSPR=1     
  5462.     else
  5463.         echo "$ac_t""no" 1>&6
  5464.     fi
  5465.  
  5466.  
  5467.     
  5468.     
  5469.  
  5470.  
  5471.  
  5472. if test -z "$MOZ_NATIVE_NSPR"; then
  5473.     echo "configure: warning: nspr-config not found. building local copy of NSPR" 1>&2
  5474.     NSPR_CFLAGS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --cflags`'
  5475.     case "$target" in
  5476.     *-*-os2_vacpp)
  5477.         NSPR_LIBS='$(DIST)/lib/nspr'$NSPR_VERSION'.lib $(DIST)/lib/plc'$NSPR_VERSION'.lib $(DIST)/lib/plds'$NSPR_VERSION'.lib '$_PTHREAD_LDFLAGS''
  5478.         ;;
  5479.     *)
  5480.         NSPR_LIBS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --libs`'
  5481.         ;;
  5482.     esac
  5483. fi
  5484.  
  5485.  
  5486.  
  5487. # Check whether --enable-xinerama or --disable-xinerama was given.
  5488. if test "${enable_xinerama+set}" = set; then
  5489.   enableval="$enable_xinerama"
  5490.   if test "$enableval" = "yes"; then
  5491.      if test -n "$MOZ_XINERAMA_LIBS" && \
  5492.       test -n "$ac_cv_header_X11_extensions_Xinerama_h"; then
  5493.         MOZ_ENABLE_XINERAMA=1
  5494.         cat >> confdefs.h <<\EOF
  5495. #define MOZ_ENABLE_XINERAMA 1
  5496. EOF
  5497.  
  5498.     fi 
  5499.  
  5500.   elif test "$enableval" = "no"; then
  5501.     :
  5502.   else
  5503.     { echo "configure: error: Option, xinerama, does not take an argument ($enableval)." 1>&2; exit 1; }
  5504.   fi
  5505. fi
  5506.  
  5507.  
  5508.  
  5509. MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwidget_$(MOZ_WIDGET_TOOLKIT)'
  5510. MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_WIDGET_TOOLKIT) $(MOZ_XLIBRGB_LDFLAGS)'
  5511. WIDGET_DLL='\"libwidget_$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"'
  5512. GFXWIN_DLL='\"libgfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"'
  5513.  
  5514. case "$target_os" in
  5515. beos*)
  5516.     MOZ_WIDGET_TOOLKIT="beos"
  5517.     ;;
  5518.  
  5519. nto*)
  5520.     MOZ_WIDGET_TOOLKIT="photon"
  5521.     cat >> confdefs.h <<\EOF
  5522. #define NO_X11 1
  5523. EOF
  5524.  
  5525.     TK_CFLAGS='-I/usr/include/photon'
  5526.     TK_LIBS='-lph -lphrender'
  5527.     ;;
  5528.  
  5529. os2*)
  5530.     MOZ_WIDGET_TOOLKIT=os2
  5531.     MOZ_WIDGET_TOOLKIT_LDFLAGS='$(DIST)/lib/wdgt$(MOZ_WIDGET_TOOLKIT)'
  5532.     MOZ_GFX_TOOLKIT_LDFLAGS='$(DIST)/lib/gfx_$(MOZ_WIDGET_TOOLKIT)'
  5533.     WIDGET_DLL='\"wdgt$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"'
  5534.     GFXWIN_DLL='\"gfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"'
  5535.     ;;
  5536. esac
  5537.  
  5538.  
  5539.  
  5540. if test "$MOZ_WIDGET_TOOLKIT" = "gtk"
  5541. then
  5542.     MOZ_ENABLE_GTK=1
  5543.     MOZ_ENABLE_XREMOTE=1
  5544.     cat >> confdefs.h <<\EOF
  5545. #define MOZ_WIDGET_GTK 1
  5546. EOF
  5547.  
  5548. fi
  5549.  
  5550. if test "$MOZ_WIDGET_TOOLKIT" = "xlib"
  5551. then
  5552.     MOZ_ENABLE_XLIB=1
  5553.     MOZ_ENABLE_XREMOTE=1
  5554.     cat >> confdefs.h <<\EOF
  5555. #define MOZ_WIDGET_XLIB 1
  5556. EOF
  5557.  
  5558. fi
  5559.  
  5560. if test "$MOZ_WIDGET_TOOLKIT" = "qt"
  5561. then
  5562.     MOZ_ENABLE_QT=1
  5563.     MOZ_ENABLE_XREMOTE=1
  5564.     cat >> confdefs.h <<\EOF
  5565. #define MOZ_WIDGET_QT 1
  5566. EOF
  5567.  
  5568. fi
  5569.  
  5570. if test "$MOZ_WIDGET_TOOLKIT" = "motif"
  5571. then
  5572.     MOZ_ENABLE_MOTIF=1
  5573.     MOZ_ENABLE_XREMOTE=1
  5574.     cat >> confdefs.h <<\EOF
  5575. #define MOZ_WIDGET_MOTIF 1
  5576. EOF
  5577.  
  5578. fi
  5579.  
  5580. if test "$MOZ_WIDGET_TOOLKIT" = "photon"
  5581. then
  5582.     MOZ_ENABLE_PHOTON=1
  5583.     cat >> confdefs.h <<\EOF
  5584. #define MOZ_WIDGET_PHOTON 1
  5585. EOF
  5586.  
  5587. fi
  5588.  
  5589.  
  5590. if test "$MOZ_ENABLE_XREMOTE"; then
  5591.     cat >> confdefs.h <<\EOF
  5592. #define MOZ_ENABLE_XREMOTE 1
  5593. EOF
  5594.  
  5595. fi
  5596.  
  5597. if test "$no_x" != "yes"
  5598. then
  5599.     # Check whether --with-gtk or --without-gtk was given.
  5600. if test "${with_gtk+set}" = set; then
  5601.   withval="$with_gtk"
  5602.   
  5603.         if test "$withval" = "yes"
  5604.         then
  5605.             MOZ_ENABLE_GTK=1
  5606.         else
  5607.             MOZ_ENABLE_GTK=
  5608.         fi
  5609.     
  5610. fi
  5611.  
  5612. fi
  5613.  
  5614. HAVE_GDK_PIXBUF=
  5615. MOZ_GDK_PIXBUF_CFLAGS=
  5616. MOZ_GDK_PIXBUF_LIBS=
  5617.  
  5618. if test "$MOZ_ENABLE_GTK"
  5619. then
  5620.     # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
  5621. if test "${with_gtk_prefix+set}" = set; then
  5622.   withval="$with_gtk_prefix"
  5623.   gtk_config_prefix="$withval"
  5624. else
  5625.   gtk_config_prefix=""
  5626. fi
  5627.  
  5628. # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
  5629. if test "${with_gtk_exec_prefix+set}" = set; then
  5630.   withval="$with_gtk_exec_prefix"
  5631.   gtk_config_exec_prefix="$withval"
  5632. else
  5633.   gtk_config_exec_prefix=""
  5634. fi
  5635.  
  5636. # Check whether --enable-gtktest or --disable-gtktest was given.
  5637. if test "${enable_gtktest+set}" = set; then
  5638.   enableval="$enable_gtktest"
  5639.   :
  5640. else
  5641.   enable_gtktest=yes
  5642. fi
  5643.  
  5644.  
  5645.   if test x$gtk_config_exec_prefix != x ; then
  5646.      gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
  5647.      if test x${GTK_CONFIG+set} != xset ; then
  5648.         GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
  5649.      fi
  5650.   fi
  5651.   if test x$gtk_config_prefix != x ; then
  5652.      gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
  5653.      if test x${GTK_CONFIG+set} != xset ; then
  5654.         GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
  5655.      fi
  5656.   fi
  5657.  
  5658.     unset ac_cv_path_GTK_CONFIG
  5659.  
  5660.   # Extract the first word of "gtk-config", so it can be a program name with args.
  5661. set dummy gtk-config; ac_word=$2
  5662. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5663. echo "configure:5664: checking for $ac_word" >&5
  5664. if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  5665.   echo $ac_n "(cached) $ac_c" 1>&6
  5666. else
  5667.   case "$GTK_CONFIG" in
  5668.   /*)
  5669.   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  5670.   ;;
  5671.   ?:/*)             
  5672.   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  5673.   ;;
  5674.   *)
  5675.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  5676.   ac_dummy="$PATH"
  5677.   for ac_dir in $ac_dummy; do 
  5678.     test -z "$ac_dir" && ac_dir=.
  5679.     if test -f $ac_dir/$ac_word; then
  5680.       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
  5681.       break
  5682.     fi
  5683.   done
  5684.   IFS="$ac_save_ifs"
  5685.   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  5686.   ;;
  5687. esac
  5688. fi
  5689. GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
  5690. if test -n "$GTK_CONFIG"; then
  5691.   echo "$ac_t""$GTK_CONFIG" 1>&6
  5692. else
  5693.   echo "$ac_t""no" 1>&6
  5694. fi
  5695.  
  5696.   min_gtk_version=$GTK_VERSION
  5697.   echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
  5698. echo "configure:5699: checking for GTK - version >= $min_gtk_version" >&5
  5699.   no_gtk=""
  5700.   if test "$GTK_CONFIG" = "no" ; then
  5701.     no_gtk=yes
  5702.   else
  5703.     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
  5704.     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
  5705.     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
  5706.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  5707.     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
  5708.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  5709.     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
  5710.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  5711.     if test "x$enable_gtktest" = "xyes" ; then
  5712.       ac_save_CFLAGS="$CFLAGS"
  5713.       ac_save_LIBS="$LIBS"
  5714.       CFLAGS="$CFLAGS $GTK_CFLAGS"
  5715.       LIBS="$LIBS $GTK_LIBS"
  5716.       rm -f conf.gtktest
  5717.       if test "$cross_compiling" = yes; then
  5718.   echo $ac_n "cross compiling; assumed OK... $ac_c"
  5719. else
  5720.   cat > conftest.$ac_ext <<EOF
  5721. #line 5722 "configure"
  5722. #include "confdefs.h"
  5723.  
  5724. #include <gtk/gtk.h>
  5725. #include <stdio.h>
  5726. #include <stdlib.h>
  5727.  
  5728. int 
  5729. main ()
  5730. {
  5731.   int major, minor, micro;
  5732.   char *tmp_version;
  5733.  
  5734.   system ("touch conf.gtktest");
  5735.  
  5736.   /* HP/UX 9 (%@#!) writes to sscanf strings */
  5737.   tmp_version = g_strdup("$min_gtk_version");
  5738.   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
  5739.      printf("%s, bad version string\n", "$min_gtk_version");
  5740.      exit(1);
  5741.    }
  5742.  
  5743.   if ((gtk_major_version != $gtk_config_major_version) ||
  5744.       (gtk_minor_version != $gtk_config_minor_version) ||
  5745.       (gtk_micro_version != $gtk_config_micro_version))
  5746.     {
  5747.       printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
  5748.              $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
  5749.              gtk_major_version, gtk_minor_version, gtk_micro_version);
  5750.       printf ("*** was found! If gtk-config was correct, then it is best\n");
  5751.       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
  5752.       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
  5753.       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
  5754.       printf("*** required on your system.\n");
  5755.       printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
  5756.       printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
  5757.       printf("*** before re-running configure\n");
  5758.     } 
  5759. #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
  5760.   else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
  5761.        (gtk_minor_version != GTK_MINOR_VERSION) ||
  5762.            (gtk_micro_version != GTK_MICRO_VERSION))
  5763.     {
  5764.       printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
  5765.          GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
  5766.       printf("*** library (version %d.%d.%d)\n",
  5767.          gtk_major_version, gtk_minor_version, gtk_micro_version);
  5768.     }
  5769. #endif /* defined (GTK_MAJOR_VERSION) ... */
  5770.   else
  5771.     {
  5772.       if ((gtk_major_version > major) ||
  5773.         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
  5774.         ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
  5775.       {
  5776.         return 0;
  5777.        }
  5778.      else
  5779.       {
  5780.         printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
  5781.                gtk_major_version, gtk_minor_version, gtk_micro_version);
  5782.         printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
  5783.            major, minor, micro);
  5784.         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
  5785.         printf("***\n");
  5786.         printf("*** If you have already installed a sufficiently new version, this error\n");
  5787.         printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
  5788.         printf("*** being found. The easiest way to fix this is to remove the old version\n");
  5789.         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
  5790.         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
  5791.         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  5792.         printf("*** so that the correct libraries are found at run-time))\n");
  5793.       }
  5794.     }
  5795.   return 1;
  5796. }
  5797.  
  5798. EOF
  5799. if { (eval echo configure:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5800. then
  5801.   :
  5802. else
  5803.   echo "configure: failed program was:" >&5
  5804.   cat conftest.$ac_ext >&5
  5805.   rm -fr conftest*
  5806.   no_gtk=yes
  5807. fi
  5808. rm -fr conftest*
  5809. fi
  5810.  
  5811.        CFLAGS="$ac_save_CFLAGS"
  5812.        LIBS="$ac_save_LIBS"
  5813.      fi
  5814.   fi
  5815.   if test "x$no_gtk" = x ; then
  5816.      echo "$ac_t""yes" 1>&6
  5817.      :     
  5818.   else
  5819.      echo "$ac_t""no" 1>&6
  5820.      if test "$GTK_CONFIG" = "no" ; then
  5821.        echo "*** The gtk-config script installed by GTK could not be found."
  5822.        echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
  5823.        echo "*** your path, or set the GTK_CONFIG environment variable to the"
  5824.        echo "*** full path to gtk-config."
  5825.        echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk"
  5826.      else
  5827.        if test -f conf.gtktest ; then
  5828.         :
  5829.        else
  5830.           echo "*** Could not run GTK test program, checking why..."
  5831.           CFLAGS="$CFLAGS $GTK_CFLAGS"
  5832.           LIBS="$LIBS $GTK_LIBS"
  5833.           cat > conftest.$ac_ext <<EOF
  5834. #line 5835 "configure"
  5835. #include "confdefs.h"
  5836.  
  5837. #include <gtk/gtk.h>
  5838. #include <stdio.h>
  5839.  
  5840. int main() {
  5841.  return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); 
  5842. ; return 0; }
  5843. EOF
  5844. if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5845.   rm -rf conftest*
  5846.    echo "*** The test program compiled, but did not run. This usually means"
  5847.           echo "*** that the run-time linker is not finding GTK or finding the wrong"
  5848.           echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
  5849.           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  5850.           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
  5851.           echo "*** is required on your system"
  5852.       echo "***"
  5853.           echo "*** If you have an old version installed, it is best to remove it, although"
  5854.           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
  5855.           echo "***"
  5856.           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
  5857.           echo "*** came with the system with the command"
  5858.           echo "***"
  5859.           echo "***    rpm --erase --nodeps gtk gtk-devel" 
  5860. else
  5861.   echo "configure: failed program was:" >&5
  5862.   cat conftest.$ac_ext >&5
  5863.   rm -rf conftest*
  5864.    echo "*** The test program failed to compile or link. See the file config.log for the"
  5865.           echo "*** exact error that occured. This usually means GTK was incorrectly installed"
  5866.           echo "*** or that you have moved GTK since it was installed. In the latter case, you"
  5867.           echo "*** may want to edit the gtk-config script: $GTK_CONFIG" 
  5868. fi
  5869. rm -f conftest*
  5870.           CFLAGS="$ac_save_CFLAGS"
  5871.           LIBS="$ac_save_LIBS"
  5872.        fi
  5873.      fi
  5874.      GTK_CFLAGS=""
  5875.      GTK_LIBS=""
  5876.      { echo "configure: error: Test for GTK failed." 1>&2; exit 1; }
  5877.   fi
  5878.   
  5879.   
  5880.   rm -f conf.gtktest
  5881.  
  5882.  
  5883.  
  5884.     # Check whether --with-gdk-pixbuf-prefix or --without-gdk-pixbuf-prefix was given.
  5885. if test "${with_gdk_pixbuf_prefix+set}" = set; then
  5886.   withval="$with_gdk_pixbuf_prefix"
  5887.   gdk_pixbuf_prefix="$withval"
  5888. else
  5889.   gdk_pixbuf_prefix=""
  5890. fi
  5891.  
  5892. # Check whether --with-gdk-pixbuf-exec-prefix or --without-gdk-pixbuf-exec-prefix was given.
  5893. if test "${with_gdk_pixbuf_exec_prefix+set}" = set; then
  5894.   withval="$with_gdk_pixbuf_exec_prefix"
  5895.   gdk_pixbuf_exec_prefix="$withval"
  5896. else
  5897.   gdk_pixbuf_exec_prefix=""
  5898. fi
  5899.  
  5900. # Check whether --enable-gdk_pixbuftest or --disable-gdk_pixbuftest was given.
  5901. if test "${enable_gdk_pixbuftest+set}" = set; then
  5902.   enableval="$enable_gdk_pixbuftest"
  5903.   :
  5904. else
  5905.   enable_gdk_pixbuftest=yes
  5906. fi
  5907.  
  5908.  
  5909.   if test x$gdk_pixbuf_exec_prefix != x ; then
  5910.      gdk_pixbuf_args="$gdk_pixbuf_args --exec-prefix=$gdk_pixbuf_exec_prefix"
  5911.      if test x${GDK_PIXBUF_CONFIG+set} = xset ; then
  5912.         GDK_PIXBUF_CONFIG=$gdk_pixbuf_exec_prefix/gdk-pixbuf-config
  5913.      fi
  5914.   fi
  5915.   if test x$gdk_pixbuf_prefix != x ; then
  5916.      gdk_pixbuf_args="$gdk_pixbuf_args --prefix=$gdk_pixbuf_prefix"
  5917.      if test x${GDK_PIXBUF_CONFIG+set} = xset ; then
  5918.         GDK_PIXBUF_CONFIG=$gdk_pixbuf_prefix/bin/gdk-pixbuf-config
  5919.      fi
  5920.   fi
  5921.  
  5922.   # Extract the first word of "gdk-pixbuf-config", so it can be a program name with args.
  5923. set dummy gdk-pixbuf-config; ac_word=$2
  5924. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5925. echo "configure:5926: checking for $ac_word" >&5
  5926. if eval "test \"`echo '$''{'ac_cv_path_GDK_PIXBUF_CONFIG'+set}'`\" = set"; then
  5927.   echo $ac_n "(cached) $ac_c" 1>&6
  5928. else
  5929.   case "$GDK_PIXBUF_CONFIG" in
  5930.   /*)
  5931.   ac_cv_path_GDK_PIXBUF_CONFIG="$GDK_PIXBUF_CONFIG" # Let the user override the test with a path.
  5932.   ;;
  5933.   ?:/*)             
  5934.   ac_cv_path_GDK_PIXBUF_CONFIG="$GDK_PIXBUF_CONFIG" # Let the user override the test with a dos path.
  5935.   ;;
  5936.   *)
  5937.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  5938.   ac_dummy="$PATH"
  5939.   for ac_dir in $ac_dummy; do 
  5940.     test -z "$ac_dir" && ac_dir=.
  5941.     if test -f $ac_dir/$ac_word; then
  5942.       ac_cv_path_GDK_PIXBUF_CONFIG="$ac_dir/$ac_word"
  5943.       break
  5944.     fi
  5945.   done
  5946.   IFS="$ac_save_ifs"
  5947.   test -z "$ac_cv_path_GDK_PIXBUF_CONFIG" && ac_cv_path_GDK_PIXBUF_CONFIG="no"
  5948.   ;;
  5949. esac
  5950. fi
  5951. GDK_PIXBUF_CONFIG="$ac_cv_path_GDK_PIXBUF_CONFIG"
  5952. if test -n "$GDK_PIXBUF_CONFIG"; then
  5953.   echo "$ac_t""$GDK_PIXBUF_CONFIG" 1>&6
  5954. else
  5955.   echo "$ac_t""no" 1>&6
  5956. fi
  5957.  
  5958.   min_gdk_pixbuf_version=$GDK_PIXBUF_VERSION
  5959.   echo $ac_n "checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version""... $ac_c" 1>&6
  5960. echo "configure:5961: checking for GDK_PIXBUF - version >= $min_gdk_pixbuf_version" >&5
  5961.   no_gdk_pixbuf=""
  5962.   if test "$GDK_PIXBUF_CONFIG" = "no" ; then
  5963.     no_gdk_pixbuf=yes
  5964.   else
  5965.     GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --cflags`
  5966.     GDK_PIXBUF_LIBS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --libs`
  5967.  
  5968.     gdk_pixbuf_major_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
  5969.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  5970.     gdk_pixbuf_minor_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
  5971.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  5972.     gdk_pixbuf_micro_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_config_args --version | \
  5973.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  5974.     if test "x$enable_gdk_pixbuftest" = "xyes" ; then
  5975.       ac_save_CFLAGS="$CFLAGS"
  5976.       ac_save_LIBS="$LIBS"
  5977.       CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
  5978.       LIBS="$LIBS $GDK_PIXBUF_LIBS"
  5979.       rm -f conf.gdk_pixbuftest
  5980.       if test "$cross_compiling" = yes; then
  5981.   echo $ac_n "cross compiling; assumed OK... $ac_c"
  5982. else
  5983.   cat > conftest.$ac_ext <<EOF
  5984. #line 5985 "configure"
  5985. #include "confdefs.h"
  5986.  
  5987. #include <stdio.h>
  5988. #include <stdlib.h>
  5989. #include <string.h>
  5990. #include <gdk-pixbuf/gdk-pixbuf.h>
  5991.  
  5992. char*
  5993. my_strdup (char *str)
  5994. {
  5995.   char *new_str;
  5996.   
  5997.   if (str)
  5998.     {
  5999.       new_str = malloc ((strlen (str) + 1) * sizeof(char));
  6000.       strcpy (new_str, str);
  6001.     }
  6002.   else
  6003.     new_str = NULL;
  6004.   
  6005.   return new_str;
  6006. }
  6007.  
  6008. int main ()
  6009. {
  6010.   int major, minor, micro;
  6011.   char *tmp_version;
  6012.  
  6013.   system ("touch conf.gdk_pixbuftest");
  6014.  
  6015.   /* HP/UX 9 (%@#!) writes to sscanf strings */
  6016.   tmp_version = my_strdup("$min_gdk_pixbuf_version");
  6017.   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
  6018.      printf("%s, bad version string\n", "$min_gdk_pixbuf_version");
  6019.      exit(1);
  6020.    }
  6021.  
  6022.    if (($gdk_pixbuf_major_version > major) ||
  6023.       (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version > minor)) ||
  6024.       (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version == minor) && ($gdk_pixbuf_micro_version >= micro)))
  6025.     {
  6026.       return 0;
  6027.     }
  6028.   else
  6029.     {
  6030.       printf("\n*** 'gdk-pixbuf-config --version' returned %d.%d.%d, but the minimum version\n", $gdk_pixbuf_major_version, $gdk_pixbuf_minor_version, $gdk_pixbuf_micro_version);
  6031.       printf("*** of GDK_PIXBUF required is %d.%d.%d. If gdk-pixbuf-config is correct, then it is\n", major, minor, micro);
  6032.       printf("*** best to upgrade to the required version.\n");
  6033.       printf("*** If gdk-pixbuf-config was wrong, set the environment variable GDK_PIXBUF_CONFIG\n");
  6034.       printf("*** to point to the correct copy of gdk-pixbuf-config, and remove the file\n");
  6035.       printf("*** config.cache before re-running configure\n");
  6036.       return 1;
  6037.     }
  6038. }
  6039.  
  6040.  
  6041. EOF
  6042. if { (eval echo configure:6043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  6043. then
  6044.   :
  6045. else
  6046.   echo "configure: failed program was:" >&5
  6047.   cat conftest.$ac_ext >&5
  6048.   rm -fr conftest*
  6049.   no_gdk_pixbuf=yes
  6050. fi
  6051. rm -fr conftest*
  6052. fi
  6053.  
  6054.        CFLAGS="$ac_save_CFLAGS"
  6055.        LIBS="$ac_save_LIBS"
  6056.      fi
  6057.   fi
  6058.   if test "x$no_gdk_pixbuf" = x ; then
  6059.      echo "$ac_t""yes" 1>&6
  6060.      HAVE_GDK_PIXBUF=1     
  6061.   else
  6062.      echo "$ac_t""no" 1>&6
  6063.      if test "$GDK_PIXBUF_CONFIG" = "no" ; then
  6064.        echo "*** The gdk-pixbuf-config script installed by GDK_PIXBUF could not be found"
  6065.        echo "*** If GDK_PIXBUF was installed in PREFIX, make sure PREFIX/bin is in"
  6066.        echo "*** your path, or set the GDK_PIXBUF_CONFIG environment variable to the"
  6067.        echo "*** full path to gdk-pixbuf-config."
  6068.      else
  6069.        if test -f conf.gdk_pixbuftest ; then
  6070.         :
  6071.        else
  6072.           echo "*** Could not run GDK_PIXBUF test program, checking why..."
  6073.           CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
  6074.           LIBS="$LIBS $GDK_PIXBUF_LIBS"
  6075.           cat > conftest.$ac_ext <<EOF
  6076. #line 6077 "configure"
  6077. #include "confdefs.h"
  6078.  
  6079. #include <stdio.h>
  6080. #include <gdk-pixbuf/gdk-pixbuf.h>
  6081.  
  6082. int main() {
  6083.  return 0; 
  6084. ; return 0; }
  6085. EOF
  6086. if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6087.   rm -rf conftest*
  6088.    echo "*** The test program compiled, but did not run. This usually means"
  6089.           echo "*** that the run-time linker is not finding GDK_PIXBUF or finding the wrong"
  6090.           echo "*** version of GDK_PIXBUF. If it is not finding GDK_PIXBUF, you'll need to set your"
  6091.           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  6092.           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
  6093.           echo "*** is required on your system"
  6094.       echo "***"
  6095.           echo "*** If you have an old version installed, it is best to remove it, although"
  6096.           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
  6097. else
  6098.   echo "configure: failed program was:" >&5
  6099.   cat conftest.$ac_ext >&5
  6100.   rm -rf conftest*
  6101.    echo "*** The test program failed to compile or link. See the file config.log for the"
  6102.           echo "*** exact error that occured. This usually means GDK_PIXBUF was incorrectly installed"
  6103.           echo "*** or that you have moved GDK_PIXBUF since it was installed. In the latter case, you"
  6104.           echo "*** may want to edit the gdk-pixbuf-config script: $GDK_PIXBUF_CONFIG" 
  6105. fi
  6106. rm -f conftest*
  6107.           CFLAGS="$ac_save_CFLAGS"
  6108.           LIBS="$ac_save_LIBS"
  6109.        fi
  6110.      fi
  6111.      GDK_PIXBUF_CFLAGS=""
  6112.      GDK_PIXBUF_LIBS=""
  6113.      :
  6114.   fi
  6115.   
  6116.   
  6117.   rm -f conf.gdk_pixbuftest
  6118.  
  6119.  
  6120.     if test "$HAVE_GDK_PIXBUF"; then
  6121.         MOZ_GDK_PIXBUF_CFLAGS=$GDK_PIXBUF_CFLAGS
  6122.         MOZ_GDK_PIXBUF_LIBS=$GDK_PIXBUF_LIBS
  6123.     fi
  6124.  
  6125. if test "$no_x" != "yes"
  6126. then
  6127.     # Check whether --with-java-supplement or --without-java-supplement was given.
  6128. if test "${with_java_supplement+set}" = set; then
  6129.   withval="$with_java_supplement"
  6130.   
  6131.         if test "$withval" = "yes"
  6132.         then
  6133.             MOZ_JAVA_SUPPLEMENT=1
  6134.         else
  6135.             MOZ_JAVA_SUPPLEMENT=
  6136.         fi
  6137.     
  6138. fi
  6139.  
  6140. fi
  6141.  
  6142.                                 MOZ_GLE=
  6143.     MOZ_GLE_LDFLAGS=
  6144.  
  6145.     # Check whether --with-gle or --without-gle was given.
  6146. if test "${with_gle+set}" = set; then
  6147.   withval="$with_gle"
  6148.   
  6149.         if test "$withval" = "yes"
  6150.         then
  6151.             MOZ_GLE=1
  6152.             MOZ_GLE_LDFLAGS=-lgle
  6153.             cat >> confdefs.h <<\EOF
  6154. #define MOZ_GLE 1
  6155. EOF
  6156.  
  6157.         else
  6158.             MOZ_GLE=
  6159.             MOZ_GLE_LDFLAGS=
  6160.         fi
  6161.     
  6162. fi
  6163.  
  6164.  
  6165.     # Check whether --with-static-gtk or --without-static-gtk was given.
  6166. if test "${with_static_gtk+set}" = set; then
  6167.   withval="$with_static_gtk"
  6168.   sysstaticgtk=$withval
  6169. fi
  6170.  
  6171.  
  6172.     if test "$sysstaticgtk" != "yes"
  6173.     then
  6174.         MOZ_GTK_LDFLAGS=$GTK_LIBS
  6175.  
  6176.         if test "$MOZ_GLE"
  6177.         then
  6178.             MOZ_GTK_LDFLAGS=`echo $MOZ_GTK_LDFLAGS | sed -e 's/-lgtk/-lgle -lgtk/'`
  6179.         fi
  6180.     else
  6181.        
  6182.  
  6183.        GTK_LIBS_LOC=`echo $GTK_LIBS | sed 's/\(.*\)\(-lgtk.*\)/\1/'`
  6184.  
  6185.        GTK_STATIC_LOC=`echo $GTK_LIBS | sed 's/^ *-L\([^ ]*\) .*$/\1/'`
  6186.        GTK_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gtk[^ ]*\) .*/\1/'`
  6187.        GDK_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gdk[^ ]*\) .*/\1/'`
  6188.  
  6189.        GLIB_STATIC_LOC=`echo $GTK_LIBS | sed -e 's/^.*-lgdk[^ ]* *-L\([^ ]*\).*$/\1/' -e 's/^.* -lgdk[^ ]* .*$//'`
  6190.        if test ! "$GLIB_STATIC_LOC" ; then
  6191.          GLIB_STATIC_LOC=$GTK_STATIC_LOC
  6192.        fi
  6193.        GMODULE_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gmodule[^ ]*\) .*/\1/'`
  6194.        GLIB_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(glib[^ ]*\) .*/\1/'`
  6195.  
  6196.        GTK_OTHER_LIBS=`echo $GTK_LIBS | sed 's/^.*-lglib *\(.*\)/\1/'`
  6197.  
  6198.        
  6199.  
  6200.        MOZ_GTK_LDFLAGS="$GTK_STATIC_LOC/lib${GTK_STATIC}.a"
  6201.        MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GTK_STATIC_LOC/lib${GDK_STATIC}.a"
  6202.        MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GLIB_STATIC_LOC/lib${GMODULE_STATIC}.a"
  6203.        MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GLIB_STATIC_LOC/lib${GLIB_STATIC}.a"
  6204.        MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GTK_LIBS_LOC $GTK_OTHER_LIBS"
  6205.     fi
  6206.  
  6207.     MOZ_GTK_CFLAGS=$GTK_CFLAGS
  6208.  
  6209. fi
  6210.  
  6211. if test "$no_x" != "yes"
  6212. then
  6213.     # Check whether --with-xprint or --without-xprint was given.
  6214. if test "${with_xprint+set}" = set; then
  6215.   withval="$with_xprint"
  6216.   
  6217.         if test "$withval" = "yes"
  6218.         then
  6219.             MOZ_ENABLE_XPRINT=1
  6220.         else
  6221.             MOZ_ENABLE_XPRINT=
  6222.         fi
  6223.     
  6224. fi
  6225.  
  6226. fi
  6227.  
  6228. MISSING_XPRINT=
  6229. if test "$MOZ_ENABLE_XPRINT"
  6230. then
  6231.     echo $ac_n "checking for xprint insanity""... $ac_c" 1>&6
  6232. echo "configure:6233: checking for xprint insanity" >&5
  6233.  
  6234.     _SAVE_LDFLAGS="$LDFLAGS"
  6235.     LDFLAGS="$XLDFLAGS $LDFLAGS"
  6236.     echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6
  6237. echo "configure:6238: checking for XpGetPrinterList in -lXp" >&5
  6238. ac_lib_var=`echo Xp'_'XpGetPrinterList | sed 'y%./+-%__p_%'`
  6239. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6240.   echo $ac_n "(cached) $ac_c" 1>&6
  6241. else
  6242.   ac_save_LIBS="$LIBS"
  6243. LIBS="-lXp $XEXT_LIBS $XLIBS $LIBS"
  6244. cat > conftest.$ac_ext <<EOF
  6245. #line 6246 "configure"
  6246. #include "confdefs.h"
  6247. /* Override any gcc2 internal prototype to avoid an error.  */
  6248. /* We use char because int might match the return type of a gcc2
  6249.     builtin and then its argument prototype would still apply.  */
  6250. char XpGetPrinterList();
  6251.  
  6252. int main() {
  6253. XpGetPrinterList()
  6254. ; return 0; }
  6255. EOF
  6256. if { (eval echo configure:6257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6257.   rm -rf conftest*
  6258.   eval "ac_cv_lib_$ac_lib_var=yes"
  6259. else
  6260.   echo "configure: failed program was:" >&5
  6261.   cat conftest.$ac_ext >&5
  6262.   rm -rf conftest*
  6263.   eval "ac_cv_lib_$ac_lib_var=no"
  6264. fi
  6265. rm -f conftest*
  6266. LIBS="$ac_save_LIBS"
  6267.  
  6268. fi
  6269. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6270.   echo "$ac_t""yes" 1>&6
  6271.   XPRINT_LIBS="-lXp"
  6272. else
  6273.   echo "$ac_t""no" 1>&6
  6274. MISSING_XPRINT="$MISSING_XPRINT -lXp"
  6275. fi
  6276.  
  6277.  
  6278.     LDFLAGS="$_SAVE_LDFLAGS"
  6279.  
  6280.     MOZ_XPRINT_CFLAGS="$X_CFLAGS"
  6281.     MOZ_XPRINT_LDFLAGS="$XLDFLAGS $XPRINT_LIBS"
  6282.     MOZ_XPRINT_LDFLAGS="$MOZ_XPRINT_LDFLAGS $XEXT_LIBS $X11_LIBS"
  6283.  
  6284. fi
  6285.  
  6286. if test "$no_x" != "yes"
  6287. then
  6288.     # Check whether --with-motif or --without-motif was given.
  6289. if test "${with_motif+set}" = set; then
  6290.   withval="$with_motif"
  6291.   
  6292.         if test "$withval" = "yes"
  6293.         then
  6294.             MOZ_ENABLE_MOTIF=1
  6295.         else
  6296.             MOZ_ENABLE_MOTIF=
  6297.         fi
  6298.     
  6299. fi
  6300.  
  6301. fi
  6302.  
  6303. if test "$MOZ_ENABLE_MOTIF"
  6304. then
  6305.     echo $ac_n "checking for motif insanity""... $ac_c" 1>&6
  6306. echo "configure:6307: checking for motif insanity" >&5
  6307.  
  6308.     if test "$x_includes"
  6309.     then
  6310.         MOTIF_XINCS="-xif -I$x_includes"
  6311.     fi
  6312.  
  6313.     detect_motif="${srcdir}/config/mkdetect/detect_motif.sh -cc $CC $MOTIF_XINCS"
  6314.     MOTIF_VERSION=`${detect_motif}`
  6315.     MOTIF_INCLUDES=`${detect_motif} -if`
  6316.     MOTIF_STATIC_FLAGS=`${detect_motif} -sf`
  6317.     MOTIF_DYNAMIC_FLAGS=`${detect_motif} -df`
  6318.     MOTIF_DYNAMIC_PATHS=`${detect_motif} -dp`
  6319.     MOTIF_REQUIRES_XPM="False"
  6320.  
  6321.     ${srcdir}/config/mkdetect/detect_motif.sh --cleanup
  6322.  
  6323.     if test "$MOTIF_REQUIRES_XPM" = "True" -o "$MOTIF_VERSION" = "2.1"
  6324.     then
  6325.         _SAVE_LDFLAGS="$LDFLAGS"
  6326.         LDFLAGS="$XLDFLAGS $LDFLAGS"
  6327.     fi
  6328.  
  6329.     if test "$MOTIF_REQUIRES_XPM" = "True"
  6330.     then
  6331.         echo $ac_n "checking for XpmWriteFileFromImage in -lXpm""... $ac_c" 1>&6
  6332. echo "configure:6333: checking for XpmWriteFileFromImage in -lXpm" >&5
  6333. ac_lib_var=`echo Xpm'_'XpmWriteFileFromImage | sed 'y%./+-%__p_%'`
  6334. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6335.   echo $ac_n "(cached) $ac_c" 1>&6
  6336. else
  6337.   ac_save_LIBS="$LIBS"
  6338. LIBS="-lXpm $XLIBS $LIBS"
  6339. cat > conftest.$ac_ext <<EOF
  6340. #line 6341 "configure"
  6341. #include "confdefs.h"
  6342. /* Override any gcc2 internal prototype to avoid an error.  */
  6343. /* We use char because int might match the return type of a gcc2
  6344.     builtin and then its argument prototype would still apply.  */
  6345. char XpmWriteFileFromImage();
  6346.  
  6347. int main() {
  6348. XpmWriteFileFromImage()
  6349. ; return 0; }
  6350. EOF
  6351. if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6352.   rm -rf conftest*
  6353.   eval "ac_cv_lib_$ac_lib_var=yes"
  6354. else
  6355.   echo "configure: failed program was:" >&5
  6356.   cat conftest.$ac_ext >&5
  6357.   rm -rf conftest*
  6358.   eval "ac_cv_lib_$ac_lib_var=no"
  6359. fi
  6360. rm -f conftest*
  6361. LIBS="$ac_save_LIBS"
  6362.  
  6363. fi
  6364. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6365.   echo "$ac_t""yes" 1>&6
  6366.   XPM_LIBS="-lXpm"
  6367. else
  6368.   echo "$ac_t""no" 1>&6
  6369. MISSING_MOTIF="$MISSING_MOTIF -lXpm"
  6370. fi
  6371.  
  6372.     fi
  6373.  
  6374.     if test "$MOTIF_VERSION" = "2.1"
  6375.     then
  6376.         echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6
  6377. echo "configure:6378: checking for XpGetPrinterList in -lXp" >&5
  6378. ac_lib_var=`echo Xp'_'XpGetPrinterList | sed 'y%./+-%__p_%'`
  6379. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6380.   echo $ac_n "(cached) $ac_c" 1>&6
  6381. else
  6382.   ac_save_LIBS="$LIBS"
  6383. LIBS="-lXp $XEXT_LIBS $XLIBS $LIBS"
  6384. cat > conftest.$ac_ext <<EOF
  6385. #line 6386 "configure"
  6386. #include "confdefs.h"
  6387. /* Override any gcc2 internal prototype to avoid an error.  */
  6388. /* We use char because int might match the return type of a gcc2
  6389.     builtin and then its argument prototype would still apply.  */
  6390. char XpGetPrinterList();
  6391.  
  6392. int main() {
  6393. XpGetPrinterList()
  6394. ; return 0; }
  6395. EOF
  6396. if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6397.   rm -rf conftest*
  6398.   eval "ac_cv_lib_$ac_lib_var=yes"
  6399. else
  6400.   echo "configure: failed program was:" >&5
  6401.   cat conftest.$ac_ext >&5
  6402.   rm -rf conftest*
  6403.   eval "ac_cv_lib_$ac_lib_var=no"
  6404. fi
  6405. rm -f conftest*
  6406. LIBS="$ac_save_LIBS"
  6407.  
  6408. fi
  6409. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6410.   echo "$ac_t""yes" 1>&6
  6411.   MOTIF_XP_LIBS="-lXp"
  6412. else
  6413.   echo "$ac_t""no" 1>&6
  6414. MISSING_MOTIF="$MISSING_MOTIF -lXp"
  6415. fi
  6416.  
  6417.     fi
  6418.  
  6419.     LDFLAGS="$_SAVE_LDFLAGS"
  6420.  
  6421.     MOZ_MOTIF_LDFLAGS="$XLDFLAGS $MOZ_MOTIF_LDFLAGS"
  6422.  
  6423.     if test "$MOTIF_STATIC_LIB" = "unknown" -a "$MOTIF_DYNAMIC_LIB" = "unknown"
  6424.     then
  6425.         echo "$ac_t""no" 1>&6
  6426.     else
  6427.         echo "$ac_t""yes" 1>&6
  6428.     fi
  6429.  
  6430.     # Get rid of offending error values
  6431.     if test "$MOTIF_DYNAMIC_PATHS" = "unknown"
  6432.     then 
  6433.         MOTIF_DYNAMIC_PATHS=
  6434.     fi
  6435.  
  6436.     if test "$MOTIF_DYNAMIC_FLAGS" = "unknown"
  6437.     then 
  6438.         MOTIF_DYNAMIC_FLAGS=
  6439.     fi
  6440.  
  6441.     if test "$MOTIF_STATIC_FLAGS" = "unknown"
  6442.     then 
  6443.         MOTIF_STATIC_FLAGS=
  6444.     fi
  6445.  
  6446.     if test "$MOTIF_INCLUDE_DIR" = "unknown"
  6447.     then
  6448.         MOTIF_INCLUDE_DIR=
  6449.     fi
  6450.  
  6451.     MOZ_MOTIF_LDFLAGS="$MOTIF_XP_LIBS $MOZ_MOTIF_LDFLAGS $X_LIBS $XT_LIBS $XMU_LIBS $XPM_LIBS $XEXT_LIBS $X11_LIBS $XSM_LIBS $XICE_LIBS"
  6452.  
  6453.     # Check whether --with-static-motif or --without-static-motif was given.
  6454. if test "${with_static_motif+set}" = set; then
  6455.   withval="$with_static_motif"
  6456.   sysstaticmotif=$withval
  6457. fi
  6458.  
  6459.  
  6460.     if test "$sysstaticmotif" != "yes"; then
  6461.     _SAVE_LDFLAGS="$LDFLAGS"
  6462.         LDFLAGS="$MOTIF_DYNAMIC_PATHS $XLDFLAGS $LDFLAGS"
  6463.         echo $ac_n "checking for XmStringCreate in -lXm""... $ac_c" 1>&6
  6464. echo "configure:6465: checking for XmStringCreate in -lXm" >&5
  6465. ac_lib_var=`echo Xm'_'XmStringCreate | sed 'y%./+-%__p_%'`
  6466. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6467.   echo $ac_n "(cached) $ac_c" 1>&6
  6468. else
  6469.   ac_save_LIBS="$LIBS"
  6470. LIBS="-lXm $MOTIF_DYNAMIC_PATHS $MOZ_MOTIF_LDFLAGS $XLIBS $LIBS"
  6471. cat > conftest.$ac_ext <<EOF
  6472. #line 6473 "configure"
  6473. #include "confdefs.h"
  6474. /* Override any gcc2 internal prototype to avoid an error.  */
  6475. /* We use char because int might match the return type of a gcc2
  6476.     builtin and then its argument prototype would still apply.  */
  6477. char XmStringCreate();
  6478.  
  6479. int main() {
  6480. XmStringCreate()
  6481. ; return 0; }
  6482. EOF
  6483. if { (eval echo configure:6484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6484.   rm -rf conftest*
  6485.   eval "ac_cv_lib_$ac_lib_var=yes"
  6486. else
  6487.   echo "configure: failed program was:" >&5
  6488.   cat conftest.$ac_ext >&5
  6489.   rm -rf conftest*
  6490.   eval "ac_cv_lib_$ac_lib_var=no"
  6491. fi
  6492. rm -f conftest*
  6493. LIBS="$ac_save_LIBS"
  6494.  
  6495. fi
  6496. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6497.   echo "$ac_t""yes" 1>&6
  6498.   MOZ_MOTIF_LDFLAGS="$MOTIF_DYNAMIC_PATHS $MOTIF_DYNAMIC_FLAGS $MOZ_MOTIF_LDFLAGS"
  6499. else
  6500.   echo "$ac_t""no" 1>&6
  6501. MISSING_MOTIF="$MISSING_MOTIF $MOTIF_DYNAMIC_FLAGS"
  6502. fi
  6503.  
  6504.     LDFLAGS="$_SAVE_LDFLAGS"
  6505.     else
  6506.         echo $ac_n "checking for XmStringCreate in -lXm""... $ac_c" 1>&6
  6507. echo "configure:6508: checking for XmStringCreate in -lXm" >&5
  6508. ac_lib_var=`echo Xm'_'XmStringCreate | sed 'y%./+-%__p_%'`
  6509. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6510.   echo $ac_n "(cached) $ac_c" 1>&6
  6511. else
  6512.   ac_save_LIBS="$LIBS"
  6513. LIBS="-lXm $MOZ_MOTIF_LDFLAGS $XLIBS $LIBS"
  6514. cat > conftest.$ac_ext <<EOF
  6515. #line 6516 "configure"
  6516. #include "confdefs.h"
  6517. /* Override any gcc2 internal prototype to avoid an error.  */
  6518. /* We use char because int might match the return type of a gcc2
  6519.     builtin and then its argument prototype would still apply.  */
  6520. char XmStringCreate();
  6521.  
  6522. int main() {
  6523. XmStringCreate()
  6524. ; return 0; }
  6525. EOF
  6526. if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  6527.   rm -rf conftest*
  6528.   eval "ac_cv_lib_$ac_lib_var=yes"
  6529. else
  6530.   echo "configure: failed program was:" >&5
  6531.   cat conftest.$ac_ext >&5
  6532.   rm -rf conftest*
  6533.   eval "ac_cv_lib_$ac_lib_var=no"
  6534. fi
  6535. rm -f conftest*
  6536. LIBS="$ac_save_LIBS"
  6537.  
  6538. fi
  6539. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6540.   echo "$ac_t""yes" 1>&6
  6541.   MOZ_MOTIF_LDFLAGS="$MOTIF_STATIC_FLAGS $MOZ_MOTIF_LDFLAGS"
  6542. else
  6543.   echo "$ac_t""no" 1>&6
  6544. MISSING_MOTIF="$MISSING_MOTIF $MOTIF_STATIC_FLAGS"
  6545. fi
  6546.  
  6547.     fi
  6548.  
  6549.     MOZ_MOTIF_CFLAGS="$MOTIF_INCLUDES"
  6550. fi
  6551.  
  6552.  
  6553. if test "$no_x" != "yes"
  6554. then
  6555.     # Check whether --with-xlib or --without-xlib was given.
  6556. if test "${with_xlib+set}" = set; then
  6557.   withval="$with_xlib"
  6558.   
  6559.         if test "$withval" = "yes"
  6560.         then
  6561.             MOZ_ENABLE_XLIB=1
  6562.         else
  6563.             MOZ_ENABLE_XLIB=
  6564.         fi
  6565.     
  6566. fi
  6567.  
  6568. fi
  6569.  
  6570. if test "$MOZ_ENABLE_XLIB"
  6571. then
  6572.     echo $ac_n "checking for xlib insanity""... $ac_c" 1>&6
  6573. echo "configure:6574: checking for xlib insanity" >&5
  6574.     echo "$ac_t""yes" 1>&6
  6575.  
  6576.     MOZ_XLIB_CFLAGS="$X_CFLAGS"
  6577.     MOZ_XLIB_LDFLAGS="$XLDFLAGS"
  6578.     MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS"
  6579. fi
  6580.  
  6581.  
  6582. if test "$no_x" != "yes"
  6583. then
  6584.     # Check whether --with-qt or --without-qt was given.
  6585. if test "${with_qt+set}" = set; then
  6586.   withval="$with_qt"
  6587.   
  6588.         if test "$withval" = "yes"
  6589.         then
  6590.             MOZ_ENABLE_QT=1
  6591.         else
  6592.             MOZ_ENABLE_QT=
  6593.         fi
  6594.     
  6595. fi
  6596.  
  6597. fi
  6598.  
  6599. if test "$MOZ_ENABLE_QT"
  6600. then
  6601.     # Check whether --with-qtdir or --without-qtdir was given.
  6602. if test "${with_qtdir+set}" = set; then
  6603.   withval="$with_qtdir"
  6604.    QTDIR=$withval
  6605. else
  6606.    QTDIR="/usr"
  6607. fi
  6608.  
  6609.  
  6610.     QT_CFLAGS="-I${QTDIR}/include -DQT_GENUINE_STR"
  6611.     QT_LIBS="-L/usr/X11R6/lib -L${QTDIR}/lib -lqt -lXext -lX11"
  6612.  
  6613.     # Check whether --with-static-qt or --without-static-qt was given.
  6614. if test "${with_static_qt+set}" = set; then
  6615.   withval="$with_static_qt"
  6616.   sysstaticqt=$withval
  6617. fi
  6618.  
  6619.  
  6620.     if test "$sysstaticqt" != "yes"; then
  6621.        MOZ_QT_LDFLAGS=$QT_LIBS
  6622.     else
  6623.        
  6624.  
  6625.        QT_LIBS_LOC=`echo $QT_LIBS | sed 's/\(.*\)\(-lqt.*\)/\1/'`
  6626.  
  6627.        QT_STATIC_LOC=`echo $QT_LIBS | sed 's/^ *-L\([^ ]*\) .*$/\1/'`
  6628.        QT_STATIC=`echo $QT_LIBS | sed 's/^.*-l\(qt[^ ]*\) .*/\1/'`
  6629.  
  6630.        
  6631.  
  6632.        MOZ_QT_LDFLAGS="$QT_STATIC_LOC/lib${QT_STATIC}.a"
  6633.        MOZ_QT_LDFLAGS="$MOZ_QT_LDFLAGS $QT_STATIC_LOC/lib${QT_STATIC}.a"
  6634.        MOZ_QT_LDFLAGS="$MOZ_QT_LDFLAGS $QT_LIBS_LOC"
  6635.     fi
  6636.  
  6637.     MOZ_QT_CFLAGS=$QT_CFLAGS
  6638.  
  6639.     ac_ext=C
  6640. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6641. ac_cpp='$CXXCPP $CPPFLAGS'
  6642. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6643. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6644. cross_compiling=$ac_cv_prog_cxx_cross
  6645.  
  6646.  
  6647.     _SAVE_CXXFLAGS=$CXXFLAGS
  6648.     _SAVE_LIBS=$LIBS
  6649.  
  6650.     CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
  6651.     LIBS="$LIBS $QT_LIBS"
  6652.     
  6653.     echo $ac_n "checking Qt - version >= $QT_VERSION""... $ac_c" 1>&6
  6654. echo "configure:6655: checking Qt - version >= $QT_VERSION" >&5
  6655.     cat > conftest.$ac_ext <<EOF
  6656. #line 6657 "configure"
  6657. #include "confdefs.h"
  6658. #include <qglobal.h>
  6659. int main() {
  6660.  
  6661.         #if (QT_VERSION < $QT_VERSION_NUM)
  6662.             #error  "QT_VERSION too old"
  6663.         #endif
  6664.     
  6665. ; return 0; }
  6666. EOF
  6667. if { (eval echo configure:6668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  6668.   rm -rf conftest*
  6669.   result="yes"
  6670. else
  6671.   echo "configure: failed program was:" >&5
  6672.   cat conftest.$ac_ext >&5
  6673.   rm -rf conftest*
  6674.   result="no"
  6675. fi
  6676. rm -f conftest*
  6677.  
  6678.     echo "$ac_t"""$result"" 1>&6
  6679.     if test "$result" = "no"; then
  6680.        { echo "configure: error: Qt Mozilla requires at least version $QT_VERSION of Qt" 1>&2; exit 1; }
  6681.     fi
  6682.     CXXFLAGS=$_SAVE_CXXFLAGS
  6683.     LIBS=$_SAVE_LIBS
  6684.  
  6685.     ac_ext=c
  6686. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  6687. ac_cpp='$CPP $CPPFLAGS'
  6688. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  6689. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  6690. cross_compiling=$ac_cv_prog_cc_cross
  6691.  
  6692. fi
  6693.  
  6694.  
  6695.  
  6696. if test "$MOZ_WIDGET_TOOLKIT" = "gtk"
  6697. then
  6698.     TK_CFLAGS="$MOZ_GTK_CFLAGS"
  6699.     TK_LIBS="$MOZ_GTK_LDFLAGS"
  6700. fi
  6701.  
  6702. if test "$MOZ_WIDGET_TOOLKIT" = "xlib"
  6703. then
  6704.     TK_CFLAGS="$MOZ_XLIB_CFLAGS"
  6705.     TK_LIBS="$MOZ_XLIB_LDFLAGS"
  6706. fi
  6707.  
  6708. if test "$MOZ_WIDGET_TOOLKIT" = "qt"
  6709. then
  6710.     TK_CFLAGS="$MOZ_QT_CFLAGS"
  6711.     TK_LIBS="$MOZ_QT_LDFLAGS"
  6712. fi
  6713.  
  6714. if test "$MOZ_WIDGET_TOOLKIT" = "motif"
  6715. then
  6716.     TK_CFLAGS="$MOZ_MOTIF_CFLAGS"
  6717.     TK_LIBS="$MOZ_MOTIF_LDFLAGS"
  6718. fi
  6719.  
  6720. cat >> confdefs.h <<EOF
  6721. #define MOZ_DEFAULT_TOOLKIT "$MOZ_WIDGET_TOOLKIT"
  6722. EOF
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.  
  6729.  
  6730.  
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.  
  6737.  
  6738.  
  6739.  
  6740.  
  6741.  
  6742.  
  6743.  
  6744.  
  6745.  
  6746.  
  6747.  
  6748.  
  6749.  
  6750.  
  6751.  
  6752.  
  6753.  
  6754.  
  6755.  
  6756.  
  6757.  
  6758.  
  6759.  
  6760. XCFLAGS="$X_CFLAGS"
  6761.  
  6762.  
  6763.  
  6764.  
  6765.  
  6766. if test "$MOZ_ENABLE_GTK" || test "$MOZ_ENABLE_QT" \
  6767. || test "$MOZ_ENABLE_XLIB" || test "$MOZ_ENABLE_MOTIF"
  6768. then
  6769. cat >> confdefs.h <<\EOF
  6770. #define MOZ_X11 1
  6771. EOF
  6772.  
  6773. fi
  6774.  
  6775. SKIP_IDL_CHECK="no"
  6776.  
  6777. # Check whether --with-libIDL or --without-libIDL was given.
  6778. if test "${with_libIDL+set}" = set; then
  6779.   withval="$with_libIDL"
  6780.     if test "$withval" = "no"; then
  6781.     SKIP_IDL_CHECK="yes"
  6782.    fi 
  6783. fi
  6784.  
  6785.  
  6786. if test -z "$CROSS_COMPILE"; then
  6787.  
  6788. for ac_prog in $LIBIDL_CONFIG libIDL-config
  6789. do
  6790. # Extract the first word of "$ac_prog", so it can be a program name with args.
  6791. set dummy $ac_prog; ac_word=$2
  6792. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6793. echo "configure:6794: checking for $ac_word" >&5
  6794. if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then
  6795.   echo $ac_n "(cached) $ac_c" 1>&6
  6796. else
  6797.   case "$LIBIDL_CONFIG" in
  6798.   /*)
  6799.   ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a path.
  6800.   ;;
  6801.   ?:/*)             
  6802.   ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a dos path.
  6803.   ;;
  6804.   *)
  6805.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  6806.   ac_dummy="$PATH"
  6807.   for ac_dir in $ac_dummy; do 
  6808.     test -z "$ac_dir" && ac_dir=.
  6809.     if test -f $ac_dir/$ac_word; then
  6810.       ac_cv_path_LIBIDL_CONFIG="$ac_dir/$ac_word"
  6811.       break
  6812.     fi
  6813.   done
  6814.   IFS="$ac_save_ifs"
  6815.   ;;
  6816. esac
  6817. fi
  6818. LIBIDL_CONFIG="$ac_cv_path_LIBIDL_CONFIG"
  6819. if test -n "$LIBIDL_CONFIG"; then
  6820.   echo "$ac_t""$LIBIDL_CONFIG" 1>&6
  6821. else
  6822.   echo "$ac_t""no" 1>&6
  6823. fi
  6824.  
  6825. test -n "$LIBIDL_CONFIG" && break
  6826. done
  6827.  
  6828.  
  6829. if test -z "$LIBIDL_CONFIG"; then
  6830.     for ac_prog in $ORBIT_CONFIG orbit-config
  6831. do
  6832. # Extract the first word of "$ac_prog", so it can be a program name with args.
  6833. set dummy $ac_prog; ac_word=$2
  6834. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6835. echo "configure:6836: checking for $ac_word" >&5
  6836. if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then
  6837.   echo $ac_n "(cached) $ac_c" 1>&6
  6838. else
  6839.   case "$ORBIT_CONFIG" in
  6840.   /*)
  6841.   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a path.
  6842.   ;;
  6843.   ?:/*)             
  6844.   ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a dos path.
  6845.   ;;
  6846.   *)
  6847.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  6848.   ac_dummy="$PATH"
  6849.   for ac_dir in $ac_dummy; do 
  6850.     test -z "$ac_dir" && ac_dir=.
  6851.     if test -f $ac_dir/$ac_word; then
  6852.       ac_cv_path_ORBIT_CONFIG="$ac_dir/$ac_word"
  6853.       break
  6854.     fi
  6855.   done
  6856.   IFS="$ac_save_ifs"
  6857.   ;;
  6858. esac
  6859. fi
  6860. ORBIT_CONFIG="$ac_cv_path_ORBIT_CONFIG"
  6861. if test -n "$ORBIT_CONFIG"; then
  6862.   echo "$ac_t""$ORBIT_CONFIG" 1>&6
  6863. else
  6864.   echo "$ac_t""no" 1>&6
  6865. fi
  6866.  
  6867. test -n "$ORBIT_CONFIG" && break
  6868. done
  6869.  
  6870.     if test -n "$ORBIT_CONFIG"; then
  6871.         SKIP_IDL_CHECK="yes"
  6872.     _ORBIT_CFLAGS=`${ORBIT_CONFIG} client --cflags`
  6873.     _ORBIT_LIBS=`${ORBIT_CONFIG} client --libs`
  6874.         _ORBIT_INC_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-I/); } }' -- ${_ORBIT_CFLAGS}`
  6875.         _ORBIT_LIB_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-L/); } }' -- ${_ORBIT_LIBS}`
  6876.         LIBIDL_CFLAGS="$_ORBIT_INC_PATH"
  6877.         LIBIDL_LIBS="$_ORBIT_LIB_PATH -lIDL -lglib"
  6878.     fi
  6879. fi
  6880. fi
  6881.  
  6882. if test "$SKIP_IDL_CHECK" = "no"
  6883. then
  6884. # Check whether --with-libIDL-prefix or --without-libIDL-prefix was given.
  6885. if test "${with_libIDL_prefix+set}" = set; then
  6886.   withval="$with_libIDL_prefix"
  6887.   libIDL_config_prefix="$withval"
  6888. else
  6889.   libIDL_config_prefix=""
  6890. fi
  6891.  
  6892. # Check whether --with-libIDL-exec-prefix or --without-libIDL-exec-prefix was given.
  6893. if test "${with_libIDL_exec_prefix+set}" = set; then
  6894.   withval="$with_libIDL_exec_prefix"
  6895.   libIDL_config_exec_prefix="$withval"
  6896. else
  6897.   libIDL_config_exec_prefix=""
  6898. fi
  6899.  
  6900. # Check whether --enable-libIDLtest or --disable-libIDLtest was given.
  6901. if test "${enable_libIDLtest+set}" = set; then
  6902.   enableval="$enable_libIDLtest"
  6903.   :
  6904. else
  6905.   enable_libIDLtest=yes
  6906. fi
  6907.  
  6908.  
  6909.   if test x$libIDL_config_exec_prefix != x ; then
  6910.      libIDL_config_args="$libIDL_config_args --exec-prefix=$libIDL_config_exec_prefix"
  6911.      if test x${LIBIDL_CONFIG+set} != xset ; then
  6912.         LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
  6913.      fi
  6914.   fi
  6915.   if test x$libIDL_config_prefix != x ; then
  6916.      libIDL_config_args="$libIDL_config_args --prefix=$libIDL_config_prefix"
  6917.      if test x${LIBIDL_CONFIG+set} != xset ; then
  6918.         LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
  6919.      fi
  6920.   fi
  6921.  
  6922.   # Check whether --with-glib-prefix or --without-glib-prefix was given.
  6923. if test "${with_glib_prefix+set}" = set; then
  6924.   withval="$with_glib_prefix"
  6925.   glib_config_prefix="$withval"
  6926. else
  6927.   glib_config_prefix=""
  6928. fi
  6929.  
  6930. # Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given.
  6931. if test "${with_glib_exec_prefix+set}" = set; then
  6932.   withval="$with_glib_exec_prefix"
  6933.   glib_config_exec_prefix="$withval"
  6934. else
  6935.   glib_config_exec_prefix=""
  6936. fi
  6937.  
  6938. # Check whether --enable-glibtest or --disable-glibtest was given.
  6939. if test "${enable_glibtest+set}" = set; then
  6940.   enableval="$enable_glibtest"
  6941.   :
  6942. else
  6943.   enable_glibtest=yes
  6944. fi
  6945.  
  6946.  
  6947.   if test x$glib_config_exec_prefix != x ; then
  6948.      glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
  6949.      if test x${GLIB_CONFIG+set} != xset ; then
  6950.         GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
  6951.      fi
  6952.   fi
  6953.   if test x$glib_config_prefix != x ; then
  6954.      glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
  6955.      if test x${GLIB_CONFIG+set} != xset ; then
  6956.         GLIB_CONFIG=$glib_config_prefix/bin/glib-config
  6957.      fi
  6958.   fi
  6959.  
  6960.   for module in . 
  6961.   do
  6962.       case "$module" in
  6963.          gmodule) 
  6964.              glib_config_args="$glib_config_args gmodule"
  6965.          ;;
  6966.          gthread) 
  6967.              glib_config_args="$glib_config_args gthread"
  6968.          ;;
  6969.       esac
  6970.   done
  6971.  
  6972.     unset ac_cv_path_GLIB_CONFIG
  6973.  
  6974.   # Extract the first word of "glib-config", so it can be a program name with args.
  6975. set dummy glib-config; ac_word=$2
  6976. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  6977. echo "configure:6978: checking for $ac_word" >&5
  6978. if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
  6979.   echo $ac_n "(cached) $ac_c" 1>&6
  6980. else
  6981.   case "$GLIB_CONFIG" in
  6982.   /*)
  6983.   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
  6984.   ;;
  6985.   ?:/*)             
  6986.   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
  6987.   ;;
  6988.   *)
  6989.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  6990.   ac_dummy="$PATH"
  6991.   for ac_dir in $ac_dummy; do 
  6992.     test -z "$ac_dir" && ac_dir=.
  6993.     if test -f $ac_dir/$ac_word; then
  6994.       ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word"
  6995.       break
  6996.     fi
  6997.   done
  6998.   IFS="$ac_save_ifs"
  6999.   test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no"
  7000.   ;;
  7001. esac
  7002. fi
  7003. GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
  7004. if test -n "$GLIB_CONFIG"; then
  7005.   echo "$ac_t""$GLIB_CONFIG" 1>&6
  7006. else
  7007.   echo "$ac_t""no" 1>&6
  7008. fi
  7009.  
  7010.   min_glib_version=1.2.0
  7011.   echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
  7012. echo "configure:7013: checking for GLIB - version >= $min_glib_version" >&5
  7013.   no_glib=""
  7014.   if test "$GLIB_CONFIG" = "no" ; then
  7015.     no_glib=yes
  7016.   else
  7017.     GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
  7018.     GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
  7019.     glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
  7020.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  7021.     glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
  7022.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  7023.     glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
  7024.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  7025.     if test "x$enable_glibtest" = "xyes" ; then
  7026.       ac_save_CFLAGS="$CFLAGS"
  7027.       ac_save_LIBS="$LIBS"
  7028.       CFLAGS="$CFLAGS $GLIB_CFLAGS"
  7029.       LIBS="$GLIB_LIBS $LIBS"
  7030.       rm -f conf.glibtest
  7031.       if test "$cross_compiling" = yes; then
  7032.   echo $ac_n "cross compiling; assumed OK... $ac_c"
  7033. else
  7034.   cat > conftest.$ac_ext <<EOF
  7035. #line 7036 "configure"
  7036. #include "confdefs.h"
  7037.  
  7038. #include <glib.h>
  7039. #include <stdio.h>
  7040. #include <stdlib.h>
  7041.  
  7042. int 
  7043. main ()
  7044. {
  7045.   int major, minor, micro;
  7046.   char *tmp_version;
  7047.  
  7048.   system ("touch conf.glibtest");
  7049.  
  7050.   /* HP/UX 9 (%@#!) writes to sscanf strings */
  7051.   tmp_version = g_strdup("$min_glib_version");
  7052.   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
  7053.      printf("%s, bad version string\n", "$min_glib_version");
  7054.      exit(1);
  7055.    }
  7056.  
  7057.   if ((glib_major_version != $glib_config_major_version) ||
  7058.       (glib_minor_version != $glib_config_minor_version) ||
  7059.       (glib_micro_version != $glib_config_micro_version))
  7060.     {
  7061.       printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
  7062.              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
  7063.              glib_major_version, glib_minor_version, glib_micro_version);
  7064.       printf ("*** was found! If glib-config was correct, then it is best\n");
  7065.       printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
  7066.       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
  7067.       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
  7068.       printf("*** required on your system.\n");
  7069.       printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
  7070.       printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
  7071.       printf("*** before re-running configure\n");
  7072.     } 
  7073.   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
  7074.        (glib_minor_version != GLIB_MINOR_VERSION) ||
  7075.            (glib_micro_version != GLIB_MICRO_VERSION))
  7076.     {
  7077.       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
  7078.          GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
  7079.       printf("*** library (version %d.%d.%d)\n",
  7080.          glib_major_version, glib_minor_version, glib_micro_version);
  7081.     }
  7082.   else
  7083.     {
  7084.       if ((glib_major_version > major) ||
  7085.         ((glib_major_version == major) && (glib_minor_version > minor)) ||
  7086.         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
  7087.       {
  7088.         return 0;
  7089.        }
  7090.      else
  7091.       {
  7092.         printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
  7093.                glib_major_version, glib_minor_version, glib_micro_version);
  7094.         printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
  7095.            major, minor, micro);
  7096.         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
  7097.         printf("***\n");
  7098.         printf("*** If you have already installed a sufficiently new version, this error\n");
  7099.         printf("*** probably means that the wrong copy of the glib-config shell script is\n");
  7100.         printf("*** being found. The easiest way to fix this is to remove the old version\n");
  7101.         printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
  7102.         printf("*** correct copy of glib-config. (In this case, you will have to\n");
  7103.         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  7104.         printf("*** so that the correct libraries are found at run-time))\n");
  7105.       }
  7106.     }
  7107.   return 1;
  7108. }
  7109.  
  7110. EOF
  7111. if { (eval echo configure:7112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7112. then
  7113.   :
  7114. else
  7115.   echo "configure: failed program was:" >&5
  7116.   cat conftest.$ac_ext >&5
  7117.   rm -fr conftest*
  7118.   no_glib=yes
  7119. fi
  7120. rm -fr conftest*
  7121. fi
  7122.  
  7123.        CFLAGS="$ac_save_CFLAGS"
  7124.        LIBS="$ac_save_LIBS"
  7125.      fi
  7126.   fi
  7127.   if test "x$no_glib" = x ; then
  7128.      echo "$ac_t""yes" 1>&6
  7129.      :     
  7130.   else
  7131.      echo "$ac_t""no" 1>&6
  7132.      if test "$GLIB_CONFIG" = "no" ; then
  7133.        echo "*** The glib-config script installed by GLIB could not be found"
  7134.        echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
  7135.        echo "*** your path, or set the GLIB_CONFIG environment variable to the"
  7136.        echo "*** full path to glib-config."
  7137.      else
  7138.        if test -f conf.glibtest ; then
  7139.         :
  7140.        else
  7141.           echo "*** Could not run GLIB test program, checking why..."
  7142.           CFLAGS="$CFLAGS $GLIB_CFLAGS"
  7143.           LIBS="$LIBS $GLIB_LIBS"
  7144.           cat > conftest.$ac_ext <<EOF
  7145. #line 7146 "configure"
  7146. #include "confdefs.h"
  7147.  
  7148. #include <glib.h>
  7149. #include <stdio.h>
  7150.  
  7151. int main() {
  7152.  return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
  7153. ; return 0; }
  7154. EOF
  7155. if { (eval echo configure:7156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7156.   rm -rf conftest*
  7157.    echo "*** The test program compiled, but did not run. This usually means"
  7158.           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
  7159.           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
  7160.           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  7161.           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
  7162.           echo "*** is required on your system"
  7163.       echo "***"
  7164.           echo "*** If you have an old version installed, it is best to remove it, although"
  7165.           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
  7166.           echo "***"
  7167.           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
  7168.           echo "*** came with the system with the command"
  7169.           echo "***"
  7170.           echo "***    rpm --erase --nodeps gtk gtk-devel" 
  7171. else
  7172.   echo "configure: failed program was:" >&5
  7173.   cat conftest.$ac_ext >&5
  7174.   rm -rf conftest*
  7175.    echo "*** The test program failed to compile or link. See the file config.log for the"
  7176.           echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
  7177.           echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
  7178.           echo "*** may want to edit the glib-config script: $GLIB_CONFIG" 
  7179. fi
  7180. rm -f conftest*
  7181.           CFLAGS="$ac_save_CFLAGS"
  7182.           LIBS="$ac_save_LIBS"
  7183.        fi
  7184.      fi
  7185.      GLIB_CFLAGS=""
  7186.      GLIB_LIBS=""
  7187.      :
  7188.   fi
  7189.   
  7190.   
  7191.   rm -f conf.glibtest
  7192.  
  7193.  
  7194.     unset ac_cv_path_LIBIDL_CONFIG
  7195.  
  7196.   # Extract the first word of "libIDL-config", so it can be a program name with args.
  7197. set dummy libIDL-config; ac_word=$2
  7198. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  7199. echo "configure:7200: checking for $ac_word" >&5
  7200. if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then
  7201.   echo $ac_n "(cached) $ac_c" 1>&6
  7202. else
  7203.   case "$LIBIDL_CONFIG" in
  7204.   /*)
  7205.   ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a path.
  7206.   ;;
  7207.   ?:/*)             
  7208.   ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a dos path.
  7209.   ;;
  7210.   *)
  7211.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  7212.   ac_dummy="$PATH"
  7213.   for ac_dir in $ac_dummy; do 
  7214.     test -z "$ac_dir" && ac_dir=.
  7215.     if test -f $ac_dir/$ac_word; then
  7216.       ac_cv_path_LIBIDL_CONFIG="$ac_dir/$ac_word"
  7217.       break
  7218.     fi
  7219.   done
  7220.   IFS="$ac_save_ifs"
  7221.   test -z "$ac_cv_path_LIBIDL_CONFIG" && ac_cv_path_LIBIDL_CONFIG="no"
  7222.   ;;
  7223. esac
  7224. fi
  7225. LIBIDL_CONFIG="$ac_cv_path_LIBIDL_CONFIG"
  7226. if test -n "$LIBIDL_CONFIG"; then
  7227.   echo "$ac_t""$LIBIDL_CONFIG" 1>&6
  7228. else
  7229.   echo "$ac_t""no" 1>&6
  7230. fi
  7231.  
  7232.   min_libIDL_version=$LIBIDL_VERSION
  7233.   echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6
  7234. echo "configure:7235: checking for libIDL - version >= $min_libIDL_version" >&5
  7235.   no_libIDL=""
  7236.   if test "$LIBIDL_CONFIG" = "no" ; then
  7237.     no_libIDL=yes
  7238.   else
  7239.     LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
  7240.     LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
  7241.     # hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
  7242.     # this after we start requiring libIDL 0.6.8 or anything higher
  7243.     LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
  7244.     LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
  7245.     libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
  7246.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  7247.     libIDL_config_minor_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
  7248.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  7249.     libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
  7250.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  7251.     if test "x$enable_libIDLtest" = "xyes" ; then
  7252.       ac_save_CFLAGS="$CFLAGS"
  7253.       ac_save_LIBS="$LIBS"
  7254.       CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
  7255.       LIBS="$LIBIDL_LIBS $LIBS"
  7256.       rm -f conf.libIDLtest
  7257.       if test "$cross_compiling" = yes; then
  7258.   echo $ac_n "cross compiling; assumed OK... $ac_c"
  7259. else
  7260.   cat > conftest.$ac_ext <<EOF
  7261. #line 7262 "configure"
  7262. #include "confdefs.h"
  7263.  
  7264. #include <stdio.h>
  7265. #include <stdlib.h>
  7266. #include <libIDL/IDL.h>
  7267.  
  7268. int 
  7269. main ()
  7270. {
  7271.   int major, minor, micro;
  7272.   int libIDL_major_version;
  7273.   int libIDL_minor_version;
  7274.   int libIDL_micro_version;
  7275.   char *tmp_version;
  7276.  
  7277.   system ("touch conf.libIDLtest");
  7278.  
  7279.   /* HP/UX 9 (%@#!) writes to sscanf strings */
  7280.   tmp_version = g_strdup ("$min_libIDL_version");
  7281.   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
  7282.      printf("%s, bad version string\n", "$min_libIDL_version");
  7283.      exit(1);
  7284.   }
  7285.   tmp_version = g_strdup (IDL_get_libver_string ());
  7286.   if (sscanf(tmp_version, "%d.%d.%d",
  7287.          &libIDL_major_version,
  7288.          &libIDL_minor_version,
  7289.          &libIDL_micro_version) != 3) {
  7290.      printf("%s, bad version string\n", tmp_version);
  7291.      exit(1);
  7292.   }
  7293.  
  7294.   if ((libIDL_major_version != $libIDL_config_major_version) ||
  7295.       (libIDL_minor_version != $libIDL_config_minor_version) ||
  7296.       (libIDL_micro_version != $libIDL_config_micro_version))
  7297.     {
  7298.       printf("\n*** 'libIDL-config --version' returned %d.%d.%d, but libIDL (%d.%d.%d)\n", 
  7299.              $libIDL_config_major_version, $libIDL_config_minor_version, $libIDL_config_micro_version,
  7300.              libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
  7301.       printf ("*** was found! If libIDL-config was correct, then it is best\n");
  7302.       printf ("*** to remove the old version of LIBIDL. You may also be able to fix the error\n");
  7303.       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
  7304.       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
  7305.       printf("*** required on your system.\n");
  7306.       printf("*** If libIDL-config was wrong, set the environment variable LIBIDL_CONFIG\n");
  7307.       printf("*** to point to the correct copy of libIDL-config, and remove the file config.cache\n");
  7308.       printf("*** before re-running configure\n");
  7309.     } 
  7310.   else if ((libIDL_major_version != LIBIDL_MAJOR_VERSION) ||
  7311.        (libIDL_minor_version != LIBIDL_MINOR_VERSION) ||
  7312.            (libIDL_micro_version != LIBIDL_MICRO_VERSION))
  7313.     {
  7314.       printf("\n*** libIDL header files (version %d.%d.%d) do not match\n",
  7315.          LIBIDL_MAJOR_VERSION, LIBIDL_MINOR_VERSION, LIBIDL_MICRO_VERSION);
  7316.       printf("*** library (version %d.%d.%d)\n",
  7317.          libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
  7318.     }
  7319.   else
  7320.     {
  7321.       if ((libIDL_major_version > major) ||
  7322.         ((libIDL_major_version == major) && (libIDL_minor_version > minor)) ||
  7323.         ((libIDL_major_version == major) && (libIDL_minor_version == minor) && (libIDL_micro_version >= micro)))
  7324.       {
  7325.         return 0;
  7326.        }
  7327.      else
  7328.       {
  7329.         printf("\n*** An old version of libIDL (%d.%d.%d) was found.\n",
  7330.                libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
  7331.         printf("*** You need at least libIDL version %d.%d.%d.\n",
  7332.                major, minor, micro);
  7333.         printf("***\n");
  7334.         printf("*** If you have already installed a sufficiently new version, this error\n");
  7335.         printf("*** probably means that the wrong copy of the libIDL-config shell script is\n");
  7336.         printf("*** being found. The easiest way to fix this is to remove the old version\n");
  7337.         printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n");
  7338.         printf("*** correct copy of libIDL-config. (In this case, you will have to\n");
  7339.         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  7340.         printf("*** so that the correct libraries are found at run-time))\n");
  7341.       }
  7342.     }
  7343.   return 1;
  7344. }
  7345.  
  7346. EOF
  7347. if { (eval echo configure:7348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7348. then
  7349.   :
  7350. else
  7351.   echo "configure: failed program was:" >&5
  7352.   cat conftest.$ac_ext >&5
  7353.   rm -fr conftest*
  7354.   no_libIDL=yes
  7355. fi
  7356. rm -fr conftest*
  7357. fi
  7358.  
  7359.        CFLAGS="$ac_save_CFLAGS"
  7360.        LIBS="$ac_save_LIBS"
  7361.      fi
  7362.   fi
  7363.   if test "x$no_libIDL" = x ; then
  7364.      echo "$ac_t""yes" 1>&6
  7365.      :     
  7366.   else
  7367.      echo "$ac_t""no" 1>&6
  7368.      if test "$LIBIDL_CONFIG" = "no" ; then
  7369.        echo "*** The libIDL-config script installed by libIDL could not be found"
  7370.        echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
  7371.        echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
  7372.        echo "*** full path to libIDL-config."
  7373.      else
  7374.        if test -f conf.libIDLtest ; then
  7375.         :
  7376.        else
  7377.           echo "*** Could not run libIDL test program, checking why..."
  7378.           CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
  7379.           LIBS="$LIBS $LIBIDL_LIBS"
  7380.           cat > conftest.$ac_ext <<EOF
  7381. #line 7382 "configure"
  7382. #include "confdefs.h"
  7383.  
  7384. #include <stdio.h>
  7385. #include <stdlib.h>
  7386. #include <libIDL/IDL.h>
  7387.  
  7388. int main() {
  7389.  return IDL_get_libver_string ? 1 : 0; 
  7390. ; return 0; }
  7391. EOF
  7392. if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7393.   rm -rf conftest*
  7394.    echo "*** The test program compiled, but did not run. This usually means"
  7395.           echo "*** that the run-time linker is not finding libIDL or finding the wrong"
  7396.           echo "*** version of LIBIDL. If it is not finding libIDL, you'll need to set your"
  7397.           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  7398.           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
  7399.           echo "*** is required on your system"
  7400.       echo "***"
  7401.           echo "*** If you have an old version installed, it is best to remove it, although"
  7402.           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" 
  7403. else
  7404.   echo "configure: failed program was:" >&5
  7405.   cat conftest.$ac_ext >&5
  7406.   rm -rf conftest*
  7407.    echo "*** The test program failed to compile or link. See the file config.log for the"
  7408.           echo "*** exact error that occured. This usually means libIDL was incorrectly installed"
  7409.           echo "*** or that you have moved libIDL since it was installed. In the latter case, you"
  7410.           echo "*** may want to edit the libIDL-config script: $LIBIDL_CONFIG" 
  7411. fi
  7412. rm -f conftest*
  7413.           CFLAGS="$ac_save_CFLAGS"
  7414.           LIBS="$ac_save_LIBS"
  7415.        fi
  7416.      fi
  7417.      LIBIDL_CFLAGS=""
  7418.      LIBIDL_LIBS=""
  7419.      echo libIDL $LIBIDL_VERSION or higher is required.
  7420.   echo See http://andrewtv.org/libIDL/ for more information.
  7421.   { echo "configure: error: libIDL not installed." 1>&2; exit 1; }
  7422.   fi
  7423.   
  7424.   
  7425.   rm -f conf.libIDLtest
  7426.  
  7427. fi
  7428.  
  7429. if test -n "$CROSS_COMPILE"; then
  7430.     if test -z "$HOST_LIBIDL_CONFIG"; then
  7431.         HOST_LIBIDL_CONFIG="$LIBIDL_CONFIG"
  7432.     fi
  7433.     if test -n "$HOST_LIBIDL_CONFIG"; then
  7434.         HOST_LIBIDL_CFLAGS=`${HOST_LIBIDL_CONFIG} --cflags`
  7435.         HOST_LIBIDL_LIBS=`${HOST_LIBIDL_CONFIG} --libs`
  7436.     else
  7437.         HOST_LIBIDL_CFLAGS="$LIBIDL_CFLAGS"
  7438.         HOST_LIBIDL_LIBS="$LIBIDL_LIBS"
  7439.     fi
  7440.     if test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then
  7441.       LIBIDL_CFLAGS=`${LIBIDL_CONFIG}-VMS --cflags`
  7442.       LIBIDL_LIBS=`${LIBIDL_CONFIG}-VMS --libs`
  7443.     fi
  7444. fi
  7445.  
  7446. if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then
  7447.     # Check whether --with-glib-prefix or --without-glib-prefix was given.
  7448. if test "${with_glib_prefix+set}" = set; then
  7449.   withval="$with_glib_prefix"
  7450.   glib_config_prefix="$withval"
  7451. else
  7452.   glib_config_prefix=""
  7453. fi
  7454.  
  7455. # Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given.
  7456. if test "${with_glib_exec_prefix+set}" = set; then
  7457.   withval="$with_glib_exec_prefix"
  7458.   glib_config_exec_prefix="$withval"
  7459. else
  7460.   glib_config_exec_prefix=""
  7461. fi
  7462.  
  7463. # Check whether --enable-glibtest or --disable-glibtest was given.
  7464. if test "${enable_glibtest+set}" = set; then
  7465.   enableval="$enable_glibtest"
  7466.   :
  7467. else
  7468.   enable_glibtest=yes
  7469. fi
  7470.  
  7471.  
  7472.   if test x$glib_config_exec_prefix != x ; then
  7473.      glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
  7474.      if test x${GLIB_CONFIG+set} != xset ; then
  7475.         GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
  7476.      fi
  7477.   fi
  7478.   if test x$glib_config_prefix != x ; then
  7479.      glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
  7480.      if test x${GLIB_CONFIG+set} != xset ; then
  7481.         GLIB_CONFIG=$glib_config_prefix/bin/glib-config
  7482.      fi
  7483.   fi
  7484.  
  7485.   for module in . 
  7486.   do
  7487.       case "$module" in
  7488.          gmodule) 
  7489.              glib_config_args="$glib_config_args gmodule"
  7490.          ;;
  7491.          gthread) 
  7492.              glib_config_args="$glib_config_args gthread"
  7493.          ;;
  7494.       esac
  7495.   done
  7496.  
  7497.     unset ac_cv_path_GLIB_CONFIG
  7498.  
  7499.   # Extract the first word of "glib-config", so it can be a program name with args.
  7500. set dummy glib-config; ac_word=$2
  7501. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  7502. echo "configure:7503: checking for $ac_word" >&5
  7503. if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
  7504.   echo $ac_n "(cached) $ac_c" 1>&6
  7505. else
  7506.   case "$GLIB_CONFIG" in
  7507.   /*)
  7508.   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
  7509.   ;;
  7510.   ?:/*)             
  7511.   ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
  7512.   ;;
  7513.   *)
  7514.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  7515.   ac_dummy="$PATH"
  7516.   for ac_dir in $ac_dummy; do 
  7517.     test -z "$ac_dir" && ac_dir=.
  7518.     if test -f $ac_dir/$ac_word; then
  7519.       ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word"
  7520.       break
  7521.     fi
  7522.   done
  7523.   IFS="$ac_save_ifs"
  7524.   test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no"
  7525.   ;;
  7526. esac
  7527. fi
  7528. GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
  7529. if test -n "$GLIB_CONFIG"; then
  7530.   echo "$ac_t""$GLIB_CONFIG" 1>&6
  7531. else
  7532.   echo "$ac_t""no" 1>&6
  7533. fi
  7534.  
  7535.   min_glib_version=${GLIB_VERSION}
  7536.   echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
  7537. echo "configure:7538: checking for GLIB - version >= $min_glib_version" >&5
  7538.   no_glib=""
  7539.   if test "$GLIB_CONFIG" = "no" ; then
  7540.     no_glib=yes
  7541.   else
  7542.     GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
  7543.     GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
  7544.     glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
  7545.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  7546.     glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
  7547.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  7548.     glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
  7549.            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  7550.     if test "x$enable_glibtest" = "xyes" ; then
  7551.       ac_save_CFLAGS="$CFLAGS"
  7552.       ac_save_LIBS="$LIBS"
  7553.       CFLAGS="$CFLAGS $GLIB_CFLAGS"
  7554.       LIBS="$GLIB_LIBS $LIBS"
  7555.       rm -f conf.glibtest
  7556.       if test "$cross_compiling" = yes; then
  7557.   echo $ac_n "cross compiling; assumed OK... $ac_c"
  7558. else
  7559.   cat > conftest.$ac_ext <<EOF
  7560. #line 7561 "configure"
  7561. #include "confdefs.h"
  7562.  
  7563. #include <glib.h>
  7564. #include <stdio.h>
  7565. #include <stdlib.h>
  7566.  
  7567. int 
  7568. main ()
  7569. {
  7570.   int major, minor, micro;
  7571.   char *tmp_version;
  7572.  
  7573.   system ("touch conf.glibtest");
  7574.  
  7575.   /* HP/UX 9 (%@#!) writes to sscanf strings */
  7576.   tmp_version = g_strdup("$min_glib_version");
  7577.   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
  7578.      printf("%s, bad version string\n", "$min_glib_version");
  7579.      exit(1);
  7580.    }
  7581.  
  7582.   if ((glib_major_version != $glib_config_major_version) ||
  7583.       (glib_minor_version != $glib_config_minor_version) ||
  7584.       (glib_micro_version != $glib_config_micro_version))
  7585.     {
  7586.       printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
  7587.              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
  7588.              glib_major_version, glib_minor_version, glib_micro_version);
  7589.       printf ("*** was found! If glib-config was correct, then it is best\n");
  7590.       printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
  7591.       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
  7592.       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
  7593.       printf("*** required on your system.\n");
  7594.       printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
  7595.       printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
  7596.       printf("*** before re-running configure\n");
  7597.     } 
  7598.   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
  7599.        (glib_minor_version != GLIB_MINOR_VERSION) ||
  7600.            (glib_micro_version != GLIB_MICRO_VERSION))
  7601.     {
  7602.       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
  7603.          GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
  7604.       printf("*** library (version %d.%d.%d)\n",
  7605.          glib_major_version, glib_minor_version, glib_micro_version);
  7606.     }
  7607.   else
  7608.     {
  7609.       if ((glib_major_version > major) ||
  7610.         ((glib_major_version == major) && (glib_minor_version > minor)) ||
  7611.         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
  7612.       {
  7613.         return 0;
  7614.        }
  7615.      else
  7616.       {
  7617.         printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
  7618.                glib_major_version, glib_minor_version, glib_micro_version);
  7619.         printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
  7620.            major, minor, micro);
  7621.         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
  7622.         printf("***\n");
  7623.         printf("*** If you have already installed a sufficiently new version, this error\n");
  7624.         printf("*** probably means that the wrong copy of the glib-config shell script is\n");
  7625.         printf("*** being found. The easiest way to fix this is to remove the old version\n");
  7626.         printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
  7627.         printf("*** correct copy of glib-config. (In this case, you will have to\n");
  7628.         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  7629.         printf("*** so that the correct libraries are found at run-time))\n");
  7630.       }
  7631.     }
  7632.   return 1;
  7633. }
  7634.  
  7635. EOF
  7636. if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7637. then
  7638.   :
  7639. else
  7640.   echo "configure: failed program was:" >&5
  7641.   cat conftest.$ac_ext >&5
  7642.   rm -fr conftest*
  7643.   no_glib=yes
  7644. fi
  7645. rm -fr conftest*
  7646. fi
  7647.  
  7648.        CFLAGS="$ac_save_CFLAGS"
  7649.        LIBS="$ac_save_LIBS"
  7650.      fi
  7651.   fi
  7652.   if test "x$no_glib" = x ; then
  7653.      echo "$ac_t""yes" 1>&6
  7654.      :     
  7655.   else
  7656.      echo "$ac_t""no" 1>&6
  7657.      if test "$GLIB_CONFIG" = "no" ; then
  7658.        echo "*** The glib-config script installed by GLIB could not be found"
  7659.        echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
  7660.        echo "*** your path, or set the GLIB_CONFIG environment variable to the"
  7661.        echo "*** full path to glib-config."
  7662.      else
  7663.        if test -f conf.glibtest ; then
  7664.         :
  7665.        else
  7666.           echo "*** Could not run GLIB test program, checking why..."
  7667.           CFLAGS="$CFLAGS $GLIB_CFLAGS"
  7668.           LIBS="$LIBS $GLIB_LIBS"
  7669.           cat > conftest.$ac_ext <<EOF
  7670. #line 7671 "configure"
  7671. #include "confdefs.h"
  7672.  
  7673. #include <glib.h>
  7674. #include <stdio.h>
  7675.  
  7676. int main() {
  7677.  return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
  7678. ; return 0; }
  7679. EOF
  7680. if { (eval echo configure:7681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7681.   rm -rf conftest*
  7682.    echo "*** The test program compiled, but did not run. This usually means"
  7683.           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
  7684.           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
  7685.           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  7686.           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
  7687.           echo "*** is required on your system"
  7688.       echo "***"
  7689.           echo "*** If you have an old version installed, it is best to remove it, although"
  7690.           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
  7691.           echo "***"
  7692.           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
  7693.           echo "*** came with the system with the command"
  7694.           echo "***"
  7695.           echo "***    rpm --erase --nodeps gtk gtk-devel" 
  7696. else
  7697.   echo "configure: failed program was:" >&5
  7698.   cat conftest.$ac_ext >&5
  7699.   rm -rf conftest*
  7700.    echo "*** The test program failed to compile or link. See the file config.log for the"
  7701.           echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
  7702.           echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
  7703.           echo "*** may want to edit the glib-config script: $GLIB_CONFIG" 
  7704. fi
  7705. rm -f conftest*
  7706.           CFLAGS="$ac_save_CFLAGS"
  7707.           LIBS="$ac_save_LIBS"
  7708.        fi
  7709.      fi
  7710.      GLIB_CFLAGS=""
  7711.      GLIB_LIBS=""
  7712.      :
  7713.   fi
  7714.   
  7715.   
  7716.   rm -f conf.glibtest
  7717.  
  7718. fi
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725. echo $ac_n "checking for working const""... $ac_c" 1>&6
  7726. echo "configure:7727: checking for working const" >&5
  7727. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  7728.   echo $ac_n "(cached) $ac_c" 1>&6
  7729. else
  7730.   cat > conftest.$ac_ext <<EOF
  7731. #line 7732 "configure"
  7732. #include "confdefs.h"
  7733.  
  7734. int main() {
  7735.  
  7736. /* Ultrix mips cc rejects this.  */
  7737. typedef int charset[2]; const charset x;
  7738. /* SunOS 4.1.1 cc rejects this.  */
  7739. char const *const *ccp;
  7740. char **p;
  7741. /* NEC SVR4.0.2 mips cc rejects this.  */
  7742. struct point {int x, y;};
  7743. static struct point const zero = {0,0};
  7744. /* AIX XL C 1.02.0.0 rejects this.
  7745.    It does not let you subtract one const X* pointer from another in an arm
  7746.    of an if-expression whose if-part is not a constant expression */
  7747. const char *g = "string";
  7748. ccp = &g + (g ? g-g : 0);
  7749. /* HPUX 7.0 cc rejects these. */
  7750. ++ccp;
  7751. p = (char**) ccp;
  7752. ccp = (char const *const *) p;
  7753. { /* SCO 3.2v4 cc rejects this.  */
  7754.   char *t;
  7755.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  7756.  
  7757.   *t++ = 0;
  7758. }
  7759. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  7760.   int x[] = {25, 17};
  7761.   const int *foo = &x[0];
  7762.   ++foo;
  7763. }
  7764. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  7765.   typedef const int *iptr;
  7766.   iptr p = 0;
  7767.   ++p;
  7768. }
  7769. { /* AIX XL C 1.02.0.0 rejects this saying
  7770.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  7771.   struct s { int j; const int *ap[3]; };
  7772.   struct s *b; b->j = 5;
  7773. }
  7774. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  7775.   const int foo = 10;
  7776. }
  7777.  
  7778. ; return 0; }
  7779. EOF
  7780. if { (eval echo configure:7781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  7781.   rm -rf conftest*
  7782.   ac_cv_c_const=yes
  7783. else
  7784.   echo "configure: failed program was:" >&5
  7785.   cat conftest.$ac_ext >&5
  7786.   rm -rf conftest*
  7787.   ac_cv_c_const=no
  7788. fi
  7789. rm -f conftest*
  7790. fi
  7791.  
  7792. echo "$ac_t""$ac_cv_c_const" 1>&6
  7793. if test $ac_cv_c_const = no; then
  7794.   cat >> confdefs.h <<\EOF
  7795. #define const 
  7796. EOF
  7797.  
  7798. fi
  7799.  
  7800. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  7801. echo "configure:7802: checking for ANSI C header files" >&5
  7802. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  7803.   echo $ac_n "(cached) $ac_c" 1>&6
  7804. else
  7805.   cat > conftest.$ac_ext <<EOF
  7806. #line 7807 "configure"
  7807. #include "confdefs.h"
  7808. #include <stdlib.h>
  7809. #include <stdarg.h>
  7810. #include <string.h>
  7811. #include <float.h>
  7812. EOF
  7813. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  7814. { (eval echo configure:7815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7815. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7816. if test -z "$ac_err"; then
  7817.   rm -rf conftest*
  7818.   ac_cv_header_stdc=yes
  7819. else
  7820.   echo "$ac_err" >&5
  7821.   echo "configure: failed program was:" >&5
  7822.   cat conftest.$ac_ext >&5
  7823.   rm -rf conftest*
  7824.   ac_cv_header_stdc=no
  7825. fi
  7826. rm -f conftest*
  7827.  
  7828. if test $ac_cv_header_stdc = yes; then
  7829.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  7830. cat > conftest.$ac_ext <<EOF
  7831. #line 7832 "configure"
  7832. #include "confdefs.h"
  7833. #include <string.h>
  7834. EOF
  7835. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7836.   egrep "memchr" >/dev/null 2>&1; then
  7837.   :
  7838. else
  7839.   rm -rf conftest*
  7840.   ac_cv_header_stdc=no
  7841. fi
  7842. rm -f conftest*
  7843.  
  7844. fi
  7845.  
  7846. if test $ac_cv_header_stdc = yes; then
  7847.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  7848. cat > conftest.$ac_ext <<EOF
  7849. #line 7850 "configure"
  7850. #include "confdefs.h"
  7851. #include <stdlib.h>
  7852. EOF
  7853. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7854.   egrep "free" >/dev/null 2>&1; then
  7855.   :
  7856. else
  7857.   rm -rf conftest*
  7858.   ac_cv_header_stdc=no
  7859. fi
  7860. rm -f conftest*
  7861.  
  7862. fi
  7863.  
  7864. if test $ac_cv_header_stdc = yes; then
  7865.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  7866. if test "$cross_compiling" = yes; then
  7867.   :
  7868. else
  7869.   cat > conftest.$ac_ext <<EOF
  7870. #line 7871 "configure"
  7871. #include "confdefs.h"
  7872. #include <ctype.h>
  7873. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  7874. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  7875. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  7876. int main () { int i; for (i = 0; i < 256; i++)
  7877. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  7878. exit (0); }
  7879.  
  7880. EOF
  7881. if { (eval echo configure:7882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  7882. then
  7883.   :
  7884. else
  7885.   echo "configure: failed program was:" >&5
  7886.   cat conftest.$ac_ext >&5
  7887.   rm -fr conftest*
  7888.   ac_cv_header_stdc=no
  7889. fi
  7890. rm -fr conftest*
  7891. fi
  7892.  
  7893. fi
  7894. fi
  7895.  
  7896. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  7897. if test $ac_cv_header_stdc = yes; then
  7898.   cat >> confdefs.h <<\EOF
  7899. #define STDC_HEADERS 1
  7900. EOF
  7901.  
  7902. fi
  7903.  
  7904. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  7905. echo "configure:7906: checking for mode_t" >&5
  7906. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  7907.   echo $ac_n "(cached) $ac_c" 1>&6
  7908. else
  7909.   cat > conftest.$ac_ext <<EOF
  7910. #line 7911 "configure"
  7911. #include "confdefs.h"
  7912. #include <sys/types.h>
  7913. #if STDC_HEADERS
  7914. #include <stdlib.h>
  7915. #include <stddef.h>
  7916. #endif
  7917. EOF
  7918. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7919.   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  7920.   rm -rf conftest*
  7921.   ac_cv_type_mode_t=yes
  7922. else
  7923.   rm -rf conftest*
  7924.   ac_cv_type_mode_t=no
  7925. fi
  7926. rm -f conftest*
  7927.  
  7928. fi
  7929. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  7930. if test $ac_cv_type_mode_t = no; then
  7931.   cat >> confdefs.h <<\EOF
  7932. #define mode_t int
  7933. EOF
  7934.  
  7935. fi
  7936.  
  7937. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  7938. echo "configure:7939: checking for off_t" >&5
  7939. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  7940.   echo $ac_n "(cached) $ac_c" 1>&6
  7941. else
  7942.   cat > conftest.$ac_ext <<EOF
  7943. #line 7944 "configure"
  7944. #include "confdefs.h"
  7945. #include <sys/types.h>
  7946. #if STDC_HEADERS
  7947. #include <stdlib.h>
  7948. #include <stddef.h>
  7949. #endif
  7950. EOF
  7951. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7952.   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  7953.   rm -rf conftest*
  7954.   ac_cv_type_off_t=yes
  7955. else
  7956.   rm -rf conftest*
  7957.   ac_cv_type_off_t=no
  7958. fi
  7959. rm -f conftest*
  7960.  
  7961. fi
  7962. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  7963. if test $ac_cv_type_off_t = no; then
  7964.   cat >> confdefs.h <<\EOF
  7965. #define off_t long
  7966. EOF
  7967.  
  7968. fi
  7969.  
  7970. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  7971. echo "configure:7972: checking for pid_t" >&5
  7972. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  7973.   echo $ac_n "(cached) $ac_c" 1>&6
  7974. else
  7975.   cat > conftest.$ac_ext <<EOF
  7976. #line 7977 "configure"
  7977. #include "confdefs.h"
  7978. #include <sys/types.h>
  7979. #if STDC_HEADERS
  7980. #include <stdlib.h>
  7981. #include <stddef.h>
  7982. #endif
  7983. EOF
  7984. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  7985.   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  7986.   rm -rf conftest*
  7987.   ac_cv_type_pid_t=yes
  7988. else
  7989.   rm -rf conftest*
  7990.   ac_cv_type_pid_t=no
  7991. fi
  7992. rm -f conftest*
  7993.  
  7994. fi
  7995. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  7996. if test $ac_cv_type_pid_t = no; then
  7997.   cat >> confdefs.h <<\EOF
  7998. #define pid_t int
  7999. EOF
  8000.  
  8001. fi
  8002.  
  8003. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  8004. echo "configure:8005: checking for size_t" >&5
  8005. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  8006.   echo $ac_n "(cached) $ac_c" 1>&6
  8007. else
  8008.   cat > conftest.$ac_ext <<EOF
  8009. #line 8010 "configure"
  8010. #include "confdefs.h"
  8011. #include <sys/types.h>
  8012. #if STDC_HEADERS
  8013. #include <stdlib.h>
  8014. #include <stddef.h>
  8015. #endif
  8016. EOF
  8017. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8018.   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  8019.   rm -rf conftest*
  8020.   ac_cv_type_size_t=yes
  8021. else
  8022.   rm -rf conftest*
  8023.   ac_cv_type_size_t=no
  8024. fi
  8025. rm -f conftest*
  8026.  
  8027. fi
  8028. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  8029. if test $ac_cv_type_size_t = no; then
  8030.   cat >> confdefs.h <<\EOF
  8031. #define size_t unsigned
  8032. EOF
  8033.  
  8034. fi
  8035.  
  8036. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  8037. echo "configure:8038: checking for uid_t in sys/types.h" >&5
  8038. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  8039.   echo $ac_n "(cached) $ac_c" 1>&6
  8040. else
  8041.   cat > conftest.$ac_ext <<EOF
  8042. #line 8043 "configure"
  8043. #include "confdefs.h"
  8044. #include <sys/types.h>
  8045. EOF
  8046. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  8047.   egrep "uid_t" >/dev/null 2>&1; then
  8048.   rm -rf conftest*
  8049.   ac_cv_type_uid_t=yes
  8050. else
  8051.   rm -rf conftest*
  8052.   ac_cv_type_uid_t=no
  8053. fi
  8054. rm -f conftest*
  8055.  
  8056. fi
  8057.  
  8058. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  8059. if test $ac_cv_type_uid_t = no; then
  8060.   cat >> confdefs.h <<\EOF
  8061. #define uid_t int
  8062. EOF
  8063.  
  8064.   cat >> confdefs.h <<\EOF
  8065. #define gid_t int
  8066. EOF
  8067.  
  8068. fi
  8069.  
  8070. echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  8071. echo "configure:8072: checking for st_blksize in struct stat" >&5
  8072. if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  8073.   echo $ac_n "(cached) $ac_c" 1>&6
  8074. else
  8075.   cat > conftest.$ac_ext <<EOF
  8076. #line 8077 "configure"
  8077. #include "confdefs.h"
  8078. #include <sys/types.h>
  8079. #include <sys/stat.h>
  8080. int main() {
  8081. struct stat s; s.st_blksize;
  8082. ; return 0; }
  8083. EOF
  8084. if { (eval echo configure:8085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8085.   rm -rf conftest*
  8086.   ac_cv_struct_st_blksize=yes
  8087. else
  8088.   echo "configure: failed program was:" >&5
  8089.   cat conftest.$ac_ext >&5
  8090.   rm -rf conftest*
  8091.   ac_cv_struct_st_blksize=no
  8092. fi
  8093. rm -f conftest*
  8094. fi
  8095.  
  8096. echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  8097. if test $ac_cv_struct_st_blksize = yes; then
  8098.   cat >> confdefs.h <<\EOF
  8099. #define HAVE_ST_BLKSIZE 1
  8100. EOF
  8101.  
  8102. fi
  8103.  
  8104.  
  8105. case "$target" in
  8106.     *-*-os2_vacpp)
  8107.         cat >> confdefs.h <<\EOF
  8108. #define __size_t 1
  8109. EOF
  8110.  
  8111.         cat >> confdefs.h <<\EOF
  8112. #define __off_t 1
  8113. EOF
  8114.  
  8115.         ;;
  8116. esac
  8117.  
  8118. echo $ac_n "checking for int16_t""... $ac_c" 1>&6
  8119. echo "configure:8120: checking for int16_t" >&5
  8120. if eval "test \"`echo '$''{'ac_cv_int16_t'+set}'`\" = set"; then
  8121.   echo $ac_n "(cached) $ac_c" 1>&6
  8122. else
  8123.   cat > conftest.$ac_ext <<EOF
  8124. #line 8125 "configure"
  8125. #include "confdefs.h"
  8126. #include <stdio.h>
  8127.                   #include <sys/types.h>
  8128. int main() {
  8129. int16_t foo = 0;
  8130. ; return 0; }
  8131. EOF
  8132. if { (eval echo configure:8133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8133.   rm -rf conftest*
  8134.   ac_cv_int16_t=true
  8135. else
  8136.   echo "configure: failed program was:" >&5
  8137.   cat conftest.$ac_ext >&5
  8138.   rm -rf conftest*
  8139.   ac_cv_int16_t=false
  8140. fi
  8141. rm -f conftest*
  8142. fi
  8143.  
  8144. if test "$ac_cv_int16_t" = true ; then
  8145.   cat >> confdefs.h <<\EOF
  8146. #define HAVE_INT16_T 1
  8147. EOF
  8148.  
  8149.   echo "$ac_t""yes" 1>&6
  8150. else
  8151.   echo "$ac_t""no" 1>&6
  8152. fi
  8153. echo $ac_n "checking for int32_t""... $ac_c" 1>&6
  8154. echo "configure:8155: checking for int32_t" >&5
  8155. if eval "test \"`echo '$''{'ac_cv_int32_t'+set}'`\" = set"; then
  8156.   echo $ac_n "(cached) $ac_c" 1>&6
  8157. else
  8158.   cat > conftest.$ac_ext <<EOF
  8159. #line 8160 "configure"
  8160. #include "confdefs.h"
  8161. #include <stdio.h>
  8162.                   #include <sys/types.h>
  8163. int main() {
  8164. int32_t foo = 0;
  8165. ; return 0; }
  8166. EOF
  8167. if { (eval echo configure:8168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8168.   rm -rf conftest*
  8169.   ac_cv_int32_t=true
  8170. else
  8171.   echo "configure: failed program was:" >&5
  8172.   cat conftest.$ac_ext >&5
  8173.   rm -rf conftest*
  8174.   ac_cv_int32_t=false
  8175. fi
  8176. rm -f conftest*
  8177. fi
  8178.  
  8179. if test "$ac_cv_int32_t" = true ; then
  8180.   cat >> confdefs.h <<\EOF
  8181. #define HAVE_INT32_T 1
  8182. EOF
  8183.  
  8184.   echo "$ac_t""yes" 1>&6
  8185. else
  8186.   echo "$ac_t""no" 1>&6
  8187. fi
  8188. echo $ac_n "checking for int64_t""... $ac_c" 1>&6
  8189. echo "configure:8190: checking for int64_t" >&5
  8190. if eval "test \"`echo '$''{'ac_cv_int64_t'+set}'`\" = set"; then
  8191.   echo $ac_n "(cached) $ac_c" 1>&6
  8192. else
  8193.   cat > conftest.$ac_ext <<EOF
  8194. #line 8195 "configure"
  8195. #include "confdefs.h"
  8196. #include <stdio.h>
  8197.                   #include <sys/types.h>
  8198. int main() {
  8199. int64_t foo = 0;
  8200. ; return 0; }
  8201. EOF
  8202. if { (eval echo configure:8203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8203.   rm -rf conftest*
  8204.   ac_cv_int64_t=true
  8205. else
  8206.   echo "configure: failed program was:" >&5
  8207.   cat conftest.$ac_ext >&5
  8208.   rm -rf conftest*
  8209.   ac_cv_int64_t=false
  8210. fi
  8211. rm -f conftest*
  8212. fi
  8213.  
  8214. if test "$ac_cv_int64_t" = true ; then
  8215.   cat >> confdefs.h <<\EOF
  8216. #define HAVE_INT64_T 1
  8217. EOF
  8218.  
  8219.   echo "$ac_t""yes" 1>&6
  8220. else
  8221.   echo "$ac_t""no" 1>&6
  8222. fi
  8223. echo $ac_n "checking for int64""... $ac_c" 1>&6
  8224. echo "configure:8225: checking for int64" >&5
  8225. if eval "test \"`echo '$''{'ac_cv_int64'+set}'`\" = set"; then
  8226.   echo $ac_n "(cached) $ac_c" 1>&6
  8227. else
  8228.   cat > conftest.$ac_ext <<EOF
  8229. #line 8230 "configure"
  8230. #include "confdefs.h"
  8231. #include <stdio.h>
  8232.                   #include <sys/types.h>
  8233. int main() {
  8234. int64 foo = 0;
  8235. ; return 0; }
  8236. EOF
  8237. if { (eval echo configure:8238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8238.   rm -rf conftest*
  8239.   ac_cv_int64=true
  8240. else
  8241.   echo "configure: failed program was:" >&5
  8242.   cat conftest.$ac_ext >&5
  8243.   rm -rf conftest*
  8244.   ac_cv_int64=false
  8245. fi
  8246. rm -f conftest*
  8247. fi
  8248.  
  8249. if test "$ac_cv_int64" = true ; then
  8250.   cat >> confdefs.h <<\EOF
  8251. #define HAVE_INT64 1
  8252. EOF
  8253.  
  8254.   echo "$ac_t""yes" 1>&6
  8255. else
  8256.   echo "$ac_t""no" 1>&6
  8257. fi
  8258. echo $ac_n "checking for uint""... $ac_c" 1>&6
  8259. echo "configure:8260: checking for uint" >&5
  8260. if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then
  8261.   echo $ac_n "(cached) $ac_c" 1>&6
  8262. else
  8263.   cat > conftest.$ac_ext <<EOF
  8264. #line 8265 "configure"
  8265. #include "confdefs.h"
  8266. #include <stdio.h>
  8267.                   #include <sys/types.h>
  8268. int main() {
  8269. uint foo = 0;
  8270. ; return 0; }
  8271. EOF
  8272. if { (eval echo configure:8273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8273.   rm -rf conftest*
  8274.   ac_cv_uint=true
  8275. else
  8276.   echo "configure: failed program was:" >&5
  8277.   cat conftest.$ac_ext >&5
  8278.   rm -rf conftest*
  8279.   ac_cv_uint=false
  8280. fi
  8281. rm -f conftest*
  8282. fi
  8283.  
  8284. if test "$ac_cv_uint" = true ; then
  8285.   cat >> confdefs.h <<\EOF
  8286. #define HAVE_UINT 1
  8287. EOF
  8288.  
  8289.   echo "$ac_t""yes" 1>&6
  8290. else
  8291.   echo "$ac_t""no" 1>&6
  8292. fi
  8293. echo $ac_n "checking for uint_t""... $ac_c" 1>&6
  8294. echo "configure:8295: checking for uint_t" >&5
  8295. if eval "test \"`echo '$''{'ac_cv_uint_t'+set}'`\" = set"; then
  8296.   echo $ac_n "(cached) $ac_c" 1>&6
  8297. else
  8298.   cat > conftest.$ac_ext <<EOF
  8299. #line 8300 "configure"
  8300. #include "confdefs.h"
  8301. #include <stdio.h>
  8302.                   #include <sys/types.h>
  8303. int main() {
  8304. uint foo = 0;
  8305. ; return 0; }
  8306. EOF
  8307. if { (eval echo configure:8308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8308.   rm -rf conftest*
  8309.   ac_cv_uint_t=true
  8310. else
  8311.   echo "configure: failed program was:" >&5
  8312.   cat conftest.$ac_ext >&5
  8313.   rm -rf conftest*
  8314.   ac_cv_uint_t=false
  8315. fi
  8316. rm -f conftest*
  8317. fi
  8318.  
  8319. if test "$ac_cv_uint_t" = true ; then
  8320.   cat >> confdefs.h <<\EOF
  8321. #define HAVE_UINT_T 1
  8322. EOF
  8323.  
  8324.   echo "$ac_t""yes" 1>&6
  8325. else
  8326.   echo "$ac_t""no" 1>&6
  8327. fi
  8328. echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
  8329. echo "configure:8330: checking for uint16_t" >&5
  8330. if eval "test \"`echo '$''{'ac_cv_uint16_t'+set}'`\" = set"; then
  8331.   echo $ac_n "(cached) $ac_c" 1>&6
  8332. else
  8333.   cat > conftest.$ac_ext <<EOF
  8334. #line 8335 "configure"
  8335. #include "confdefs.h"
  8336. #include <stdio.h>
  8337.                   #include <sys/types.h>
  8338. int main() {
  8339. uint16_t foo = 0;
  8340. ; return 0; }
  8341. EOF
  8342. if { (eval echo configure:8343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8343.   rm -rf conftest*
  8344.   ac_cv_uint16_t=true
  8345. else
  8346.   echo "configure: failed program was:" >&5
  8347.   cat conftest.$ac_ext >&5
  8348.   rm -rf conftest*
  8349.   ac_cv_uint16_t=false
  8350. fi
  8351. rm -f conftest*
  8352. fi
  8353.  
  8354. if test "$ac_cv_uint16_t" = true ; then
  8355.   cat >> confdefs.h <<\EOF
  8356. #define HAVE_UINT16_T 1
  8357. EOF
  8358.  
  8359.   echo "$ac_t""yes" 1>&6
  8360. else
  8361.   echo "$ac_t""no" 1>&6
  8362. fi
  8363.  
  8364. ac_ext=C
  8365. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  8366. ac_cpp='$CXXCPP $CPPFLAGS'
  8367. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  8368. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  8369. cross_compiling=$ac_cv_prog_cxx_cross
  8370.  
  8371.  
  8372. echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6
  8373. echo "configure:8374: checking for uname.domainname" >&5
  8374. if eval "test \"`echo '$''{'ac_cv_have_uname_domainname_field'+set}'`\" = set"; then
  8375.   echo $ac_n "(cached) $ac_c" 1>&6
  8376. else
  8377.   cat > conftest.$ac_ext <<EOF
  8378. #line 8379 "configure"
  8379. #include "confdefs.h"
  8380. #include <sys/utsname.h>
  8381. int main() {
  8382.  struct utsname *res; char *domain; 
  8383.             (void)uname(res);  if (res != 0) { domain = res->domainname; } 
  8384. ; return 0; }
  8385. EOF
  8386. if { (eval echo configure:8387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8387.   rm -rf conftest*
  8388.   ac_cv_have_uname_domainname_field=true
  8389. else
  8390.   echo "configure: failed program was:" >&5
  8391.   cat conftest.$ac_ext >&5
  8392.   rm -rf conftest*
  8393.   ac_cv_have_uname_domainname_field=false
  8394. fi
  8395. rm -f conftest*
  8396. fi
  8397.  
  8398.  
  8399. if test "$ac_cv_have_uname_domainname_field" = "true"; then
  8400.     cat >> confdefs.h <<\EOF
  8401. #define HAVE_UNAME_DOMAINNAME_FIELD 1
  8402. EOF
  8403.  
  8404.     echo "$ac_t""yes" 1>&6
  8405. else
  8406.     echo "$ac_t""no" 1>&6
  8407. fi
  8408.  
  8409. echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6
  8410. echo "configure:8411: checking for uname.__domainname" >&5
  8411. if eval "test \"`echo '$''{'ac_cv_have_uname_us_domainname_field'+set}'`\" = set"; then
  8412.   echo $ac_n "(cached) $ac_c" 1>&6
  8413. else
  8414.   cat > conftest.$ac_ext <<EOF
  8415. #line 8416 "configure"
  8416. #include "confdefs.h"
  8417. #include <sys/utsname.h>
  8418. int main() {
  8419.  struct utsname *res; char *domain; 
  8420.             (void)uname(res);  if (res != 0) { domain = res->__domainname; } 
  8421. ; return 0; }
  8422. EOF
  8423. if { (eval echo configure:8424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8424.   rm -rf conftest*
  8425.   ac_cv_have_uname_us_domainname_field=true
  8426. else
  8427.   echo "configure: failed program was:" >&5
  8428.   cat conftest.$ac_ext >&5
  8429.   rm -rf conftest*
  8430.   ac_cv_have_uname_us_domainname_field=false
  8431. fi
  8432. rm -f conftest*
  8433. fi
  8434.  
  8435.  
  8436. if test "$ac_cv_have_uname_us_domainname_field" = "true"; then
  8437.     cat >> confdefs.h <<\EOF
  8438. #define HAVE_UNAME_US_DOMAINNAME_FIELD 1
  8439. EOF
  8440.  
  8441.     echo "$ac_t""yes" 1>&6
  8442. else
  8443.     echo "$ac_t""no" 1>&6
  8444. fi
  8445.  
  8446. ac_ext=c
  8447. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  8448. ac_cpp='$CPP $CPPFLAGS'
  8449. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  8450. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  8451. cross_compiling=$ac_cv_prog_cc_cross
  8452.  
  8453.  
  8454. echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6
  8455. echo "configure:8456: checking for 64-bit OS" >&5
  8456. if test "$cross_compiling" = yes; then
  8457.   result="maybe" 
  8458. else
  8459.   cat > conftest.$ac_ext <<EOF
  8460. #line 8461 "configure"
  8461. #include "confdefs.h"
  8462.  int main () {
  8463.     if (sizeof(long) == 8) { return 0; } return 1; } 
  8464. EOF
  8465. if { (eval echo configure:8466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8466. then
  8467.   result="yes"
  8468. else
  8469.   echo "configure: failed program was:" >&5
  8470.   cat conftest.$ac_ext >&5
  8471.   rm -fr conftest*
  8472.   result="no"
  8473. fi
  8474. rm -fr conftest*
  8475. fi
  8476.  
  8477. echo "$ac_t"""$result"" 1>&6
  8478. if test "$result" = "yes"; then
  8479.     cat >> confdefs.h <<\EOF
  8480. #define HAVE_64BIT_OS 1
  8481. EOF
  8482.  
  8483. fi
  8484.  
  8485.  
  8486. echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6
  8487. echo "configure:8488: checking for usable wchar_t (2 bytes, unsigned)" >&5
  8488. if eval "test \"`echo '$''{'ac_cv_have_usable_wchar'+set}'`\" = set"; then
  8489.   echo $ac_n "(cached) $ac_c" 1>&6
  8490. else
  8491.   if test "$cross_compiling" = yes; then
  8492.   ac_cv_have_usable_wchar="maybe"
  8493. else
  8494.   cat > conftest.$ac_ext <<EOF
  8495. #line 8496 "configure"
  8496. #include "confdefs.h"
  8497. #include <wchar.h>
  8498.                  int main () {
  8499.                    return (sizeof(wchar_t) != 2) ||
  8500.                           (wchar_t)-1 < (wchar_t) 0 ; } 
  8501. EOF
  8502. if { (eval echo configure:8503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8503. then
  8504.   ac_cv_have_usable_wchar="yes"
  8505. else
  8506.   echo "configure: failed program was:" >&5
  8507.   cat conftest.$ac_ext >&5
  8508.   rm -fr conftest*
  8509.   ac_cv_have_usable_wchar="no"
  8510. fi
  8511. rm -fr conftest*
  8512. fi
  8513.  
  8514. fi
  8515.  
  8516. echo "$ac_t""$ac_cv_have_usable_wchar" 1>&6
  8517. if test "$ac_cv_have_usable_wchar" = "yes"; then
  8518.     cat >> confdefs.h <<\EOF
  8519. #define HAVE_CPP_2BYTE_WCHAR_T 1
  8520. EOF
  8521.  
  8522.     HAVE_CPP_2BYTE_WCHAR_T=1
  8523. else
  8524.  
  8525.     _SAVE_CFLAGS=$CFLAGS
  8526.     _SAVE_CC=$CC
  8527.     CC=$CXX
  8528.     CFLAGS="$CFLAGS -fshort-wchar"
  8529.  
  8530.     echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6
  8531. echo "configure:8532: checking for compiler -fshort-wchar option" >&5
  8532. if eval "test \"`echo '$''{'ac_cv_have_usable_wchar_option'+set}'`\" = set"; then
  8533.   echo $ac_n "(cached) $ac_c" 1>&6
  8534. else
  8535.   if test "$cross_compiling" = yes; then
  8536.   ac_cv_have_usable_wchar_option="maybe"
  8537. else
  8538.   cat > conftest.$ac_ext <<EOF
  8539. #line 8540 "configure"
  8540. #include "confdefs.h"
  8541. #include <wchar.h>
  8542.                      int main () {
  8543.                        return (sizeof(wchar_t) != 2) ||
  8544.                               (wchar_t)-1 < (wchar_t) 0 ; } 
  8545. EOF
  8546. if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  8547. then
  8548.   ac_cv_have_usable_wchar_option="yes"
  8549. else
  8550.   echo "configure: failed program was:" >&5
  8551.   cat conftest.$ac_ext >&5
  8552.   rm -fr conftest*
  8553.   ac_cv_have_usable_wchar_option="no"
  8554. fi
  8555. rm -fr conftest*
  8556. fi
  8557.  
  8558. fi
  8559.  
  8560. echo "$ac_t""$ac_cv_have_usable_wchar_option" 1>&6
  8561.  
  8562.     if test "$ac_cv_have_usable_wchar_option" = "yes"; then
  8563.         cat >> confdefs.h <<\EOF
  8564. #define HAVE_CPP_2BYTE_WCHAR_T 1
  8565. EOF
  8566.  
  8567.         HAVE_CPP_2BYTE_WCHAR_T=1
  8568.         CXXFLAGS="$CXXFLAGS -fshort-wchar"
  8569.     else    
  8570.         CFLAGS=$_SAVE_CFLAGS
  8571.     fi
  8572.     CC=$_SAVE_CC
  8573. fi
  8574.  
  8575. ac_header_dirent=no
  8576. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  8577. do
  8578. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8579. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  8580. echo "configure:8581: checking for $ac_hdr that defines DIR" >&5
  8581. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  8582.   echo $ac_n "(cached) $ac_c" 1>&6
  8583. else
  8584.   cat > conftest.$ac_ext <<EOF
  8585. #line 8586 "configure"
  8586. #include "confdefs.h"
  8587. #include <sys/types.h>
  8588. #include <$ac_hdr>
  8589. int main() {
  8590. DIR *dirp = 0;
  8591. ; return 0; }
  8592. EOF
  8593. if { (eval echo configure:8594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  8594.   rm -rf conftest*
  8595.   eval "ac_cv_header_dirent_$ac_safe=yes"
  8596. else
  8597.   echo "configure: failed program was:" >&5
  8598.   cat conftest.$ac_ext >&5
  8599.   rm -rf conftest*
  8600.   eval "ac_cv_header_dirent_$ac_safe=no"
  8601. fi
  8602. rm -f conftest*
  8603. fi
  8604. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  8605.   echo "$ac_t""yes" 1>&6
  8606.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8607.   cat >> confdefs.h <<EOF
  8608. #define $ac_tr_hdr 1
  8609. EOF
  8610.  ac_header_dirent=$ac_hdr; break
  8611. else
  8612.   echo "$ac_t""no" 1>&6
  8613. fi
  8614. done
  8615. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  8616. if test $ac_header_dirent = dirent.h; then
  8617. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  8618. echo "configure:8619: checking for opendir in -ldir" >&5
  8619. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  8620. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  8621.   echo $ac_n "(cached) $ac_c" 1>&6
  8622. else
  8623.   ac_save_LIBS="$LIBS"
  8624. LIBS="-ldir  $LIBS"
  8625. cat > conftest.$ac_ext <<EOF
  8626. #line 8627 "configure"
  8627. #include "confdefs.h"
  8628. /* Override any gcc2 internal prototype to avoid an error.  */
  8629. /* We use char because int might match the return type of a gcc2
  8630.     builtin and then its argument prototype would still apply.  */
  8631. char opendir();
  8632.  
  8633. int main() {
  8634. opendir()
  8635. ; return 0; }
  8636. EOF
  8637. if { (eval echo configure:8638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8638.   rm -rf conftest*
  8639.   eval "ac_cv_lib_$ac_lib_var=yes"
  8640. else
  8641.   echo "configure: failed program was:" >&5
  8642.   cat conftest.$ac_ext >&5
  8643.   rm -rf conftest*
  8644.   eval "ac_cv_lib_$ac_lib_var=no"
  8645. fi
  8646. rm -f conftest*
  8647. LIBS="$ac_save_LIBS"
  8648.  
  8649. fi
  8650. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8651.   echo "$ac_t""yes" 1>&6
  8652.   LIBS="$LIBS -ldir"
  8653. else
  8654.   echo "$ac_t""no" 1>&6
  8655. fi
  8656.  
  8657. else
  8658. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  8659. echo "configure:8660: checking for opendir in -lx" >&5
  8660. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  8661. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  8662.   echo $ac_n "(cached) $ac_c" 1>&6
  8663. else
  8664.   ac_save_LIBS="$LIBS"
  8665. LIBS="-lx  $LIBS"
  8666. cat > conftest.$ac_ext <<EOF
  8667. #line 8668 "configure"
  8668. #include "confdefs.h"
  8669. /* Override any gcc2 internal prototype to avoid an error.  */
  8670. /* We use char because int might match the return type of a gcc2
  8671.     builtin and then its argument prototype would still apply.  */
  8672. char opendir();
  8673.  
  8674. int main() {
  8675. opendir()
  8676. ; return 0; }
  8677. EOF
  8678. if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8679.   rm -rf conftest*
  8680.   eval "ac_cv_lib_$ac_lib_var=yes"
  8681. else
  8682.   echo "configure: failed program was:" >&5
  8683.   cat conftest.$ac_ext >&5
  8684.   rm -rf conftest*
  8685.   eval "ac_cv_lib_$ac_lib_var=no"
  8686. fi
  8687. rm -f conftest*
  8688. LIBS="$ac_save_LIBS"
  8689.  
  8690. fi
  8691. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8692.   echo "$ac_t""yes" 1>&6
  8693.   LIBS="$LIBS -lx"
  8694. else
  8695.   echo "$ac_t""no" 1>&6
  8696. fi
  8697.  
  8698. fi
  8699.  
  8700. case "$target_os" in
  8701. os2*)
  8702.     LIBS=
  8703.     ;;
  8704. esac
  8705. for ac_hdr in sys/byteorder.h compat.h getopt.h
  8706. do
  8707. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8708. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8709. echo "configure:8710: checking for $ac_hdr" >&5
  8710. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8711.   echo $ac_n "(cached) $ac_c" 1>&6
  8712. else
  8713.   cat > conftest.$ac_ext <<EOF
  8714. #line 8715 "configure"
  8715. #include "confdefs.h"
  8716. #include <$ac_hdr>
  8717. EOF
  8718. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8719. { (eval echo configure:8720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8720. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8721. if test -z "$ac_err"; then
  8722.   rm -rf conftest*
  8723.   eval "ac_cv_header_$ac_safe=yes"
  8724. else
  8725.   echo "$ac_err" >&5
  8726.   echo "configure: failed program was:" >&5
  8727.   cat conftest.$ac_ext >&5
  8728.   rm -rf conftest*
  8729.   eval "ac_cv_header_$ac_safe=no"
  8730. fi
  8731. rm -f conftest*
  8732. fi
  8733. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8734.   echo "$ac_t""yes" 1>&6
  8735.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8736.   cat >> confdefs.h <<EOF
  8737. #define $ac_tr_hdr 1
  8738. EOF
  8739.  
  8740. else
  8741.   echo "$ac_t""no" 1>&6
  8742. fi
  8743. done
  8744.  
  8745. for ac_hdr in sys/bittypes.h memory.h unistd.h sys/filio.h
  8746. do
  8747. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8748. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8749. echo "configure:8750: checking for $ac_hdr" >&5
  8750. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8751.   echo $ac_n "(cached) $ac_c" 1>&6
  8752. else
  8753.   cat > conftest.$ac_ext <<EOF
  8754. #line 8755 "configure"
  8755. #include "confdefs.h"
  8756. #include <$ac_hdr>
  8757. EOF
  8758. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8759. { (eval echo configure:8760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8760. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8761. if test -z "$ac_err"; then
  8762.   rm -rf conftest*
  8763.   eval "ac_cv_header_$ac_safe=yes"
  8764. else
  8765.   echo "$ac_err" >&5
  8766.   echo "configure: failed program was:" >&5
  8767.   cat conftest.$ac_ext >&5
  8768.   rm -rf conftest*
  8769.   eval "ac_cv_header_$ac_safe=no"
  8770. fi
  8771. rm -f conftest*
  8772. fi
  8773. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8774.   echo "$ac_t""yes" 1>&6
  8775.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8776.   cat >> confdefs.h <<EOF
  8777. #define $ac_tr_hdr 1
  8778. EOF
  8779.  
  8780. else
  8781.   echo "$ac_t""no" 1>&6
  8782. fi
  8783. done
  8784.  
  8785. for ac_hdr in gnu/libc-version.h nl_types.h
  8786. do
  8787. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8788. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8789. echo "configure:8790: checking for $ac_hdr" >&5
  8790. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8791.   echo $ac_n "(cached) $ac_c" 1>&6
  8792. else
  8793.   cat > conftest.$ac_ext <<EOF
  8794. #line 8795 "configure"
  8795. #include "confdefs.h"
  8796. #include <$ac_hdr>
  8797. EOF
  8798. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8799. { (eval echo configure:8800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8800. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8801. if test -z "$ac_err"; then
  8802.   rm -rf conftest*
  8803.   eval "ac_cv_header_$ac_safe=yes"
  8804. else
  8805.   echo "$ac_err" >&5
  8806.   echo "configure: failed program was:" >&5
  8807.   cat conftest.$ac_ext >&5
  8808.   rm -rf conftest*
  8809.   eval "ac_cv_header_$ac_safe=no"
  8810. fi
  8811. rm -f conftest*
  8812. fi
  8813. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8814.   echo "$ac_t""yes" 1>&6
  8815.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8816.   cat >> confdefs.h <<EOF
  8817. #define $ac_tr_hdr 1
  8818. EOF
  8819.  
  8820. else
  8821.   echo "$ac_t""no" 1>&6
  8822. fi
  8823. done
  8824.  
  8825.  
  8826. for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h
  8827. do
  8828. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8829. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8830. echo "configure:8831: checking for $ac_hdr" >&5
  8831. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8832.   echo $ac_n "(cached) $ac_c" 1>&6
  8833. else
  8834.   cat > conftest.$ac_ext <<EOF
  8835. #line 8836 "configure"
  8836. #include "confdefs.h"
  8837. #include <$ac_hdr>
  8838. EOF
  8839. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8840. { (eval echo configure:8841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8841. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8842. if test -z "$ac_err"; then
  8843.   rm -rf conftest*
  8844.   eval "ac_cv_header_$ac_safe=yes"
  8845. else
  8846.   echo "$ac_err" >&5
  8847.   echo "configure: failed program was:" >&5
  8848.   cat conftest.$ac_ext >&5
  8849.   rm -rf conftest*
  8850.   eval "ac_cv_header_$ac_safe=no"
  8851. fi
  8852. rm -f conftest*
  8853. fi
  8854. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8855.   echo "$ac_t""yes" 1>&6
  8856.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8857.   cat >> confdefs.h <<EOF
  8858. #define $ac_tr_hdr 1
  8859. EOF
  8860.  
  8861. else
  8862.   echo "$ac_t""no" 1>&6
  8863. fi
  8864. done
  8865.  
  8866.  
  8867. case $target in
  8868. *-aix4.3*)
  8869.     ;;
  8870. *)
  8871.     for ac_hdr in sys/cdefs.h
  8872. do
  8873. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  8874. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  8875. echo "configure:8876: checking for $ac_hdr" >&5
  8876. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  8877.   echo $ac_n "(cached) $ac_c" 1>&6
  8878. else
  8879.   cat > conftest.$ac_ext <<EOF
  8880. #line 8881 "configure"
  8881. #include "confdefs.h"
  8882. #include <$ac_hdr>
  8883. EOF
  8884. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  8885. { (eval echo configure:8886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  8886. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  8887. if test -z "$ac_err"; then
  8888.   rm -rf conftest*
  8889.   eval "ac_cv_header_$ac_safe=yes"
  8890. else
  8891.   echo "$ac_err" >&5
  8892.   echo "configure: failed program was:" >&5
  8893.   cat conftest.$ac_ext >&5
  8894.   rm -rf conftest*
  8895.   eval "ac_cv_header_$ac_safe=no"
  8896. fi
  8897. rm -f conftest*
  8898. fi
  8899. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  8900.   echo "$ac_t""yes" 1>&6
  8901.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  8902.   cat >> confdefs.h <<EOF
  8903. #define $ac_tr_hdr 1
  8904. EOF
  8905.  
  8906. else
  8907.   echo "$ac_t""no" 1>&6
  8908. fi
  8909. done
  8910.  
  8911.     ;;
  8912. esac
  8913.  
  8914. case $target in
  8915. *-hpux11.*)
  8916.     ;;
  8917. *)
  8918.     echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6
  8919. echo "configure:8920: checking for gethostbyname_r in -lc_r" >&5
  8920. ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'`
  8921. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  8922.   echo $ac_n "(cached) $ac_c" 1>&6
  8923. else
  8924.   ac_save_LIBS="$LIBS"
  8925. LIBS="-lc_r  $LIBS"
  8926. cat > conftest.$ac_ext <<EOF
  8927. #line 8928 "configure"
  8928. #include "confdefs.h"
  8929. /* Override any gcc2 internal prototype to avoid an error.  */
  8930. /* We use char because int might match the return type of a gcc2
  8931.     builtin and then its argument prototype would still apply.  */
  8932. char gethostbyname_r();
  8933.  
  8934. int main() {
  8935. gethostbyname_r()
  8936. ; return 0; }
  8937. EOF
  8938. if { (eval echo configure:8939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8939.   rm -rf conftest*
  8940.   eval "ac_cv_lib_$ac_lib_var=yes"
  8941. else
  8942.   echo "configure: failed program was:" >&5
  8943.   cat conftest.$ac_ext >&5
  8944.   rm -rf conftest*
  8945.   eval "ac_cv_lib_$ac_lib_var=no"
  8946. fi
  8947. rm -f conftest*
  8948. LIBS="$ac_save_LIBS"
  8949.  
  8950. fi
  8951. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  8952.   echo "$ac_t""yes" 1>&6
  8953.     ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  8954.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  8955.   cat >> confdefs.h <<EOF
  8956. #define $ac_tr_lib 1
  8957. EOF
  8958.  
  8959.   LIBS="-lc_r $LIBS"
  8960.  
  8961. else
  8962.   echo "$ac_t""no" 1>&6
  8963. fi
  8964.  
  8965.     ;;
  8966. esac
  8967. echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
  8968. echo "configure:8969: checking for atan in -lm" >&5
  8969. ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
  8970. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  8971.   echo $ac_n "(cached) $ac_c" 1>&6
  8972. else
  8973.   ac_save_LIBS="$LIBS"
  8974. LIBS="-lm  $LIBS"
  8975. cat > conftest.$ac_ext <<EOF
  8976. #line 8977 "configure"
  8977. #include "confdefs.h"
  8978. /* Override any gcc2 internal prototype to avoid an error.  */
  8979. /* We use char because int might match the return type of a gcc2
  8980.     builtin and then its argument prototype would still apply.  */
  8981. char atan();
  8982.  
  8983. int main() {
  8984. atan()
  8985. ; return 0; }
  8986. EOF
  8987. if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  8988.   rm -rf conftest*
  8989.   eval "ac_cv_lib_$ac_lib_var=yes"
  8990. else
  8991.   echo "configure: failed program was:" >&5
  8992.   cat conftest.$ac_ext >&5
  8993.   rm -rf conftest*
  8994.   eval "ac_cv_lib_$ac_lib_var=no"
  8995. fi
  8996. rm -f conftest*
  8997. LIBS="$ac_save_LIBS"
  8998.  
  8999. fi
  9000. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9001.   echo "$ac_t""yes" 1>&6
  9002.     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  9003.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  9004.   cat >> confdefs.h <<EOF
  9005. #define $ac_tr_lib 1
  9006. EOF
  9007.  
  9008.   LIBS="-lm $LIBS"
  9009.  
  9010. else
  9011.   echo "$ac_t""no" 1>&6
  9012. fi
  9013.  
  9014. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  9015. echo "configure:9016: checking for dlopen in -ldl" >&5
  9016. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  9017. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  9018.   echo $ac_n "(cached) $ac_c" 1>&6
  9019. else
  9020.   ac_save_LIBS="$LIBS"
  9021. LIBS="-ldl  $LIBS"
  9022. cat > conftest.$ac_ext <<EOF
  9023. #line 9024 "configure"
  9024. #include "confdefs.h"
  9025. /* Override any gcc2 internal prototype to avoid an error.  */
  9026. /* We use char because int might match the return type of a gcc2
  9027.     builtin and then its argument prototype would still apply.  */
  9028. char dlopen();
  9029.  
  9030. int main() {
  9031. dlopen()
  9032. ; return 0; }
  9033. EOF
  9034. if { (eval echo configure:9035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9035.   rm -rf conftest*
  9036.   eval "ac_cv_lib_$ac_lib_var=yes"
  9037. else
  9038.   echo "configure: failed program was:" >&5
  9039.   cat conftest.$ac_ext >&5
  9040.   rm -rf conftest*
  9041.   eval "ac_cv_lib_$ac_lib_var=no"
  9042. fi
  9043. rm -f conftest*
  9044. LIBS="$ac_save_LIBS"
  9045.  
  9046. fi
  9047. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9048.   echo "$ac_t""yes" 1>&6
  9049.     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  9050.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  9051.   cat >> confdefs.h <<EOF
  9052. #define $ac_tr_lib 1
  9053. EOF
  9054.  
  9055.   LIBS="-ldl $LIBS"
  9056.  
  9057. else
  9058.   echo "$ac_t""no" 1>&6
  9059. fi
  9060.  
  9061. if test ! "$GNU_CXX"; then
  9062.  
  9063.     case $target in
  9064.     *-solaris*)
  9065.     LIBS="-lCrun $LIBS"
  9066.     ;;
  9067.     *-aix*)
  9068.     echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6
  9069. echo "configure:9070: checking for demangle in -lC_r" >&5
  9070. ac_lib_var=`echo C_r'_'demangle | sed 'y%./+-%__p_%'`
  9071. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  9072.   echo $ac_n "(cached) $ac_c" 1>&6
  9073. else
  9074.   ac_save_LIBS="$LIBS"
  9075. LIBS="-lC_r  $LIBS"
  9076. cat > conftest.$ac_ext <<EOF
  9077. #line 9078 "configure"
  9078. #include "confdefs.h"
  9079. /* Override any gcc2 internal prototype to avoid an error.  */
  9080. /* We use char because int might match the return type of a gcc2
  9081.     builtin and then its argument prototype would still apply.  */
  9082. char demangle();
  9083.  
  9084. int main() {
  9085. demangle()
  9086. ; return 0; }
  9087. EOF
  9088. if { (eval echo configure:9089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9089.   rm -rf conftest*
  9090.   eval "ac_cv_lib_$ac_lib_var=yes"
  9091. else
  9092.   echo "configure: failed program was:" >&5
  9093.   cat conftest.$ac_ext >&5
  9094.   rm -rf conftest*
  9095.   eval "ac_cv_lib_$ac_lib_var=no"
  9096. fi
  9097. rm -f conftest*
  9098. LIBS="$ac_save_LIBS"
  9099.  
  9100. fi
  9101. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9102.   echo "$ac_t""yes" 1>&6
  9103.     ac_tr_lib=HAVE_LIB`echo C_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  9104.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  9105.   cat >> confdefs.h <<EOF
  9106. #define $ac_tr_lib 1
  9107. EOF
  9108.  
  9109.   LIBS="-lC_r $LIBS"
  9110.  
  9111. else
  9112.   echo "$ac_t""no" 1>&6
  9113. fi
  9114.  
  9115.     ;;
  9116.      *)
  9117.     echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6
  9118. echo "configure:9119: checking for demangle in -lC" >&5
  9119. ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'`
  9120. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  9121.   echo $ac_n "(cached) $ac_c" 1>&6
  9122. else
  9123.   ac_save_LIBS="$LIBS"
  9124. LIBS="-lC  $LIBS"
  9125. cat > conftest.$ac_ext <<EOF
  9126. #line 9127 "configure"
  9127. #include "confdefs.h"
  9128. /* Override any gcc2 internal prototype to avoid an error.  */
  9129. /* We use char because int might match the return type of a gcc2
  9130.     builtin and then its argument prototype would still apply.  */
  9131. char demangle();
  9132.  
  9133. int main() {
  9134. demangle()
  9135. ; return 0; }
  9136. EOF
  9137. if { (eval echo configure:9138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9138.   rm -rf conftest*
  9139.   eval "ac_cv_lib_$ac_lib_var=yes"
  9140. else
  9141.   echo "configure: failed program was:" >&5
  9142.   cat conftest.$ac_ext >&5
  9143.   rm -rf conftest*
  9144.   eval "ac_cv_lib_$ac_lib_var=no"
  9145. fi
  9146. rm -f conftest*
  9147. LIBS="$ac_save_LIBS"
  9148.  
  9149. fi
  9150. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9151.   echo "$ac_t""yes" 1>&6
  9152.     ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  9153.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  9154.   cat >> confdefs.h <<EOF
  9155. #define $ac_tr_lib 1
  9156. EOF
  9157.  
  9158.   LIBS="-lC $LIBS"
  9159.  
  9160. else
  9161.   echo "$ac_t""no" 1>&6
  9162. fi
  9163.  
  9164.     ;;
  9165.      esac
  9166. fi
  9167. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  9168. echo "configure:9169: checking for socket in -lsocket" >&5
  9169. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  9170. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  9171.   echo $ac_n "(cached) $ac_c" 1>&6
  9172. else
  9173.   ac_save_LIBS="$LIBS"
  9174. LIBS="-lsocket  $LIBS"
  9175. cat > conftest.$ac_ext <<EOF
  9176. #line 9177 "configure"
  9177. #include "confdefs.h"
  9178. /* Override any gcc2 internal prototype to avoid an error.  */
  9179. /* We use char because int might match the return type of a gcc2
  9180.     builtin and then its argument prototype would still apply.  */
  9181. char socket();
  9182.  
  9183. int main() {
  9184. socket()
  9185. ; return 0; }
  9186. EOF
  9187. if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9188.   rm -rf conftest*
  9189.   eval "ac_cv_lib_$ac_lib_var=yes"
  9190. else
  9191.   echo "configure: failed program was:" >&5
  9192.   cat conftest.$ac_ext >&5
  9193.   rm -rf conftest*
  9194.   eval "ac_cv_lib_$ac_lib_var=no"
  9195. fi
  9196. rm -f conftest*
  9197. LIBS="$ac_save_LIBS"
  9198.  
  9199. fi
  9200. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9201.   echo "$ac_t""yes" 1>&6
  9202.     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  9203.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  9204.   cat >> confdefs.h <<EOF
  9205. #define $ac_tr_lib 1
  9206. EOF
  9207.  
  9208.   LIBS="-lsocket $LIBS"
  9209.  
  9210. else
  9211.   echo "$ac_t""no" 1>&6
  9212. fi
  9213.  
  9214. echo $ac_n "checking for shm_open in -lposix4""... $ac_c" 1>&6
  9215. echo "configure:9216: checking for shm_open in -lposix4" >&5
  9216. ac_lib_var=`echo posix4'_'shm_open | sed 'y%./+-%__p_%'`
  9217. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  9218.   echo $ac_n "(cached) $ac_c" 1>&6
  9219. else
  9220.   ac_save_LIBS="$LIBS"
  9221. LIBS="-lposix4  $LIBS"
  9222. cat > conftest.$ac_ext <<EOF
  9223. #line 9224 "configure"
  9224. #include "confdefs.h"
  9225. /* Override any gcc2 internal prototype to avoid an error.  */
  9226. /* We use char because int might match the return type of a gcc2
  9227.     builtin and then its argument prototype would still apply.  */
  9228. char shm_open();
  9229.  
  9230. int main() {
  9231. shm_open()
  9232. ; return 0; }
  9233. EOF
  9234. if { (eval echo configure:9235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9235.   rm -rf conftest*
  9236.   eval "ac_cv_lib_$ac_lib_var=yes"
  9237. else
  9238.   echo "configure: failed program was:" >&5
  9239.   cat conftest.$ac_ext >&5
  9240.   rm -rf conftest*
  9241.   eval "ac_cv_lib_$ac_lib_var=no"
  9242. fi
  9243. rm -f conftest*
  9244. LIBS="$ac_save_LIBS"
  9245.  
  9246. fi
  9247. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  9248.   echo "$ac_t""yes" 1>&6
  9249.     ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  9250.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  9251.   cat >> confdefs.h <<EOF
  9252. #define $ac_tr_lib 1
  9253. EOF
  9254.  
  9255.   LIBS="-lposix4 $LIBS"
  9256.  
  9257. else
  9258.   echo "$ac_t""no" 1>&6
  9259. fi
  9260.  
  9261.  
  9262.  
  9263.  
  9264.  
  9265. echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
  9266. echo "configure:9267: checking for pthread_create in -lpthreads" >&5
  9267. echo "
  9268.     #include <pthread.h> 
  9269.     void *foo(void *v) { int a = 1;  } 
  9270.     int main() { 
  9271.         pthread_t t;
  9272.         if (!pthread_create(&t, 0, &foo, 0)) {
  9273.             pthread_join(t, 0);
  9274.         }
  9275.         exit(0);
  9276.     }" > dummy.c ;
  9277.     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
  9278.     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
  9279.     _res=$? ;
  9280.     rm -f dummy.c dummy${ac_exeext} ;
  9281.     if test "$_res" = "0"; then
  9282.         echo "$ac_t""yes" 1>&6
  9283.         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
  9284.     else
  9285.         echo "$ac_t""no" 1>&6
  9286.         
  9287. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  9288. echo "configure:9289: checking for pthread_create in -lpthread" >&5
  9289. echo "
  9290.     #include <pthread.h> 
  9291.     void *foo(void *v) { int a = 1;  } 
  9292.     int main() { 
  9293.         pthread_t t;
  9294.         if (!pthread_create(&t, 0, &foo, 0)) {
  9295.             pthread_join(t, 0);
  9296.         }
  9297.         exit(0);
  9298.     }" > dummy.c ;
  9299.     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
  9300.     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
  9301.     _res=$? ;
  9302.     rm -f dummy.c dummy${ac_exeext} ;
  9303.     if test "$_res" = "0"; then
  9304.         echo "$ac_t""yes" 1>&6
  9305.         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
  9306.     else
  9307.         echo "$ac_t""no" 1>&6
  9308.         
  9309. echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
  9310. echo "configure:9311: checking for pthread_create in -lc_r" >&5
  9311. echo "
  9312.     #include <pthread.h> 
  9313.     void *foo(void *v) { int a = 1;  } 
  9314.     int main() { 
  9315.         pthread_t t;
  9316.         if (!pthread_create(&t, 0, &foo, 0)) {
  9317.             pthread_join(t, 0);
  9318.         }
  9319.         exit(0);
  9320.     }" > dummy.c ;
  9321.     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
  9322.     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
  9323.     _res=$? ;
  9324.     rm -f dummy.c dummy${ac_exeext} ;
  9325.     if test "$_res" = "0"; then
  9326.         echo "$ac_t""yes" 1>&6
  9327.         USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
  9328.     else
  9329.         echo "$ac_t""no" 1>&6
  9330.         
  9331. echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
  9332. echo "configure:9333: checking for pthread_create in -lc" >&5
  9333. echo "
  9334.     #include <pthread.h> 
  9335.     void *foo(void *v) { int a = 1;  } 
  9336.     int main() { 
  9337.         pthread_t t;
  9338.         if (!pthread_create(&t, 0, &foo, 0)) {
  9339.             pthread_join(t, 0);
  9340.         }
  9341.         exit(0);
  9342.     }" > dummy.c ;
  9343.     echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
  9344.     ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
  9345.     _res=$? ;
  9346.     rm -f dummy.c dummy${ac_exeext} ;
  9347.     if test "$_res" = "0"; then
  9348.         echo "$ac_t""yes" 1>&6
  9349.         USE_PTHREADS=1
  9350.             
  9351.     else
  9352.         echo "$ac_t""no" 1>&6
  9353.         
  9354.     fi
  9355.  
  9356.         
  9357.     fi
  9358.  
  9359.     
  9360.     fi
  9361.  
  9362.  
  9363.     fi
  9364.  
  9365.  
  9366. # Check whether --with-pthreads or --without-pthreads was given.
  9367. if test "${with_pthreads+set}" = set; then
  9368.   withval="$with_pthreads"
  9369.   if test "$withval" = "yes"
  9370.          then
  9371.            if test "$USE_PTHREADS"x = x
  9372.            then
  9373.              { echo "configure: error:  --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
  9374.            fi
  9375.          else
  9376.            USE_PTHREADS=
  9377.            _PTHREAD_LDFLAGS=""
  9378.          fi 
  9379. fi
  9380.  
  9381.  
  9382. if test "$USE_PTHREADS"x != x
  9383. then
  9384.                 rm -f conftest*
  9385.     ac_cv_have_dash_pthread=no
  9386.     echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
  9387. echo "configure:9388: checking whether ${CC-cc} accepts -pthread" >&5
  9388.     echo 'int main() { return 0; }' | cat > conftest.c
  9389.     ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
  9390.     if test $? -eq 0; then
  9391.         if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
  9392.             ac_cv_have_dash_pthread=yes
  9393.             CFLAGS="$CFLAGS -pthread"
  9394.             CXXFLAGS="$CXXFLAGS -pthread"
  9395.         fi
  9396.     fi
  9397.     rm -f conftest*
  9398.     echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
  9399.  
  9400.                 ac_cv_have_dash_pthreads=no
  9401.     if test "$ac_cv_have_dash_pthread" = "no"; then
  9402.         echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
  9403. echo "configure:9404: checking whether ${CC-cc} accepts -pthreads" >&5
  9404.         echo 'int main() { return 0; }' | cat > conftest.c
  9405.         ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
  9406.         if test $? -eq 0; then
  9407.             if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
  9408.                 ac_cv_have_dash_pthreads=yes
  9409.                 CFLAGS="$CFLAGS -pthreads"
  9410.                 CXXFLAGS="$CXXFLAGS -pthreads"
  9411.             fi
  9412.         fi
  9413.         rm -f conftest*
  9414.         echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
  9415.     fi
  9416.  
  9417.     case "$target" in
  9418.         *-*-freebsd*|*-*-openbsd*|*-*-bsdi*)
  9419.             cat >> confdefs.h <<\EOF
  9420. #define _REENTRANT 1
  9421. EOF
  9422.  
  9423.             cat >> confdefs.h <<\EOF
  9424. #define _THREAD_SAFE 1
  9425. EOF
  9426.  
  9427.                         if test "$ac_cv_have_dash_pthread" = "yes"; then
  9428.                 _PTHREAD_LDFLAGS=""
  9429.             else
  9430.                 _PTHREAD_LDFLAGS="-lc_r"
  9431.             fi
  9432.             ;;
  9433.  
  9434.         *-*-linux*) 
  9435.             cat >> confdefs.h <<\EOF
  9436. #define _REENTRANT 1
  9437. EOF
  9438.  
  9439.             ;;
  9440.  
  9441.         *-*-nto*) 
  9442.             cat >> confdefs.h <<\EOF
  9443. #define _REENTRANT 1
  9444. EOF
  9445.  
  9446.             ;;
  9447.  
  9448.         *-aix4.3*)
  9449.             cat >> confdefs.h <<\EOF
  9450. #define _REENTRANT 1
  9451. EOF
  9452.  
  9453.             ;;
  9454.  
  9455.         *-hpux11.*)
  9456.             cat >> confdefs.h <<\EOF
  9457. #define _REENTRANT 1
  9458. EOF
  9459.  
  9460.             ;;
  9461.  
  9462.         *-*-os2*)
  9463.             USE_PTHREADS=
  9464.             _PTHREAD_LDFLAGS=
  9465.             ;;
  9466.  
  9467.         alpha*-*-osf*)
  9468.             cat >> confdefs.h <<\EOF
  9469. #define _REENTRANT 1
  9470. EOF
  9471.  
  9472.             ;;
  9473.  
  9474.         *-*-solaris*) 
  9475.                 cat >> confdefs.h <<\EOF
  9476. #define _REENTRANT 1
  9477. EOF
  9478.  
  9479.             if test ! "$GNU_CC"; then
  9480.                 CFLAGS="$CFLAGS -mt" 
  9481.                 CXXFLAGS="$CXXFLAGS -mt" 
  9482.             fi
  9483.             ;;
  9484.     *-*-netbsd*)
  9485.         USE_PTHREADS=
  9486.         _PTHREAD_LDFLAGS=
  9487.     esac
  9488. fi
  9489.  
  9490.  
  9491.    case "$target" in
  9492.     *-hpux*)      
  9493.         cat >> confdefs.h <<\EOF
  9494. #define MOZ_OJI_REQUIRE_THREAD_SAFE_ON_STARTUP 1
  9495. EOF
  9496.  
  9497.         ;;
  9498.     *)
  9499.         ;;
  9500.    esac
  9501.  
  9502.  
  9503. echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6
  9504. echo "configure:9505: checking whether mmap() sees write()s" >&5
  9505.  
  9506.  
  9507. mmap_test_prog='
  9508.     #include <stdlib.h>
  9509.     #include <unistd.h>
  9510.     #include <sys/mman.h>
  9511.     #include <sys/types.h>
  9512.     #include <sys/stat.h>
  9513.     #include <fcntl.h>
  9514.  
  9515.     char fname[] = "conftest.file";
  9516.     char zbuff[1024]; /* Fractional page is probably worst case */
  9517.  
  9518.     int main() {
  9519.     char *map;
  9520.     int fd;
  9521.     int i;
  9522.     unlink(fname);
  9523.     fd = open(fname, O_RDWR | O_CREAT, 0660);
  9524.     if(fd<0) return 1;
  9525.     unlink(fname);
  9526.     write(fd, zbuff, sizeof(zbuff));
  9527.     lseek(fd, 0, SEEK_SET);
  9528.     map = (char*)mmap(0, sizeof(zbuff), PROT_READ, MAP_SHARED, fd, 0);
  9529.     if(map==(char*)-1) return 2;
  9530.     for(i=0; fname[i]; i++) {
  9531.         int rc = write(fd, &fname[i], 1);
  9532.         if(map[i]!=fname[i]) return 4;
  9533.     }
  9534.     return 0;
  9535.     }
  9536. '
  9537.  
  9538.  
  9539. if test "$cross_compiling" = yes; then
  9540.   result="yes"
  9541. else
  9542.   cat > conftest.$ac_ext <<EOF
  9543. #line 9544 "configure"
  9544. #include "confdefs.h"
  9545. $mmap_test_prog 
  9546. EOF
  9547. if { (eval echo configure:9548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  9548. then
  9549.   result="yes"
  9550. else
  9551.   echo "configure: failed program was:" >&5
  9552.   cat conftest.$ac_ext >&5
  9553.   rm -fr conftest*
  9554.   result="no"
  9555. fi
  9556. rm -fr conftest*
  9557. fi
  9558.  
  9559.  
  9560. echo "$ac_t"""$result"" 1>&6
  9561.  
  9562. if test "$result" = "no"; then
  9563.     cat >> confdefs.h <<\EOF
  9564. #define MMAP_MISSES_WRITES 1
  9565. EOF
  9566.  
  9567. fi
  9568.  
  9569.  
  9570. if test $ac_cv_prog_gcc = yes; then
  9571.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  9572. echo "configure:9573: checking whether ${CC-cc} needs -traditional" >&5
  9573. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  9574.   echo $ac_n "(cached) $ac_c" 1>&6
  9575. else
  9576.     ac_pattern="Autoconf.*'x'"
  9577.   cat > conftest.$ac_ext <<EOF
  9578. #line 9579 "configure"
  9579. #include "confdefs.h"
  9580. #include <sgtty.h>
  9581. Autoconf TIOCGETP
  9582. EOF
  9583. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  9584.   egrep "$ac_pattern" >/dev/null 2>&1; then
  9585.   rm -rf conftest*
  9586.   ac_cv_prog_gcc_traditional=yes
  9587. else
  9588.   rm -rf conftest*
  9589.   ac_cv_prog_gcc_traditional=no
  9590. fi
  9591. rm -f conftest*
  9592.  
  9593.  
  9594.   if test $ac_cv_prog_gcc_traditional = no; then
  9595.     cat > conftest.$ac_ext <<EOF
  9596. #line 9597 "configure"
  9597. #include "confdefs.h"
  9598. #include <termio.h>
  9599. Autoconf TCGETA
  9600. EOF
  9601. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  9602.   egrep "$ac_pattern" >/dev/null 2>&1; then
  9603.   rm -rf conftest*
  9604.   ac_cv_prog_gcc_traditional=yes
  9605. fi
  9606. rm -f conftest*
  9607.  
  9608.   fi
  9609. fi
  9610.  
  9611. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  9612.   if test $ac_cv_prog_gcc_traditional = yes; then
  9613.     CC="$CC -traditional"
  9614.   fi
  9615. fi
  9616.  
  9617. echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
  9618. echo "configure:9619: checking for 8-bit clean memcmp" >&5
  9619. if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
  9620.   echo $ac_n "(cached) $ac_c" 1>&6
  9621. else
  9622.   if test "$cross_compiling" = yes; then
  9623.   ac_cv_func_memcmp_clean=no
  9624. else
  9625.   cat > conftest.$ac_ext <<EOF
  9626. #line 9627 "configure"
  9627. #include "confdefs.h"
  9628.  
  9629. main()
  9630. {
  9631.   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  9632.   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
  9633. }
  9634.  
  9635. EOF
  9636. if { (eval echo configure:9637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  9637. then
  9638.   ac_cv_func_memcmp_clean=yes
  9639. else
  9640.   echo "configure: failed program was:" >&5
  9641.   cat conftest.$ac_ext >&5
  9642.   rm -fr conftest*
  9643.   ac_cv_func_memcmp_clean=no
  9644. fi
  9645. rm -fr conftest*
  9646. fi
  9647.  
  9648. fi
  9649.  
  9650. echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
  9651. test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
  9652.  
  9653. for ac_func in random qsort strerror lchown fchmod snprintf localtime_r statvfs memmove usleep rint
  9654. do
  9655. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  9656. echo "configure:9657: checking for $ac_func" >&5
  9657. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  9658.   echo $ac_n "(cached) $ac_c" 1>&6
  9659. else
  9660.   cat > conftest.$ac_ext <<EOF
  9661. #line 9662 "configure"
  9662. #include "confdefs.h"
  9663. /* System header to define __stub macros and hopefully few prototypes,
  9664.     which can conflict with char $ac_func(); below.  */
  9665. #include <assert.h>
  9666. /* Override any gcc2 internal prototype to avoid an error.  */
  9667. /* We use char because int might match the return type of a gcc2
  9668.     builtin and then its argument prototype would still apply.  */
  9669. char $ac_func();
  9670.  
  9671. int main() {
  9672.  
  9673. /* The GNU C library defines this for functions which it implements
  9674.     to always fail with ENOSYS.  Some functions are actually named
  9675.     something starting with __ and the normal name is an alias.  */
  9676. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  9677. choke me
  9678. #else
  9679. $ac_func();
  9680. #endif
  9681.  
  9682. ; return 0; }
  9683. EOF
  9684. if { (eval echo configure:9685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9685.   rm -rf conftest*
  9686.   eval "ac_cv_func_$ac_func=yes"
  9687. else
  9688.   echo "configure: failed program was:" >&5
  9689.   cat conftest.$ac_ext >&5
  9690.   rm -rf conftest*
  9691.   eval "ac_cv_func_$ac_func=no"
  9692. fi
  9693. rm -f conftest*
  9694. fi
  9695.  
  9696. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  9697.   echo "$ac_t""yes" 1>&6
  9698.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  9699.   cat >> confdefs.h <<EOF
  9700. #define $ac_tr_func 1
  9701. EOF
  9702.  
  9703. else
  9704.   echo "$ac_t""no" 1>&6
  9705. fi
  9706. done
  9707.  
  9708. for ac_func in nl_langinfo
  9709. do
  9710. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  9711. echo "configure:9712: checking for $ac_func" >&5
  9712. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  9713.   echo $ac_n "(cached) $ac_c" 1>&6
  9714. else
  9715.   cat > conftest.$ac_ext <<EOF
  9716. #line 9717 "configure"
  9717. #include "confdefs.h"
  9718. /* System header to define __stub macros and hopefully few prototypes,
  9719.     which can conflict with char $ac_func(); below.  */
  9720. #include <assert.h>
  9721. /* Override any gcc2 internal prototype to avoid an error.  */
  9722. /* We use char because int might match the return type of a gcc2
  9723.     builtin and then its argument prototype would still apply.  */
  9724. char $ac_func();
  9725.  
  9726. int main() {
  9727.  
  9728. /* The GNU C library defines this for functions which it implements
  9729.     to always fail with ENOSYS.  Some functions are actually named
  9730.     something starting with __ and the normal name is an alias.  */
  9731. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  9732. choke me
  9733. #else
  9734. $ac_func();
  9735. #endif
  9736.  
  9737. ; return 0; }
  9738. EOF
  9739. if { (eval echo configure:9740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9740.   rm -rf conftest*
  9741.   eval "ac_cv_func_$ac_func=yes"
  9742. else
  9743.   echo "configure: failed program was:" >&5
  9744.   cat conftest.$ac_ext >&5
  9745.   rm -rf conftest*
  9746.   eval "ac_cv_func_$ac_func=no"
  9747. fi
  9748. rm -f conftest*
  9749. fi
  9750.  
  9751. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  9752.   echo "$ac_t""yes" 1>&6
  9753.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  9754.   cat >> confdefs.h <<EOF
  9755. #define $ac_tr_func 1
  9756. EOF
  9757.  
  9758. else
  9759.   echo "$ac_t""no" 1>&6
  9760. fi
  9761. done
  9762.  
  9763.  
  9764. ac_ext=C
  9765. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  9766. ac_cpp='$CXXCPP $CPPFLAGS'
  9767. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  9768. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  9769. cross_compiling=$ac_cv_prog_cxx_cross
  9770.  
  9771. echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6
  9772. echo "configure:9773: checking for gnu_get_libc_version()" >&5
  9773. if eval "test \"`echo '$''{'ac_cv_func_gnu_get_libc_version'+set}'`\" = set"; then
  9774.   echo $ac_n "(cached) $ac_c" 1>&6
  9775. else
  9776.   cat > conftest.$ac_ext <<EOF
  9777. #line 9778 "configure"
  9778. #include "confdefs.h"
  9779.  
  9780.         #ifdef HAVE_GNU_LIBC_VERSION_H
  9781.         #include <gnu/libc-version.h>
  9782.         #endif
  9783.         
  9784. int main() {
  9785. const char *glibc_version = gnu_get_libc_version();
  9786. ; return 0; }
  9787. EOF
  9788. if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  9789.   rm -rf conftest*
  9790.   ac_cv_func_gnu_get_libc_version=yes
  9791. else
  9792.   echo "configure: failed program was:" >&5
  9793.   cat conftest.$ac_ext >&5
  9794.   rm -rf conftest*
  9795.   ac_cv_func_gnu_get_libc_version=no 
  9796.         
  9797. fi
  9798. rm -f conftest*
  9799.     
  9800. fi
  9801.  
  9802. echo "$ac_t""$ac_cv_func_gnu_get_libc_version" 1>&6
  9803.  
  9804. if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then
  9805.     cat >> confdefs.h <<\EOF
  9806. #define HAVE_GNU_GET_LIBC_VERSION 1
  9807. EOF
  9808.  
  9809. fi
  9810. ac_ext=c
  9811. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  9812. ac_cpp='$CPP $CPPFLAGS'
  9813. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  9814. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  9815. cross_compiling=$ac_cv_prog_cc_cross
  9816.  
  9817.  
  9818. echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
  9819. echo "configure:9820: checking how to call gettimeofday" >&5
  9820. if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
  9821.   echo $ac_n "(cached) $ac_c" 1>&6
  9822. else
  9823.   cat > conftest.$ac_ext <<EOF
  9824. #line 9825 "configure"
  9825. #include "confdefs.h"
  9826. #include <stdlib.h>
  9827.                   #include <sys/time.h>
  9828. int main() {
  9829. struct timeval tv; struct timezone tzp;
  9830.                   gettimeofday(&tv, &tzp);
  9831. ; return 0; }
  9832. EOF
  9833. if { (eval echo configure:9834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  9834.   rm -rf conftest*
  9835.   ac_cv_gettimeofday_args=2
  9836. else
  9837.   echo "configure: failed program was:" >&5
  9838.   cat conftest.$ac_ext >&5
  9839.   rm -rf conftest*
  9840.   cat > conftest.$ac_ext <<EOF
  9841. #line 9842 "configure"
  9842. #include "confdefs.h"
  9843. #include <stdlib.h>
  9844.                                   #include <sys/time.h>
  9845. int main() {
  9846. struct timeval tv; gettimeofday(&tv);
  9847. ; return 0; }
  9848. EOF
  9849. if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  9850.   rm -rf conftest*
  9851.   ac_cv_gettimeofday_args=1
  9852. else
  9853.   echo "configure: failed program was:" >&5
  9854.   cat conftest.$ac_ext >&5
  9855.   rm -rf conftest*
  9856.   ac_cv_gettimeofday_args=0
  9857. fi
  9858. rm -f conftest*
  9859. fi
  9860. rm -f conftest*
  9861. fi
  9862.  
  9863. if test "$ac_cv_gettimeofday_args" = 1 ; then
  9864.   cat >> confdefs.h <<\EOF
  9865. #define HAVE_GETTIMEOFDAY 1
  9866. EOF
  9867.  
  9868.   echo "$ac_t""one argument" 1>&6
  9869. elif test "$ac_cv_gettimeofday_args" = 2 ; then
  9870.   cat >> confdefs.h <<\EOF
  9871. #define HAVE_GETTIMEOFDAY 1
  9872. EOF
  9873.  
  9874.   cat >> confdefs.h <<\EOF
  9875. #define GETTIMEOFDAY_TWO_ARGS 1
  9876. EOF
  9877.  
  9878.   echo "$ac_t""two arguments" 1>&6
  9879. else
  9880.   echo "$ac_t""unknown" 1>&6
  9881. fi
  9882.  
  9883.  
  9884. echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6
  9885. echo "configure:9886: checking for /dev/zero" >&5
  9886. if test "$HAVE_DEV_ZERO"; then
  9887.   cat >> confdefs.h <<\EOF
  9888. #define HAVE_DEV_ZERO 1
  9889. EOF
  9890.  
  9891.   echo "$ac_t""yes" 1>&6
  9892. else
  9893. if test -r /dev/zero && test -z "$CROSS_COMPILE"; then
  9894.   cat >> confdefs.h <<\EOF
  9895. #define HAVE_DEV_ZERO 1
  9896. EOF
  9897.  
  9898.   echo "$ac_t""yes" 1>&6
  9899. else
  9900.         echo "$ac_t""no" 1>&6
  9901.         echo $ac_n "checking for valloc""... $ac_c" 1>&6
  9902. echo "configure:9903: checking for valloc" >&5
  9903.         if eval "test \"`echo '$''{'ac_cv_valloc'+set}'`\" = set"; then
  9904.   echo $ac_n "(cached) $ac_c" 1>&6
  9905. else
  9906.   cat > conftest.$ac_ext <<EOF
  9907. #line 9908 "configure"
  9908. #include "confdefs.h"
  9909. #include <stdlib.h>
  9910. int main() {
  9911. void *ptr = valloc(1);
  9912. ; return 0; }
  9913. EOF
  9914. if { (eval echo configure:9915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  9915.   rm -rf conftest*
  9916.   ac_cv_valloc=true
  9917. else
  9918.   echo "configure: failed program was:" >&5
  9919.   cat conftest.$ac_ext >&5
  9920.   rm -rf conftest*
  9921.   ac_cv_valloc=false
  9922. fi
  9923. rm -f conftest*
  9924. fi
  9925.  
  9926.  
  9927.     if test "$ac_cv_valloc" = true ; then
  9928.       cat >> confdefs.h <<\EOF
  9929. #define HAVE_VALLOC 1
  9930. EOF
  9931.  
  9932.       echo "$ac_t""yes" 1>&6
  9933.     else
  9934.       echo "$ac_t""no" 1>&6
  9935.     fi
  9936. fi
  9937. fi
  9938.  
  9939. echo $ac_n "checking whether va_list assignments need array notation""... $ac_c" 1>&6
  9940. echo "configure:9941: checking whether va_list assignments need array notation" >&5
  9941. if eval "test \"`echo '$''{'ac_cv_valistisarray'+set}'`\" = set"; then
  9942.   echo $ac_n "(cached) $ac_c" 1>&6
  9943. else
  9944.   if test "$cross_compiling" = yes; then
  9945.   ac_cv_valistisarray=false
  9946. else
  9947.   cat > conftest.$ac_ext <<EOF
  9948. #line 9949 "configure"
  9949. #include "confdefs.h"
  9950. #include <stdlib.h>
  9951.              #include <stdarg.h>
  9952.              void foo(int i, ...) {
  9953.             va_list ap1, ap2;
  9954.             va_start(ap1, i);
  9955.             ap2 = ap1;
  9956.             if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); }
  9957.             va_end(ap1); va_end(ap2);
  9958.              }
  9959.              int main() { foo(0, 123); return(0); }
  9960. EOF
  9961. if { (eval echo configure:9962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  9962. then
  9963.   ac_cv_valistisarray=false
  9964. else
  9965.   echo "configure: failed program was:" >&5
  9966.   cat conftest.$ac_ext >&5
  9967.   rm -fr conftest*
  9968.   ac_cv_valistisarray=true
  9969. fi
  9970. rm -fr conftest*
  9971. fi
  9972.  
  9973. fi
  9974.  
  9975.  
  9976. if test "$ac_cv_valistisarray" = true ; then
  9977.     cat >> confdefs.h <<\EOF
  9978. #define HAVE_VA_LIST_AS_ARRAY 1
  9979. EOF
  9980.  
  9981.     echo "$ac_t""yes" 1>&6
  9982. else
  9983.     echo "$ac_t""no" 1>&6
  9984. fi
  9985.  
  9986. case "$target" in
  9987.     *-linux*)
  9988.                 curdir=`pwd`
  9989.         rm -f conftest* /tmp/conftest*
  9990.         cat >> conftest.C <<\EOF
  9991. #include <stdio.h>
  9992. #include <link.h>
  9993. #include <dlfcn.h>
  9994. #ifdef _dl_loaded
  9995. void __dump_link_map(void) {
  9996.   struct link_map *map = _dl_loaded;
  9997.   while (NULL != map) {printf("0x%08x %s\n", map->l_addr, map->l_name); map = map->l_next;}
  9998. }
  9999. int main() {
  10000.   dlopen("./conftest1.so",RTLD_LAZY);
  10001.   dlopen("./../tmp/conftest1.so",RTLD_LAZY);
  10002.   dlopen("/tmp/conftest1.so",RTLD_LAZY);
  10003.   dlopen("/tmp/../tmp/conftest1.so",RTLD_LAZY);
  10004.   __dump_link_map();
  10005. }
  10006. #else
  10007. /* _dl_loaded isn't defined, so this should be either a libc5 (glibc1) system, or a glibc2 system that doesn't have the multiple load bug (i.e., RH6.0).*/
  10008. int main() { printf("./conftest1.so\n"); }
  10009. #endif
  10010. EOF
  10011.  
  10012.         cat >> conftest1.C <<\EOF
  10013. #include <stdio.h>
  10014. void foo(void) {printf("foo in dll called\n");}
  10015. EOF
  10016.  
  10017.         ${CXX-g++} -fPIC -c -g conftest1.C
  10018.         ${CXX-g++} -shared -Wl,-h -Wl,conftest1.so -o conftest1.so conftest1.o
  10019.         ${CXX-g++} -g conftest.C -o conftest -ldl
  10020.         cp -f conftest1.so conftest /tmp
  10021.         cd /tmp
  10022.         if test `./conftest | grep conftest1.so | wc -l` -gt 1
  10023.         then
  10024.         echo
  10025.         echo "*** Your libc has a bug that can result in loading the same dynamic"
  10026.         echo "*** library multiple times.  This bug is known to be fixed in glibc-2.0.7-32"
  10027.         echo "*** or later.  However, if you choose not to upgrade, the only effect"
  10028.         echo "*** will be excessive memory usage at runtime."
  10029.         echo
  10030.         fi
  10031.         cd ${curdir}
  10032.         rm -f conftest* /tmp/conftest*
  10033.                 ;;
  10034. esac
  10035.  
  10036. echo $ac_n "checking for sys_errlist/sys_nerr""... $ac_c" 1>&6
  10037. echo "configure:10038: checking for sys_errlist/sys_nerr" >&5
  10038. if eval "test \"`echo '$''{'ac_cv_syserrlist'+set}'`\" = set"; then
  10039.   echo $ac_n "(cached) $ac_c" 1>&6
  10040. else
  10041.   cat > conftest.$ac_ext <<EOF
  10042. #line 10043 "configure"
  10043. #include "confdefs.h"
  10044. #include <stdio.h>
  10045.                   #include <errno.h>
  10046. int main() {
  10047. char *foo = sys_errlist[sys_nerr-1];
  10048. ; return 0; }
  10049. EOF
  10050. if { (eval echo configure:10051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10051.   rm -rf conftest*
  10052.   ac_cv_syserrlist=true
  10053. else
  10054.   echo "configure: failed program was:" >&5
  10055.   cat conftest.$ac_ext >&5
  10056.   rm -rf conftest*
  10057.   ac_cv_syserrlist=false
  10058. fi
  10059. rm -f conftest*
  10060. fi
  10061.  
  10062. if test "$ac_cv_syserrlist" = true ; then
  10063.   cat >> confdefs.h <<\EOF
  10064. #define HAVE_SYSERRLIST 1
  10065. EOF
  10066.  
  10067.   echo "$ac_t""yes" 1>&6
  10068. else
  10069.   echo "$ac_t""no" 1>&6
  10070. fi  
  10071.  
  10072. if test "$GNU_CXX"; then
  10073.  
  10074.   _MOZ_RTTI_FLAGS=${_COMPILER_PREFIX}-fno-rtti
  10075.  
  10076.   echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6
  10077. echo "configure:10078: checking for C++ exceptions flag" >&5
  10078.  
  10079.     if eval "test \"`echo '$''{'ac_cv_cxx_exceptions_flags'+set}'`\" = set"; then
  10080.   echo $ac_n "(cached) $ac_c" 1>&6
  10081. else
  10082.   echo "int main() { return 0; }" | cat > conftest.C
  10083.  
  10084.   ${CXX-g++} ${CXXFLAGS} -c -fno-handle-exceptions conftest.C > conftest.out 2>&1
  10085.  
  10086.   if egrep "warning.*renamed" conftest.out >/dev/null; then
  10087.     ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-exceptions
  10088.   else
  10089.     ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-handle-exceptions
  10090.   fi
  10091.  
  10092.   rm -f conftest*
  10093. fi
  10094.  
  10095.  
  10096.   echo "$ac_t""$ac_cv_cxx_exceptions_flags" 1>&6
  10097.   _MOZ_EXCEPTIONS_FLAGS=$ac_cv_cxx_exceptions_flags
  10098. fi
  10099.  
  10100. ac_ext=C
  10101. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10102. ac_cpp='$CXXCPP $CPPFLAGS'
  10103. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10104. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10105. cross_compiling=$ac_cv_prog_cxx_cross
  10106.  
  10107.  
  10108. echo $ac_n "checking for ios::binary""... $ac_c" 1>&6
  10109. echo "configure:10110: checking for ios::binary" >&5
  10110. if eval "test \"`echo '$''{'ac_cv_ios_binary'+set}'`\" = set"; then
  10111.   echo $ac_n "(cached) $ac_c" 1>&6
  10112. else
  10113.   cat > conftest.$ac_ext <<EOF
  10114. #line 10115 "configure"
  10115. #include "confdefs.h"
  10116. #include <iostream.h>
  10117.              #include <fstream.h>
  10118. int main() {
  10119. char *buffer = "config.log";
  10120.           fstream *mFileStream=new fstream(buffer, ios::binary);
  10121. ; return 0; }
  10122. EOF
  10123. if { (eval echo configure:10124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10124.   rm -rf conftest*
  10125.   ac_cv_ios_binary=true
  10126. else
  10127.   echo "configure: failed program was:" >&5
  10128.   cat conftest.$ac_ext >&5
  10129.   rm -rf conftest*
  10130.   ac_cv_ios_binary=false
  10131. fi
  10132. rm -f conftest*
  10133. fi
  10134.  
  10135. if test "$ac_cv_ios_binary" = true ; then
  10136.   cat >> confdefs.h <<\EOF
  10137. #define HAVE_IOS_BINARY 1
  10138. EOF
  10139.  
  10140.   echo "$ac_t""yes" 1>&6
  10141. else
  10142.   echo "$ac_t""no" 1>&6
  10143. fi  
  10144.  
  10145.  
  10146. echo $ac_n "checking for ios::bin""... $ac_c" 1>&6
  10147. echo "configure:10148: checking for ios::bin" >&5
  10148. if eval "test \"`echo '$''{'ac_cv_ios_bin'+set}'`\" = set"; then
  10149.   echo $ac_n "(cached) $ac_c" 1>&6
  10150. else
  10151.   cat > conftest.$ac_ext <<EOF
  10152. #line 10153 "configure"
  10153. #include "confdefs.h"
  10154. #include <iostream.h>
  10155.                #include <fstream.h>
  10156. int main() {
  10157. char *buffer = "config.log";
  10158.                 fstream *mFileStream=new fstream(buffer, ios::bin);
  10159. ; return 0; }
  10160. EOF
  10161. if { (eval echo configure:10162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10162.   rm -rf conftest*
  10163.   ac_cv_ios_bin=true
  10164. else
  10165.   echo "configure: failed program was:" >&5
  10166.   cat conftest.$ac_ext >&5
  10167.   rm -rf conftest*
  10168.   ac_cv_ios_bin=false
  10169. fi
  10170. rm -f conftest*
  10171. fi
  10172.  
  10173. if test "$ac_cv_ios_bin" = true ; then
  10174.   cat >> confdefs.h <<\EOF
  10175. #define HAVE_IOS_BIN 1
  10176. EOF
  10177.  
  10178.   echo "$ac_t""yes" 1>&6
  10179. else
  10180.   echo "$ac_t""no" 1>&6
  10181. fi  
  10182.  
  10183. echo $ac_n "checking for ostreams""... $ac_c" 1>&6
  10184. echo "configure:10185: checking for ostreams" >&5
  10185. if eval "test \"`echo '$''{'ac_cv_ostream'+set}'`\" = set"; then
  10186.   echo $ac_n "(cached) $ac_c" 1>&6
  10187. else
  10188.   cat > conftest.$ac_ext <<EOF
  10189. #line 10190 "configure"
  10190. #include "confdefs.h"
  10191. #include <iostream.h>
  10192. int main() {
  10193. streambuf *xxx; ostream *foo=new ostream(xxx);
  10194. ; return 0; }
  10195. EOF
  10196. if { (eval echo configure:10197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10197.   rm -rf conftest*
  10198.   ac_cv_ostream=true
  10199. else
  10200.   echo "configure: failed program was:" >&5
  10201.   cat conftest.$ac_ext >&5
  10202.   rm -rf conftest*
  10203.   ac_cv_ostream=false
  10204. fi
  10205. rm -f conftest*
  10206. fi
  10207.  
  10208. if test "$ac_cv_ostream" = true ; then
  10209.   cat >> confdefs.h <<\EOF
  10210. #define HAVE_OSTREAM 1
  10211. EOF
  10212.  
  10213.   echo "$ac_t""yes" 1>&6
  10214. else
  10215.   echo "$ac_t""no" 1>&6
  10216.   _SAVE_LIBS=$LIBS
  10217.   LIBS="$LIBS -lstdc++"
  10218.   if test "$target_os" = "os2_emx"; then
  10219.     LIBS='-lemxio -lsocket -lstdcpp'
  10220.   fi
  10221.   echo $ac_n "checking for ostreams in -lstdc++""... $ac_c" 1>&6
  10222. echo "configure:10223: checking for ostreams in -lstdc++" >&5
  10223.   if eval "test \"`echo '$''{'ac_cv_lib_stdcpp_ostream'+set}'`\" = set"; then
  10224.   echo $ac_n "(cached) $ac_c" 1>&6
  10225. else
  10226.   cat > conftest.$ac_ext <<EOF
  10227. #line 10228 "configure"
  10228. #include "confdefs.h"
  10229. #include <iostream.h>
  10230. int main() {
  10231. ostream *foo=new ostream();
  10232. ; return 0; }
  10233. EOF
  10234. if { (eval echo configure:10235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10235.   rm -rf conftest*
  10236.   ac_cv_lib_stdcpp_ostream=true
  10237. else
  10238.   echo "configure: failed program was:" >&5
  10239.   cat conftest.$ac_ext >&5
  10240.   rm -rf conftest*
  10241.   ac_cv_lib_stdcpp_ostream=false
  10242. fi
  10243. rm -f conftest*
  10244. fi
  10245.  
  10246.   if test "$ac_cv_lib_stdcpp_ostream" = true ; then
  10247.     cat >> confdefs.h <<\EOF
  10248. #define HAVE_OSTREAM 1
  10249. EOF
  10250.  
  10251.     echo "$ac_t""yes" 1>&6
  10252.   else
  10253.     echo "$ac_t""no" 1>&6
  10254.     LIBS=$_SAVE_LIBS
  10255.   fi
  10256. fi
  10257.  
  10258. echo $ac_n "checking for C++ \"bool\" keyword""... $ac_c" 1>&6
  10259. echo "configure:10260: checking for C++ \"bool\" keyword" >&5
  10260. if eval "test \"`echo '$''{'ac_cv_cpp_bool'+set}'`\" = set"; then
  10261.   echo $ac_n "(cached) $ac_c" 1>&6
  10262. else
  10263.   cat > conftest.$ac_ext <<EOF
  10264. #line 10265 "configure"
  10265. #include "confdefs.h"
  10266. bool b;
  10267. int main() {
  10268. b = true;
  10269. ; return 0; }
  10270. EOF
  10271. if { (eval echo configure:10272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10272.   rm -rf conftest*
  10273.   ac_cv_cpp_bool=yes
  10274. else
  10275.   echo "configure: failed program was:" >&5
  10276.   cat conftest.$ac_ext >&5
  10277.   rm -rf conftest*
  10278.   ac_cv_cpp_bool=no
  10279. fi
  10280. rm -f conftest*
  10281. fi
  10282.  
  10283. echo "$ac_t""$ac_cv_cpp_bool" 1>&6
  10284. if test "$ac_cv_cpp_bool" = no ; then
  10285.    cat >> confdefs.h <<\EOF
  10286. #define NEEDS_bool 1
  10287. EOF
  10288.  
  10289. fi
  10290.  
  10291.  
  10292. echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6
  10293. echo "configure:10294: checking for C++ \"explicit\" keyword" >&5
  10294. if eval "test \"`echo '$''{'ac_cv_cpp_explicit'+set}'`\" = set"; then
  10295.   echo $ac_n "(cached) $ac_c" 1>&6
  10296. else
  10297.   cat > conftest.$ac_ext <<EOF
  10298. #line 10299 "configure"
  10299. #include "confdefs.h"
  10300. class X {
  10301.                                public: explicit X(int i) : i_(i) {}
  10302.                                private: int i_;
  10303.                                };
  10304. int main() {
  10305. X x(3);
  10306. ; return 0; }
  10307. EOF
  10308. if { (eval echo configure:10309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10309.   rm -rf conftest*
  10310.   ac_cv_cpp_explicit=yes
  10311. else
  10312.   echo "configure: failed program was:" >&5
  10313.   cat conftest.$ac_ext >&5
  10314.   rm -rf conftest*
  10315.   ac_cv_cpp_explicit=no
  10316. fi
  10317. rm -f conftest*
  10318. fi
  10319.  
  10320. echo "$ac_t""$ac_cv_cpp_explicit" 1>&6
  10321. if test "$ac_cv_cpp_explicit" = yes ; then
  10322.    cat >> confdefs.h <<\EOF
  10323. #define HAVE_CPP_EXPLICIT 1
  10324. EOF
  10325.  
  10326. fi
  10327.  
  10328. echo $ac_n "checking for C++ template specialization support""... $ac_c" 1>&6
  10329. echo "configure:10330: checking for C++ template specialization support" >&5
  10330. if eval "test \"`echo '$''{'ac_cv_cpp_template_specialization'+set}'`\" = set"; then
  10331.   echo $ac_n "(cached) $ac_c" 1>&6
  10332. else
  10333.   cat > conftest.$ac_ext <<EOF
  10334. #line 10335 "configure"
  10335. #include "confdefs.h"
  10336. template <class T> struct X { int a; };
  10337.                                class Y {};
  10338.                                struct X<Y> { double a; };
  10339. int main() {
  10340. X<int> int_x;
  10341.                                X<Y> y_x;
  10342. ; return 0; }
  10343. EOF
  10344. if { (eval echo configure:10345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10345.   rm -rf conftest*
  10346.   ac_cv_cpp_template_specialization=yes
  10347. else
  10348.   echo "configure: failed program was:" >&5
  10349.   cat conftest.$ac_ext >&5
  10350.   rm -rf conftest*
  10351.   ac_cv_cpp_template_specialization=no
  10352. fi
  10353. rm -f conftest*
  10354. fi
  10355.  
  10356. echo "$ac_t""$ac_cv_cpp_template_specialization" 1>&6
  10357. case "$target" in
  10358.   *-*-solaris*)
  10359.     if test ! "$GNU_CC"; then
  10360.        if test ! -z "`${CC} -V 2>&1 | head -1 | grep '4.2'`"; then
  10361.              ac_cv_cpp_template_specialization=no
  10362.        fi
  10363.     fi
  10364.     ;;
  10365. esac
  10366. if test "$ac_cv_cpp_template_specialization" = yes ; then
  10367.   cat >> confdefs.h <<\EOF
  10368. #define HAVE_CPP_SPECIALIZATION 1
  10369. EOF
  10370.  
  10371. fi
  10372.  
  10373. echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6
  10374. echo "configure:10375: checking for modern C++ template specialization syntax support" >&5
  10375. if eval "test \"`echo '$''{'ac_cv_cpp_modern_specialize_template_syntax'+set}'`\" = set"; then
  10376.   echo $ac_n "(cached) $ac_c" 1>&6
  10377. else
  10378.   cat > conftest.$ac_ext <<EOF
  10379. #line 10380 "configure"
  10380. #include "confdefs.h"
  10381. template <class T> struct X { int a; };
  10382.                                class Y {};
  10383.                                template <> struct X<Y> { double a; };
  10384. int main() {
  10385. X<int> int_x;
  10386.                                X<Y> y_x;
  10387. ; return 0; }
  10388. EOF
  10389. if { (eval echo configure:10390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10390.   rm -rf conftest*
  10391.   ac_cv_cpp_modern_specialize_template_syntax=yes
  10392. else
  10393.   echo "configure: failed program was:" >&5
  10394.   cat conftest.$ac_ext >&5
  10395.   rm -rf conftest*
  10396.   ac_cv_cpp_modern_specialize_template_syntax=no
  10397. fi
  10398. rm -f conftest*
  10399. fi
  10400.  
  10401. echo "$ac_t""$ac_cv_cpp_modern_specialize_template_syntax" 1>&6
  10402. if test "$ac_cv_cpp_modern_specialize_template_syntax" = yes ; then
  10403.   cat >> confdefs.h <<\EOF
  10404. #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1
  10405. EOF
  10406.  
  10407. fi
  10408.  
  10409.  
  10410. echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6
  10411. echo "configure:10412: checking whether partial template specialization works" >&5
  10412. if eval "test \"`echo '$''{'ac_cv_cpp_partial_specialization'+set}'`\" = set"; then
  10413.   echo $ac_n "(cached) $ac_c" 1>&6
  10414. else
  10415.   cat > conftest.$ac_ext <<EOF
  10416. #line 10417 "configure"
  10417. #include "confdefs.h"
  10418. template <class T> class Foo {};
  10419.                                template <class T> class Foo<T*> {};
  10420. int main() {
  10421. return 0;
  10422. ; return 0; }
  10423. EOF
  10424. if { (eval echo configure:10425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10425.   rm -rf conftest*
  10426.   ac_cv_cpp_partial_specialization=yes
  10427. else
  10428.   echo "configure: failed program was:" >&5
  10429.   cat conftest.$ac_ext >&5
  10430.   rm -rf conftest*
  10431.   ac_cv_cpp_partial_specialization=no
  10432. fi
  10433. rm -f conftest*
  10434. fi
  10435.  
  10436. echo "$ac_t""$ac_cv_cpp_partial_specialization" 1>&6
  10437. if test "$ac_cv_cpp_partial_specialization" = yes ; then
  10438.   cat >> confdefs.h <<\EOF
  10439. #define HAVE_CPP_PARTIAL_SPECIALIZATION 1
  10440. EOF
  10441.  
  10442. fi
  10443.  
  10444.  
  10445. echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6
  10446. echo "configure:10447: checking whether operators must be re-defined for templates derived from templates" >&5
  10447. if eval "test \"`echo '$''{'ac_cv_need_derived_template_operators'+set}'`\" = set"; then
  10448.   echo $ac_n "(cached) $ac_c" 1>&6
  10449. else
  10450.   cat > conftest.$ac_ext <<EOF
  10451. #line 10452 "configure"
  10452. #include "confdefs.h"
  10453. template <class T> class Base { };
  10454.                                 template <class T>
  10455.                                 Base<T> operator+(const Base<T>& lhs, const Base<T>& rhs) { return lhs; }
  10456.                                 template <class T> class Derived : public Base<T> { };
  10457. int main() {
  10458. Derived<char> a, b;
  10459.                                 Base<char> c = a + b;
  10460.                                 return 0;
  10461. ; return 0; }
  10462. EOF
  10463. if { (eval echo configure:10464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10464.   rm -rf conftest*
  10465.   ac_cv_need_derived_template_operators=no
  10466. else
  10467.   echo "configure: failed program was:" >&5
  10468.   cat conftest.$ac_ext >&5
  10469.   rm -rf conftest*
  10470.   ac_cv_need_derived_template_operators=yes
  10471. fi
  10472. rm -f conftest*
  10473. fi
  10474.  
  10475. echo "$ac_t""$ac_cv_need_derived_template_operators" 1>&6
  10476. if test "$ac_cv_need_derived_template_operators" = yes ; then
  10477.   cat >> confdefs.h <<\EOF
  10478. #define NEED_CPP_DERIVED_TEMPLATE_OPERATORS 1
  10479. EOF
  10480.  
  10481. fi
  10482.  
  10483.  
  10484. echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6
  10485. echo "configure:10486: checking whether we need to cast a derived template to pass as its base class" >&5
  10486. if eval "test \"`echo '$''{'ac_cv_need_cpp_template_cast_to_base'+set}'`\" = set"; then
  10487.   echo $ac_n "(cached) $ac_c" 1>&6
  10488. else
  10489.   cat > conftest.$ac_ext <<EOF
  10490. #line 10491 "configure"
  10491. #include "confdefs.h"
  10492. template <class T> class Base { };
  10493.                                 template <class T> class Derived : public Base<T> { };
  10494.                                 template <class T> int foo(const Base<T>&) { return 0; }
  10495. int main() {
  10496. Derived<char> bar; return foo(bar);
  10497. ; return 0; }
  10498. EOF
  10499. if { (eval echo configure:10500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10500.   rm -rf conftest*
  10501.   ac_cv_need_cpp_template_cast_to_base=no
  10502. else
  10503.   echo "configure: failed program was:" >&5
  10504.   cat conftest.$ac_ext >&5
  10505.   rm -rf conftest*
  10506.   ac_cv_need_cpp_template_cast_to_base=yes
  10507. fi
  10508. rm -f conftest*
  10509. fi
  10510.  
  10511. echo "$ac_t""$ac_cv_need_cpp_template_cast_to_base" 1>&6
  10512. if test "$ac_cv_need_cpp_template_cast_to_base" = yes ; then
  10513.   cat >> confdefs.h <<\EOF
  10514. #define NEED_CPP_TEMPLATE_CAST_TO_BASE 1
  10515. EOF
  10516.  
  10517. fi
  10518.  
  10519. echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6
  10520. echo "configure:10521: checking whether the compiler can resolve const ambiguities for templates" >&5
  10521. if eval "test \"`echo '$''{'ac_cv_can_resolve_const_ambiguity'+set}'`\" = set"; then
  10522.   echo $ac_n "(cached) $ac_c" 1>&6
  10523. else
  10524.   cat > conftest.$ac_ext <<EOF
  10525. #line 10526 "configure"
  10526. #include "confdefs.h"
  10527.  
  10528.                                 template <class T> class ptrClass {
  10529.                                   public: T* ptr;
  10530.                                 };
  10531.  
  10532.                                 template <class T> T* a(ptrClass<T> *arg) {
  10533.                                   return arg->ptr;
  10534.                                 }
  10535.  
  10536.                                 template <class T>
  10537.                                 const T* a(const ptrClass<T> *arg) {
  10538.                                   return arg->ptr;
  10539.                                 }
  10540.                                
  10541. int main() {
  10542.  ptrClass<int> i;
  10543.                                  a(&i); 
  10544. ; return 0; }
  10545. EOF
  10546. if { (eval echo configure:10547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10547.   rm -rf conftest*
  10548.   ac_cv_can_resolve_const_ambiguity=yes
  10549. else
  10550.   echo "configure: failed program was:" >&5
  10551.   cat conftest.$ac_ext >&5
  10552.   rm -rf conftest*
  10553.   ac_cv_can_resolve_const_ambiguity=no
  10554. fi
  10555. rm -f conftest*
  10556. fi
  10557.  
  10558. echo "$ac_t""$ac_cv_can_resolve_const_ambiguity" 1>&6
  10559. if test "$ac_cv_can_resolve_const_ambiguity" = no ; then
  10560.   cat >> confdefs.h <<\EOF
  10561. #define CANT_RESOLVE_CPP_CONST_AMBIGUITY 1
  10562. EOF
  10563.  
  10564. fi
  10565.  
  10566.  
  10567. echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6
  10568. echo "configure:10569: checking whether the C++ \"using\" keyword can change access" >&5
  10569. if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using'+set}'`\" = set"; then
  10570.   echo $ac_n "(cached) $ac_c" 1>&6
  10571. else
  10572.   cat > conftest.$ac_ext <<EOF
  10573. #line 10574 "configure"
  10574. #include "confdefs.h"
  10575. class X { public: int go(const X&) {return 3;} };
  10576.                                class Y : public X {
  10577.                                  public:  int go(int) {return 2;}
  10578.                                  private: using X::go;
  10579.                                };
  10580. int main() {
  10581. X x; Y y;
  10582. ; return 0; }
  10583. EOF
  10584. if { (eval echo configure:10585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10585.   rm -rf conftest*
  10586.   ac_cv_cpp_access_changing_using=yes
  10587. else
  10588.   echo "configure: failed program was:" >&5
  10589.   cat conftest.$ac_ext >&5
  10590.   rm -rf conftest*
  10591.   ac_cv_cpp_access_changing_using=no
  10592. fi
  10593. rm -f conftest*
  10594. fi
  10595.  
  10596. echo "$ac_t""$ac_cv_cpp_access_changing_using" 1>&6
  10597. if test "$ac_cv_cpp_access_changing_using" = yes ; then
  10598.    cat >> confdefs.h <<\EOF
  10599. #define HAVE_CPP_ACCESS_CHANGING_USING 1
  10600. EOF
  10601.  
  10602. fi
  10603.  
  10604. echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6
  10605. echo "configure:10606: checking whether the C++ \"using\" keyword resolves ambiguity" >&5
  10606. if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then
  10607.   echo $ac_n "(cached) $ac_c" 1>&6
  10608. else
  10609.   cat > conftest.$ac_ext <<EOF
  10610. #line 10611 "configure"
  10611. #include "confdefs.h"
  10612. class X { 
  10613.                                  public: int go(const X&) {return 3;}
  10614.                                          int jo(const X&) {return 3;}
  10615.                                };
  10616.                                class Y : public X {
  10617.                                  public:  int go(int) {return 2;}
  10618.                                           int jo(int) {return 2;}
  10619.                                           using X::jo;
  10620.                                  private: using X::go;
  10621.                                };
  10622. int main() {
  10623. X x; Y y; y.jo(x);
  10624. ; return 0; }
  10625. EOF
  10626. if { (eval echo configure:10627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10627.   rm -rf conftest*
  10628.   ac_cv_cpp_ambiguity_resolving_using=yes
  10629. else
  10630.   echo "configure: failed program was:" >&5
  10631.   cat conftest.$ac_ext >&5
  10632.   rm -rf conftest*
  10633.   ac_cv_cpp_ambiguity_resolving_using=no
  10634. fi
  10635. rm -f conftest*
  10636. fi
  10637.  
  10638. echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6
  10639. if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then
  10640.    cat >> confdefs.h <<\EOF
  10641. #define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1
  10642. EOF
  10643.  
  10644. fi
  10645.  
  10646. echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6
  10647. echo "configure:10648: checking for \"std::\" namespace" >&5
  10648. if eval "test \"`echo '$''{'ac_cv_cpp_namespace_std'+set}'`\" = set"; then
  10649.   echo $ac_n "(cached) $ac_c" 1>&6
  10650. else
  10651.   cat > conftest.$ac_ext <<EOF
  10652. #line 10653 "configure"
  10653. #include "confdefs.h"
  10654. #include <algorithm>
  10655. int main() {
  10656. return std::min(0, 1);
  10657. ; return 0; }
  10658. EOF
  10659. if { (eval echo configure:10660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10660.   rm -rf conftest*
  10661.   ac_cv_cpp_namespace_std=yes
  10662. else
  10663.   echo "configure: failed program was:" >&5
  10664.   cat conftest.$ac_ext >&5
  10665.   rm -rf conftest*
  10666.   ac_cv_cpp_namespace_std=no
  10667. fi
  10668. rm -f conftest*
  10669. fi
  10670.  
  10671. echo "$ac_t""$ac_cv_cpp_namespace_std" 1>&6
  10672. if test "$ac_cv_cpp_namespace_std" = yes ; then
  10673.    cat >> confdefs.h <<\EOF
  10674. #define HAVE_CPP_NAMESPACE_STD 1
  10675. EOF
  10676.  
  10677. fi
  10678.  
  10679. echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6
  10680. echo "configure:10681: checking whether standard template operator!=() is ambiguous" >&5
  10681. if eval "test \"`echo '$''{'ac_cv_cpp_unambiguous_std_notequal'+set}'`\" = set"; then
  10682.   echo $ac_n "(cached) $ac_c" 1>&6
  10683. else
  10684.   cat > conftest.$ac_ext <<EOF
  10685. #line 10686 "configure"
  10686. #include "confdefs.h"
  10687. #include <algorithm>
  10688.                                 struct T1 {};
  10689.                                 int operator==(const T1&, const T1&) { return 0; }
  10690.                                 int operator!=(const T1&, const T1&) { return 0; }
  10691. int main() {
  10692. T1 a,b; return a != b;
  10693. ; return 0; }
  10694. EOF
  10695. if { (eval echo configure:10696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10696.   rm -rf conftest*
  10697.   ac_cv_cpp_unambiguous_std_notequal=unambiguous
  10698. else
  10699.   echo "configure: failed program was:" >&5
  10700.   cat conftest.$ac_ext >&5
  10701.   rm -rf conftest*
  10702.   ac_cv_cpp_unambiguous_std_notequal=ambiguous
  10703. fi
  10704. rm -f conftest*
  10705. fi
  10706.  
  10707. echo "$ac_t""$ac_cv_cpp_unambiguous_std_notequal" 1>&6
  10708. if test "$ac_cv_cpp_unambiguous_std_notequal" = unambiguous ; then
  10709.   cat >> confdefs.h <<\EOF
  10710. #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1
  10711. EOF
  10712.  
  10713. fi
  10714.  
  10715.  
  10716. echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6
  10717. echo "configure:10718: checking for C++ reinterpret_cast" >&5
  10718. if eval "test \"`echo '$''{'ac_cv_cpp_reinterpret_cast'+set}'`\" = set"; then
  10719.   echo $ac_n "(cached) $ac_c" 1>&6
  10720. else
  10721.   cat > conftest.$ac_ext <<EOF
  10722. #line 10723 "configure"
  10723. #include "confdefs.h"
  10724. struct X { int i; };
  10725.                                struct Y { int i; };
  10726. int main() {
  10727. X x; X*const z = &x;Y*y = reinterpret_cast<Y*>(z);
  10728. ; return 0; }
  10729. EOF
  10730. if { (eval echo configure:10731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10731.   rm -rf conftest*
  10732.   ac_cv_cpp_reinterpret_cast=yes
  10733. else
  10734.   echo "configure: failed program was:" >&5
  10735.   cat conftest.$ac_ext >&5
  10736.   rm -rf conftest*
  10737.   ac_cv_cpp_reinterpret_cast=no
  10738. fi
  10739. rm -f conftest*
  10740. fi
  10741.  
  10742. echo "$ac_t""$ac_cv_cpp_reinterpret_cast" 1>&6
  10743. if test "$ac_cv_cpp_reinterpret_cast" = yes ; then
  10744.    cat >> confdefs.h <<\EOF
  10745. #define HAVE_CPP_NEW_CASTS 1
  10746. EOF
  10747.  
  10748. fi
  10749.  
  10750. echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6
  10751. echo "configure:10752: checking for C++ dynamic_cast to void*" >&5
  10752. if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then
  10753.   echo $ac_n "(cached) $ac_c" 1>&6
  10754. else
  10755.   if test "$cross_compiling" = yes; then
  10756.   ac_cv_cpp_dynamic_cast_void_ptr=no
  10757. else
  10758.   cat > conftest.$ac_ext <<EOF
  10759. #line 10760 "configure"
  10760. #include "confdefs.h"
  10761. #ifdef __cplusplus
  10762. extern "C" void exit(int);
  10763. #endif
  10764. class X { int i; public: virtual ~X() { } };
  10765.                             class Y { int j; public: virtual ~Y() { } };
  10766.                             class Z : public X, public Y { int k; };
  10767.  
  10768.                             int main() {
  10769.                                  Z mdo;
  10770.                                  X *subx = (X*)&mdo;
  10771.                                  Y *suby = (Y*)&mdo;
  10772.                                  return !((((void*)&mdo != (void*)subx) &&
  10773.                                            ((void*)&mdo == dynamic_cast<void*>(subx))) ||
  10774.                                           (((void*)&mdo != (void*)suby) &&
  10775.                                            ((void*)&mdo == dynamic_cast<void*>(suby))));
  10776.                             }
  10777. EOF
  10778. if { (eval echo configure:10779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  10779. then
  10780.   ac_cv_cpp_dynamic_cast_void_ptr=yes
  10781. else
  10782.   echo "configure: failed program was:" >&5
  10783.   cat conftest.$ac_ext >&5
  10784.   rm -fr conftest*
  10785.   ac_cv_cpp_dynamic_cast_void_ptr=no
  10786. fi
  10787. rm -fr conftest*
  10788. fi
  10789.  
  10790. fi
  10791.  
  10792. echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6
  10793. if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
  10794.    cat >> confdefs.h <<\EOF
  10795. #define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1
  10796. EOF
  10797.  
  10798. fi
  10799.  
  10800.  
  10801. echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6
  10802. echo "configure:10803: checking whether C++ requires implementation of unused virtual methods" >&5
  10803. if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+set}'`\" = set"; then
  10804.   echo $ac_n "(cached) $ac_c" 1>&6
  10805. else
  10806.   cat > conftest.$ac_ext <<EOF
  10807. #line 10808 "configure"
  10808. #include "confdefs.h"
  10809. class X {private: virtual void never_called();};
  10810. int main() {
  10811. X x;
  10812. ; return 0; }
  10813. EOF
  10814. if { (eval echo configure:10815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  10815.   rm -rf conftest*
  10816.   ac_cv_cpp_unused_required=no
  10817. else
  10818.   echo "configure: failed program was:" >&5
  10819.   cat conftest.$ac_ext >&5
  10820.   rm -rf conftest*
  10821.   ac_cv_cpp_unused_required=yes
  10822. fi
  10823. rm -f conftest*
  10824. fi
  10825.  
  10826. echo "$ac_t""$ac_cv_cpp_unused_required" 1>&6
  10827. if test "$ac_cv_cpp_unused_required" = yes ; then
  10828.    cat >> confdefs.h <<\EOF
  10829. #define NEED_CPP_UNUSED_IMPLEMENTATIONS 1
  10830. EOF
  10831.  
  10832. fi
  10833.  
  10834.  
  10835.  
  10836. echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6
  10837. echo "configure:10838: checking for trouble comparing to zero near std::operator!=()" >&5
  10838. if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then
  10839.   echo $ac_n "(cached) $ac_c" 1>&6
  10840. else
  10841.   cat > conftest.$ac_ext <<EOF
  10842. #line 10843 "configure"
  10843. #include "confdefs.h"
  10844. #include <algorithm>
  10845.                                 template <class T> class Foo {};
  10846.                                 class T2;
  10847.                                 template <class T> int operator==(const T2*, const T&) { return 0; }
  10848.                                 template <class T> int operator!=(const T2*, const T&) { return 0; }
  10849. int main() {
  10850. Foo<int> f; return (0 != f);
  10851. ; return 0; }
  10852. EOF
  10853. if { (eval echo configure:10854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10854.   rm -rf conftest*
  10855.   ac_cv_trouble_comparing_to_zero=no
  10856. else
  10857.   echo "configure: failed program was:" >&5
  10858.   cat conftest.$ac_ext >&5
  10859.   rm -rf conftest*
  10860.   ac_cv_trouble_comparing_to_zero=yes
  10861. fi
  10862. rm -f conftest*
  10863. fi
  10864.  
  10865. echo "$ac_t""$ac_cv_trouble_comparing_to_zero" 1>&6
  10866. if test "$ac_cv_trouble_comparing_to_zero" = yes ; then
  10867.   cat >> confdefs.h <<\EOF
  10868. #define HAVE_CPP_TROUBLE_COMPARING_TO_ZERO 1
  10869. EOF
  10870.  
  10871. fi
  10872.  
  10873.  
  10874.  
  10875. ac_ext=c
  10876. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  10877. ac_cpp='$CPP $CPPFLAGS'
  10878. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  10879. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  10880. cross_compiling=$ac_cv_prog_cc_cross
  10881.  
  10882.  
  10883.  
  10884. echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
  10885. echo "configure:10886: checking for LC_MESSAGES" >&5
  10886. if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then
  10887.   echo $ac_n "(cached) $ac_c" 1>&6
  10888. else
  10889.   cat > conftest.$ac_ext <<EOF
  10890. #line 10891 "configure"
  10891. #include "confdefs.h"
  10892. #include <locale.h>
  10893. int main() {
  10894. int category = LC_MESSAGES;
  10895. ; return 0; }
  10896. EOF
  10897. if { (eval echo configure:10898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  10898.   rm -rf conftest*
  10899.   ac_cv_i18n_lc_messages=yes
  10900. else
  10901.   echo "configure: failed program was:" >&5
  10902.   cat conftest.$ac_ext >&5
  10903.   rm -rf conftest*
  10904.   ac_cv_i18n_lc_messages=no
  10905. fi
  10906. rm -f conftest*
  10907. fi
  10908.  
  10909. echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6
  10910. if test "$ac_cv_i18n_lc_messages" = yes; then
  10911.    cat >> confdefs.h <<\EOF
  10912. #define HAVE_I18N_LC_MESSAGES 1
  10913. EOF
  10914.  
  10915. fi     
  10916.  
  10917.  
  10918.  
  10919. # Components and Features
  10920.  
  10921. # Check whether --enable-async-dns or --disable-async-dns was given.
  10922. if test "${enable_async_dns+set}" = set; then
  10923.   enableval="$enable_async_dns"
  10924.   if test "$enableval" = "no"; then
  10925.     NO_UNIX_ASYNC_DNS=1
  10926.   elif test "$enableval" = "yes"; then
  10927.     :
  10928.   else
  10929.     { echo "configure: error: Option, async-dns, does not take an argument ($enableval)." 1>&2; exit 1; }
  10930.   fi
  10931. fi
  10932.  
  10933.  
  10934. # Check whether --enable-logging or --disable-logging was given.
  10935. if test "${enable_logging+set}" = set; then
  10936.   enableval="$enable_logging"
  10937.   if test "$enableval" = "no"; then
  10938.     NS_DISABLE_LOGGING=1
  10939.   elif test "$enableval" = "yes"; then
  10940.     :
  10941.   else
  10942.     { echo "configure: error: Option, logging, does not take an argument ($enableval)." 1>&2; exit 1; }
  10943.   fi
  10944. fi
  10945.  
  10946. if test "$NS_DISABLE_LOGGING"; then
  10947.     cat >> confdefs.h <<\EOF
  10948. #define NS_DISABLE_LOGGING 1
  10949. EOF
  10950.  
  10951. else
  10952.     cat >> confdefs.h <<\EOF
  10953. #define MOZ_LOGGING 1
  10954. EOF
  10955.  
  10956. fi
  10957.  
  10958. MOZ_BUILD_XPFE=1
  10959. # Check whether --enable-build-xpfe or --disable-build-xpfe was given.
  10960. if test "${enable_build_xpfe+set}" = set; then
  10961.   enableval="$enable_build_xpfe"
  10962.   if test "$enableval" = "no"; then
  10963.     MOZ_BUILD_XPFE= 
  10964.   elif test "$enableval" = "yes"; then
  10965.     :
  10966.   else
  10967.     { echo "configure: error: Option, build-xpfe, does not take an argument ($enableval)." 1>&2; exit 1; }
  10968.   fi
  10969. fi
  10970.  
  10971.  
  10972. MOZ_MAIL_NEWS=1
  10973. # Check whether --enable-mailnews or --disable-mailnews was given.
  10974. if test "${enable_mailnews+set}" = set; then
  10975.   enableval="$enable_mailnews"
  10976.   if test "$enableval" = "no"; then
  10977.     MOZ_MAIL_NEWS= 
  10978.   elif test "$enableval" = "yes"; then
  10979.     :
  10980.   else
  10981.     { echo "configure: error: Option, mailnews, does not take an argument ($enableval)." 1>&2; exit 1; }
  10982.   fi
  10983. fi
  10984.  
  10985. if test "$MOZ_MAIL_NEWS"; then
  10986.   cat >> confdefs.h <<\EOF
  10987. #define MOZ_MAIL_NEWS 1
  10988. EOF
  10989.  
  10990. fi
  10991.  
  10992.  
  10993. MOZ_EDITOR_API_LOG=1
  10994. # Check whether --enable-editor-api-log or --disable-editor-api-log was given.
  10995. if test "${enable_editor_api_log+set}" = set; then
  10996.   enableval="$enable_editor_api_log"
  10997.   if test "$enableval" = "no"; then
  10998.     MOZ_EDITOR_API_LOG= 
  10999.   elif test "$enableval" = "yes"; then
  11000.     :
  11001.   else
  11002.     { echo "configure: error: Option, editor-api-log, does not take an argument ($enableval)." 1>&2; exit 1; }
  11003.   fi
  11004. fi
  11005.  
  11006. if test "$MOZ_EDITOR_API_LOG"; then
  11007.   cat >> confdefs.h <<\EOF
  11008. #define MOZ_EDITOR_API_LOG 1
  11009. EOF
  11010.  
  11011. fi
  11012.  
  11013.  
  11014. MOZ_ENDER_LITE=1
  11015. # Check whether --enable-ender-lite or --disable-ender-lite was given.
  11016. if test "${enable_ender_lite+set}" = set; then
  11017.   enableval="$enable_ender_lite"
  11018.   if test "$enableval" = "no"; then
  11019.     MOZ_ENDER_LITE= 
  11020.   elif test "$enableval" = "yes"; then
  11021.     :
  11022.   else
  11023.     { echo "configure: error: Option, ender-lite, does not take an argument ($enableval)." 1>&2; exit 1; }
  11024.   fi
  11025. fi
  11026.  
  11027. if test "$MOZ_ENDER_LITE"; then
  11028.   cat >> confdefs.h <<\EOF
  11029. #define MOZ_ENDER_LITE 1
  11030. EOF
  11031.  
  11032. fi
  11033.  
  11034.  
  11035. NS_TRACE_MALLOC=
  11036. # Check whether --enable-trace-malloc or --disable-trace-malloc was given.
  11037. if test "${enable_trace_malloc+set}" = set; then
  11038.   enableval="$enable_trace_malloc"
  11039.   if test "$enableval" = "yes"; then
  11040.     NS_TRACE_MALLOC=1 
  11041.   elif test "$enableval" = "no"; then
  11042.     :
  11043.   else
  11044.     { echo "configure: error: Option, trace-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
  11045.   fi
  11046. fi
  11047.  
  11048. if test "$NS_TRACE_MALLOC"; then
  11049.   cat >> confdefs.h <<\EOF
  11050. #define NS_TRACE_MALLOC 1
  11051. EOF
  11052.  
  11053. fi
  11054.  
  11055.  
  11056. MOZ_REFLOW_PERF=
  11057. # Check whether --enable-reflow-perf or --disable-reflow-perf was given.
  11058. if test "${enable_reflow_perf+set}" = set; then
  11059.   enableval="$enable_reflow_perf"
  11060.   if test "$enableval" = "yes"; then
  11061.     MOZ_REFLOW_PERF=1 
  11062.   elif test "$enableval" = "no"; then
  11063.     :
  11064.   else
  11065.     { echo "configure: error: Option, reflow-perf, does not take an argument ($enableval)." 1>&2; exit 1; }
  11066.   fi
  11067. fi
  11068.  
  11069. if test "$MOZ_REFLOW_PERF"; then
  11070.   cat >> confdefs.h <<\EOF
  11071. #define MOZ_REFLOW_PERF 1
  11072. EOF
  11073.  
  11074. fi
  11075.  
  11076.  
  11077. NS_MT_SUPPORTED=1
  11078. cat >> confdefs.h <<\EOF
  11079. #define NS_MT_SUPPORTED 1
  11080. EOF
  11081.  
  11082.  
  11083. ENABLE_TESTS=1
  11084. # Check whether --enable-tests or --disable-tests was given.
  11085. if test "${enable_tests+set}" = set; then
  11086.   enableval="$enable_tests"
  11087.   if test "$enableval" = "no"; then
  11088.     ENABLE_TESTS= 
  11089.   elif test "$enableval" = "yes"; then
  11090.     :
  11091.   else
  11092.     { echo "configure: error: Option, tests, does not take an argument ($enableval)." 1>&2; exit 1; }
  11093.   fi
  11094. fi
  11095.  
  11096.  
  11097. IBMBIDI=1
  11098. # Check whether --enable-bidi or --disable-bidi was given.
  11099. if test "${enable_bidi+set}" = set; then
  11100.   enableval="$enable_bidi"
  11101.   if test "$enableval" = "no"; then
  11102.     IBMBIDI= 
  11103.   elif test "$enableval" = "yes"; then
  11104.     :
  11105.   else
  11106.     { echo "configure: error: Option, bidi, does not take an argument ($enableval)." 1>&2; exit 1; }
  11107.   fi
  11108. fi
  11109.  
  11110. if test "$IBMBIDI"; then
  11111.   cat >> confdefs.h <<\EOF
  11112. #define IBMBIDI 1
  11113. EOF
  11114.  
  11115. fi
  11116.  
  11117.  
  11118. MOZ_MONOLITHIC_TOOLKIT=1
  11119.  
  11120. case "$target" in
  11121.     *-*-linux*)   MOZ_MONOLITHIC_TOOLKIT= ;;
  11122.     *-*-solaris*) MOZ_MONOLITHIC_TOOLKIT= ;;
  11123.     *-openvms*)   MOZ_MONOLITHIC_TOOLKIT= ;;
  11124.     *-bsdi*)      MOZ_MONOLITHIC_TOOLKIT= ;;
  11125.     *-freebsd*)   MOZ_MONOLITHIC_TOOLKIT= ;;
  11126.     *-netbsd*)    MOZ_MONOLITHIC_TOOLKIT= ;;
  11127.     *-openbsd*)   MOZ_MONOLITHIC_TOOLKIT= ;;
  11128.     *-*-aix*)     MOZ_MONOLITHIC_TOOLKIT= ;;
  11129.     *-*-osf*)     MOZ_MONOLITHIC_TOOLKIT= ;;
  11130.     *-hpux*)      MOZ_MONOLITHIC_TOOLKIT= ;;
  11131.     *-irix*)      MOZ_MONOLITHIC_TOOLKIT= ;;
  11132.     *-nto*)       MOZ_MONOLITHIC_TOOLKIT= ;;
  11133. esac
  11134.  
  11135.  
  11136. # Check whether --enable-monolithic-toolkit or --disable-monolithic-toolkit was given.
  11137. if test "${enable_monolithic_toolkit+set}" = set; then
  11138.   enableval="$enable_monolithic_toolkit"
  11139.   if test "$enableval" = "yes"; then
  11140.     MOZ_MONOLITHIC_TOOLKIT=1
  11141.   elif test "$enableval" = "no"; then
  11142.     :
  11143.   else
  11144.     { echo "configure: error: Option, monolithic-toolkit, does not take an argument ($enableval)." 1>&2; exit 1; }
  11145.   fi
  11146. fi
  11147.  
  11148.  
  11149.  
  11150. if test "$MOZ_MONOLITHIC_TOOLKIT"
  11151. then
  11152.   cat >> confdefs.h <<\EOF
  11153. #define MOZ_MONOLITHIC_TOOLKIT 1
  11154. EOF
  11155.  
  11156. fi
  11157.  
  11158. BUILD_MODULES=all
  11159. # Check whether --enable-modules or --disable-modules was given.
  11160. if test "${enable_modules+set}" = set; then
  11161.   enableval="$enable_modules"
  11162.    BUILD_MODULES=`echo $enableval | sed 's/,/ /g'`  
  11163. fi
  11164.  
  11165.  
  11166.  
  11167. ENABLE_PIC_DSO_CFLAGS=1
  11168.  
  11169. # Check whether --enable-pic-dso-cflags or --disable-pic-dso-cflags was given.
  11170. if test "${enable_pic_dso_cflags+set}" = set; then
  11171.   enableval="$enable_pic_dso_cflags"
  11172.   if test "$enableval" = "no"; then
  11173.     ENABLE_PIC_DSO_CFLAGS= 
  11174.   elif test "$enableval" = "yes"; then
  11175.     :
  11176.   else
  11177.     { echo "configure: error: Option, pic-dso-cflags, does not take an argument ($enableval)." 1>&2; exit 1; }
  11178.   fi
  11179. fi
  11180.  
  11181.  
  11182. if test ! "$ENABLE_PIC_DSO_CFLAGS"
  11183. then
  11184.   DSO_PIC_CFLAGS=""
  11185. fi
  11186.  
  11187. # Compiler Options
  11188.  
  11189. # Check whether --enable-crash-on-assert or --disable-crash-on-assert was given.
  11190. if test "${enable_crash_on_assert+set}" = set; then
  11191.   enableval="$enable_crash_on_assert"
  11192.   if test "$enableval" = "yes"; then
  11193.     cat >> confdefs.h <<\EOF
  11194. #define UNIX_CRASH_ON_ASSERT 1
  11195. EOF
  11196.  
  11197.   elif test "$enableval" = "no"; then
  11198.     :
  11199.   else
  11200.     { echo "configure: error: Option, crash-on-assert, does not take an argument ($enableval)." 1>&2; exit 1; }
  11201.   fi
  11202. fi
  11203.  
  11204.  
  11205.  
  11206. # Check whether --enable-lea or --disable-lea was given.
  11207. if test "${enable_lea+set}" = set; then
  11208.   enableval="$enable_lea"
  11209.   if test "$enableval" = "yes"; then
  11210.      XPCOM_USE_LEA=1
  11211.     cat >> confdefs.h <<\EOF
  11212. #define XPCOM_USE_LEA 1
  11213. EOF
  11214.  
  11215.   elif test "$enableval" = "no"; then
  11216.     :
  11217.   else
  11218.     { echo "configure: error: Option, lea, does not take an argument ($enableval)." 1>&2; exit 1; }
  11219.   fi
  11220. fi
  11221.  
  11222.  
  11223.  
  11224. MOZ_OPTIMIZE=
  11225.  
  11226. if test ! "$MOZ_OPTIMIZE_FLAGS"
  11227. then
  11228.     MOZ_OPTIMIZE_FLAGS="-O"
  11229. fi
  11230.  
  11231. # Check whether --enable-optimize or --disable-optimize was given.
  11232. if test "${enable_optimize+set}" = set; then
  11233.   enableval="$enable_optimize"
  11234.    if test "$enableval" != "no"; then
  11235.     MOZ_OPTIMIZE=1
  11236.     if test -n "$enableval" && test "$enableval" != "yes"; then
  11237.         MOZ_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
  11238.     fi 
  11239.     fi 
  11240. fi
  11241.  
  11242.  
  11243. if test "$MOZ_OPTIMIZE"
  11244. then
  11245.   CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS"
  11246.   CXXFLAGS="$CXXFLAGS $MOZ_OPTIMIZE_FLAGS"
  11247. fi
  11248.  
  11249. MOZ_DEBUG=1
  11250.  
  11251. if test ! "$MOZ_DEBUG_FLAGS"
  11252. then
  11253.     case "$target" in
  11254.     *-*-os2_vacpp)
  11255.         MOZ_DEBUG_FLAGS="/Ti+"
  11256.         ;;
  11257.     *-irix*)
  11258.         if test "$GNU_CC"; then
  11259.             GCC_VERSION=`$CC -v 2>&1 | awk '/version/ { print $3 }'`
  11260.             case "$GCC_VERSION" in
  11261.             2.95.*)
  11262.                 MOZ_DEBUG_FLAGS=""
  11263.                 ;;
  11264.             *)
  11265.                 MOZ_DEBUG_FLAGS="-g"
  11266.                 ;;
  11267.             esac
  11268.         else
  11269.             MOZ_DEBUG_FLAGS="-g"
  11270.         fi
  11271.         ;;
  11272.     *)
  11273.         MOZ_DEBUG_FLAGS="-g"
  11274.         ;;
  11275.     esac
  11276. fi
  11277.  
  11278. # Check whether --enable-debug or --disable-debug was given.
  11279. if test "${enable_debug+set}" = set; then
  11280.   enableval="$enable_debug"
  11281.   if test "$enableval" = "no"; then
  11282.     MOZ_DEBUG=
  11283.   elif test "$enableval" = "yes"; then
  11284.     :
  11285.   else
  11286.     { echo "configure: error: Option, debug, does not take an argument ($enableval)." 1>&2; exit 1; }
  11287.   fi
  11288. fi
  11289.  
  11290.  
  11291. MOZ_DEBUG_ENABLE_DEFS="-DDEBUG"
  11292.  case "${target_os}" in
  11293.     beos*)
  11294.       MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${USER}"
  11295.         ;;
  11296.     *) 
  11297.       MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`"
  11298.         ;;
  11299.   esac
  11300. MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DTRACING"
  11301.  
  11302. MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED"
  11303.  
  11304. if test -z "$MOZ_POST_DSO_LIB_COMMAND"; then
  11305.   MOZ_POST_DSO_LIB_COMMAND=true
  11306. fi
  11307. if test -z "$MOZ_POST_PROGRAM_COMMAND"; then
  11308.   MOZ_POST_PROGRAM_COMMAND=true
  11309. fi
  11310.  
  11311. case "$target" in
  11312. *-*-os2*)
  11313.     MOZ_POST_DSO_LIB_COMMAND='@echo'
  11314.     MOZ_POST_PROGRAM_COMMAND='@echo'
  11315.     ;;
  11316. esac
  11317.  
  11318. # Check whether --enable-strip-libs or --disable-strip-libs was given.
  11319. if test "${enable_strip_libs+set}" = set; then
  11320.   enableval="$enable_strip_libs"
  11321.   if test "$enableval" = "yes"; then
  11322.      MOZ_POST_DSO_LIB_COMMAND='$(STRIP)'
  11323.     MOZ_POST_PROGRAM_COMMAND='$(STRIP)' 
  11324.   elif test "$enableval" = "no"; then
  11325.     :
  11326.   else
  11327.     { echo "configure: error: Option, strip-libs, does not take an argument ($enableval)." 1>&2; exit 1; }
  11328.   fi
  11329. fi
  11330.  
  11331.  
  11332. MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
  11333.  
  11334. if test ! "$MOZ_DEBUG"
  11335. then
  11336.     case "$host" in
  11337.         *-linux*)
  11338.             MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
  11339.         ;;
  11340.         *-nto*) 
  11341.             MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
  11342.         ;;
  11343.     esac
  11344. fi
  11345.  
  11346. # Check whether --enable-elf-dynstr-gc or --disable-elf-dynstr-gc was given.
  11347. if test "${enable_elf_dynstr_gc+set}" = set; then
  11348.   enableval="$enable_elf_dynstr_gc"
  11349.   if test "$enableval" = "yes"; then
  11350.     USE_ELF_DYNSTR_GC=1
  11351.   elif test "$enableval" = "no"; then
  11352.     USE_ELF_DYNSTR_GC= 
  11353.   else
  11354.     { echo "configure: error: Option, elf-dynstr-gc, does not take an argument ($enableval)." 1>&2; exit 1; }
  11355.   fi
  11356. fi
  11357.  
  11358.  
  11359.  
  11360.  
  11361. # Check whether --with-default-mozilla-five-home or --without-default-mozilla-five-home was given.
  11362. if test "${with_default_mozilla_five_home+set}" = set; then
  11363.   withval="$with_default_mozilla_five_home"
  11364.    val=`echo $withval`
  11365.     cat >> confdefs.h <<EOF
  11366. #define MOZ_DEFAULT_MOZILLA_FIVE_HOME "$val"
  11367. EOF
  11368.  
  11369.     
  11370. fi
  11371.  
  11372.  
  11373.  
  11374. # Check whether --with-debug-modules or --without-debug-modules was given.
  11375. if test "${with_debug_modules+set}" = set; then
  11376.   withval="$with_debug_modules"
  11377.    MOZ_DEBUG_MODULES=`echo $withval | sed 's/,/ /g'`  
  11378. fi
  11379.  
  11380.  
  11381.  
  11382. MOZ_DBGRINFO_MODULES=""
  11383.  
  11384. # Check whether --with-dbgrinfo-modules or --without-dbgrinfo-modules was given.
  11385. if test "${with_dbgrinfo_modules+set}" = set; then
  11386.   withval="$with_dbgrinfo_modules"
  11387.    for i in `echo $withval | sed 's/,/ /g'`; do
  11388.  
  11389.                         if test "$i" = "no"; then
  11390.         i="^ALL_MODULES"
  11391.       fi
  11392.       if test "$i" = "yes"; then
  11393.         i="ALL_MODULES"
  11394.       fi
  11395.       MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES";
  11396.     done 
  11397. fi
  11398.  
  11399.  
  11400. MOZ_PSM=
  11401.  
  11402. # Check whether --enable-crypto or --disable-crypto was given.
  11403. if test "${enable_crypto+set}" = set; then
  11404.   enableval="$enable_crypto"
  11405.   if test "$enableval" = "yes"; then
  11406.     MOZ_PSM=1 
  11407.   elif test "$enableval" = "no"; then
  11408.     :
  11409.   else
  11410.     { echo "configure: error: Option, crypto, does not take an argument ($enableval)." 1>&2; exit 1; }
  11411.   fi
  11412. fi
  11413.  
  11414.  
  11415.  
  11416. MOZ_JSDEBUGGER=
  11417.  
  11418. # Check whether --enable-jsd or --disable-jsd was given.
  11419. if test "${enable_jsd+set}" = set; then
  11420.   enableval="$enable_jsd"
  11421.   if test "$enableval" = "yes"; then
  11422.     MOZ_JSDEBUGGER=1
  11423.   elif test "$enableval" = "no"; then
  11424.     :
  11425.   else
  11426.     { echo "configure: error: Option, jsd, does not take an argument ($enableval)." 1>&2; exit 1; }
  11427.   fi
  11428. fi
  11429.  
  11430.  
  11431.  
  11432. MOZ_EXTENSIONS_DEFAULT="cookie wallet xml-rpc xmlextras help transformiix"
  11433. MOZ_EXTENSIONS_ALL="$MOZ_EXTENSIONS_DEFAULT irc xmlterm inspector access-builtin venkman" 
  11434.  
  11435. # Check whether --with-extensions or --without-extensions was given.
  11436. if test "${with_extensions+set}" = set; then
  11437.   withval="$with_extensions"
  11438.    MOZ_EXTENSIONS=""
  11439.     for option in `echo $withval | sed 's/,/ /g'`; do
  11440.       if test "$option" = "yes" || test "$option" = "all"; then
  11441.         MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL"
  11442.       elif test "$option" = "no" || test "$option" = "none"; then
  11443.         MOZ_EXTENSIONS=""
  11444.       elif test "$option" = "default"; then
  11445.         MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT"
  11446.       else
  11447.         MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option"
  11448.       fi
  11449.     done 
  11450. else
  11451.    MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT"  
  11452. fi
  11453.  
  11454.  
  11455. if test -z "$MOZ_ENABLE_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then
  11456.     echo "configure: warning: Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS." 1>&2
  11457.     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'`
  11458. fi
  11459.  
  11460. if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then
  11461.     echo "configure: warning: Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS." 1>&2
  11462.     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'`
  11463. fi
  11464.  
  11465. # Check whether --enable-jar-packaging or --disable-jar-packaging was given.
  11466. if test "${enable_jar_packaging+set}" = set; then
  11467.   enableval="$enable_jar_packaging"
  11468.   if test "$enableval" = "no"; then
  11469.     MOZ_DISABLE_JAR_PACKAGING=1
  11470.  
  11471.   elif test "$enableval" = "yes"; then
  11472.     :
  11473.   else
  11474.     { echo "configure: error: Option, jar-packaging, does not take an argument ($enableval)." 1>&2; exit 1; }
  11475.   fi
  11476. fi
  11477.  
  11478.  
  11479. # Check whether --enable-chrome-format or --disable-chrome-format was given.
  11480. if test "${enable_chrome_format+set}" = set; then
  11481.   enableval="$enable_chrome_format"
  11482.   MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`
  11483. fi
  11484.  
  11485.  
  11486. if test -z "$MOZ_CHROME_FILE_FORMAT"; then
  11487.     if test -n "$MOZ_DISABLE_JAR_PACKAGING"; then
  11488.         MOZ_CHROME_FILE_FORMAT=flat
  11489.     else
  11490.         MOZ_CHROME_FILE_FORMAT=jar
  11491.     fi
  11492. fi
  11493.  
  11494. if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && 
  11495.     test "$MOZ_CHROME_FILE_FORMAT" != "flat" &&
  11496.     test "$MOZ_CHROME_FILE_FORMAT" != "both"; then
  11497.     { echo "configure: error: --enable-chrome-format must be set to either jar, flat or both" 1>&2; exit 1; }
  11498. fi
  11499.  
  11500. MOZ_AUTO_DEPS=1
  11501. # Check whether --enable-auto-deps or --disable-auto-deps was given.
  11502. if test "${enable_auto_deps+set}" = set; then
  11503.   enableval="$enable_auto_deps"
  11504.   if test "$enableval" = "no"; then
  11505.     MOZ_AUTO_DEPS=
  11506.   elif test "$enableval" = "yes"; then
  11507.     :
  11508.   else
  11509.     { echo "configure: error: Option, auto-deps, does not take an argument ($enableval)." 1>&2; exit 1; }
  11510.   fi
  11511. fi
  11512.  
  11513.  
  11514. if test -n "$MOZ_AUTO_DEPS"; then
  11515. _cpp_md_flag=
  11516. # Check whether --enable-md or --disable-md was given.
  11517. if test "${enable_md+set}" = set; then
  11518.   enableval="$enable_md"
  11519.   if test "$enableval" = "no"; then
  11520.     :
  11521.   elif test "$enableval" = "yes"; then
  11522.     _cpp_md_flag=1
  11523.   else
  11524.     { echo "configure: error: Option, md, does not take an argument ($enableval)." 1>&2; exit 1; }
  11525.   fi
  11526. else
  11527.      if test "$GNU_CC" -a "$GNU_CXX"; then
  11528.      _cpp_md_flag=1
  11529.    fi
  11530. fi
  11531.  
  11532. if test "$_cpp_md_flag"; then
  11533.   COMPILER_DEPEND=1
  11534.   _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)'
  11535. fi
  11536. fi # MOZ_AUTO_DEPS
  11537. MDDEPDIR='.deps'
  11538.  
  11539.  
  11540.  
  11541.  
  11542.  
  11543. # Check whether --enable-pedantic or --disable-pedantic was given.
  11544. if test "${enable_pedantic+set}" = set; then
  11545.   enableval="$enable_pedantic"
  11546.   if test "$enableval" = "no"; then
  11547.     _PEDANTIC= 
  11548.   elif test "$enableval" = "yes"; then
  11549.     :
  11550.   else
  11551.     { echo "configure: error: Option, pedantic, does not take an argument ($enableval)." 1>&2; exit 1; }
  11552.   fi
  11553. fi
  11554.  
  11555. if test "$_PEDANTIC"; then
  11556.     ac_ext=C
  11557. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  11558. ac_cpp='$CXXCPP $CPPFLAGS'
  11559. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  11560. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  11561. cross_compiling=$ac_cv_prog_cxx_cross
  11562.  
  11563.     _SAVE_CXXFLAGS=$CXXFLAGS
  11564.     CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic"
  11565.     echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6
  11566. echo "configure:11567: checking whether C++ compiler has -pedantic long long bug" >&5
  11567.     if test "$cross_compiling" = yes; then
  11568.   result="maybe" 
  11569. else
  11570.   cat > conftest.$ac_ext <<EOF
  11571. #line 11572 "configure"
  11572. #include "confdefs.h"
  11573. #ifdef __cplusplus
  11574. extern "C" void exit(int);
  11575. #endif
  11576.  int main () {
  11577.                 if (sizeof(long long) != 8) { return 1; } 
  11578.                     return 0; } 
  11579. EOF
  11580. if { (eval echo configure:11581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  11581. then
  11582.   result="no"
  11583. else
  11584.   echo "configure: failed program was:" >&5
  11585.   cat conftest.$ac_ext >&5
  11586.   rm -fr conftest*
  11587.   result="yes"
  11588. fi
  11589. rm -fr conftest*
  11590. fi
  11591.  
  11592.     echo "$ac_t""$result" 1>&6
  11593.     CXXFLAGS="$_SAVE_CXXFLAGS"
  11594.     ac_ext=c
  11595. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  11596. ac_cpp='$CPP $CPPFLAGS'
  11597. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  11598. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  11599. cross_compiling=$ac_cv_prog_cc_cross
  11600.  
  11601.  
  11602.     case "$result" in
  11603.     no)
  11604.         _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic"
  11605.         _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic"
  11606.         ;;
  11607.     yes)
  11608.         { echo "configure: error: Your compiler appears to have a known bug where long long is miscompiled when using -pedantic.  Reconfigure using --disable-pedantic. " 1>&2; exit 1; }
  11609.         ;;
  11610.     maybe)
  11611.         echo "configure: warning: Cannot test -pedantic long long bug when cross-compiling." 1>&2
  11612.         ;;
  11613.     esac
  11614. fi
  11615.  
  11616.  
  11617. ac_ext=C
  11618. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  11619. ac_cpp='$CXXCPP $CPPFLAGS'
  11620. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  11621. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  11622. cross_compiling=$ac_cv_prog_cxx_cross
  11623.  
  11624. _SAVE_CXXFLAGS=$CXXFLAGS
  11625. CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}"
  11626.  
  11627. echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6
  11628. echo "configure:11629: checking for correct overload resolution with const and templates" >&5
  11629. if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then
  11630.   echo $ac_n "(cached) $ac_c" 1>&6
  11631. else
  11632.   cat > conftest.$ac_ext <<EOF
  11633. #line 11634 "configure"
  11634. #include "confdefs.h"
  11635.  
  11636.                       template <class T>
  11637.                       class Pointer
  11638.                         {
  11639.                         public:
  11640.                           T* myPtr;
  11641.                         };
  11642.                       
  11643.                       template <class T, class U>
  11644.                       int operator==(const Pointer<T>& rhs, U* lhs)
  11645.                         {
  11646.                           return rhs.myPtr == lhs;
  11647.                         }
  11648.                       
  11649.                       template <class T, class U>
  11650.                       int operator==(const Pointer<T>& rhs, const U* lhs)
  11651.                         {
  11652.                           return rhs.myPtr == lhs;
  11653.                         }
  11654.                     
  11655. int main() {
  11656.  
  11657.                       Pointer<int> foo;
  11658.                       const int* bar;
  11659.                       return foo == bar;
  11660.                     
  11661. ; return 0; }
  11662. EOF
  11663. if { (eval echo configure:11664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11664.   rm -rf conftest*
  11665.   ac_nscap_nonconst_opeq_bug="no"
  11666. else
  11667.   echo "configure: failed program was:" >&5
  11668.   cat conftest.$ac_ext >&5
  11669.   rm -rf conftest*
  11670.   ac_nscap_nonconst_opeq_bug="yes"
  11671. fi
  11672. rm -f conftest*
  11673. fi
  11674.  
  11675. echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6
  11676.  
  11677. ac_ext=c
  11678. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  11679. ac_cpp='$CPP $CPPFLAGS'
  11680. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  11681. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  11682. cross_compiling=$ac_cv_prog_cc_cross
  11683.  
  11684. CXXFLAGS="$_SAVE_CXXFLAGS"
  11685.  
  11686. if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then
  11687.     cat >> confdefs.h <<\EOF
  11688. #define NSCAP_DONT_PROVIDE_NONCONST_OPEQ 1
  11689. EOF
  11690.  
  11691. fi
  11692.  
  11693. # Check whether --enable-long-long-warning or --disable-long-long-warning was given.
  11694. if test "${enable_long_long_warning+set}" = set; then
  11695.   enableval="$enable_long_long_warning"
  11696.   if test "$enableval" = "yes"; then
  11697.     _IGNORE_LONG_LONG_WARNINGS=
  11698.   elif test "$enableval" = "no"; then
  11699.     :
  11700.   else
  11701.     { echo "configure: error: Option, long-long-warning, does not take an argument ($enableval)." 1>&2; exit 1; }
  11702.   fi
  11703. fi
  11704.  
  11705. if test "$_IGNORE_LONG_LONG_WARNINGS"; then
  11706.      _SAVE_CFLAGS="$CFLAGS"
  11707.      CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long"
  11708.      echo $ac_n "checking whether compiler supports -Wno-long-long""... $ac_c" 1>&6
  11709. echo "configure:11710: checking whether compiler supports -Wno-long-long" >&5
  11710.      cat > conftest.$ac_ext <<EOF
  11711. #line 11712 "configure"
  11712. #include "confdefs.h"
  11713.  
  11714. int main() {
  11715. return(0);
  11716. ; return 0; }
  11717. EOF
  11718. if { (eval echo configure:11719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  11719.   rm -rf conftest*
  11720.    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long"
  11721.       _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long"
  11722.       result="yes" 
  11723. else
  11724.   echo "configure: failed program was:" >&5
  11725.   cat conftest.$ac_ext >&5
  11726.   rm -rf conftest*
  11727.   result="no"
  11728. fi
  11729. rm -f conftest*
  11730.      echo "$ac_t""$result" 1>&6
  11731.      CFLAGS="$_SAVE_CFLAGS"
  11732. fi
  11733.  
  11734. # Check whether --enable-shared or --disable-shared was given.
  11735. if test "${enable_shared+set}" = set; then
  11736.   enableval="$enable_shared"
  11737.   if test "$enableval" = "no"; then
  11738.     NO_SHARED_LIB=1
  11739.   elif test "$enableval" = "yes"; then
  11740.     :
  11741.   else
  11742.     { echo "configure: error: Option, shared, does not take an argument ($enableval)." 1>&2; exit 1; }
  11743.   fi
  11744. fi
  11745.  
  11746.  
  11747. # Check whether --enable-cpp-rtti or --disable-cpp-rtti was given.
  11748. if test "${enable_cpp_rtti+set}" = set; then
  11749.   enableval="$enable_cpp_rtti"
  11750.   if test "$enableval" = "yes"; then
  11751.      _MOZ_RTTI_FLAGS=-frtti 
  11752.  
  11753.   elif test "$enableval" = "no"; then
  11754.     :
  11755.   else
  11756.     { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; exit 1; }
  11757.   fi
  11758. fi
  11759.  
  11760.  
  11761. # Check whether --enable-cpp-exceptions or --disable-cpp-exceptions was given.
  11762. if test "${enable_cpp_exceptions+set}" = set; then
  11763.   enableval="$enable_cpp_exceptions"
  11764.   if test "$enableval" = "yes"; then
  11765.      _MOZ_EXCEPTIONS_FLAGS=-fexceptions 
  11766.  
  11767.   elif test "$enableval" = "no"; then
  11768.     :
  11769.   else
  11770.     { echo "configure: error: Option, cpp-exceptions, does not take an argument ($enableval)." 1>&2; exit 1; }
  11771.   fi
  11772. fi
  11773.  
  11774.  
  11775. # Check whether --enable-ultrasparc or --disable-ultrasparc was given.
  11776. if test "${enable_ultrasparc+set}" = set; then
  11777.   enableval="$enable_ultrasparc"
  11778.   if test "$enableval" = "yes"; then
  11779.     case "$target_os" in
  11780.     solaris*)   
  11781.         case $OS_TEST in
  11782.         sun4u)
  11783.             if test -z "$GNU_CC"; then
  11784.                 ASFLAGS='-xarch=v8plus -DULTRA_SPARC -P -L -D_ASM -D__STDC__=0 -K PIC'
  11785.                 cat >> confdefs.h <<\EOF
  11786. #define ULTRA_SPARC 1
  11787. EOF
  11788.  
  11789.             else
  11790.                 CFLAGS="${CFLAGS} -Wa,-xarch=v8plus,-DULTRA_SPARC,-P,-L,-D_ASM,-D__STDC__=0"
  11791.                 CXXFLAGS="${CXXFLAGS} -Wa,-xarch=v8plus,-DULTRA_SPARC,-P,-L,-D_ASM,-D__STDC__=0,-K,PIC"
  11792.                 cat >> confdefs.h <<\EOF
  11793. #define ULTRA_SPARC 1
  11794. EOF
  11795.  
  11796.             fi
  11797.             ;;
  11798.         esac
  11799.         ;;
  11800.     esac
  11801.  
  11802.   elif test "$enableval" = "no"; then
  11803.     :
  11804.   else
  11805.     { echo "configure: error: Option, ultrasparc, does not take an argument ($enableval)." 1>&2; exit 1; }
  11806.   fi
  11807. fi
  11808.  
  11809.  
  11810. # Profiling and Instrumenting
  11811.  
  11812. # Check whether --enable-eazel-profiler or --disable-eazel-profiler was given.
  11813. if test "${enable_eazel_profiler+set}" = set; then
  11814.   enableval="$enable_eazel_profiler"
  11815.   if test "$enableval" = "yes"; then
  11816.       ENABLE_EAZEL_PROFILER=1
  11817.      cat >> confdefs.h <<\EOF
  11818. #define ENABLE_EAZEL_PROFILER 1
  11819. EOF
  11820.  
  11821.      USE_ELF_DYNSTR_GC=
  11822.      MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
  11823.      EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES  -D__NO_MATH_INLINES"
  11824.      EAZEL_PROFILER_LIBS="-lprofiler -lpthread"
  11825.   elif test "$enableval" = "no"; then
  11826.     :
  11827.   else
  11828.     { echo "configure: error: Option, eazel-profiler, does not take an argument ($enableval)." 1>&2; exit 1; }
  11829.   fi
  11830. fi
  11831.  
  11832.  
  11833. # Check whether --with-profile-modules or --without-profile-modules was given.
  11834. if test "${with_profile_modules+set}" = set; then
  11835.   withval="$with_profile_modules"
  11836.    MOZ_PROFILE_MODULES=`echo $withval | sed 's/,/ /g'`  
  11837. fi
  11838.  
  11839.  
  11840. # Check whether --enable-perf-metrics or --disable-perf-metrics was given.
  11841. if test "${enable_perf_metrics+set}" = set; then
  11842.   enableval="$enable_perf_metrics"
  11843.   if test "$enableval" = "yes"; then
  11844.     MOZ_PERF_METRICS=1
  11845.   cat >> confdefs.h <<\EOF
  11846. #define MOZ_PERF_METRICS 1
  11847. EOF
  11848.  
  11849.   elif test "$enableval" = "no"; then
  11850.     :
  11851.   else
  11852.     { echo "configure: error: Option, perf-metrics, does not take an argument ($enableval)." 1>&2; exit 1; }
  11853.   fi
  11854. fi
  11855.  
  11856.  
  11857. # Check whether --enable-insure or --disable-insure was given.
  11858. if test "${enable_insure+set}" = set; then
  11859.   enableval="$enable_insure"
  11860.   if test "$enableval" = "yes"; then
  11861.      MOZ_INSURE="insure" MOZ_INSURIFYING=1 MOZ_INSURE_DIRS="." MOZ_INSURE_EXCLUDE_DIRS="config" 
  11862.   elif test "$enableval" = "no"; then
  11863.     :
  11864.   else
  11865.     { echo "configure: error: Option, insure, does not take an argument ($enableval)." 1>&2; exit 1; }
  11866.   fi
  11867. fi
  11868.  
  11869.  
  11870. # Check whether --with-insure-dirs or --without-insure-dirs was given.
  11871. if test "${with_insure_dirs+set}" = set; then
  11872.   withval="$with_insure_dirs"
  11873.   MOZ_INSURE_DIRS=$withval 
  11874. fi
  11875.  
  11876.  
  11877. # Check whether --with-insure-exclude-dirs or --without-insure-exclude-dirs was given.
  11878. if test "${with_insure_exclude_dirs+set}" = set; then
  11879.   withval="$with_insure_exclude_dirs"
  11880.   MOZ_INSURE_EXCLUDE_DIRS="config $withval" 
  11881. fi
  11882.  
  11883.  
  11884. # Check whether --enable-boehm or --disable-boehm was given.
  11885. if test "${enable_boehm+set}" = set; then
  11886.   enableval="$enable_boehm"
  11887.   if test "$enableval" = "yes"; then
  11888.     cat >> confdefs.h <<\EOF
  11889. #define GC_LEAK_DETECTOR 1
  11890. EOF
  11891.  
  11892.   GC_LEAK_DETECTOR=1
  11893.  
  11894.   elif test "$enableval" = "no"; then
  11895.     :
  11896.   else
  11897.     { echo "configure: error: Option, boehm, does not take an argument ($enableval)." 1>&2; exit 1; }
  11898.   fi
  11899. fi
  11900.  
  11901.  
  11902. # Check whether --enable-logrefcnt or --disable-logrefcnt was given.
  11903. if test "${enable_logrefcnt+set}" = set; then
  11904.   enableval="$enable_logrefcnt"
  11905.   if test "$enableval" = "yes"; then
  11906.     cat >> confdefs.h <<\EOF
  11907. #define FORCE_BUILD_REFCNT_LOGGING 1
  11908. EOF
  11909.  
  11910.   elif test "$enableval" = "no"; then
  11911.     cat >> confdefs.h <<\EOF
  11912. #define NO_BUILD_REFCNT_LOGGING 1
  11913. EOF
  11914.  
  11915.   else
  11916.     { echo "configure: error: Option, logrefcnt, does not take an argument ($enableval)." 1>&2; exit 1; }
  11917.   fi
  11918. fi
  11919.  
  11920.  
  11921.  
  11922. # Check whether --enable-leaky or --disable-leaky was given.
  11923. if test "${enable_leaky+set}" = set; then
  11924.   enableval="$enable_leaky"
  11925.   if test "$enableval" = "yes"; then
  11926.     MOZ_LEAKY=1
  11927.   elif test "$enableval" = "no"; then
  11928.     :
  11929.   else
  11930.     { echo "configure: error: Option, leaky, does not take an argument ($enableval)." 1>&2; exit 1; }
  11931.   fi
  11932. fi
  11933.  
  11934.  
  11935. # Check whether --enable-jprof or --disable-jprof was given.
  11936. if test "${enable_jprof+set}" = set; then
  11937.   enableval="$enable_jprof"
  11938.   if test "$enableval" = "yes"; then
  11939.     MOZ_JPROF=1
  11940.   cat >> confdefs.h <<\EOF
  11941. #define MOZ_JPROF 1
  11942. EOF
  11943.  
  11944.   elif test "$enableval" = "no"; then
  11945.     :
  11946.   else
  11947.     { echo "configure: error: Option, jprof, does not take an argument ($enableval)." 1>&2; exit 1; }
  11948.   fi
  11949. fi
  11950.  
  11951.  
  11952. # Check whether --enable-xpctools or --disable-xpctools was given.
  11953. if test "${enable_xpctools+set}" = set; then
  11954.   enableval="$enable_xpctools"
  11955.   if test "$enableval" = "yes"; then
  11956.     MOZ_XPCTOOLS=1
  11957.   elif test "$enableval" = "no"; then
  11958.     :
  11959.   else
  11960.     { echo "configure: error: Option, xpctools, does not take an argument ($enableval)." 1>&2; exit 1; }
  11961.   fi
  11962. fi
  11963.  
  11964.  
  11965. echo $ac_n "checking webshell leaks option""... $ac_c" 1>&6
  11966. echo "configure:11967: checking webshell leaks option" >&5
  11967. # Check whether --enable-detect-webshell-leaks or --disable-detect-webshell-leaks was given.
  11968. if test "${enable_detect_webshell_leaks+set}" = set; then
  11969.   enableval="$enable_detect_webshell_leaks"
  11970.   if test "$enableval" = "yes"; then
  11971.      echo "$ac_t""on (user enabled)" 1>&6
  11972.     DETECT_WEBSHELL_LEAKS=1 
  11973.   elif test "$enableval" = "no"; then
  11974.      echo "$ac_t""off (user disabled)" 1>&6 
  11975.   else
  11976.     { echo "configure: error: Option, detect-webshell-leaks, does not take an argument ($enableval)." 1>&2; exit 1; }
  11977.   fi
  11978. else
  11979.    if test "$MOZ_DEBUG"; then
  11980.       echo "$ac_t""on (debug build)" 1>&6
  11981.       DETECT_WEBSHELL_LEAKS=1 
  11982.     else
  11983.       echo "$ac_t""off (non-debug build)" 1>&6
  11984.     fi
  11985. fi
  11986.  
  11987.  
  11988. if test "$DETECT_WEBSHELL_LEAKS"; then
  11989.   cat >> confdefs.h <<\EOF
  11990. #define DETECT_WEBSHELL_LEAKS 1
  11991. EOF
  11992.  
  11993.   
  11994. fi
  11995.  
  11996. # Check whether --enable-double-buffer or --disable-double-buffer was given.
  11997. if test "${enable_double_buffer+set}" = set; then
  11998.   enableval="$enable_double_buffer"
  11999.   if test "$enableval" = "no"; then
  12000.     cat >> confdefs.h <<\EOF
  12001. #define NO_DOUBLE_BUFFER 1
  12002. EOF
  12003.  
  12004.   elif test "$enableval" = "yes"; then
  12005.     :
  12006.   else
  12007.     { echo "configure: error: Option, double-buffer, does not take an argument ($enableval)." 1>&2; exit 1; }
  12008.   fi
  12009. fi
  12010.  
  12011.  
  12012. # Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
  12013. if test "${enable_wrap_malloc+set}" = set; then
  12014.   enableval="$enable_wrap_malloc"
  12015.   if test "$enableval" = "yes"; then
  12016.      if test "$GNU_CC"; then
  12017.       WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc"
  12018.       MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) -o $@'
  12019.     fi
  12020.   elif test "$enableval" = "no"; then
  12021.     :
  12022.   else
  12023.     { echo "configure: error: Option, wrap-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
  12024.   fi
  12025. fi
  12026.  
  12027.  
  12028. # Check whether --with-wrap-malloc or --without-wrap-malloc was given.
  12029. if test "${with_wrap_malloc+set}" = set; then
  12030.   withval="$with_wrap_malloc"
  12031.   WRAP_MALLOC_LIB=$withval
  12032. fi
  12033.  
  12034.  
  12035. # Check whether --enable-efence or --disable-efence was given.
  12036. if test "${enable_efence+set}" = set; then
  12037.   enableval="$enable_efence"
  12038.   if test "$enableval" = "yes"; then
  12039.     echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6
  12040. echo "configure:12041: checking for malloc in -lefence" >&5
  12041. ac_lib_var=`echo efence'_'malloc | sed 'y%./+-%__p_%'`
  12042. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  12043.   echo $ac_n "(cached) $ac_c" 1>&6
  12044. else
  12045.   ac_save_LIBS="$LIBS"
  12046. LIBS="-lefence  $LIBS"
  12047. cat > conftest.$ac_ext <<EOF
  12048. #line 12049 "configure"
  12049. #include "confdefs.h"
  12050. /* Override any gcc2 internal prototype to avoid an error.  */
  12051. /* We use char because int might match the return type of a gcc2
  12052.     builtin and then its argument prototype would still apply.  */
  12053. char malloc();
  12054.  
  12055. int main() {
  12056. malloc()
  12057. ; return 0; }
  12058. EOF
  12059. if { (eval echo configure:12060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  12060.   rm -rf conftest*
  12061.   eval "ac_cv_lib_$ac_lib_var=yes"
  12062. else
  12063.   echo "configure: failed program was:" >&5
  12064.   cat conftest.$ac_ext >&5
  12065.   rm -rf conftest*
  12066.   eval "ac_cv_lib_$ac_lib_var=no"
  12067. fi
  12068. rm -f conftest*
  12069. LIBS="$ac_save_LIBS"
  12070.  
  12071. fi
  12072. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  12073.   echo "$ac_t""yes" 1>&6
  12074.     ac_tr_lib=HAVE_LIB`echo efence | sed -e 's/^a-zA-Z0-9_/_/g' \
  12075.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  12076.   cat >> confdefs.h <<EOF
  12077. #define $ac_tr_lib 1
  12078. EOF
  12079.  
  12080.   LIBS="-lefence $LIBS"
  12081.  
  12082. else
  12083.   echo "$ac_t""no" 1>&6
  12084. fi
  12085.  
  12086.   elif test "$enableval" = "no"; then
  12087.     :
  12088.   else
  12089.     { echo "configure: error: Option, efence, does not take an argument ($enableval)." 1>&2; exit 1; }
  12090.   fi
  12091. fi
  12092.  
  12093.  
  12094. echo $ac_n "checking for cplus_demangle in -liberty""... $ac_c" 1>&6
  12095. echo "configure:12096: checking for cplus_demangle in -liberty" >&5
  12096. ac_lib_var=`echo iberty'_'cplus_demangle | sed 'y%./+-%__p_%'`
  12097. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  12098.   echo $ac_n "(cached) $ac_c" 1>&6
  12099. else
  12100.   ac_save_LIBS="$LIBS"
  12101. LIBS="-liberty "-liberty" $LIBS"
  12102. cat > conftest.$ac_ext <<EOF
  12103. #line 12104 "configure"
  12104. #include "confdefs.h"
  12105. /* Override any gcc2 internal prototype to avoid an error.  */
  12106. /* We use char because int might match the return type of a gcc2
  12107.     builtin and then its argument prototype would still apply.  */
  12108. char cplus_demangle();
  12109.  
  12110. int main() {
  12111. cplus_demangle()
  12112. ; return 0; }
  12113. EOF
  12114. if { (eval echo configure:12115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  12115.   rm -rf conftest*
  12116.   eval "ac_cv_lib_$ac_lib_var=yes"
  12117. else
  12118.   echo "configure: failed program was:" >&5
  12119.   cat conftest.$ac_ext >&5
  12120.   rm -rf conftest*
  12121.   eval "ac_cv_lib_$ac_lib_var=no"
  12122. fi
  12123. rm -f conftest*
  12124. LIBS="$ac_save_LIBS"
  12125.  
  12126. fi
  12127. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  12128.   echo "$ac_t""yes" 1>&6
  12129.   HAVE_DEMANGLE=1
  12130. else
  12131.   echo "$ac_t""no" 1>&6
  12132. HAVE_DEMANGLE=
  12133. fi
  12134.  
  12135.  
  12136. MOZ_DEMANGLE_SYMBOLS=
  12137.  
  12138. if test "$HAVE_DEMANGLE"
  12139. then
  12140.   case "$target" in
  12141.     *-linux*)
  12142.         # Demangle only for debug or trace-malloc builds
  12143.         if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC"
  12144.         then
  12145.             MOZ_DEMANGLE_SYMBOLS=1
  12146.             cat >> confdefs.h <<\EOF
  12147. #define MOZ_DEMANGLE_SYMBOLS 1
  12148. EOF
  12149.  
  12150.         fi
  12151.     ;;
  12152.     *-solaris*)
  12153.         # Demangle only for debug builds which are using the Gnu compiler.
  12154.         if test "$GNU_CC"
  12155.         then
  12156.             if test "$MOZ_DEBUG"
  12157.             then
  12158.                 MOZ_DEMANGLE_SYMBOLS=1
  12159.                 cat >> confdefs.h <<\EOF
  12160. #define MOZ_DEMANGLE_SYMBOLS 1
  12161. EOF
  12162.  
  12163.             fi
  12164.         fi
  12165.     ;;
  12166.   esac
  12167. fi
  12168.  
  12169.  
  12170.  
  12171.  
  12172.  
  12173.  
  12174. # Misc. Options
  12175.  
  12176. # Check whether --enable-homedir or --disable-homedir was given.
  12177. if test "${enable_homedir+set}" = set; then
  12178.   enableval="$enable_homedir"
  12179.     if echo "$enableval" | grep "\/" >/dev/null; then
  12180.     { echo "configure: error: "Homedir must be single relative path."" 1>&2; exit 1; }
  12181.   else 
  12182.     cat >> confdefs.h <<EOF
  12183. #define MOZ_USER_DIR "$enableval"
  12184. EOF
  12185.  
  12186.   fi
  12187. else
  12188.   cat >> confdefs.h <<\EOF
  12189. #define MOZ_USER_DIR ".mozilla"
  12190. EOF
  12191.  
  12192. fi
  12193.  
  12194.  
  12195. # Check whether --enable-idltool or --disable-idltool was given.
  12196. if test "${enable_idltool+set}" = set; then
  12197.   enableval="$enable_idltool"
  12198.   if test "$enableval" = "yes"; then
  12199.     BUILD_IDLC=1
  12200.   elif test "$enableval" = "no"; then
  12201.     :
  12202.   else
  12203.     { echo "configure: error: Option, idltool, does not take an argument ($enableval)." 1>&2; exit 1; }
  12204.   fi
  12205. fi
  12206.  
  12207.  
  12208. # Check whether --enable-xterm-updates or --disable-xterm-updates was given.
  12209. if test "${enable_xterm_updates+set}" = set; then
  12210.   enableval="$enable_xterm_updates"
  12211.   if test "$enableval" = "yes"; then
  12212.     MOZ_UPDATE_XTERM=1
  12213.   elif test "$enableval" = "no"; then
  12214.     :
  12215.   else
  12216.     { echo "configure: error: Option, xterm-updates, does not take an argument ($enableval)." 1>&2; exit 1; }
  12217.   fi
  12218. fi
  12219.  
  12220.  
  12221. MOZ_LDAP_XPCOM=1
  12222.  
  12223. # Check whether --enable-ldap or --disable-ldap was given.
  12224. if test "${enable_ldap+set}" = set; then
  12225.   enableval="$enable_ldap"
  12226.   if test "$enableval" = "no"; then
  12227.     MOZ_LDAP_XPCOM=
  12228.     
  12229.   elif test "$enableval" = "yes"; then
  12230.     :
  12231.   else
  12232.     { echo "configure: error: Option, ldap, does not take an argument ($enableval)." 1>&2; exit 1; }
  12233.   fi
  12234. fi
  12235.  
  12236.  
  12237. # Check whether --enable-ldap-experimental or --disable-ldap-experimental was given.
  12238. if test "${enable_ldap_experimental+set}" = set; then
  12239.   enableval="$enable_ldap_experimental"
  12240.   if test "$enableval" = "yes"; then
  12241.     MOZ_LDAP_XPCOM_EXPERIMENTAL=1
  12242.     
  12243.   elif test "$enableval" = "no"; then
  12244.     :
  12245.   else
  12246.     { echo "configure: error: Option, ldap-experimental, does not take an argument ($enableval)." 1>&2; exit 1; }
  12247.   fi
  12248. fi
  12249.  
  12250.  
  12251. MOZ_XUL=1
  12252. # Check whether --enable-xul or --disable-xul was given.
  12253. if test "${enable_xul+set}" = set; then
  12254.   enableval="$enable_xul"
  12255.   if test "$enableval" = "no"; then
  12256.     MOZ_XUL= 
  12257.   elif test "$enableval" = "yes"; then
  12258.     :
  12259.   else
  12260.     { echo "configure: error: Option, xul, does not take an argument ($enableval)." 1>&2; exit 1; }
  12261.   fi
  12262. fi
  12263.  
  12264. if test "$MOZ_XUL"; then
  12265.   cat >> confdefs.h <<\EOF
  12266. #define MOZ_XUL 1
  12267. EOF
  12268.  
  12269.   cat >> confdefs.h <<\EOF
  12270. #define INCLUDE_XUL 1
  12271. EOF
  12272.  
  12273. fi
  12274.  
  12275.  
  12276.  
  12277. # Check whether --enable-mathml or --disable-mathml was given.
  12278. if test "${enable_mathml+set}" = set; then
  12279.   enableval="$enable_mathml"
  12280.   if test "$enableval" = "yes"; then
  12281.     MOZ_MATHML=1
  12282.   cat >> confdefs.h <<\EOF
  12283. #define MOZ_MATHML 1
  12284. EOF
  12285.  
  12286.   elif test "$enableval" = "no"; then
  12287.     :
  12288.   else
  12289.     { echo "configure: error: Option, mathml, does not take an argument ($enableval)." 1>&2; exit 1; }
  12290.   fi
  12291. fi
  12292.  
  12293.  
  12294. # Check whether --enable-svg or --disable-svg was given.
  12295. if test "${enable_svg+set}" = set; then
  12296.   enableval="$enable_svg"
  12297.   if test "$enableval" = "yes"; then
  12298.     MOZ_SVG=1
  12299.   cat >> confdefs.h <<\EOF
  12300. #define MOZ_SVG 1
  12301. EOF
  12302.  
  12303.   elif test "$enableval" = "no"; then
  12304.     :
  12305.   else
  12306.     { echo "configure: error: Option, svg, does not take an argument ($enableval)." 1>&2; exit 1; }
  12307.   fi
  12308. fi
  12309.  
  12310.  
  12311. MOZ_XSL=1
  12312. cat >> confdefs.h <<\EOF
  12313. #define MOZ_XSL 1
  12314. EOF
  12315.  
  12316.  
  12317. VERBOSE_CONFIG_DEFS=1
  12318. # Check whether --enable-verbose-config-defs or --disable-verbose-config-defs was given.
  12319. if test "${enable_verbose_config_defs+set}" = set; then
  12320.   enableval="$enable_verbose_config_defs"
  12321.   if test "$enableval" = "no"; then
  12322.     VERBOSE_CONFIG_DEFS=
  12323.     fi
  12324. fi
  12325.  
  12326.  
  12327. MOZ_NEW_CACHE=1
  12328. # Check whether --enable-new-cache or --disable-new-cache was given.
  12329. if test "${enable_new_cache+set}" = set; then
  12330.   enableval="$enable_new_cache"
  12331.   if test "$enableval" = "no"; then
  12332.     MOZ_NEW_CACHE=0
  12333.   elif test "$enableval" = "yes"; then
  12334.     :
  12335.   else
  12336.     { echo "configure: error: Option, new-cache, does not take an argument ($enableval)." 1>&2; exit 1; }
  12337.   fi
  12338. fi
  12339.  
  12340. if test "$MOZ_NEW_CACHE" = "1"; then
  12341.   cat >> confdefs.h <<\EOF
  12342. #define MOZ_NEW_CACHE 1
  12343. EOF
  12344.  
  12345. fi
  12346.  
  12347.  
  12348. USE_IMG2=1
  12349. # Check whether --enable-libpr0n or --disable-libpr0n was given.
  12350. if test "${enable_libpr0n+set}" = set; then
  12351.   enableval="$enable_libpr0n"
  12352.   if test "$enableval" = "no"; then
  12353.     USE_IMG2=
  12354.   elif test "$enableval" = "yes"; then
  12355.     :
  12356.   else
  12357.     { echo "configure: error: Option, libpr0n, does not take an argument ($enableval)." 1>&2; exit 1; }
  12358.   fi
  12359. fi
  12360.  
  12361. if test "$USE_IMG2" = "1"; then
  12362.   cat >> confdefs.h <<\EOF
  12363. #define USE_IMG2 1
  12364. EOF
  12365.  
  12366. fi
  12367.  
  12368.  
  12369. MOZ_DISABLE_DTD_DEBUG=
  12370.  
  12371. # Check whether --enable-dtd-debug or --disable-dtd-debug was given.
  12372. if test "${enable_dtd_debug+set}" = set; then
  12373.   enableval="$enable_dtd_debug"
  12374.   if test "$enableval" = "no"; then
  12375.     MOZ_DISABLE_DTD_DEBUG=1 
  12376.   cat >> confdefs.h <<\EOF
  12377. #define MOZ_DISABLE_DTD_DEBUG 1
  12378. EOF
  12379.  
  12380.   elif test "$enableval" = "yes"; then
  12381.     :
  12382.   else
  12383.     { echo "configure: error: Option, dtd-debug, does not take an argument ($enableval)." 1>&2; exit 1; }
  12384.   fi
  12385. fi
  12386.  
  12387.  
  12388. # OS/2 Build Options
  12389.  
  12390. # Check whether --with-os2emx or --without-os2emx was given.
  12391. if test "${with_os2emx+set}" = set; then
  12392.   withval="$with_os2emx"
  12393.    MOZ_OS2_TOOLS=EMX
  12394.       MOZ_OS2_EMX_OBJECTFORMAT="$withval"
  12395.       cat >> confdefs.h <<\EOF
  12396. #define XP_OS2_EMX 1
  12397. EOF
  12398.  
  12399. fi
  12400.  
  12401.  
  12402. # Check whether --with-os2vacpp or --without-os2vacpp was given.
  12403. if test "${with_os2vacpp+set}" = set; then
  12404.   withval="$with_os2vacpp"
  12405.    MOZ_OS2_TOOLS=VACPP
  12406.       cat >> confdefs.h <<\EOF
  12407. #define XP_OS2_VACPP 1
  12408. EOF
  12409.  
  12410. fi
  12411.  
  12412.  
  12413.  
  12414. NO_STATIC_LIB=1
  12415.  
  12416. # Check whether --enable-static or --disable-static was given.
  12417. if test "${enable_static+set}" = set; then
  12418.   enableval="$enable_static"
  12419.   if test "$enableval" = "yes"; then
  12420.     NO_STATIC_LIB=
  12421.   elif test "$enableval" = "no"; then
  12422.     :
  12423.   else
  12424.     { echo "configure: error: Option, static, does not take an argument ($enableval)." 1>&2; exit 1; }
  12425.   fi
  12426. fi
  12427.  
  12428.  
  12429.  
  12430. # Check whether --enable-static-components or --disable-static-components was given.
  12431. if test "${enable_static_components+set}" = set; then
  12432.   enableval="$enable_static_components"
  12433.    MOZ_STATIC_COMPONENTS=`echo $enableval | sed 's/,/ /g'`  
  12434. fi
  12435.  
  12436.  
  12437.  
  12438. case "$target" in
  12439.     *-*-aix*)
  12440.     if test "${NO_STATIC_LIB}" = "1" -o -z "${NO_SHARED_LIB}"; then
  12441.         if test -f /usr/lpp/xlC/bin/makeC++SharedLib_r; then
  12442.         AIX_SHLIB_BIN='/usr/lpp/xlC/bin/makeC++SharedLib_r'
  12443.         elif test -f /usr/ibmcxx/bin/makeC++SharedLib_r; then
  12444.         AIX_SHLIB_BIN='/usr/ibmcxx/bin/makeC++SharedLib_r'
  12445.         fi
  12446.         # Extract the first word of "makeC++SharedLib_r", so it can be a program name with args.
  12447. set dummy makeC++SharedLib_r; ac_word=$2
  12448. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  12449. echo "configure:12450: checking for $ac_word" >&5
  12450. if eval "test \"`echo '$''{'ac_cv_path_AIX_SHLIB_BIN'+set}'`\" = set"; then
  12451.   echo $ac_n "(cached) $ac_c" 1>&6
  12452. else
  12453.   case "$AIX_SHLIB_BIN" in
  12454.   /*)
  12455.   ac_cv_path_AIX_SHLIB_BIN="$AIX_SHLIB_BIN" # Let the user override the test with a path.
  12456.   ;;
  12457.   ?:/*)             
  12458.   ac_cv_path_AIX_SHLIB_BIN="$AIX_SHLIB_BIN" # Let the user override the test with a dos path.
  12459.   ;;
  12460.   *)
  12461.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  12462.   ac_dummy="$PATH"
  12463.   for ac_dir in $ac_dummy; do 
  12464.     test -z "$ac_dir" && ac_dir=.
  12465.     if test -f $ac_dir/$ac_word; then
  12466.       ac_cv_path_AIX_SHLIB_BIN="$ac_dir/$ac_word"
  12467.       break
  12468.     fi
  12469.   done
  12470.   IFS="$ac_save_ifs"
  12471.   test -z "$ac_cv_path_AIX_SHLIB_BIN" && ac_cv_path_AIX_SHLIB_BIN=":"
  12472.   ;;
  12473. esac
  12474. fi
  12475. AIX_SHLIB_BIN="$ac_cv_path_AIX_SHLIB_BIN"
  12476. if test -n "$AIX_SHLIB_BIN"; then
  12477.   echo "$ac_t""$AIX_SHLIB_BIN" 1>&6
  12478. else
  12479.   echo "$ac_t""no" 1>&6
  12480. fi
  12481.  
  12482.         if test ! -n "$AIX_SHLIB_BIN"; then
  12483.         echo
  12484.         echo "*** Unable to locate makeC++SharedLib_r, needed for creation of shared"
  12485.         echo "*** libraries on AIX.  You will only be able to build static libraries."
  12486.         echo
  12487.         NO_STATIC_LIB=''
  12488.         NO_SHARED_LIB=1
  12489.         fi
  12490.     fi
  12491.     
  12492.     ;;
  12493. esac
  12494.  
  12495.  
  12496.  
  12497.  
  12498.  
  12499.  
  12500.  
  12501.  
  12502.  
  12503.  
  12504.  
  12505.  
  12506.  
  12507.  
  12508.  
  12509.  
  12510.  
  12511.  
  12512.  
  12513.  
  12514.  
  12515.  
  12516.  
  12517.  
  12518.  
  12519.  
  12520.  
  12521.  
  12522.  
  12523.  
  12524.  
  12525.  
  12526.  
  12527.  
  12528.  
  12529.  
  12530.  
  12531.  
  12532.  
  12533.  
  12534.  
  12535.  
  12536.  
  12537.  
  12538.  
  12539.  
  12540.  
  12541.  
  12542.  
  12543.  
  12544.  
  12545.  
  12546.  
  12547.  
  12548.  
  12549.  
  12550.  
  12551.  
  12552.  
  12553.  
  12554.  
  12555.  
  12556.  
  12557.  
  12558.  
  12559.  
  12560.  
  12561.  
  12562.  
  12563.  
  12564.  
  12565.  
  12566.  
  12567.  
  12568.  
  12569.  
  12570.  
  12571.  
  12572.  
  12573.  
  12574.  
  12575.  
  12576.  
  12577.  
  12578.  
  12579. # Check whether --with-jpeg or --without-jpeg was given.
  12580. if test "${with_jpeg+set}" = set; then
  12581.   withval="$with_jpeg"
  12582.   JPEG_DIR=$withval
  12583. fi
  12584.  
  12585.  
  12586. _SAVE_CFLAGS=$CFLAGS
  12587. _SAVE_LDFLAGS=$LDFLAGS
  12588. _SAVE_LIBS=$LIBS
  12589. CFLAGS="-I${JPEG_DIR}/include $CFLAGS"
  12590. LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS"
  12591. if test "$JPEG_DIR" = no; then
  12592.     SYSTEM_JPEG=
  12593. else
  12594.     echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
  12595. echo "configure:12596: checking for jpeg_destroy_compress in -ljpeg" >&5
  12596. ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
  12597. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  12598.   echo $ac_n "(cached) $ac_c" 1>&6
  12599. else
  12600.   ac_save_LIBS="$LIBS"
  12601. LIBS="-ljpeg $JPEG_LIBS $LIBS"
  12602. cat > conftest.$ac_ext <<EOF
  12603. #line 12604 "configure"
  12604. #include "confdefs.h"
  12605. /* Override any gcc2 internal prototype to avoid an error.  */
  12606. /* We use char because int might match the return type of a gcc2
  12607.     builtin and then its argument prototype would still apply.  */
  12608. char jpeg_destroy_compress();
  12609.  
  12610. int main() {
  12611. jpeg_destroy_compress()
  12612. ; return 0; }
  12613. EOF
  12614. if { (eval echo configure:12615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  12615.   rm -rf conftest*
  12616.   eval "ac_cv_lib_$ac_lib_var=yes"
  12617. else
  12618.   echo "configure: failed program was:" >&5
  12619.   cat conftest.$ac_ext >&5
  12620.   rm -rf conftest*
  12621.   eval "ac_cv_lib_$ac_lib_var=no"
  12622. fi
  12623. rm -f conftest*
  12624. LIBS="$ac_save_LIBS"
  12625.  
  12626. fi
  12627. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  12628.   echo "$ac_t""yes" 1>&6
  12629.   SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS"
  12630. else
  12631.   echo "$ac_t""no" 1>&6
  12632. SYSTEM_JPEG=
  12633. fi
  12634.  
  12635. fi
  12636.  
  12637. if test "$SYSTEM_JPEG" = 1; then
  12638.     LIBS="$JPEG_LIBS $LIBS"
  12639.     if test "$cross_compiling" = yes; then
  12640.   SYSTEM_JPEG= 
  12641. else
  12642.   cat > conftest.$ac_ext <<EOF
  12643. #line 12644 "configure"
  12644. #include "confdefs.h"
  12645. #include <stdio.h>
  12646.     #include <sys/types.h>
  12647.     #include <jpeglib.h>
  12648.     int main () {
  12649.         #if JPEG_LIB_VERSION >= $MOZJPEG
  12650.         exit(0);
  12651.         #else
  12652.         exit(1);
  12653.         #endif
  12654.     }
  12655.     
  12656. EOF
  12657. if { (eval echo configure:12658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  12658. then
  12659.   SYSTEM_JPEG=1
  12660. else
  12661.   echo "configure: failed program was:" >&5
  12662.   cat conftest.$ac_ext >&5
  12663.   rm -fr conftest*
  12664.   SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS=
  12665. fi
  12666. rm -fr conftest*
  12667. fi
  12668.  
  12669.     rm -f core
  12670. fi 
  12671. CFLAGS=$_SAVE_CFLAGS
  12672. LDFLAGS=$_SAVE_LDFLAGS
  12673. LIBS=$_SAVE_LIBS
  12674.  
  12675. if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then
  12676.     JPEG_CFLAGS="-I${JPEG_DIR}/include"
  12677.     JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}"
  12678. fi
  12679.  
  12680. # Check whether --with-zlib or --without-zlib was given.
  12681. if test "${with_zlib+set}" = set; then
  12682.   withval="$with_zlib"
  12683.   ZLIB_DIR=$withval
  12684. fi
  12685.  
  12686.  
  12687. _SAVE_CFLAGS=$CFLAGS
  12688. _SAVE_LDFLAGS=$LDFLAGS
  12689. CFLAGS="-I${ZLIB_DIR}/include $CFLAGS"
  12690. LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS"
  12691. if test "$ZLIB_DIR" = no; then
  12692.     SYSTEM_ZLIB=
  12693. else
  12694.     echo $ac_n "checking "for zlib.h"""... $ac_c" 1>&6
  12695. echo "configure:12696: checking "for zlib.h"" >&5
  12696.     cat > conftest.$ac_ext <<EOF
  12697. #line 12698 "configure"
  12698. #include "confdefs.h"
  12699. #include "zlib.h"
  12700. int main() {
  12701.  
  12702. ; return 0; }
  12703. EOF
  12704. if { (eval echo configure:12705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  12705.   rm -rf conftest*
  12706.   result="yes" SYSTEM_ZLIB=1
  12707. else
  12708.   echo "configure: failed program was:" >&5
  12709.   cat conftest.$ac_ext >&5
  12710.   rm -rf conftest*
  12711.   result="no" SYSTEM_ZLIB=
  12712. fi
  12713. rm -f conftest*
  12714.     echo "$ac_t"""$result"" 1>&6
  12715. fi
  12716. if test "$SYSTEM_ZLIB" = 1; then
  12717.     echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6
  12718. echo "configure:12719: checking for gzread in -lz" >&5
  12719. ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'`
  12720. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  12721.   echo $ac_n "(cached) $ac_c" 1>&6
  12722. else
  12723.   ac_save_LIBS="$LIBS"
  12724. LIBS="-lz $ZLIB_LIBS $LIBS"
  12725. cat > conftest.$ac_ext <<EOF
  12726. #line 12727 "configure"
  12727. #include "confdefs.h"
  12728. /* Override any gcc2 internal prototype to avoid an error.  */
  12729. /* We use char because int might match the return type of a gcc2
  12730.     builtin and then its argument prototype would still apply.  */
  12731. char gzread();
  12732.  
  12733. int main() {
  12734. gzread()
  12735. ; return 0; }
  12736. EOF
  12737. if { (eval echo configure:12738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  12738.   rm -rf conftest*
  12739.   eval "ac_cv_lib_$ac_lib_var=yes"
  12740. else
  12741.   echo "configure: failed program was:" >&5
  12742.   cat conftest.$ac_ext >&5
  12743.   rm -rf conftest*
  12744.   eval "ac_cv_lib_$ac_lib_var=no"
  12745. fi
  12746. rm -f conftest*
  12747. LIBS="$ac_save_LIBS"
  12748.  
  12749. fi
  12750. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  12751.   echo "$ac_t""yes" 1>&6
  12752.   SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS"
  12753. else
  12754.   echo "$ac_t""no" 1>&6
  12755. SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=
  12756. fi
  12757.  
  12758. fi
  12759. CFLAGS=$_SAVE_CFLAGS
  12760. LDFLAGS=$_SAVE_LDFLAGS
  12761.  
  12762. if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then
  12763.     ZLIB_CFLAGS="-I${ZLIB_DIR}/include"
  12764.     ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}"
  12765. fi
  12766.  
  12767. # Check whether --with-png or --without-png was given.
  12768. if test "${with_png+set}" = set; then
  12769.   withval="$with_png"
  12770.   PNG_DIR=$withval
  12771. fi
  12772.  
  12773.  
  12774. _SAVE_CFLAGS=$CFLAGS
  12775. _SAVE_LDFLAGS=$LDFLAGS
  12776. _SAVE_LIBS=$LIBS
  12777. CFLAGS="-I${PNG_DIR}/include $ZLIB_CFLAGS $CFLAGS"
  12778. LDFLAGS="-L${PNG_DIR}/lib $ZLIB_LIBS -lz $LDFLAGS"
  12779. if test "$PNG_DIR" = no; then
  12780.     SYSTEM_PNG=
  12781. else
  12782.     echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6
  12783. echo "configure:12784: checking for png_get_valid in -lpng" >&5
  12784. ac_lib_var=`echo png'_'png_get_valid | sed 'y%./+-%__p_%'`
  12785. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  12786.   echo $ac_n "(cached) $ac_c" 1>&6
  12787. else
  12788.   ac_save_LIBS="$LIBS"
  12789. LIBS="-lpng $PNG_LIBS $LIBS"
  12790. cat > conftest.$ac_ext <<EOF
  12791. #line 12792 "configure"
  12792. #include "confdefs.h"
  12793. /* Override any gcc2 internal prototype to avoid an error.  */
  12794. /* We use char because int might match the return type of a gcc2
  12795.     builtin and then its argument prototype would still apply.  */
  12796. char png_get_valid();
  12797.  
  12798. int main() {
  12799. png_get_valid()
  12800. ; return 0; }
  12801. EOF
  12802. if { (eval echo configure:12803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  12803.   rm -rf conftest*
  12804.   eval "ac_cv_lib_$ac_lib_var=yes"
  12805. else
  12806.   echo "configure: failed program was:" >&5
  12807.   cat conftest.$ac_ext >&5
  12808.   rm -rf conftest*
  12809.   eval "ac_cv_lib_$ac_lib_var=no"
  12810. fi
  12811. rm -f conftest*
  12812. LIBS="$ac_save_LIBS"
  12813.  
  12814. fi
  12815. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  12816.   echo "$ac_t""yes" 1>&6
  12817.   SYSTEM_PNG=1 PNG_LIBS="-lpng $PNG_LIBS"
  12818. else
  12819.   echo "$ac_t""no" 1>&6
  12820. SYSTEM_PNG=
  12821. fi
  12822.  
  12823. fi
  12824. if test "$SYSTEM_PNG" = 1; then
  12825.     LIBS="$PNG_LIBS $LIBS"
  12826.     if test "$cross_compiling" = yes; then
  12827.   SYSTEM_PNG= 
  12828. else
  12829.   cat > conftest.$ac_ext <<EOF
  12830. #line 12831 "configure"
  12831. #include "confdefs.h"
  12832. #include <stdio.h>
  12833.     #include <sys/types.h>
  12834.     #include <png.h>
  12835.     int main () {
  12836.         #if PNG_LIBPNG_VER >= $MOZPNG
  12837.         exit(0);
  12838.         #else
  12839.         exit(1);
  12840.         #endif
  12841.     }
  12842.     
  12843. EOF
  12844. if { (eval echo configure:12845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  12845. then
  12846.   SYSTEM_PNG=1
  12847. else
  12848.   echo "configure: failed program was:" >&5
  12849.   cat conftest.$ac_ext >&5
  12850.   rm -fr conftest*
  12851.   SYSTEM_PNG= PNG_CFLAGS= PNG_LIBS=
  12852. fi
  12853. rm -fr conftest*
  12854. fi
  12855.  
  12856.     rm -f core
  12857. fi
  12858. CFLAGS=$_SAVE_CFLAGS
  12859. LDFLAGS=$_SAVE_LDFLAGS
  12860. LIBS=$_SAVE_LIBS
  12861.  
  12862. if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$SYSTEM_PNG" = 1; then
  12863.     PNG_CFLAGS="-I${PNG_DIR}/include"
  12864.     PNG_LIBS="-L${PNG_DIR}/lib ${PNG_LIBS}"
  12865. fi
  12866.  
  12867. # Check whether --with-mng or --without-mng was given.
  12868. if test "${with_mng+set}" = set; then
  12869.   withval="$with_mng"
  12870.   MNG_DIR=$withval
  12871. fi
  12872.  
  12873.  
  12874. _SAVE_CFLAGS=$CFLAGS
  12875. _SAVE_LDFLAGS=$LDFLAGS
  12876. _SAVE_LIBS=$LIBS
  12877. CFLAGS="-I${MNG_DIR}/include $ZLIB_CFLAGS $CFLAGS"
  12878. LDFLAGS="-L${MNG_DIR}/lib $ZLIB_LIBS -lz $LDFLAGS"
  12879. if test "$MNG_DIR" = no; then
  12880.     SYSTEM_MNG=
  12881. else
  12882.     echo $ac_n "checking for mng_initialize in -lmng""... $ac_c" 1>&6
  12883. echo "configure:12884: checking for mng_initialize in -lmng" >&5
  12884. ac_lib_var=`echo mng'_'mng_initialize | sed 'y%./+-%__p_%'`
  12885. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  12886.   echo $ac_n "(cached) $ac_c" 1>&6
  12887. else
  12888.   ac_save_LIBS="$LIBS"
  12889. LIBS="-lmng $MNG_LIBS $LIBS"
  12890. cat > conftest.$ac_ext <<EOF
  12891. #line 12892 "configure"
  12892. #include "confdefs.h"
  12893. /* Override any gcc2 internal prototype to avoid an error.  */
  12894. /* We use char because int might match the return type of a gcc2
  12895.     builtin and then its argument prototype would still apply.  */
  12896. char mng_initialize();
  12897.  
  12898. int main() {
  12899. mng_initialize()
  12900. ; return 0; }
  12901. EOF
  12902. if { (eval echo configure:12903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  12903.   rm -rf conftest*
  12904.   eval "ac_cv_lib_$ac_lib_var=yes"
  12905. else
  12906.   echo "configure: failed program was:" >&5
  12907.   cat conftest.$ac_ext >&5
  12908.   rm -rf conftest*
  12909.   eval "ac_cv_lib_$ac_lib_var=no"
  12910. fi
  12911. rm -f conftest*
  12912. LIBS="$ac_save_LIBS"
  12913.  
  12914. fi
  12915. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  12916.   echo "$ac_t""yes" 1>&6
  12917.   SYSTEM_MNG=1 MNG_LIBS="-lmng $MNG_LIBS"
  12918. else
  12919.   echo "$ac_t""no" 1>&6
  12920. SYSTEM_MNG=
  12921. fi
  12922.  
  12923. fi
  12924. if test "$SYSTEM_MNG" = 1; then
  12925.     LIBS="$MNG_LIBS $LIBS"
  12926.     if test "$cross_compiling" = yes; then
  12927.   SYSTEM_MNG= 
  12928. else
  12929.   cat > conftest.$ac_ext <<EOF
  12930. #line 12931 "configure"
  12931. #include "confdefs.h"
  12932. #include <stdio.h>
  12933.     #include <sys/types.h>
  12934.     #include <libmng.h>
  12935.     int main () {
  12936.         #if (((MNG_VERSION_MAJOR)<<16)|((MNG_VERSION_MINOR)<<8)|(MNG_VERSION_RELEASE)) >= $MOZMNG
  12937.         exit(0);
  12938.         #else
  12939.         exit(1);
  12940.         #endif
  12941.     }
  12942.     
  12943. EOF
  12944. if { (eval echo configure:12945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  12945. then
  12946.   SYSTEM_MNG=1
  12947. else
  12948.   echo "configure: failed program was:" >&5
  12949.   cat conftest.$ac_ext >&5
  12950.   rm -fr conftest*
  12951.   SYSTEM_MNG= MNG_CFLAGS= MNG_LIBS=
  12952. fi
  12953. rm -fr conftest*
  12954. fi
  12955.  
  12956.     rm -f core
  12957. fi
  12958. CFLAGS=$_SAVE_CFLAGS
  12959. LDFLAGS=$_SAVE_LDFLAGS
  12960. LIBS=$_SAVE_LIBS
  12961.  
  12962. if test "${MNG_DIR}" -a -d "${MNG_DIR}" -a "$SYSTEM_MNG" = 1; then
  12963.     MNG_CFLAGS="-I${MNG_DIR}/include"
  12964.     MNG_LIBS="-L${MNG_DIR}/lib ${MNG_LIBS}"
  12965. fi
  12966.  
  12967. if test "$MOZ_BYPASS_PROFILE_AT_STARTUP"; then
  12968.   cat >> confdefs.h <<\EOF
  12969. #define MOZ_BYPASS_PROFILE_AT_STARTUP 1
  12970. EOF
  12971.  
  12972. fi
  12973.  
  12974.  
  12975. MOZ_FULLCIRCLE=
  12976. FULLCIRCLE_LIBS=
  12977. # Check whether --enable-fullcircle or --disable-fullcircle was given.
  12978. if test "${enable_fullcircle+set}" = set; then
  12979.   enableval="$enable_fullcircle"
  12980.   if test "$enableval" = "yes"; then
  12981.      MOZ_FULLCIRCLE=1 FULLCIRCLE_LIBS="-lfullsoft" 
  12982.   elif test "$enableval" = "no"; then
  12983.     :
  12984.   else
  12985.     { echo "configure: error: Option, fullcircle, does not take an argument ($enableval)." 1>&2; exit 1; }
  12986.   fi
  12987. fi
  12988.  
  12989.  
  12990. # Check whether --with-fullcircle or --without-fullcircle was given.
  12991. if test "${with_fullcircle+set}" = set; then
  12992.   withval="$with_fullcircle"
  12993.   FULLCIRCLE_DIR=$withval
  12994. else
  12995.   FULLCIRCLE_DIR=no
  12996. fi
  12997.  
  12998.  
  12999. if test "$FULLCIRCLE_DIR" = no; then
  13000.     FULLCIRCLE_DIR=
  13001. else
  13002.  
  13003. _SAVE_CFLAGS=$CFLAGS
  13004. _SAVE_LDFLAGS=$LDFLAGS
  13005. _SAVE_LIBS=$LIBS
  13006. CFLAGS="$CFLAGS -I${FULLCIRCLE_DIR}"
  13007. LDFLAGS="$LDFLAGS -L${FULLCIRCLE_DIR}"
  13008. LIBS="-lfullsoft $LIBS"
  13009. echo $ac_n "checking "for FCInitialize in -lfullsoft"""... $ac_c" 1>&6
  13010. echo "configure:13011: checking "for FCInitialize in -lfullsoft"" >&5;
  13011. cat > conftest.$ac_ext <<EOF
  13012. #line 13013 "configure"
  13013. #include "confdefs.h"
  13014.  #include <stdio.h>
  13015.           #include "fullsoft.h" 
  13016. int main() {
  13017.  FCInitialize(); exit(0); 
  13018. ; return 0; }
  13019. EOF
  13020. if { (eval echo configure:13021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  13021.   rm -rf conftest*
  13022.   FULLCIRCLE_LIBS="-I${FULLCIRCLE_DIR} -L${FULLCIRCLE_DIR} -lfullsoft" result="yes"
  13023. else
  13024.   echo "configure: failed program was:" >&5
  13025.   cat conftest.$ac_ext >&5
  13026.   rm -rf conftest*
  13027.   MISSING_FULLCIRCLE=1 result="no"
  13028. fi
  13029. rm -f conftest*
  13030. echo "$ac_t"""$result"" 1>&6
  13031. CFLAGS=$_SAVE_CFLAGS
  13032. LDFLAGS=$_SAVE_LDFLAGS
  13033. LIBS=$_SAVE_LIBS
  13034.  
  13035. if test "$MISSING_FULLCIRCLE"; then
  13036.     echo
  13037.     echo "Could not find FullCircle library -- ignoring it"
  13038.     echo
  13039.     MOZ_FULLCIRCLE=
  13040.     FULLCIRCLE_LIBS=
  13041. else
  13042.     cat >> confdefs.h <<\EOF
  13043. #define MOZ_FULLCIRCLE 1
  13044. EOF
  13045.  
  13046.     CFLAGS="$CFLAGS -I${FULLCIRCLE_DIR}"
  13047.     CXXFLAGS="$CXXFLAGS -I${FULLCIRCLE_DIR}"
  13048. fi
  13049.  
  13050. fi
  13051.  
  13052.  
  13053.  
  13054.  
  13055. CFLAGS=`echo \
  13056.     $_WARNINGS_CFLAGS \
  13057.     $CFLAGS`
  13058.  
  13059. CXXFLAGS=`echo \
  13060.     $_MOZ_RTTI_FLAGS \
  13061.     $_MOZ_EXCEPTIONS_FLAGS \
  13062.     $_WARNINGS_CXXFLAGS \
  13063.     $CXXFLAGS`
  13064.  
  13065. COMPILE_CFLAGS=`echo \
  13066.     $_DEFINES_CFLAGS \
  13067.     $_DEPEND_CFLAGS \
  13068.     $COMPILE_CFLAGS`
  13069.  
  13070. COMPILE_CXXFLAGS=`echo \
  13071.     $_DEFINES_CXXFLAGS \
  13072.     $_DEPEND_CFLAGS \
  13073.     $COMPILE_CXXFLAGS`
  13074.  
  13075.  
  13076.  
  13077.  
  13078.  
  13079.  
  13080.  
  13081.  
  13082.  
  13083.  
  13084.  
  13085.  
  13086.  
  13087.  
  13088.  
  13089.  
  13090.  
  13091.  
  13092.  
  13093.  
  13094.  
  13095.  
  13096.  
  13097.  
  13098.  
  13099.  
  13100.  
  13101.  
  13102.  
  13103.  
  13104.  
  13105.  
  13106.  
  13107.  
  13108.  
  13109.  
  13110.  
  13111.  
  13112.  
  13113.  
  13114.  
  13115.  
  13116.  
  13117.  
  13118.  
  13119.  
  13120.  
  13121.  
  13122.  
  13123.  
  13124.  
  13125.  
  13126.  
  13127.  
  13128.  
  13129.  
  13130.  
  13131.  
  13132.  
  13133.  
  13134.  
  13135.  
  13136.  
  13137.  
  13138.  
  13139.  
  13140.  
  13141.  
  13142.  
  13143.  
  13144.  
  13145.  
  13146.  
  13147.  
  13148.  
  13149.  
  13150. cat >> confdefs.h <<EOF
  13151. #define MOZ_DLL_SUFFIX "$DLL_SUFFIX"
  13152. EOF
  13153.  
  13154.  
  13155.  
  13156.  
  13157.  
  13158.  
  13159.  
  13160. if test "$USING_HCC"; then
  13161.    CC='${topsrcdir}/build/hcc'
  13162.    CC="$CC '$_OLDCC'"
  13163.    CXX='${topsrcdir}/build/hcpp'
  13164.    CXX="$CXX '$_OLDCXX'"
  13165.    
  13166.    
  13167. fi
  13168.  
  13169. if test "$no_x" != "yes"; then
  13170. if test ! -z "$MISSING_X"; then
  13171.    { echo "configure: error:  Could not find the following X libraries: $MISSING_X " 1>&2; exit 1; };
  13172. fi
  13173.  
  13174. if test ! -z "$MISSING_XPRINT"; then
  13175.    { echo "configure: error:  Could not find the following XPRINT libraries: $MISSING_XPRINT " 1>&2; exit 1; };
  13176. fi
  13177.  
  13178. if test ! -z "$MISSING_MOTIF"; then
  13179.    { echo "configure: error:  Could not find the following Motif libraries: $MISSING_MOTIF " 1>&2; exit 1; };
  13180. fi
  13181. fi # $no_x
  13182.  
  13183.  
  13184. if test "$OS_TARGET" = "OS2"; then
  13185.   cat >> confdefs.h <<\EOF
  13186. #define XP_PC 1
  13187. EOF
  13188.  
  13189.   cat >> confdefs.h <<\EOF
  13190. #define XP_OS2 1
  13191. EOF
  13192.  
  13193.   cat >> confdefs.h <<\EOF
  13194. #define BSD_SELECT 1
  13195. EOF
  13196.  
  13197.   cat >> confdefs.h <<\EOF
  13198. #define XP_OS2_FIX 1
  13199. EOF
  13200.  
  13201.   case "$target" in
  13202.     *-*-os2_vacpp)
  13203.         LIBS='so32dll.lib tcp32dll.lib'
  13204.         ;;
  13205.   esac
  13206. elif test "$OS_TARGET" = "WINNT"; then
  13207.   cat >> confdefs.h <<\EOF
  13208. #define XP_PC 1
  13209. EOF
  13210.  
  13211. elif test "$OS_TARGET" = "BeOS"; then
  13212.   cat >> confdefs.h <<\EOF
  13213. #define XP_BEOS 1
  13214. EOF
  13215.  
  13216.   cat >> confdefs.h <<\EOF
  13217. #define HAVE_MOVEMAIL 1
  13218. EOF
  13219.  
  13220.   HAVE_MOVEMAIL=1
  13221.   
  13222. elif test "$OS_TARGET" = "Mac OS"; then
  13223.   cat >> confdefs.h <<\EOF
  13224. #define XP_UNIX 1
  13225. EOF
  13226.  
  13227.   cat >> confdefs.h <<\EOF
  13228. #define UNIX_EMBED 1
  13229. EOF
  13230.  
  13231.   cat >> confdefs.h <<\EOF
  13232. #define UNIX_LDAP 1
  13233. EOF
  13234.  
  13235.   cat >> confdefs.h <<\EOF
  13236. #define UNIX_ASYNC_DNS 1
  13237. EOF
  13238.  
  13239. elif test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then
  13240.   cat >> confdefs.h <<\EOF
  13241. #define XP_UNIX 1
  13242. EOF
  13243.  
  13244.   cat >> confdefs.h <<\EOF
  13245. #define UNIX_ASYNC_DNS 1
  13246. EOF
  13247.  
  13248. else
  13249.   cat >> confdefs.h <<\EOF
  13250. #define XP_UNIX 1
  13251. EOF
  13252.  
  13253.   cat >> confdefs.h <<\EOF
  13254. #define UNIX_ASYNC_DNS 1
  13255. EOF
  13256.  
  13257.   cat >> confdefs.h <<\EOF
  13258. #define HAVE_MOVEMAIL 1
  13259. EOF
  13260.  
  13261.   HAVE_MOVEMAIL=1
  13262.   
  13263. fi
  13264.  
  13265. cat >> confdefs.h <<\EOF
  13266. #define JS_THREADSAFE 1
  13267. EOF
  13268.  
  13269.  
  13270.  
  13271. # Used for LD_LIBRARY_PATH of run_viewer target
  13272. LIBS_PATH=
  13273. for lib_arg in $NSPR_LIBS $TK_LIBS; do
  13274.   case $lib_arg in
  13275.     -L* ) LIBS_PATH="${LIBS_PATH:+$LIBS_PATH:}"`expr $lib_arg : "-L\(.*\)"` ;;
  13276.       * ) ;;
  13277.   esac
  13278. done
  13279.  
  13280.  
  13281.  
  13282. # Save the defines header file before autoconf removes it.
  13283. # (Do not add AC_DEFINE calls after this line.)
  13284. if test "$_USE_CPP_INCLUDE_FLAG"; then
  13285.   _CONFIG_TMP=confdefs-tmp.h
  13286.   _CONFIG_DEFS_H=config-defs.h
  13287.  
  13288.   cat > $_CONFIG_TMP <<\EOF
  13289. /* List of defines generated by configure. Included with preprocessor flag,
  13290.  * -include, to avoid long list of -D defines on the compile command-line.
  13291.  * Do not edit.
  13292.  */
  13293. EOF
  13294.   sort confdefs.h >> $_CONFIG_TMP
  13295.  
  13296.   # Only write config-defs.h when something changes (or it doesn't exist)
  13297.   if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then
  13298.     rm $_CONFIG_TMP
  13299.   else
  13300.     echo "$ac_t"""creating $_CONFIG_DEFS_H"" 1>&6
  13301.     mv -f $_CONFIG_TMP $_CONFIG_DEFS_H
  13302.  
  13303.     if test "$VERBOSE_CONFIG_DEFS"; then
  13304.       echo ==== $_CONFIG_DEFS_H =================================
  13305.       cat $_CONFIG_DEFS_H
  13306.     fi
  13307.   fi
  13308. fi
  13309.  
  13310.  
  13311.  
  13312. . ${srcdir}/allmakefiles.sh
  13313. echo $MAKEFILES | $PERL $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
  13314. . ./conftest.sh
  13315. rm conftest.sh
  13316.  
  13317. echo $MAKEFILES > unallmakefiles
  13318.  
  13319. trap '' 1 2 15
  13320. cat > confcache <<\EOF
  13321. # This file is a shell script that caches the results of configure
  13322. # tests run on this system so they can be shared between configure
  13323. # scripts and configure runs.  It is not useful on other systems.
  13324. # If it contains results you don't want to keep, you may remove or edit it.
  13325. #
  13326. # By default, configure uses ./config.cache as the cache file,
  13327. # creating it if it does not exist already.  You can give configure
  13328. # the --cache-file=FILE option to use a different cache file; that is
  13329. # what configure does when it calls configure scripts in
  13330. # subdirectories, so they share the cache.
  13331. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  13332. # config.status only pays attention to the cache file if you give it the
  13333. # --recheck option to rerun configure.
  13334. #
  13335. EOF
  13336. # The following way of writing the cache mishandles newlines in values,
  13337. # but we know of no workaround that is simple, portable, and efficient.
  13338. # So, don't put newlines in cache variables' values.
  13339. # Ultrix sh set writes to stderr and can't be redirected directly,
  13340. # and sets the high bit in the cache file unless we assign to the vars.
  13341. (set) 2>&1 |
  13342.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  13343.   *ac_space=\ *)
  13344.     # `set' does not quote correctly, so add quotes (double-quote substitution
  13345.     # turns \\\\ into \\, and sed turns \\ into \).
  13346.     sed -n \
  13347.       -e "s/'/'\\\\''/g" \
  13348.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  13349.     ;;
  13350.   *)
  13351.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  13352.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  13353.     ;;
  13354.   esac >> confcache
  13355. if cmp -s $cache_file confcache; then
  13356.   :
  13357. else
  13358.   if test -w $cache_file; then
  13359.     echo "updating cache $cache_file"
  13360.     cat confcache > $cache_file
  13361.   else
  13362.     echo "not updating unwritable cache $cache_file"
  13363.   fi
  13364. fi
  13365. rm -f confcache
  13366.  
  13367. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  13368.  
  13369. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  13370. # Let make expand exec_prefix.
  13371. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  13372.  
  13373. # Any assignment to VPATH causes Sun make to only execute
  13374. # the first set of double-colon rules, so remove it if not needed.
  13375. # If there is a colon in the path, we need to keep it.
  13376. if test "x$srcdir" = x.; then
  13377.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  13378. fi
  13379.  
  13380. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  13381.  
  13382. # Transform confdefs.h into DEFS.
  13383. # Protect against shell expansion while executing Makefile rules.
  13384. # Protect against Makefile macro expansion.
  13385. cat > conftest.defs <<\EOF
  13386. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
  13387. s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  13388. s%\[%\\&%g
  13389. s%\]%\\&%g
  13390. s%\$%$$%g
  13391. EOF
  13392. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  13393. rm -f conftest.defs
  13394.  
  13395.  
  13396. # Without the "./", some shells look in PATH for config.status.
  13397. : ${CONFIG_STATUS=./config.status}
  13398.  
  13399. echo creating $CONFIG_STATUS
  13400. rm -f $CONFIG_STATUS
  13401. cat > $CONFIG_STATUS <<EOF
  13402. #! /bin/sh
  13403. # Generated automatically by configure.
  13404. # Run this file to recreate the current configuration.
  13405. # This directory was configured as follows,
  13406. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  13407. #
  13408. # $0 $ac_configure_args
  13409. #
  13410. # Compiler output produced by configure, useful for debugging
  13411. # configure, is in ./config.log if it exists.
  13412.  
  13413. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  13414. for ac_option
  13415. do
  13416.   case "\$ac_option" in
  13417.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  13418.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  13419.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  13420.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  13421.     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  13422.     exit 0 ;;
  13423.   -help | --help | --hel | --he | --h)
  13424.     echo "\$ac_cs_usage"; exit 0 ;;
  13425.   *) echo "\$ac_cs_usage"; exit 1 ;;
  13426.   esac
  13427. done
  13428.  
  13429. ac_given_srcdir=$srcdir
  13430. ac_given_INSTALL="$INSTALL"
  13431.  
  13432. trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  13433. EOF
  13434. cat >> $CONFIG_STATUS <<EOF
  13435.  
  13436. # Protect against being on the right side of a sed subst in config.status.
  13437. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  13438.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  13439. $ac_vpsub
  13440. $extrasub
  13441. s%@SHELL@%$SHELL%g
  13442. s%@CFLAGS@%$CFLAGS%g
  13443. s%@CPPFLAGS@%$CPPFLAGS%g
  13444. s%@CXXFLAGS@%$CXXFLAGS%g
  13445. s%@FFLAGS@%$FFLAGS%g
  13446. s%@DEFS@%$DEFS%g
  13447. s%@LDFLAGS@%$LDFLAGS%g
  13448. s%@LIBS@%$LIBS%g
  13449. s%@exec_prefix@%$exec_prefix%g
  13450. s%@prefix@%$prefix%g
  13451. s%@program_transform_name@%$program_transform_name%g
  13452. s%@bindir@%$bindir%g
  13453. s%@sbindir@%$sbindir%g
  13454. s%@libexecdir@%$libexecdir%g
  13455. s%@datadir@%$datadir%g
  13456. s%@sysconfdir@%$sysconfdir%g
  13457. s%@sharedstatedir@%$sharedstatedir%g
  13458. s%@localstatedir@%$localstatedir%g
  13459. s%@libdir@%$libdir%g
  13460. s%@includedir@%$includedir%g
  13461. s%@oldincludedir@%$oldincludedir%g
  13462. s%@infodir@%$infodir%g
  13463. s%@mandir@%$mandir%g
  13464. s%@host@%$host%g
  13465. s%@host_alias@%$host_alias%g
  13466. s%@host_cpu@%$host_cpu%g
  13467. s%@host_vendor@%$host_vendor%g
  13468. s%@host_os@%$host_os%g
  13469. s%@target@%$target%g
  13470. s%@target_alias@%$target_alias%g
  13471. s%@target_cpu@%$target_cpu%g
  13472. s%@target_vendor@%$target_vendor%g
  13473. s%@target_os@%$target_os%g
  13474. s%@build@%$build%g
  13475. s%@build_alias@%$build_alias%g
  13476. s%@build_cpu@%$build_cpu%g
  13477. s%@build_vendor@%$build_vendor%g
  13478. s%@build_os@%$build_os%g
  13479. s%@HOST_CC@%$HOST_CC%g
  13480. s%@HOST_CXX@%$HOST_CXX%g
  13481. s%@HOST_RANLIB@%$HOST_RANLIB%g
  13482. s%@HOST_AR@%$HOST_AR%g
  13483. s%@CC@%$CC%g
  13484. s%@CXX@%$CXX%g
  13485. s%@RANLIB@%$RANLIB%g
  13486. s%@AR@%$AR%g
  13487. s%@AS@%$AS%g
  13488. s%@LD@%$LD%g
  13489. s%@STRIP@%$STRIP%g
  13490. s%@DLLTOOL@%$DLLTOOL%g
  13491. s%@WINDRES@%$WINDRES%g
  13492. s%@GNU_AS@%$GNU_AS%g
  13493. s%@GNU_CC@%$GNU_CC%g
  13494. s%@GNU_CXX@%$GNU_CXX%g
  13495. s%@CPP@%$CPP%g
  13496. s%@CXXCPP@%$CXXCPP%g
  13497. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  13498. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  13499. s%@INSTALL_DATA@%$INSTALL_DATA%g
  13500. s%@LN_S@%$LN_S%g
  13501. s%@AWK@%$AWK%g
  13502. s%@EMACS@%$EMACS%g
  13503. s%@PERL@%$PERL%g
  13504. s%@WHOAMI@%$WHOAMI%g
  13505. s%@AUTOCONF@%$AUTOCONF%g
  13506. s%@UNZIP@%$UNZIP%g
  13507. s%@ZIP@%$ZIP%g
  13508. s%@SYSTEM_MAKEDEPEND@%$SYSTEM_MAKEDEPEND%g
  13509. s%@XARGS@%$XARGS%g
  13510. s%@MAKE@%$MAKE%g
  13511. s%@SET_MAKE@%$SET_MAKE%g
  13512. s%@X_CFLAGS@%$X_CFLAGS%g
  13513. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  13514. s%@X_LIBS@%$X_LIBS%g
  13515. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  13516. s%@NO_LD_ARCHIVE_FLAGS@%$NO_LD_ARCHIVE_FLAGS%g
  13517. s%@NSPR_CONFIG@%$NSPR_CONFIG%g
  13518. s%@NSPR_CFLAGS@%$NSPR_CFLAGS%g
  13519. s%@NSPR_LIBS@%$NSPR_LIBS%g
  13520. s%@GTK_CONFIG@%$GTK_CONFIG%g
  13521. s%@GTK_CFLAGS@%$GTK_CFLAGS%g
  13522. s%@GTK_LIBS@%$GTK_LIBS%g
  13523. s%@GDK_PIXBUF_CONFIG@%$GDK_PIXBUF_CONFIG%g
  13524. s%@GDK_PIXBUF_CFLAGS@%$GDK_PIXBUF_CFLAGS%g
  13525. s%@GDK_PIXBUF_LIBS@%$GDK_PIXBUF_LIBS%g
  13526. s%@TK_CFLAGS@%$TK_CFLAGS%g
  13527. s%@TK_LIBS@%$TK_LIBS%g
  13528. s%@MOZ_ENABLE_GTK@%$MOZ_ENABLE_GTK%g
  13529. s%@MOZ_ENABLE_MOTIF@%$MOZ_ENABLE_MOTIF%g
  13530. s%@MOZ_ENABLE_XLIB@%$MOZ_ENABLE_XLIB%g
  13531. s%@MOZ_ENABLE_QT@%$MOZ_ENABLE_QT%g
  13532. s%@MOZ_ENABLE_PHOTON@%$MOZ_ENABLE_PHOTON%g
  13533. s%@MOZ_ENABLE_XREMOTE@%$MOZ_ENABLE_XREMOTE%g
  13534. s%@MOZ_GTK_CFLAGS@%$MOZ_GTK_CFLAGS%g
  13535. s%@MOZ_GTK_LDFLAGS@%$MOZ_GTK_LDFLAGS%g
  13536. s%@MOZ_MOTIF_CFLAGS@%$MOZ_MOTIF_CFLAGS%g
  13537. s%@MOZ_MOTIF_LDFLAGS@%$MOZ_MOTIF_LDFLAGS%g
  13538. s%@MOZ_XLIB_CFLAGS@%$MOZ_XLIB_CFLAGS%g
  13539. s%@MOZ_XLIB_LDFLAGS@%$MOZ_XLIB_LDFLAGS%g
  13540. s%@MOZ_XPRINT_CFLAGS@%$MOZ_XPRINT_CFLAGS%g
  13541. s%@MOZ_XPRINT_LDFLAGS@%$MOZ_XPRINT_LDFLAGS%g
  13542. s%@MOZ_ENABLE_XPRINT@%$MOZ_ENABLE_XPRINT%g
  13543. s%@MOZ_QT_CFLAGS@%$MOZ_QT_CFLAGS%g
  13544. s%@MOZ_QT_LDFLAGS@%$MOZ_QT_LDFLAGS%g
  13545. s%@MOZ_DEFAULT_TOOLKIT@%$MOZ_DEFAULT_TOOLKIT%g
  13546. s%@HAVE_GDK_PIXBUF@%$HAVE_GDK_PIXBUF%g
  13547. s%@MOZ_GDK_PIXBUF_CFLAGS@%$MOZ_GDK_PIXBUF_CFLAGS%g
  13548. s%@MOZ_GDK_PIXBUF_LIBS@%$MOZ_GDK_PIXBUF_LIBS%g
  13549. s%@HAVE_XIE@%$HAVE_XIE%g
  13550. s%@MOZ_XIE_LIBS@%$MOZ_XIE_LIBS%g
  13551. s%@MOZ_XINERAMA_LIBS@%$MOZ_XINERAMA_LIBS%g
  13552. s%@MOZ_ENABLE_XINERAMA@%$MOZ_ENABLE_XINERAMA%g
  13553. s%@XCFLAGS@%$XCFLAGS%g
  13554. s%@XLDFLAGS@%$XLDFLAGS%g
  13555. s%@XLIBS@%$XLIBS%g
  13556. s%@LIBIDL_CONFIG@%$LIBIDL_CONFIG%g
  13557. s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g
  13558. s%@GLIB_CONFIG@%$GLIB_CONFIG%g
  13559. s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
  13560. s%@GLIB_LIBS@%$GLIB_LIBS%g
  13561. s%@LIBIDL_CFLAGS@%$LIBIDL_CFLAGS%g
  13562. s%@LIBIDL_LIBS@%$LIBIDL_LIBS%g
  13563. s%@LIBOBJS@%$LIBOBJS%g
  13564. s%@MOZ_MAIL_NEWS@%$MOZ_MAIL_NEWS%g
  13565. s%@MOZ_EDITOR_API_LOG@%$MOZ_EDITOR_API_LOG%g
  13566. s%@MOZ_ENDER_LITE@%$MOZ_ENDER_LITE%g
  13567. s%@NS_TRACE_MALLOC@%$NS_TRACE_MALLOC%g
  13568. s%@MOZ_REFLOW_PERF@%$MOZ_REFLOW_PERF%g
  13569. s%@USE_ELF_DYNSTR_GC@%$USE_ELF_DYNSTR_GC%g
  13570. s%@MOZ_AUTO_DEPS@%$MOZ_AUTO_DEPS%g
  13571. s%@COMPILER_DEPEND@%$COMPILER_DEPEND%g
  13572. s%@MDDEPDIR@%$MDDEPDIR%g
  13573. s%@DETECT_WEBSHELL_LEAKS@%$DETECT_WEBSHELL_LEAKS%g
  13574. s%@MOZ_DEMANGLE_SYMBOLS@%$MOZ_DEMANGLE_SYMBOLS%g
  13575. s%@MOZ_XUL@%$MOZ_XUL%g
  13576. s%@INCLUDE_XUL@%$INCLUDE_XUL%g
  13577. s%@MOZ_NEW_CACHE@%$MOZ_NEW_CACHE%g
  13578. s%@USE_IMG2@%$USE_IMG2%g
  13579. s%@AIX_SHLIB_BIN@%$AIX_SHLIB_BIN%g
  13580. s%@MOZ_TRACK_MODULE_DEPS@%$MOZ_TRACK_MODULE_DEPS%g
  13581. s%@AR_FLAGS@%$AR_FLAGS%g
  13582. s%@AR_LIST@%$AR_LIST%g
  13583. s%@AR_EXTRACT@%$AR_EXTRACT%g
  13584. s%@AR_DELETE@%$AR_DELETE%g
  13585. s%@ASFLAGS@%$ASFLAGS%g
  13586. s%@AS_DASH_C_FLAG@%$AS_DASH_C_FLAG%g
  13587. s%@USE_SHORT_LIBNAME@%$USE_SHORT_LIBNAME%g
  13588. s%@IMPLIB@%$IMPLIB%g
  13589. s%@FILTER@%$FILTER%g
  13590. s%@BIN_FLAGS@%$BIN_FLAGS%g
  13591. s%@NS_USE_NATIVE@%$NS_USE_NATIVE%g
  13592. s%@MOZ_WIDGET_TOOLKIT@%$MOZ_WIDGET_TOOLKIT%g
  13593. s%@MOZ_WIDGET_TOOLKIT_LDFLAGS@%$MOZ_WIDGET_TOOLKIT_LDFLAGS%g
  13594. s%@WIDGET_DLL@%$WIDGET_DLL%g
  13595. s%@GFXWIN_DLL@%$GFXWIN_DLL%g
  13596. s%@MOZ_GFX_TOOLKIT@%$MOZ_GFX_TOOLKIT%g
  13597. s%@MOZ_GFX_TOOLKIT_LDFLAGS@%$MOZ_GFX_TOOLKIT_LDFLAGS%g
  13598. s%@MOZ_UPDATE_XTERM@%$MOZ_UPDATE_XTERM%g
  13599. s%@MOZ_MATHML@%$MOZ_MATHML%g
  13600. s%@MOZ_SVG@%$MOZ_SVG%g
  13601. s%@MOZ_XSL@%$MOZ_XSL%g
  13602. s%@MOZ_MONOLITHIC_TOOLKIT@%$MOZ_MONOLITHIC_TOOLKIT%g
  13603. s%@MOZ_JS_LIBS@%$MOZ_JS_LIBS%g
  13604. s%@MOZ_PSM@%$MOZ_PSM%g
  13605. s%@BUILD_MODULES@%$BUILD_MODULES%g
  13606. s%@MOZ_DEBUG@%$MOZ_DEBUG%g
  13607. s%@MOZ_DEBUG_MODULES@%$MOZ_DEBUG_MODULES%g
  13608. s%@MOZ_PROFILE_MODULES@%$MOZ_PROFILE_MODULES%g
  13609. s%@MOZ_DEBUG_ENABLE_DEFS@%$MOZ_DEBUG_ENABLE_DEFS%g
  13610. s%@MOZ_DEBUG_DISABLE_DEFS@%$MOZ_DEBUG_DISABLE_DEFS%g
  13611. s%@MOZ_DEBUG_FLAGS@%$MOZ_DEBUG_FLAGS%g
  13612. s%@MOZ_DBGRINFO_MODULES@%$MOZ_DBGRINFO_MODULES%g
  13613. s%@MOZ_EXTENSIONS@%$MOZ_EXTENSIONS%g
  13614. s%@MOZ_JSDEBUGGER@%$MOZ_JSDEBUGGER%g
  13615. s%@ENABLE_EAZEL_PROFILER@%$ENABLE_EAZEL_PROFILER%g
  13616. s%@EAZEL_PROFILER_CFLAGS@%$EAZEL_PROFILER_CFLAGS%g
  13617. s%@EAZEL_PROFILER_LIBS@%$EAZEL_PROFILER_LIBS%g
  13618. s%@MOZ_PERF_METRICS@%$MOZ_PERF_METRICS%g
  13619. s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
  13620. s%@MOZ_LOG_REFCNT@%$MOZ_LOG_REFCNT%g
  13621. s%@MOZ_LEAKY@%$MOZ_LEAKY%g
  13622. s%@MOZ_JPROF@%$MOZ_JPROF%g
  13623. s%@MOZ_XPCTOOLS@%$MOZ_XPCTOOLS%g
  13624. s%@MOZ_INSURE@%$MOZ_INSURE%g
  13625. s%@MOZ_INSURE_DIRS@%$MOZ_INSURE_DIRS%g
  13626. s%@MOZ_INSURE_EXCLUDE_DIRS@%$MOZ_INSURE_EXCLUDE_DIRS%g
  13627. s%@MOZ_INSURIFYING@%$MOZ_INSURIFYING%g
  13628. s%@MOZ_BUILD_XPFE@%$MOZ_BUILD_XPFE%g
  13629. s%@MOZ_LDAP_XPCOM@%$MOZ_LDAP_XPCOM%g
  13630. s%@MOZ_LDAP_XPCOM_EXPERIMENTAL@%$MOZ_LDAP_XPCOM_EXPERIMENTAL%g
  13631. s%@XPCOM_USE_LEA@%$XPCOM_USE_LEA%g
  13632. s%@UNIX_CRASH_ON_ASSERT@%$UNIX_CRASH_ON_ASSERT%g
  13633. s%@NO_UNIX_ASYNC_DNS@%$NO_UNIX_ASYNC_DNS%g
  13634. s%@NO_SHARED_LIB@%$NO_SHARED_LIB%g
  13635. s%@NO_STATIC_LIB@%$NO_STATIC_LIB%g
  13636. s%@MOZ_STATIC_COMPONENTS@%$MOZ_STATIC_COMPONENTS%g
  13637. s%@ENABLE_TESTS@%$ENABLE_TESTS%g
  13638. s%@IBMBIDI@%$IBMBIDI%g
  13639. s%@MOZ_USER_DIR@%$MOZ_USER_DIR%g
  13640. s%@FULL_STATIC_BUILD@%$FULL_STATIC_BUILD%g
  13641. s%@BUILD_IDLC@%$BUILD_IDLC%g
  13642. s%@MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@%$MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS%g
  13643. s%@MOZ_COMPONENT_NSPR_LIBS@%$MOZ_COMPONENT_NSPR_LIBS%g
  13644. s%@MOZ_COMPONENT_XPCOM_LIBS@%$MOZ_COMPONENT_XPCOM_LIBS%g
  13645. s%@XPCOM_LIBS@%$XPCOM_LIBS%g
  13646. s%@MOZ_GLE@%$MOZ_GLE%g
  13647. s%@MOZ_BUILD_ROOT@%$MOZ_BUILD_ROOT%g
  13648. s%@MOZ_OS2_TOOLS@%$MOZ_OS2_TOOLS%g
  13649. s%@MOZ_OS2_EMX_OBJECTFORMAT@%$MOZ_OS2_EMX_OBJECTFORMAT%g
  13650. s%@MOZ_POST_DSO_LIB_COMMAND@%$MOZ_POST_DSO_LIB_COMMAND%g
  13651. s%@MOZ_POST_PROGRAM_COMMAND@%$MOZ_POST_PROGRAM_COMMAND%g
  13652. s%@MOZ_FULLCIRCLE@%$MOZ_FULLCIRCLE%g
  13653. s%@FULLCIRCLE_LIBS@%$FULLCIRCLE_LIBS%g
  13654. s%@SYSTEM_JPEG@%$SYSTEM_JPEG%g
  13655. s%@SYSTEM_PNG@%$SYSTEM_PNG%g
  13656. s%@SYSTEM_MNG@%$SYSTEM_MNG%g
  13657. s%@SYSTEM_ZLIB@%$SYSTEM_ZLIB%g
  13658. s%@JPEG_CFLAGS@%$JPEG_CFLAGS%g
  13659. s%@JPEG_LIBS@%$JPEG_LIBS%g
  13660. s%@ZLIB_CFLAGS@%$ZLIB_CFLAGS%g
  13661. s%@ZLIB_LIBS@%$ZLIB_LIBS%g
  13662. s%@PNG_CFLAGS@%$PNG_CFLAGS%g
  13663. s%@PNG_LIBS@%$PNG_LIBS%g
  13664. s%@MNG_CFLAGS@%$MNG_CFLAGS%g
  13665. s%@MNG_LIBS@%$MNG_LIBS%g
  13666. s%@MOZ_JPEG_CFLAGS@%$MOZ_JPEG_CFLAGS%g
  13667. s%@MOZ_JPEG_LIBS@%$MOZ_JPEG_LIBS%g
  13668. s%@MOZ_ZLIB_CFLAGS@%$MOZ_ZLIB_CFLAGS%g
  13669. s%@MOZ_ZLIB_LIBS@%$MOZ_ZLIB_LIBS%g
  13670. s%@MOZ_PNG_CFLAGS@%$MOZ_PNG_CFLAGS%g
  13671. s%@MOZ_PNG_LIBS@%$MOZ_PNG_LIBS%g
  13672. s%@MOZ_MNG_CFLAGS@%$MOZ_MNG_CFLAGS%g
  13673. s%@MOZ_MNG_LIBS@%$MOZ_MNG_LIBS%g
  13674. s%@MOZ_NATIVE_NSPR@%$MOZ_NATIVE_NSPR%g
  13675. s%@COMPILE_CFLAGS@%$COMPILE_CFLAGS%g
  13676. s%@COMPILE_CXXFLAGS@%$COMPILE_CXXFLAGS%g
  13677. s%@CROSS_COMPILE@%$CROSS_COMPILE%g
  13678. s%@HOST_CFLAGS@%$HOST_CFLAGS%g
  13679. s%@HOST_CXXFLAGS@%$HOST_CXXFLAGS%g
  13680. s%@HOST_NSPR_MDCPUCFG@%$HOST_NSPR_MDCPUCFG%g
  13681. s%@HOST_LIBIDL_CONFIG@%$HOST_LIBIDL_CONFIG%g
  13682. s%@HOST_LIBIDL_CFLAGS@%$HOST_LIBIDL_CFLAGS%g
  13683. s%@HOST_LIBIDL_LIBS@%$HOST_LIBIDL_LIBS%g
  13684. s%@TARGET_CPU@%$TARGET_CPU%g
  13685. s%@TARGET_OS@%$TARGET_OS%g
  13686. s%@TARGET_NSPR_MDCPUCFG@%$TARGET_NSPR_MDCPUCFG%g
  13687. s%@TARGET_MD_ARCH@%$TARGET_MD_ARCH%g
  13688. s%@OS_TARGET@%$OS_TARGET%g
  13689. s%@OS_ARCH@%$OS_ARCH%g
  13690. s%@OS_RELEASE@%$OS_RELEASE%g
  13691. s%@OS_TEST@%$OS_TEST%g
  13692. s%@MOZ_DISABLE_DTD_DEBUG@%$MOZ_DISABLE_DTD_DEBUG%g
  13693. s%@MOZ_DISABLE_JAR_PACKAGING@%$MOZ_DISABLE_JAR_PACKAGING%g
  13694. s%@MOZ_CHROME_FILE_FORMAT@%$MOZ_CHROME_FILE_FORMAT%g
  13695. s%@WRAP_MALLOC_CFLAGS@%$WRAP_MALLOC_CFLAGS%g
  13696. s%@WRAP_MALLOC_LIB@%$WRAP_MALLOC_LIB%g
  13697. s%@MKSHLIB@%$MKSHLIB%g
  13698. s%@MKCSHLIB@%$MKCSHLIB%g
  13699. s%@MKSHLIB_FORCE_ALL@%$MKSHLIB_FORCE_ALL%g
  13700. s%@MKSHLIB_UNFORCE_ALL@%$MKSHLIB_UNFORCE_ALL%g
  13701. s%@DSO_CFLAGS@%$DSO_CFLAGS%g
  13702. s%@DSO_PIC_CFLAGS@%$DSO_PIC_CFLAGS%g
  13703. s%@DSO_LDOPTS@%$DSO_LDOPTS%g
  13704. s%@DLL_SUFFIX@%$DLL_SUFFIX%g
  13705. s%@LIB_SUFFIX@%$LIB_SUFFIX%g
  13706. s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
  13707. s%@BIN_SUFFIX@%$BIN_SUFFIX%g
  13708. s%@USE_N32@%$USE_N32%g
  13709. s%@MOZ_NSS_AUTOCONF@%$MOZ_NSS_AUTOCONF%g
  13710. s%@HAVE_MOVEMAIL@%$HAVE_MOVEMAIL%g
  13711. s%@LIBS_PATH@%$LIBS_PATH%g
  13712. s%@MOZ_DEFINES@%$MOZ_DEFINES%g
  13713.  
  13714. CEOF
  13715. EOF
  13716.  
  13717. cat >> $CONFIG_STATUS <<\EOF
  13718.  
  13719. # Split the substitutions into bite-sized pieces for seds with
  13720. # small command number limits, like on Digital OSF/1 and HP-UX.
  13721. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  13722. ac_file=1 # Number of current file.
  13723. ac_beg=1 # First line for current file.
  13724. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  13725. ac_more_lines=:
  13726. ac_sed_cmds=""
  13727. while $ac_more_lines; do
  13728.   if test $ac_beg -gt 1; then
  13729.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  13730.   else
  13731.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  13732.   fi
  13733.   if test ! -s conftest.s$ac_file; then
  13734.     ac_more_lines=false
  13735.     rm -f conftest.s$ac_file
  13736.   else
  13737.     if test -z "$ac_sed_cmds"; then
  13738.       ac_sed_cmds="sed -f conftest.s$ac_file"
  13739.     else
  13740.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  13741.     fi
  13742.     ac_file=`expr $ac_file + 1`
  13743.     ac_beg=$ac_end
  13744.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  13745.   fi
  13746. done
  13747. if test -z "$ac_sed_cmds"; then
  13748.   ac_sed_cmds=cat
  13749. fi
  13750. EOF
  13751.  
  13752. cat >> $CONFIG_STATUS <<EOF
  13753.  
  13754. CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
  13755. EOF
  13756. cat >> $CONFIG_STATUS <<\EOF
  13757. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  13758.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  13759.   case "$ac_file" in
  13760.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  13761.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  13762.   *) ac_file_in="${ac_file}.in" ;;
  13763.   esac
  13764.  
  13765.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  13766.  
  13767.   # Remove last slash and all that follows it.  Not all systems have dirname.
  13768.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  13769.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  13770.     # The file is in a subdirectory.
  13771.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  13772.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  13773.     # A "../" for each directory in $ac_dir_suffix.
  13774.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  13775.   else
  13776.     ac_dir_suffix= ac_dots=
  13777.   fi
  13778.  
  13779.   case "$ac_given_srcdir" in
  13780.   .)  srcdir=.
  13781.       if test -z "$ac_dots"; then top_srcdir=.
  13782.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  13783.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  13784.   *) # Relative path.
  13785.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  13786.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  13787.   esac
  13788.  
  13789.   case "$ac_given_INSTALL" in
  13790.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  13791.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  13792.   esac
  13793.  
  13794.   echo creating "$ac_file"
  13795.   rm -f "$ac_file"
  13796.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  13797.   case "$ac_file" in
  13798.   *Makefile*) ac_comsub="1i\\
  13799. # $configure_input" ;;
  13800.   *) ac_comsub= ;;
  13801.   esac
  13802.  
  13803.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  13804.   sed -e "$ac_comsub
  13805. s%@configure_input@%$configure_input%g
  13806. s%@srcdir@%$srcdir%g
  13807. s%@top_srcdir@%$top_srcdir%g
  13808. s%@INSTALL@%$INSTALL%g
  13809. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  13810. fi; done
  13811. rm -f conftest.s*
  13812.  
  13813. EOF
  13814. cat >> $CONFIG_STATUS <<EOF
  13815.  
  13816. EOF
  13817. cat >> $CONFIG_STATUS <<\EOF
  13818.  
  13819. exit 0
  13820. EOF
  13821. chmod +x $CONFIG_STATUS
  13822. rm -fr confdefs* $ac_clean_files
  13823. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  13824.  
  13825.  
  13826. CC="$_SUBDIR_CC" 
  13827. CXX="$_SUBDIR_CXX" 
  13828. CFLAGS="$_SUBDIR_CFLAGS" 
  13829. CPPFLAGS="$_SUBDIR_CPPFLAGS"
  13830. CXXFLAGS="$_SUBDIR_CXXFLAGS"
  13831. LDFLAGS="$_SUBDIR_LDFLAGS"
  13832. HOST_CC="$_SUBDIR_HOST_CC" 
  13833. HOST_CFLAGS="$_SUBDIR_HOST_CFLAGS"
  13834. HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS"
  13835. WINDRES=
  13836. DLLTOOL=
  13837.  
  13838. unset MAKEFILES
  13839. unset CONFIG_FILES
  13840.  
  13841. if test -z "$MOZ_NATIVE_NSPR" || test "$MOZ_LDAP_XPCOM"; then
  13842.     ac_configure_args="$_SUBDIR_CONFIG_ARGS --with-dist-prefix=$MOZ_BUILD_ROOT/dist"
  13843.     
  13844. if test "$no_recursion" != yes; then
  13845.  
  13846.   # Remove --cache-file and --srcdir arguments so they do not pile up.
  13847.   ac_sub_configure_args=
  13848.   ac_prev=
  13849.   for ac_arg in $ac_configure_args; do
  13850.     if test -n "$ac_prev"; then
  13851.       ac_prev=
  13852.       continue
  13853.     fi
  13854.     case "$ac_arg" in
  13855.     -cache-file | --cache-file | --cache-fil | --cache-fi \
  13856.     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  13857.       ac_prev=cache_file ;;
  13858.     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  13859.     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  13860.       ;;
  13861.     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  13862.       ac_prev=srcdir ;;
  13863.     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  13864.       ;;
  13865.     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
  13866.     esac
  13867.   done
  13868.  
  13869.   for ac_config_dir in nsprpub; do
  13870.  
  13871.     # Do not complain, so a configure script can configure whichever
  13872.     # parts of a large source tree are present.
  13873.     if test ! -d $srcdir/$ac_config_dir; then
  13874.       continue
  13875.     fi
  13876.  
  13877.     echo configuring in $ac_config_dir
  13878.  
  13879.     case "$srcdir" in
  13880.     .) ;;
  13881.     *)
  13882.       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
  13883.       else
  13884.         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
  13885.       fi
  13886.       ;;
  13887.     esac
  13888.  
  13889.     ac_popdir=`pwd`
  13890.     cd $ac_config_dir
  13891.  
  13892.       # A "../" for each directory in /$ac_config_dir.
  13893.       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
  13894.  
  13895.     case "$srcdir" in
  13896.     .) # No --srcdir option.  We are building in place.
  13897.       ac_sub_srcdir=$srcdir ;;
  13898.     /*) # Absolute path.
  13899.       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
  13900.     *) # Relative path.
  13901.       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
  13902.     esac
  13903.  
  13904.     # Check for guested configure; otherwise get Cygnus style configure.
  13905.     if test -f $ac_sub_srcdir/configure; then
  13906.       ac_sub_configure=$ac_sub_srcdir/configure
  13907.     elif test -f $ac_sub_srcdir/configure.in; then
  13908.       ac_sub_configure=$ac_configure
  13909.     else
  13910.       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
  13911.       ac_sub_configure=
  13912.     fi
  13913.  
  13914.     # The recursion is here.
  13915.     if test -n "$ac_sub_configure"; then
  13916.  
  13917.       # Make the cache file name correct relative to the subdirectory.
  13918.       case "$cache_file" in
  13919.       /*) ac_sub_cache_file=$cache_file ;;
  13920.       *) # Relative path.
  13921.         ac_sub_cache_file="$ac_dots$cache_file" ;;
  13922.       esac
  13923.   case "$ac_given_INSTALL" in
  13924.         [/$]*) INSTALL="$ac_given_INSTALL" ;;
  13925.         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  13926.         esac
  13927.  
  13928.       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
  13929.       # The eval makes quoting arguments work.
  13930.       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
  13931.       then :
  13932.       else
  13933.         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
  13934.       fi
  13935.     fi
  13936.  
  13937.     cd $ac_popdir
  13938.   done
  13939. fi
  13940.  
  13941. fi
  13942.  
  13943. if test -z "$MOZ_NATIVE_NSPR"; then
  13944.     # Hack to deal with the fact that we use NSPR_CFLAGS everywhere
  13945.     echo "configure: warning: Recreating autoconf.mk with updated nspr-config output" 1>&2
  13946.     case "$target" in
  13947.     *-*-os2_vacpp)
  13948.         ;;
  13949.     *)
  13950.         NSPR_LIBS=`./nsprpub/config/nspr-config --prefix=$MOZ_BUILD_ROOT/dist --exec-prefix=$MOZ_BUILD_ROOT/dist --libs`
  13951.         $PERL -pi.bak -e "s {^NSPR_LIBS\s*=.*} {NSPR_LIBS = $NSPR_LIBS }" config/autoconf.mk
  13952.         ;;
  13953.     esac
  13954.     NSPR_CFLAGS=`./nsprpub/config/nspr-config --prefix=$MOZ_BUILD_ROOT/dist --exec-prefix=$MOZ_BUILD_ROOT/dist --cflags`
  13955.     $PERL -pi.bak -e "s {^NSPR_CFLAGS\s*=.*} {NSPR_CFLAGS = $NSPR_CFLAGS }" config/autoconf.mk
  13956.     rm -f config/autoconf.mk.bak
  13957. fi
  13958.  
  13959. # if we're building the LDAP XPCOM component, we need to build 
  13960. # the c-sdk first.  
  13961. #
  13962. if test "$MOZ_LDAP_XPCOM"; then
  13963.  
  13964.   # these subdirs may not yet have been created in the build tree.
  13965.   # don't use the "-p" switch to mkdir, since not all platforms have it
  13966.   #
  13967.   if test ! -d "directory/c-sdk"; then
  13968.     mkdir "directory/c-sdk"    
  13969.   fi
  13970.   if test ! -d "directory/c-sdk/ldap"; then
  13971.     mkdir "directory/c-sdk/ldap"    
  13972.   fi
  13973.  
  13974.   ac_configure_args="$_SUBDIR_CONFIG_ARGS --prefix=$MOZ_BUILD_ROOT/dist"
  13975.   
  13976. if test "$no_recursion" != yes; then
  13977.  
  13978.   # Remove --cache-file and --srcdir arguments so they do not pile up.
  13979.   ac_sub_configure_args=
  13980.   ac_prev=
  13981.   for ac_arg in $ac_configure_args; do
  13982.     if test -n "$ac_prev"; then
  13983.       ac_prev=
  13984.       continue
  13985.     fi
  13986.     case "$ac_arg" in
  13987.     -cache-file | --cache-file | --cache-fil | --cache-fi \
  13988.     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  13989.       ac_prev=cache_file ;;
  13990.     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  13991.     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  13992.       ;;
  13993.     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  13994.       ac_prev=srcdir ;;
  13995.     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  13996.       ;;
  13997.     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
  13998.     esac
  13999.   done
  14000.  
  14001.   for ac_config_dir in directory/c-sdk/ldap; do
  14002.  
  14003.     # Do not complain, so a configure script can configure whichever
  14004.     # parts of a large source tree are present.
  14005.     if test ! -d $srcdir/$ac_config_dir; then
  14006.       continue
  14007.     fi
  14008.  
  14009.     echo configuring in $ac_config_dir
  14010.  
  14011.     case "$srcdir" in
  14012.     .) ;;
  14013.     *)
  14014.       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
  14015.       else
  14016.         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
  14017.       fi
  14018.       ;;
  14019.     esac
  14020.  
  14021.     ac_popdir=`pwd`
  14022.     cd $ac_config_dir
  14023.  
  14024.       # A "../" for each directory in /$ac_config_dir.
  14025.       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
  14026.  
  14027.     case "$srcdir" in
  14028.     .) # No --srcdir option.  We are building in place.
  14029.       ac_sub_srcdir=$srcdir ;;
  14030.     /*) # Absolute path.
  14031.       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
  14032.     *) # Relative path.
  14033.       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
  14034.     esac
  14035.  
  14036.     # Check for guested configure; otherwise get Cygnus style configure.
  14037.     if test -f $ac_sub_srcdir/configure; then
  14038.       ac_sub_configure=$ac_sub_srcdir/configure
  14039.     elif test -f $ac_sub_srcdir/configure.in; then
  14040.       ac_sub_configure=$ac_configure
  14041.     else
  14042.       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
  14043.       ac_sub_configure=
  14044.     fi
  14045.  
  14046.     # The recursion is here.
  14047.     if test -n "$ac_sub_configure"; then
  14048.  
  14049.       # Make the cache file name correct relative to the subdirectory.
  14050.       case "$cache_file" in
  14051.       /*) ac_sub_cache_file=$cache_file ;;
  14052.       *) # Relative path.
  14053.         ac_sub_cache_file="$ac_dots$cache_file" ;;
  14054.       esac
  14055.   case "$ac_given_INSTALL" in
  14056.         [/$]*) INSTALL="$ac_given_INSTALL" ;;
  14057.         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  14058.         esac
  14059.  
  14060.       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
  14061.       # The eval makes quoting arguments work.
  14062.       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
  14063.       then :
  14064.       else
  14065.         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
  14066.       fi
  14067.     fi
  14068.  
  14069.     cd $ac_popdir
  14070.   done
  14071. fi
  14072.  
  14073. fi
  14074.  
  14075. if test "$MOZ_PSM" && test -n "$MOZ_NSS_AUTOCONF"; then
  14076.     if test ! -d security; then
  14077.         rm -rf security; mkdir security
  14078.     fi
  14079.     ac_configure_args="$_SUBDIR_CONFIG_ARGS --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla --disable-cmd"
  14080.     
  14081. if test "$no_recursion" != yes; then
  14082.  
  14083.   # Remove --cache-file and --srcdir arguments so they do not pile up.
  14084.   ac_sub_configure_args=
  14085.   ac_prev=
  14086.   for ac_arg in $ac_configure_args; do
  14087.     if test -n "$ac_prev"; then
  14088.       ac_prev=
  14089.       continue
  14090.     fi
  14091.     case "$ac_arg" in
  14092.     -cache-file | --cache-file | --cache-fil | --cache-fi \
  14093.     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  14094.       ac_prev=cache_file ;;
  14095.     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  14096.     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  14097.       ;;
  14098.     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  14099.       ac_prev=srcdir ;;
  14100.     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  14101.       ;;
  14102.     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
  14103.     esac
  14104.   done
  14105.  
  14106.   for ac_config_dir in security/nss; do
  14107.  
  14108.     # Do not complain, so a configure script can configure whichever
  14109.     # parts of a large source tree are present.
  14110.     if test ! -d $srcdir/$ac_config_dir; then
  14111.       continue
  14112.     fi
  14113.  
  14114.     echo configuring in $ac_config_dir
  14115.  
  14116.     case "$srcdir" in
  14117.     .) ;;
  14118.     *)
  14119.       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
  14120.       else
  14121.         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
  14122.       fi
  14123.       ;;
  14124.     esac
  14125.  
  14126.     ac_popdir=`pwd`
  14127.     cd $ac_config_dir
  14128.  
  14129.       # A "../" for each directory in /$ac_config_dir.
  14130.       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
  14131.  
  14132.     case "$srcdir" in
  14133.     .) # No --srcdir option.  We are building in place.
  14134.       ac_sub_srcdir=$srcdir ;;
  14135.     /*) # Absolute path.
  14136.       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
  14137.     *) # Relative path.
  14138.       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
  14139.     esac
  14140.  
  14141.     # Check for guested configure; otherwise get Cygnus style configure.
  14142.     if test -f $ac_sub_srcdir/configure; then
  14143.       ac_sub_configure=$ac_sub_srcdir/configure
  14144.     elif test -f $ac_sub_srcdir/configure.in; then
  14145.       ac_sub_configure=$ac_configure
  14146.     else
  14147.       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
  14148.       ac_sub_configure=
  14149.     fi
  14150.  
  14151.     # The recursion is here.
  14152.     if test -n "$ac_sub_configure"; then
  14153.  
  14154.       # Make the cache file name correct relative to the subdirectory.
  14155.       case "$cache_file" in
  14156.       /*) ac_sub_cache_file=$cache_file ;;
  14157.       *) # Relative path.
  14158.         ac_sub_cache_file="$ac_dots$cache_file" ;;
  14159.       esac
  14160.   case "$ac_given_INSTALL" in
  14161.         [/$]*) INSTALL="$ac_given_INSTALL" ;;
  14162.         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  14163.         esac
  14164.  
  14165.       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
  14166.       # The eval makes quoting arguments work.
  14167.       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
  14168.       then :
  14169.       else
  14170.         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
  14171.       fi
  14172.     fi
  14173.  
  14174.     cd $ac_popdir
  14175.   done
  14176. fi
  14177.  
  14178. fi
  14179.