home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lyx-0.13.2.tar.gz / lyx-0.13.2.tar / lyx-0.13.2 / configure < prev    next >
Text File  |  1998-04-23  |  175KB  |  6,155 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --with-warnings         tell GNU C++ to display more warnings"
  16. ac_help="$ac_help
  17.   --with-broken-const     disable the keyword 'const'"
  18. ac_help="$ac_help
  19.   --with-gcc-hack         add a wrapper around gcc"
  20. ac_help="$ac_help
  21.   --with-extra-lib        specify extra library directory"
  22. ac_help="$ac_help
  23.   --with-extra-inc        specify extra include directory"
  24. ac_help="$ac_help
  25.   --with-extra-prefix        specify extra lib+include directory"
  26. ac_help="$ac_help
  27.   --without-liberty       do not try to link against libiberty.a"
  28. ac_help="$ac_help
  29.   --with-x                use the X Window System"
  30. ac_help="$ac_help
  31.   --disable-nls           do not use Native Language Support"
  32. ac_help="$ac_help
  33.   --with-included-gettext use the GNU gettext library included here"
  34. ac_help="$ac_help
  35.   --with-catgets          use catgets functions if available"
  36. ac_help="$ac_help
  37.   --with-broken-headers      define some functions on SunOS4 and SCO"
  38. ac_help="$ac_help
  39.   --with-two-colors       use two color pixmaps"
  40. ac_help="$ac_help
  41.   --with-debug            output debug information by default"
  42.  
  43. # Initialize some variables set by options.
  44. # The variables have the same names as the options, with
  45. # dashes changed to underlines.
  46. build=NONE
  47. cache_file=./config.cache
  48. exec_prefix=NONE
  49. host=NONE
  50. no_create=
  51. nonopt=NONE
  52. no_recursion=
  53. prefix=NONE
  54. program_prefix=NONE
  55. program_suffix=NONE
  56. program_transform_name=s,x,x,
  57. silent=
  58. site=
  59. srcdir=
  60. target=NONE
  61. verbose=
  62. x_includes=NONE
  63. x_libraries=NONE
  64. bindir='${exec_prefix}/bin'
  65. sbindir='${exec_prefix}/sbin'
  66. libexecdir='${exec_prefix}/libexec'
  67. datadir='${prefix}/share'
  68. sysconfdir='${prefix}/etc'
  69. sharedstatedir='${prefix}/com'
  70. localstatedir='${prefix}/var'
  71. libdir='${exec_prefix}/lib'
  72. includedir='${prefix}/include'
  73. oldincludedir='/usr/include'
  74. infodir='${prefix}/info'
  75. mandir='${prefix}/man'
  76.  
  77. # Initialize some other variables.
  78. subdirs=
  79. MFLAGS= MAKEFLAGS=
  80. # Maximum number of lines to put in a shell here document.
  81. ac_max_here_lines=12
  82.  
  83. ac_prev=
  84. for ac_option
  85. do
  86.  
  87.   # If the previous option needs an argument, assign it.
  88.   if test -n "$ac_prev"; then
  89.     eval "$ac_prev=\$ac_option"
  90.     ac_prev=
  91.     continue
  92.   fi
  93.  
  94.   case "$ac_option" in
  95.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  96.   *) ac_optarg= ;;
  97.   esac
  98.  
  99.   # Accept the important Cygnus configure options, so we can diagnose typos.
  100.  
  101.   case "$ac_option" in
  102.  
  103.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  104.     ac_prev=bindir ;;
  105.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  106.     bindir="$ac_optarg" ;;
  107.  
  108.   -build | --build | --buil | --bui | --bu)
  109.     ac_prev=build ;;
  110.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  111.     build="$ac_optarg" ;;
  112.  
  113.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  114.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  115.     ac_prev=cache_file ;;
  116.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  117.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  118.     cache_file="$ac_optarg" ;;
  119.  
  120.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  121.     ac_prev=datadir ;;
  122.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  123.   | --da=*)
  124.     datadir="$ac_optarg" ;;
  125.  
  126.   -disable-* | --disable-*)
  127.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  128.     # Reject names that are not valid shell variable names.
  129.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  130.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  131.     fi
  132.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  133.     eval "enable_${ac_feature}=no" ;;
  134.  
  135.   -enable-* | --enable-*)
  136.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  137.     # Reject names that are not valid shell variable names.
  138.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  139.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  140.     fi
  141.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  142.     case "$ac_option" in
  143.       *=*) ;;
  144.       *) ac_optarg=yes ;;
  145.     esac
  146.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  147.  
  148.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  149.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  150.   | --exec | --exe | --ex)
  151.     ac_prev=exec_prefix ;;
  152.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  153.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  154.   | --exec=* | --exe=* | --ex=*)
  155.     exec_prefix="$ac_optarg" ;;
  156.  
  157.   -gas | --gas | --ga | --g)
  158.     # Obsolete; use --with-gas.
  159.     with_gas=yes ;;
  160.  
  161.   -help | --help | --hel | --he)
  162.     # Omit some internal or obsolete options to make the list less imposing.
  163.     # This message is too long to be a string in the A/UX 3.1 sh.
  164.     cat << EOF
  165. Usage: configure [options] [host]
  166. Options: [defaults in brackets after descriptions]
  167. Configuration:
  168.   --cache-file=FILE       cache test results in FILE
  169.   --help                  print this message
  170.   --no-create             do not create output files
  171.   --quiet, --silent       do not print \`checking...' messages
  172.   --version               print the version of autoconf that created configure
  173. Directory and file names:
  174.   --prefix=PREFIX         install architecture-independent files in PREFIX
  175.                           [$ac_default_prefix]
  176.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  177.                           [same as prefix]
  178.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  179.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  180.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  181.   --datadir=DIR           read-only architecture-independent data in DIR
  182.                           [PREFIX/share]
  183.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  184.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  185.                           [PREFIX/com]
  186.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  187.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  188.   --includedir=DIR        C header files in DIR [PREFIX/include]
  189.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  190.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  191.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  192.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  193.   --program-prefix=PREFIX prepend PREFIX to installed program names
  194.   --program-suffix=SUFFIX append SUFFIX to installed program names
  195.   --program-transform-name=PROGRAM
  196.                           run sed PROGRAM on installed program names
  197. EOF
  198.     cat << EOF
  199. Host type:
  200.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  201.   --host=HOST             configure for HOST [guessed]
  202.   --target=TARGET         configure for TARGET [TARGET=HOST]
  203. Features and packages:
  204.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  205.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  206.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  207.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  208.   --x-includes=DIR        X include files are in DIR
  209.   --x-libraries=DIR       X library files are in DIR
  210. EOF
  211.     if test -n "$ac_help"; then
  212.       echo "--enable and --with options recognized:$ac_help"
  213.     fi
  214.     exit 0 ;;
  215.  
  216.   -host | --host | --hos | --ho)
  217.     ac_prev=host ;;
  218.   -host=* | --host=* | --hos=* | --ho=*)
  219.     host="$ac_optarg" ;;
  220.  
  221.   -includedir | --includedir | --includedi | --included | --include \
  222.   | --includ | --inclu | --incl | --inc)
  223.     ac_prev=includedir ;;
  224.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  225.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  226.     includedir="$ac_optarg" ;;
  227.  
  228.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  229.     ac_prev=infodir ;;
  230.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  231.     infodir="$ac_optarg" ;;
  232.  
  233.   -libdir | --libdir | --libdi | --libd)
  234.     ac_prev=libdir ;;
  235.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  236.     libdir="$ac_optarg" ;;
  237.  
  238.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  239.   | --libexe | --libex | --libe)
  240.     ac_prev=libexecdir ;;
  241.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  242.   | --libexe=* | --libex=* | --libe=*)
  243.     libexecdir="$ac_optarg" ;;
  244.  
  245.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  246.   | --localstate | --localstat | --localsta | --localst \
  247.   | --locals | --local | --loca | --loc | --lo)
  248.     ac_prev=localstatedir ;;
  249.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  250.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  251.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  252.     localstatedir="$ac_optarg" ;;
  253.  
  254.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  255.     ac_prev=mandir ;;
  256.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  257.     mandir="$ac_optarg" ;;
  258.  
  259.   -nfp | --nfp | --nf)
  260.     # Obsolete; use --without-fp.
  261.     with_fp=no ;;
  262.  
  263.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  264.   | --no-cr | --no-c)
  265.     no_create=yes ;;
  266.  
  267.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  268.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  269.     no_recursion=yes ;;
  270.  
  271.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  272.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  273.   | --oldin | --oldi | --old | --ol | --o)
  274.     ac_prev=oldincludedir ;;
  275.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  276.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  277.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  278.     oldincludedir="$ac_optarg" ;;
  279.  
  280.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  281.     ac_prev=prefix ;;
  282.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  283.     prefix="$ac_optarg" ;;
  284.  
  285.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  286.   | --program-pre | --program-pr | --program-p)
  287.     ac_prev=program_prefix ;;
  288.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  289.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  290.     program_prefix="$ac_optarg" ;;
  291.  
  292.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  293.   | --program-suf | --program-su | --program-s)
  294.     ac_prev=program_suffix ;;
  295.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  296.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  297.     program_suffix="$ac_optarg" ;;
  298.  
  299.   -program-transform-name | --program-transform-name \
  300.   | --program-transform-nam | --program-transform-na \
  301.   | --program-transform-n | --program-transform- \
  302.   | --program-transform | --program-transfor \
  303.   | --program-transfo | --program-transf \
  304.   | --program-trans | --program-tran \
  305.   | --progr-tra | --program-tr | --program-t)
  306.     ac_prev=program_transform_name ;;
  307.   -program-transform-name=* | --program-transform-name=* \
  308.   | --program-transform-nam=* | --program-transform-na=* \
  309.   | --program-transform-n=* | --program-transform-=* \
  310.   | --program-transform=* | --program-transfor=* \
  311.   | --program-transfo=* | --program-transf=* \
  312.   | --program-trans=* | --program-tran=* \
  313.   | --progr-tra=* | --program-tr=* | --program-t=*)
  314.     program_transform_name="$ac_optarg" ;;
  315.  
  316.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  317.   | -silent | --silent | --silen | --sile | --sil)
  318.     silent=yes ;;
  319.  
  320.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  321.     ac_prev=sbindir ;;
  322.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  323.   | --sbi=* | --sb=*)
  324.     sbindir="$ac_optarg" ;;
  325.  
  326.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  327.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  328.   | --sharedst | --shareds | --shared | --share | --shar \
  329.   | --sha | --sh)
  330.     ac_prev=sharedstatedir ;;
  331.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  332.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  333.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  334.   | --sha=* | --sh=*)
  335.     sharedstatedir="$ac_optarg" ;;
  336.  
  337.   -site | --site | --sit)
  338.     ac_prev=site ;;
  339.   -site=* | --site=* | --sit=*)
  340.     site="$ac_optarg" ;;
  341.  
  342.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  343.     ac_prev=srcdir ;;
  344.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  345.     srcdir="$ac_optarg" ;;
  346.  
  347.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  348.   | --syscon | --sysco | --sysc | --sys | --sy)
  349.     ac_prev=sysconfdir ;;
  350.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  351.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  352.     sysconfdir="$ac_optarg" ;;
  353.  
  354.   -target | --target | --targe | --targ | --tar | --ta | --t)
  355.     ac_prev=target ;;
  356.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  357.     target="$ac_optarg" ;;
  358.  
  359.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  360.     verbose=yes ;;
  361.  
  362.   -version | --version | --versio | --versi | --vers)
  363.     echo "configure generated by autoconf version 2.12"
  364.     exit 0 ;;
  365.  
  366.   -with-* | --with-*)
  367.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  368.     # Reject names that are not valid shell variable names.
  369.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  370.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  371.     fi
  372.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  373.     case "$ac_option" in
  374.       *=*) ;;
  375.       *) ac_optarg=yes ;;
  376.     esac
  377.     eval "with_${ac_package}='$ac_optarg'" ;;
  378.  
  379.   -without-* | --without-*)
  380.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  381.     # Reject names that are not valid shell variable names.
  382.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  383.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  384.     fi
  385.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  386.     eval "with_${ac_package}=no" ;;
  387.  
  388.   --x)
  389.     # Obsolete; use --with-x.
  390.     with_x=yes ;;
  391.  
  392.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  393.   | --x-incl | --x-inc | --x-in | --x-i)
  394.     ac_prev=x_includes ;;
  395.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  396.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  397.     x_includes="$ac_optarg" ;;
  398.  
  399.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  400.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  401.     ac_prev=x_libraries ;;
  402.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  403.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  404.     x_libraries="$ac_optarg" ;;
  405.  
  406.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  407.     ;;
  408.  
  409.   *)
  410.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  411.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  412.     fi
  413.     if test "x$nonopt" != xNONE; then
  414.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  415.     fi
  416.     nonopt="$ac_option"
  417.     ;;
  418.  
  419.   esac
  420. done
  421.  
  422. if test -n "$ac_prev"; then
  423.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  424. fi
  425.  
  426. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  427.  
  428. # File descriptor usage:
  429. # 0 standard input
  430. # 1 file creation
  431. # 2 errors and warnings
  432. # 3 some systems may open it to /dev/tty
  433. # 4 used on the Kubota Titan
  434. # 6 checking for... messages and results
  435. # 5 compiler messages saved in config.log
  436. if test "$silent" = yes; then
  437.   exec 6>/dev/null
  438. else
  439.   exec 6>&1
  440. fi
  441. exec 5>./config.log
  442.  
  443. echo "\
  444. This file contains any messages produced by compilers while
  445. running configure, to aid debugging if configure makes a mistake.
  446. " 1>&5
  447.  
  448. # Strip out --no-create and --no-recursion so they do not pile up.
  449. # Also quote any args containing shell metacharacters.
  450. ac_configure_args=
  451. for ac_arg
  452. do
  453.   case "$ac_arg" in
  454.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  455.   | --no-cr | --no-c) ;;
  456.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  457.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  458.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  459.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  460.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  461.   esac
  462. done
  463.  
  464. # NLS nuisances.
  465. # Only set these to C if already set.  These must not be set unconditionally
  466. # because not all systems understand e.g. LANG=C (notably SCO).
  467. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  468. # Non-C LC_CTYPE values break the ctype check.
  469. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  470. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  471. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  472. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  473.  
  474. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  475. rm -rf conftest* confdefs.h
  476. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  477. echo > confdefs.h
  478.  
  479. # A filename unique to this package, relative to the directory that
  480. # configure is in, which we can look for to find out if srcdir is correct.
  481. ac_unique_file=src/lyx.C
  482.  
  483. # Find the source files, if location was not specified.
  484. if test -z "$srcdir"; then
  485.   ac_srcdir_defaulted=yes
  486.   # Try the directory containing this script, then its parent.
  487.   ac_prog=$0
  488.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  489.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  490.   srcdir=$ac_confdir
  491.   if test ! -r $srcdir/$ac_unique_file; then
  492.     srcdir=..
  493.   fi
  494. else
  495.   ac_srcdir_defaulted=no
  496. fi
  497. if test ! -r $srcdir/$ac_unique_file; then
  498.   if test "$ac_srcdir_defaulted" = yes; then
  499.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  500.   else
  501.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  502.   fi
  503. fi
  504. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  505.  
  506. # Prefer explicitly selected file to automatically selected ones.
  507. if test -z "$CONFIG_SITE"; then
  508.   if test "x$prefix" != xNONE; then
  509.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  510.   else
  511.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  512.   fi
  513. fi
  514. for ac_site_file in $CONFIG_SITE; do
  515.   if test -r "$ac_site_file"; then
  516.     echo "loading site script $ac_site_file"
  517.     . "$ac_site_file"
  518.   fi
  519. done
  520.  
  521. if test -r "$cache_file"; then
  522.   echo "loading cache $cache_file"
  523.   . $cache_file
  524. else
  525.   echo "creating cache $cache_file"
  526.   > $cache_file
  527. fi
  528.  
  529. ac_ext=c
  530. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  531. ac_cpp='$CPP $CPPFLAGS'
  532. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  533. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  534. cross_compiling=$ac_cv_prog_cc_cross
  535.  
  536. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  537.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  538.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  539.     ac_n= ac_c='
  540. ' ac_t='    '
  541.   else
  542.     ac_n=-n ac_c= ac_t=
  543.   fi
  544. else
  545.   ac_n= ac_c='\c' ac_t=
  546. fi
  547.  
  548.  
  549.  
  550. ac_aux_dir=
  551. for ac_dir in config $srcdir/config; do
  552.   if test -f $ac_dir/install-sh; then
  553.     ac_aux_dir=$ac_dir
  554.     ac_install_sh="$ac_aux_dir/install-sh -c"
  555.     break
  556.   elif test -f $ac_dir/install.sh; then
  557.     ac_aux_dir=$ac_dir
  558.     ac_install_sh="$ac_aux_dir/install.sh -c"
  559.     break
  560.   fi
  561. done
  562. if test -z "$ac_aux_dir"; then
  563.   { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; }
  564. fi
  565. ac_config_guess=$ac_aux_dir/config.guess
  566. ac_config_sub=$ac_aux_dir/config.sub
  567. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  568.  
  569.  
  570. # automatically set the program suffix if none have been given
  571. # (Temporarily disabled).
  572. #if test "$program_suffix" = NONE ; then
  573. #  if test "$lyx_devel_version" = yes ; then
  574. #    program_suffix="-devel"
  575. #  else
  576. #    program_suffix=
  577. #  fi
  578. #fi
  579. if test "$program_suffix" = NONE ; then
  580.     program_suffix=
  581. fi
  582.  
  583.  
  584.  
  585.  
  586.  # Get LyX version from ${srcdir}/src/version.h and guess wether is is stable or experimental.
  587. VERSION=`grep '#define *LYX_VERSION' ${srcdir}/src/version.h | 
  588.              sed -e 's/^.*"\([0-9.]*\)[^0-9.].*$/\1/' 2>/dev/null`
  589. echo "configuring LyX version $VERSION"
  590. if echo "$VERSION" | grep '[0-9]*\.[0-9]*[13579]\.[0-9]*' >/dev/null ; then
  591.   lyx_devel_version=yes
  592.   echo "WARNING: This is a development version. Expect bugs."
  593. else
  594.   lyx_devel_version=no
  595. fi
  596.  PACKAGE=lyx${program_suffix}
  597. cat >> confdefs.h <<EOF
  598. #define PACKAGE "$PACKAGE"
  599. EOF
  600.  
  601. cat >> confdefs.h <<EOF
  602. #define VERSION "$VERSION"
  603. EOF
  604.  
  605.  
  606.  
  607.  
  608. test $lyx_devel_version = yes && cat >> confdefs.h <<\EOF
  609. #define DEVEL_VERSION 1
  610. EOF
  611.  
  612.  
  613. # The list of languages known to LyX
  614. # This is needed by GNU gettext
  615. ALL_LINGUAS="da de es fi fr hu nl no sv tr"
  616.  
  617. if test "x$prefix" = xNONE; then
  618. echo $ac_n "checking for prefix by $ac_c" 1>&6
  619. # Extract the first word of "lyx", so it can be a program name with args.
  620. set dummy lyx; ac_word=$2
  621. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  622. echo "configure:623: checking for $ac_word" >&5
  623. if eval "test \"`echo '$''{'ac_cv_path_LYX'+set}'`\" = set"; then
  624.   echo $ac_n "(cached) $ac_c" 1>&6
  625. else
  626.   case "$LYX" in
  627.   /*)
  628.   ac_cv_path_LYX="$LYX" # Let the user override the test with a path.
  629.   ;;
  630.   *)
  631.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  632.   for ac_dir in $PATH; do
  633.     test -z "$ac_dir" && ac_dir=.
  634.     if test -f $ac_dir/$ac_word; then
  635.       ac_cv_path_LYX="$ac_dir/$ac_word"
  636.       break
  637.     fi
  638.   done
  639.   IFS="$ac_save_ifs"
  640.   ;;
  641. esac
  642. fi
  643. LYX="$ac_cv_path_LYX"
  644. if test -n "$LYX"; then
  645.   echo "$ac_t""$LYX" 1>&6
  646. else
  647.   echo "$ac_t""no" 1>&6
  648. fi
  649.  
  650.   if test -n "$ac_cv_path_LYX"; then
  651.     prefix=`echo $ac_cv_path_LYX|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
  652.   fi
  653. fi
  654.  
  655.  
  656. # OS/2 would put .exe there.
  657. PROGEXT=
  658.  
  659.  
  660. # fix the value of the prefixes.
  661. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  662. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  663.  
  664. ### create the build directories if necessary
  665. test ! -d src && mkdir src 
  666.  
  667. ### Set the execute permissions of the various scripts correctly
  668. for file in config/install-sh config/mkinstalldirs config/hack-gcc \
  669.             lib/configure ; do
  670.   chmod 755 ${srcdir}/${file}
  671. done
  672.  
  673. absbuilddir=`pwd`
  674. abstopsrcdir=`cd ${srcdir} ; pwd`
  675.  
  676.  
  677.  
  678. ### Check for programs
  679. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  680. echo "configure:681: checking whether ${MAKE-make} sets \${MAKE}" >&5
  681. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  682. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  683.   echo $ac_n "(cached) $ac_c" 1>&6
  684. else
  685.   cat > conftestmake <<\EOF
  686. all:
  687.     @echo 'ac_maketemp="${MAKE}"'
  688. EOF
  689. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  690. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  691. if test -n "$ac_maketemp"; then
  692.   eval ac_cv_prog_make_${ac_make}_set=yes
  693. else
  694.   eval ac_cv_prog_make_${ac_make}_set=no
  695. fi
  696. rm -f conftestmake
  697. fi
  698. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  699.   echo "$ac_t""yes" 1>&6
  700.   SET_MAKE=
  701. else
  702.   echo "$ac_t""no" 1>&6
  703.   SET_MAKE="MAKE=${MAKE-make}"
  704. fi
  705.  
  706. # Find a good install program.  We prefer a C program (faster),
  707. # so one script is as good as another.  But avoid the broken or
  708. # incompatible versions:
  709. # SysV /etc/install, /usr/sbin/install
  710. # SunOS /usr/etc/install
  711. # IRIX /sbin/install
  712. # AIX /bin/install
  713. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  714. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  715. # ./install, which can be erroneously created by make from ./install.sh.
  716. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  717. echo "configure:718: checking for a BSD compatible install" >&5
  718. if test -z "$INSTALL"; then
  719. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  720.   echo $ac_n "(cached) $ac_c" 1>&6
  721. else
  722.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  723.   for ac_dir in $PATH; do
  724.     # Account for people who put trailing slashes in PATH elements.
  725.     case "$ac_dir/" in
  726.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  727.     *)
  728.       # OSF1 and SCO ODT 3.0 have their own names for install.
  729.       for ac_prog in ginstall installbsd scoinst install; do
  730.         if test -f $ac_dir/$ac_prog; then
  731.       if test $ac_prog = install &&
  732.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  733.         # AIX install.  It has an incompatible calling convention.
  734.         # OSF/1 installbsd also uses dspmsg, but is usable.
  735.         :
  736.       else
  737.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  738.         break 2
  739.       fi
  740.     fi
  741.       done
  742.       ;;
  743.     esac
  744.   done
  745.   IFS="$ac_save_IFS"
  746.  
  747. fi
  748.   if test "${ac_cv_path_install+set}" = set; then
  749.     INSTALL="$ac_cv_path_install"
  750.   else
  751.     # As a last resort, use the slow shell script.  We don't cache a
  752.     # path for INSTALL within a source directory, because that will
  753.     # break other packages using the cache if that directory is
  754.     # removed, or if the path is relative.
  755.     INSTALL="$ac_install_sh"
  756.   fi
  757. fi
  758. echo "$ac_t""$INSTALL" 1>&6
  759.  
  760. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  761. # It thinks the first close brace ends the variable substitution.
  762. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  763.  
  764. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  765.  
  766.  
  767. ### Check for a C++ compiler
  768. ac_ext=C
  769. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  770. ac_cpp='$CXXCPP $CPPFLAGS'
  771. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  772. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  773. cross_compiling=$ac_cv_prog_cxx_cross
  774.  
  775. echo $ac_n "checking for a working C++ compiler""... $ac_c" 1>&6
  776. echo "configure:777: checking for a working C++ compiler" >&5
  777. for ac_prog in $CCC g++ gcc c++ CC cxx xlC cc++ ; do
  778. # Extract the first word of "$ac_prog", so it can be a program name with args.
  779.   set dummy $ac_prog ; ac_word=$2
  780.   if test ! -n "$CXX"; then
  781.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  782.     for ac_dir in $PATH; do
  783.       test -z "$ac_dir" && ac_dir=.
  784.       if test -f $ac_dir/$ac_word; then
  785.         CXX="$ac_prog"
  786.         break
  787.       fi
  788.     done
  789.     IFS="$ac_save_ifs"
  790.   fi
  791.  
  792.   if test -n "$CXX"; then
  793.     ac_result=yes
  794.   else
  795.     ac_result=no
  796.   fi
  797.   
  798. ac_ext=C
  799. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  800. ac_cpp='$CXXCPP $CPPFLAGS'
  801. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  802. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  803. cross_compiling=$ac_cv_prog_cxx_cross
  804.  
  805. cat > conftest.$ac_ext <<EOF
  806. #line 807 "configure"
  807. #include "confdefs.h"
  808. class foo { int bar; }; int main(){return(0);}
  809. EOF
  810. if { (eval echo configure:811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  811.   ac_cv_prog_cxx_works=yes
  812.   # If we can't run a trivial program, we are probably using a cross compiler.
  813.   if (./conftest; exit) 2>/dev/null; then
  814.     ac_cv_prog_cxx_cross=no
  815.   else
  816.     ac_cv_prog_cxx_cross=yes
  817.   fi
  818. else
  819.   echo "configure: failed program was:" >&5
  820.   cat conftest.$ac_ext >&5
  821.   ac_cv_prog_cxx_works=no
  822. fi
  823. rm -fr conftest*
  824.  
  825. if test $ac_cv_prog_cxx_works = no; then
  826.   CXX=
  827. fi
  828. cross_compiling=$ac_cv_prog_cxx_cross
  829.  
  830.   test -n "$CXX" && break
  831. done
  832.  
  833.  
  834. if test -z "$CXX" ; then
  835.   { echo "configure: error: Unable to find a working C++ compiler" 1>&2; exit 1; }
  836. fi
  837.  
  838.  
  839. echo "$ac_t""$CXX" 1>&6
  840.  
  841. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  842. echo "configure:843: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  843. echo "$ac_t""$cross_compiling" 1>&6
  844.  
  845. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  846. echo "configure:847: checking whether we are using GNU C++" >&5
  847. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  848.   echo $ac_n "(cached) $ac_c" 1>&6
  849. else
  850.   cat > conftest.C <<EOF
  851. #ifdef __GNUC__
  852.   yes;
  853. #endif
  854. EOF
  855. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  856.   ac_cv_prog_gxx=yes
  857. else
  858.   ac_cv_prog_gxx=no
  859. fi
  860. fi
  861.  
  862. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  863.  
  864. # Check whether --with-warnings or --without-warnings was given.
  865. if test "${with_warnings+set}" = set; then
  866.   withval="$with_warnings"
  867.   :
  868. else
  869.   if test $lyx_devel_version = yes && test $ac_cv_prog_gxx = yes ; then
  870.      with_warnings=yes;
  871.    else
  872.      with_warnings=no;
  873.    fi;
  874. fi
  875.  
  876. if test "x$with_warnings" = xyes ; then
  877.   lyx_flags="$lyx_flags warnings"
  878.   cat >> confdefs.h <<\EOF
  879. #define WITH_WARNINGS 1
  880. EOF
  881.  
  882. fi
  883.  
  884. # optimize less for development versions
  885. if test "$lyx_devel_version" = yes ; then
  886.   lyx_opt="-O"
  887. else
  888.   lyx_opt="-O2"
  889. fi
  890.  
  891. # set the debug flags correctly.
  892. if test $ac_cv_prog_gxx = yes; then
  893.   GXX=yes
  894.   ac_test_CXXFLAGS="${CXXFLAGS+set}"
  895.   ac_save_CXXFLAGS="$CXXFLAGS"
  896.   CXXFLAGS=
  897.   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  898. echo "configure:899: checking whether ${CXX-g++} accepts -g" >&5
  899. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  900.   echo $ac_n "(cached) $ac_c" 1>&6
  901. else
  902.   echo 'void f(){}' > conftest.cc
  903. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  904.   ac_cv_prog_cxx_g=yes
  905. else
  906.   ac_cv_prog_cxx_g=no
  907. fi
  908. rm -f conftest*
  909.  
  910. fi
  911.  
  912. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  913.   if test "$ac_test_CXXFLAGS" = set; then
  914.     CXXFLAGS="$ac_save_CXXFLAGS"
  915.   elif test $ac_cv_prog_cxx_g = yes; then
  916.     CXXFLAGS="-g $lyx_opt"
  917.   else
  918.     CXXFLAGS="$lyx_opt"
  919.   fi
  920.   if test $with_warnings = yes ; then
  921.     CXXFLAGS="$CXXFLAGS -ansi -Wall"
  922.     # a small hack to avoid problems with headers
  923.     echo '#undef __STRICT_ANSI__' >>confdefs.h
  924.   fi
  925. else
  926.   GXX=
  927.   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
  928. fi
  929.  
  930. echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
  931. echo "configure:932: checking how to run the C++ preprocessor" >&5
  932. if test -z "$CXXCPP"; then
  933. if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
  934.   echo $ac_n "(cached) $ac_c" 1>&6
  935. else
  936.   ac_ext=C
  937. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  938. ac_cpp='$CXXCPP $CPPFLAGS'
  939. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  940. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  941. cross_compiling=$ac_cv_prog_cxx_cross
  942.   CXXCPP="${CXX-g++} -E"
  943.   cat > conftest.$ac_ext <<EOF
  944. #line 945 "configure"
  945. #include "confdefs.h"
  946. #include <stdlib.h>
  947. EOF
  948. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  949. { (eval echo configure:950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  950. ac_err=`grep -v '^ *+' conftest.out`
  951. if test -z "$ac_err"; then
  952.   :
  953. else
  954.   echo "$ac_err" >&5
  955.   echo "configure: failed program was:" >&5
  956.   cat conftest.$ac_ext >&5
  957.   rm -rf conftest*
  958.   CXXCPP=/lib/cpp
  959. fi
  960. rm -f conftest*
  961.   ac_cv_prog_CXXCPP="$CXXCPP"
  962. fi
  963. fi
  964. CXXCPP="$ac_cv_prog_CXXCPP"
  965. echo "$ac_t""$CXXCPP" 1>&6
  966.  
  967. # some compilers need that
  968. LIBS="-lc -lm $LIBS"
  969.  
  970. ### check for special systems
  971. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  972. echo "configure:973: checking for AIX" >&5
  973. cat > conftest.$ac_ext <<EOF
  974. #line 975 "configure"
  975. #include "confdefs.h"
  976. #ifdef _AIX
  977.   yes
  978. #endif
  979.  
  980. EOF
  981. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  982.   egrep "yes" >/dev/null 2>&1; then
  983.   rm -rf conftest*
  984.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  985. #define _ALL_SOURCE 1
  986. EOF
  987.  
  988. else
  989.   rm -rf conftest*
  990.   echo "$ac_t""no" 1>&6
  991. fi
  992. rm -f conftest*
  993.  
  994.  
  995. #It seems that HPUX requires using -fpcc-struct-return with gcc.
  996. echo $ac_n "checking for HP-UX""... $ac_c" 1>&6
  997. echo "configure:998: checking for HP-UX" >&5
  998. if eval "test \"`echo '$''{'ac_cv_hpux'+set}'`\" = set"; then
  999.   echo $ac_n "(cached) $ac_c" 1>&6
  1000. else
  1001.   
  1002. os=`uname -s | tr 'A-Z' 'a-z'`
  1003. ac_cv_hpux=no
  1004. test "$os" = hp-ux && ac_cv_hpux=yes
  1005. fi
  1006.  
  1007. echo "$ac_t""$ac_cv_hpux" 1>&6
  1008. if test "$ac_cv_hpux" = yes; then
  1009.  test "x$GXX" = xyes && CXXFLAGS="$CXXFLAGS -fpcc-struct-return"
  1010. fi
  1011. #The headers are not correct under SunOS4
  1012. echo $ac_n "checking for SunOS 4.x""... $ac_c" 1>&6
  1013. echo "configure:1014: checking for SunOS 4.x" >&5
  1014. if eval "test \"`echo '$''{'ac_cv_sunos4'+set}'`\" = set"; then
  1015.   echo $ac_n "(cached) $ac_c" 1>&6
  1016. else
  1017.   
  1018.  os=`uname -a | sed -e 's/^\([^ ]*\) [^ ]* \([0-9]\)\..*/\1\2/'`
  1019.  ac_cv_sunos4=no
  1020. test "$os" = SunOS4 && ac_cv_sunos4=yes
  1021. fi
  1022.  
  1023. echo "$ac_t""$ac_cv_sunos4" 1>&6
  1024. if test "$ac_cv_sunos4" = yes; then
  1025.  test "x$GXX" = xyes && lyx_broken_headers=yes
  1026. fi
  1027. echo $ac_n "checking for SCO 3.2v4""... $ac_c" 1>&6
  1028. echo "configure:1029: checking for SCO 3.2v4" >&5
  1029. if eval "test \"`echo '$''{'ac_cv_sco'+set}'`\" = set"; then
  1030.   echo $ac_n "(cached) $ac_c" 1>&6
  1031. else
  1032.   
  1033. ac_cv_sco=no
  1034. if test `uname -s` != "SCO_SV"; then
  1035.   lyx_machine_rel=`uname -m`:`uname -r`
  1036.   if test $lyx_machine_rel = i386:3.2 || test $lyx_machine_rel = i486:3.2;
  1037.   then
  1038.     if test -f /usr/options/cb.name; then
  1039.       ac_cv_sco=no
  1040.     elif /bin/uname -X 2>/dev/null >/dev/null ; then
  1041.       ac_cv_sco=yes
  1042.     fi
  1043.   fi
  1044. fi
  1045. fi
  1046.  
  1047. echo "$ac_t""$ac_cv_sco" 1>&6
  1048. if test "$ac_cv_sco" = yes; then
  1049.  test "x$GXX" = xyes && lyx_broken_headers=yes
  1050. fi
  1051.  
  1052. ### we will also need a C compiler to compile GNU gettext
  1053. # Extract the first word of "gcc", so it can be a program name with args.
  1054. set dummy gcc; ac_word=$2
  1055. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1056. echo "configure:1057: checking for $ac_word" >&5
  1057. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1058.   echo $ac_n "(cached) $ac_c" 1>&6
  1059. else
  1060.   if test -n "$CC"; then
  1061.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1062. else
  1063.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1064.   for ac_dir in $PATH; do
  1065.     test -z "$ac_dir" && ac_dir=.
  1066.     if test -f $ac_dir/$ac_word; then
  1067.       ac_cv_prog_CC="gcc"
  1068.       break
  1069.     fi
  1070.   done
  1071.   IFS="$ac_save_ifs"
  1072. fi
  1073. fi
  1074. CC="$ac_cv_prog_CC"
  1075. if test -n "$CC"; then
  1076.   echo "$ac_t""$CC" 1>&6
  1077. else
  1078.   echo "$ac_t""no" 1>&6
  1079. fi
  1080.  
  1081. if test -z "$CC"; then
  1082.   # Extract the first word of "cc", so it can be a program name with args.
  1083. set dummy cc; ac_word=$2
  1084. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1085. echo "configure:1086: checking for $ac_word" >&5
  1086. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  1087.   echo $ac_n "(cached) $ac_c" 1>&6
  1088. else
  1089.   if test -n "$CC"; then
  1090.   ac_cv_prog_CC="$CC" # Let the user override the test.
  1091. else
  1092.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1093.   ac_prog_rejected=no
  1094.   for ac_dir in $PATH; do
  1095.     test -z "$ac_dir" && ac_dir=.
  1096.     if test -f $ac_dir/$ac_word; then
  1097.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  1098.         ac_prog_rejected=yes
  1099.     continue
  1100.       fi
  1101.       ac_cv_prog_CC="cc"
  1102.       break
  1103.     fi
  1104.   done
  1105.   IFS="$ac_save_ifs"
  1106. if test $ac_prog_rejected = yes; then
  1107.   # We found a bogon in the path, so make sure we never use it.
  1108.   set dummy $ac_cv_prog_CC
  1109.   shift
  1110.   if test $# -gt 0; then
  1111.     # We chose a different compiler from the bogus one.
  1112.     # However, it has the same basename, so the bogon will be chosen
  1113.     # first if we set CC to just the basename; use the full file name.
  1114.     shift
  1115.     set dummy "$ac_dir/$ac_word" "$@"
  1116.     shift
  1117.     ac_cv_prog_CC="$@"
  1118.   fi
  1119. fi
  1120. fi
  1121. fi
  1122. CC="$ac_cv_prog_CC"
  1123. if test -n "$CC"; then
  1124.   echo "$ac_t""$CC" 1>&6
  1125. else
  1126.   echo "$ac_t""no" 1>&6
  1127. fi
  1128.  
  1129.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  1130. fi
  1131.  
  1132. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  1133. echo "configure:1134: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  1134.  
  1135. ac_ext=c
  1136. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1137. ac_cpp='$CPP $CPPFLAGS'
  1138. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1139. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1140. cross_compiling=$ac_cv_prog_cc_cross
  1141.  
  1142. cat > conftest.$ac_ext <<EOF
  1143. #line 1144 "configure"
  1144. #include "confdefs.h"
  1145. main(){return(0);}
  1146. EOF
  1147. if { (eval echo configure:1148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1148.   ac_cv_prog_cc_works=yes
  1149.   # If we can't run a trivial program, we are probably using a cross compiler.
  1150.   if (./conftest; exit) 2>/dev/null; then
  1151.     ac_cv_prog_cc_cross=no
  1152.   else
  1153.     ac_cv_prog_cc_cross=yes
  1154.   fi
  1155. else
  1156.   echo "configure: failed program was:" >&5
  1157.   cat conftest.$ac_ext >&5
  1158.   ac_cv_prog_cc_works=no
  1159. fi
  1160. rm -fr conftest*
  1161. ac_ext=C
  1162. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1163. ac_cpp='$CXXCPP $CPPFLAGS'
  1164. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1165. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1166. cross_compiling=$ac_cv_prog_cxx_cross
  1167.  
  1168. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  1169. if test $ac_cv_prog_cc_works = no; then
  1170.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  1171. fi
  1172. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  1173. echo "configure:1174: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  1174. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  1175. cross_compiling=$ac_cv_prog_cc_cross
  1176.  
  1177. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  1178. echo "configure:1179: checking whether we are using GNU C" >&5
  1179. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  1180.   echo $ac_n "(cached) $ac_c" 1>&6
  1181. else
  1182.   cat > conftest.c <<EOF
  1183. #ifdef __GNUC__
  1184.   yes;
  1185. #endif
  1186. EOF
  1187. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1188.   ac_cv_prog_gcc=yes
  1189. else
  1190.   ac_cv_prog_gcc=no
  1191. fi
  1192. fi
  1193.  
  1194. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  1195.  
  1196. if test $ac_cv_prog_gcc = yes; then
  1197.   GCC=yes
  1198.   ac_test_CFLAGS="${CFLAGS+set}"
  1199.   ac_save_CFLAGS="$CFLAGS"
  1200.   CFLAGS=
  1201.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  1202. echo "configure:1203: checking whether ${CC-cc} accepts -g" >&5
  1203. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  1204.   echo $ac_n "(cached) $ac_c" 1>&6
  1205. else
  1206.   echo 'void f(){}' > conftest.c
  1207. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  1208.   ac_cv_prog_cc_g=yes
  1209. else
  1210.   ac_cv_prog_cc_g=no
  1211. fi
  1212. rm -f conftest*
  1213.  
  1214. fi
  1215.  
  1216. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  1217.   if test "$ac_test_CFLAGS" = set; then
  1218.     CFLAGS="$ac_save_CFLAGS"
  1219.   elif test $ac_cv_prog_cc_g = yes; then
  1220.     CFLAGS="-g -O2"
  1221.   else
  1222.     CFLAGS="-O2"
  1223.   fi
  1224. else
  1225.   GCC=
  1226.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  1227. fi
  1228.  
  1229. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  1230. echo "configure:1231: checking for POSIXized ISC" >&5
  1231. if test -d /etc/conf/kconfig.d &&
  1232.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  1233. then
  1234.   echo "$ac_t""yes" 1>&6
  1235.   ISC=yes # If later tests want to check for ISC.
  1236.   cat >> confdefs.h <<\EOF
  1237. #define _POSIX_SOURCE 1
  1238. EOF
  1239.  
  1240.   if test "$GCC" = yes; then
  1241.     CC="$CC -posix"
  1242.   else
  1243.     CC="$CC -Xp"
  1244.   fi
  1245. else
  1246.   echo "$ac_t""no" 1>&6
  1247.   ISC=
  1248. fi
  1249.  
  1250.  
  1251. ### check the size of pointers and ints
  1252. # the defaults are given for cross compilation.
  1253. echo $ac_n "checking size of void *""... $ac_c" 1>&6
  1254. echo "configure:1255: checking size of void *" >&5
  1255. if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
  1256.   echo $ac_n "(cached) $ac_c" 1>&6
  1257. else
  1258.   if test "$cross_compiling" = yes; then
  1259.   ac_cv_sizeof_void_p=4
  1260. else
  1261.   cat > conftest.$ac_ext <<EOF
  1262. #line 1263 "configure"
  1263. #include "confdefs.h"
  1264. #ifdef __cplusplus
  1265. extern "C" void exit(int);
  1266. #endif
  1267. #include <stdio.h>
  1268. main()
  1269. {
  1270.   FILE *f=fopen("conftestval", "w");
  1271.   if (!f) exit(1);
  1272.   fprintf(f, "%d\n", sizeof(void *));
  1273.   exit(0);
  1274. }
  1275. EOF
  1276. if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1277. then
  1278.   ac_cv_sizeof_void_p=`cat conftestval`
  1279. else
  1280.   echo "configure: failed program was:" >&5
  1281.   cat conftest.$ac_ext >&5
  1282.   rm -fr conftest*
  1283.   ac_cv_sizeof_void_p=0
  1284. fi
  1285. rm -fr conftest*
  1286. fi
  1287.  
  1288. fi
  1289. echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
  1290. cat >> confdefs.h <<EOF
  1291. #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
  1292. EOF
  1293.  
  1294.  
  1295. echo $ac_n "checking size of int""... $ac_c" 1>&6
  1296. echo "configure:1297: checking size of int" >&5
  1297. if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  1298.   echo $ac_n "(cached) $ac_c" 1>&6
  1299. else
  1300.   if test "$cross_compiling" = yes; then
  1301.   ac_cv_sizeof_int=4
  1302. else
  1303.   cat > conftest.$ac_ext <<EOF
  1304. #line 1305 "configure"
  1305. #include "confdefs.h"
  1306. #ifdef __cplusplus
  1307. extern "C" void exit(int);
  1308. #endif
  1309. #include <stdio.h>
  1310. main()
  1311. {
  1312.   FILE *f=fopen("conftestval", "w");
  1313.   if (!f) exit(1);
  1314.   fprintf(f, "%d\n", sizeof(int));
  1315.   exit(0);
  1316. }
  1317. EOF
  1318. if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1319. then
  1320.   ac_cv_sizeof_int=`cat conftestval`
  1321. else
  1322.   echo "configure: failed program was:" >&5
  1323.   cat conftest.$ac_ext >&5
  1324.   rm -fr conftest*
  1325.   ac_cv_sizeof_int=0
  1326. fi
  1327. rm -fr conftest*
  1328. fi
  1329.  
  1330. fi
  1331. echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  1332. cat >> confdefs.h <<EOF
  1333. #define SIZEOF_INT $ac_cv_sizeof_int
  1334. EOF
  1335.  
  1336.  
  1337.  
  1338. ### check for compiler brokenness
  1339.  
  1340. #check for the strength reduction bug of gcc
  1341. if test x$GXX = xyes && test $cross_compiling = no ; then
  1342.   echo $ac_n "checking "for gcc strength-reduce bug"""... $ac_c" 1>&6
  1343. echo "configure:1344: checking "for gcc strength-reduce bug"" >&5
  1344. if eval "test \"`echo '$''{'ac_cv_c_gcc_strength_bug'+set}'`\" = set"; then
  1345.   echo $ac_n "(cached) $ac_c" 1>&6
  1346. else
  1347.   if test "$cross_compiling" = yes; then
  1348.   ac_cv_c_gcc_strength_bug="yes"
  1349. else
  1350.   cat > conftest.$ac_ext <<EOF
  1351. #line 1352 "configure"
  1352. #include "confdefs.h"
  1353. #ifdef __cplusplus
  1354. extern "C" void exit(int);
  1355. #endif
  1356.  
  1357. int main(void) {
  1358.   static int Array[3];
  1359.   unsigned int B = 3;
  1360.   int i;
  1361.   for(i=0; i<B; i++) Array[i] = i - 3;
  1362.   exit( Array[1] != -2 );
  1363. }
  1364. EOF
  1365. if { (eval echo configure:1366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1366. then
  1367.   ac_cv_c_gcc_strength_bug="no"
  1368. else
  1369.   echo "configure: failed program was:" >&5
  1370.   cat conftest.$ac_ext >&5
  1371.   rm -fr conftest*
  1372.   ac_cv_c_gcc_strength_bug="yes"
  1373. fi
  1374. rm -fr conftest*
  1375. fi
  1376.  
  1377. fi
  1378.  
  1379. echo "$ac_t""$ac_cv_c_gcc_strength_bug" 1>&6
  1380.   if test "$ac_cv_c_gcc_strength_bug" = "yes"
  1381.   then
  1382.     CXXFLAGS="$CXXFLAGS -fno-strength-reduce"
  1383.   fi
  1384. fi
  1385.  
  1386.  
  1387. ### Check whether the compiler understands the keyword `explicit'
  1388. echo $ac_n "checking whether the C++ compiler understands explicit""... $ac_c" 1>&6
  1389. echo "configure:1390: checking whether the C++ compiler understands explicit" >&5
  1390. if eval "test \"`echo '$''{'lyx_cv_explicit'+set}'`\" = set"; then
  1391.   echo $ac_n "(cached) $ac_c" 1>&6
  1392. else
  1393.   cat > conftest.$ac_ext <<EOF
  1394. #line 1395 "configure"
  1395. #include "confdefs.h"
  1396.  
  1397. class Expl {
  1398. public:
  1399.     explicit Expl() {};
  1400. };
  1401. int main() {
  1402.  
  1403. ; return 0; }
  1404. EOF
  1405. if { (eval echo configure:1406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1406.   rm -rf conftest*
  1407.   lyx_cv_explicit=yes
  1408. else
  1409.   echo "configure: failed program was:" >&5
  1410.   cat conftest.$ac_ext >&5
  1411.   rm -rf conftest*
  1412.   lyx_cv_explicit=no
  1413. fi
  1414. rm -f conftest*
  1415.  
  1416. fi
  1417.  
  1418. echo "$ac_t""$lyx_cv_explicit" 1>&6
  1419. if test $lyx_cv_explicit = no ; then
  1420.   cat >> confdefs.h <<\EOF
  1421. #define explicit  
  1422. EOF
  1423.  
  1424. fi
  1425. # Check whether --with-broken-const or --without-broken-const was given.
  1426. if test "${with_broken_const+set}" = set; then
  1427.   withval="$with_broken_const"
  1428.   cat >> confdefs.h <<\EOF
  1429. #define BROKEN_CONST 1
  1430. EOF
  1431.  
  1432.    lyx_flags="$lyx_flags broken-const"
  1433. fi
  1434.  
  1435. # A hack to work around gcc compiler errors
  1436. # Check whether --with-gcc-hack or --without-gcc-hack was given.
  1437. if test "${with_gcc_hack+set}" = set; then
  1438.   withval="$with_gcc_hack"
  1439.   :
  1440. fi
  1441.  
  1442. if test "x$with_gcc_hack" = xyes ; then
  1443.   CXX_COMMAND='${top_srcdir}/config/hack-gcc ${CXX}'
  1444.   lyx_flags="$lyx_flags gcc-hack"
  1445. else
  1446.   CXX_COMMAND='${CXX}'
  1447. fi
  1448.  
  1449.  
  1450. ### Add extra directories to check for libraries.
  1451.  
  1452.   # Check whether --with-extra-lib or --without-extra-lib was given.
  1453. if test "${with_extra_lib+set}" = set; then
  1454.   withval="$with_extra_lib"
  1455.   :
  1456. fi
  1457.  
  1458.   echo $ac_n "checking for extra library directory""... $ac_c" 1>&6
  1459. echo "configure:1460: checking for extra library directory" >&5
  1460.   if test -z "$with_extra_lib"; then
  1461.      if eval "test \"`echo '$''{'lyx_cv_extra_lib'+set}'`\" = set"; then
  1462.   echo $ac_n "(cached) $ac_c" 1>&6
  1463. else
  1464.   lyx_cv_extra_lib=NONE
  1465. fi
  1466.  
  1467.   else
  1468.     test "x$with_extra_lib" = xyes && with_extra_lib=
  1469.     lyx_cv_extra_lib="$with_extra_lib"
  1470.   fi
  1471.   echo "$ac_t""$lyx_cv_extra_lib" 1>&6
  1472.  
  1473. IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1474. for dir in `eval "echo $lyx_cv_extra_lib"`; do
  1475.   if test ! "$dir" = NONE; then
  1476.     test ! -d "$dir" && { echo "configure: error: \`$dir' is not a directory" 1>&2; exit 1; }
  1477.     
  1478. lyx_ldflags="${lyx_ldflags} -L$dir"
  1479. if test "`(uname) 2>/dev/null`" = SunOS &&
  1480.     uname -r | grep '^5' >/dev/null; then
  1481.   if test $ac_cv_prog_gxx = yes ; then 
  1482.     lyx_ldflags="${lyx_ldflags} -Wl,-R$dir" 
  1483.   else
  1484.     lyx_ldflags="${lyx_ldflags} -R$dir"
  1485.   fi
  1486. fi
  1487.   fi
  1488. done
  1489. IFS=$ac_save_ifs
  1490.  
  1491. test ! x"$lyx_ldflags" = x && LDFLAGS="$lyx_ldflags $LDFLAGS"
  1492.  
  1493. ### Add extra directories to check for include files.
  1494.  
  1495.   # Check whether --with-extra-inc or --without-extra-inc was given.
  1496. if test "${with_extra_inc+set}" = set; then
  1497.   withval="$with_extra_inc"
  1498.   :
  1499. fi
  1500.  
  1501.   echo $ac_n "checking for extra include directory""... $ac_c" 1>&6
  1502. echo "configure:1503: checking for extra include directory" >&5
  1503.   if test -z "$with_extra_inc"; then
  1504.      if eval "test \"`echo '$''{'lyx_cv_extra_inc'+set}'`\" = set"; then
  1505.   echo $ac_n "(cached) $ac_c" 1>&6
  1506. else
  1507.   lyx_cv_extra_inc=NONE
  1508. fi
  1509.  
  1510.   else
  1511.     test "x$with_extra_inc" = xyes && with_extra_inc=
  1512.     lyx_cv_extra_inc="$with_extra_inc"
  1513.   fi
  1514.   echo "$ac_t""$lyx_cv_extra_inc" 1>&6
  1515.  
  1516. IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1517. for dir in `eval "echo $lyx_cv_extra_inc"`; do
  1518.   if test ! "$dir" = NONE; then
  1519.     test ! -d "$dir" && { echo "configure: error: \`$dir' is not a directory" 1>&2; exit 1; }
  1520.     lyx_cppflags="${lyx_cppflags} -I$dir "
  1521.   fi
  1522. done
  1523. IFS=$ac_save_ifs
  1524.  
  1525. test ! x"$lyx_cppflags" = x && CPPFLAGS="$lyx_cppflags $CPPFLAGS"
  1526.  
  1527. ### Add both includes and libraries
  1528.  
  1529.   # Check whether --with-extra-prefix or --without-extra-prefix was given.
  1530. if test "${with_extra_prefix+set}" = set; then
  1531.   withval="$with_extra_prefix"
  1532.   :
  1533. fi
  1534.  
  1535.   echo $ac_n "checking for extra lib+include directory""... $ac_c" 1>&6
  1536. echo "configure:1537: checking for extra lib+include directory" >&5
  1537.   if test -z "$with_extra_prefix"; then
  1538.      if eval "test \"`echo '$''{'lyx_cv_extra_prefix'+set}'`\" = set"; then
  1539.   echo $ac_n "(cached) $ac_c" 1>&6
  1540. else
  1541.   lyx_cv_extra_prefix=NONE
  1542. fi
  1543.  
  1544.   else
  1545.     test "x$with_extra_prefix" = xyes && with_extra_prefix=${prefix}
  1546.     lyx_cv_extra_prefix="$with_extra_prefix"
  1547.   fi
  1548.   echo "$ac_t""$lyx_cv_extra_prefix" 1>&6
  1549.  
  1550. IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1551. for dir in `eval "echo $lyx_cv_extra_prefix"`; do
  1552.   if test ! "$dir" = NONE; then
  1553.     test ! -d "$dir" && { echo "configure: error: \`$dir' is not a directory" 1>&2; exit 1; }
  1554.     
  1555. CPPFLAGS="${CPPFLAGS} -I$dir/include "
  1556.   
  1557. LDFLAGS="${LDFLAGS} -L$dir/lib"
  1558. if test "`(uname) 2>/dev/null`" = SunOS &&
  1559.     uname -r | grep '^5' >/dev/null; then
  1560.   if test $ac_cv_prog_gxx = yes ; then 
  1561.     LDFLAGS="${LDFLAGS} -Wl,-R$dir/lib" 
  1562.   else
  1563.     LDFLAGS="${LDFLAGS} -R$dir/lib"
  1564.   fi
  1565. fi
  1566.   fi
  1567. done
  1568. IFS=$ac_save_ifs
  1569.  
  1570.  
  1571. ### Check for the -liberty library
  1572. test "x$GXX" = xyes && lyx_use_liberty=yes
  1573. # Check whether --with-liberty or --without-liberty was given.
  1574. if test "${with_liberty+set}" = set; then
  1575.   withval="$with_liberty"
  1576.   lyx_use_liberty=$withval
  1577. fi
  1578.  
  1579. if test x$lyx_use_liberty = xyes; then
  1580.   echo $ac_n "checking for main in -liberty""... $ac_c" 1>&6
  1581. echo "configure:1582: checking for main in -liberty" >&5
  1582. ac_lib_var=`echo iberty'_'main | sed 'y%./+-%__p_%'`
  1583. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1584.   echo $ac_n "(cached) $ac_c" 1>&6
  1585. else
  1586.   ac_save_LIBS="$LIBS"
  1587. LIBS="-liberty  $LIBS"
  1588. cat > conftest.$ac_ext <<EOF
  1589. #line 1590 "configure"
  1590. #include "confdefs.h"
  1591.  
  1592. int main() {
  1593. main()
  1594. ; return 0; }
  1595. EOF
  1596. if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1597.   rm -rf conftest*
  1598.   eval "ac_cv_lib_$ac_lib_var=yes"
  1599. else
  1600.   echo "configure: failed program was:" >&5
  1601.   cat conftest.$ac_ext >&5
  1602.   rm -rf conftest*
  1603.   eval "ac_cv_lib_$ac_lib_var=no"
  1604. fi
  1605. rm -f conftest*
  1606. LIBS="$ac_save_LIBS"
  1607.  
  1608. fi
  1609. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1610.   echo "$ac_t""yes" 1>&6
  1611.   LIBS="-liberty $LIBS"
  1612. else
  1613.   echo "$ac_t""no" 1>&6
  1614. fi
  1615.  
  1616. fi
  1617.  
  1618. ### Check for X libraries
  1619. # Check for the pt library (for SCO, needed for X)
  1620. echo $ac_n "checking for ptsname in -lpt""... $ac_c" 1>&6
  1621. echo "configure:1622: checking for ptsname in -lpt" >&5
  1622. ac_lib_var=`echo pt'_'ptsname | sed 'y%./+-%__p_%'`
  1623. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1624.   echo $ac_n "(cached) $ac_c" 1>&6
  1625. else
  1626.   ac_save_LIBS="$LIBS"
  1627. LIBS="-lpt  $LIBS"
  1628. cat > conftest.$ac_ext <<EOF
  1629. #line 1630 "configure"
  1630. #include "confdefs.h"
  1631. /* Override any gcc2 internal prototype to avoid an error.  */
  1632. #ifdef __cplusplus
  1633. extern "C"
  1634. #endif
  1635. /* We use char because int might match the return type of a gcc2
  1636.     builtin and then its argument prototype would still apply.  */
  1637. char ptsname();
  1638.  
  1639. int main() {
  1640. ptsname()
  1641. ; return 0; }
  1642. EOF
  1643. if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1644.   rm -rf conftest*
  1645.   eval "ac_cv_lib_$ac_lib_var=yes"
  1646. else
  1647.   echo "configure: failed program was:" >&5
  1648.   cat conftest.$ac_ext >&5
  1649.   rm -rf conftest*
  1650.   eval "ac_cv_lib_$ac_lib_var=no"
  1651. fi
  1652. rm -f conftest*
  1653. LIBS="$ac_save_LIBS"
  1654.  
  1655. fi
  1656. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1657.   echo "$ac_t""yes" 1>&6
  1658.   X_EXTRA_LIBS="-lpt $X_EXTRA_LIBS"
  1659. else
  1660.   echo "$ac_t""no" 1>&6
  1661. fi
  1662.  
  1663. # The real thing.
  1664. # If we find X, set shell vars x_includes and x_libraries to the
  1665. # paths, otherwise set no_x=yes.
  1666. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1667. # --without-x overrides everything else, but does not touch the cache.
  1668. echo $ac_n "checking for X""... $ac_c" 1>&6
  1669. echo "configure:1670: checking for X" >&5
  1670.  
  1671. # Check whether --with-x or --without-x was given.
  1672. if test "${with_x+set}" = set; then
  1673.   withval="$with_x"
  1674.   :
  1675. fi
  1676.  
  1677. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1678. if test "x$with_x" = xno; then
  1679.   # The user explicitly disabled X.
  1680.   have_x=disabled
  1681. else
  1682.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1683.     # Both variables are already set.
  1684.     have_x=yes
  1685.   else
  1686. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1687.   echo $ac_n "(cached) $ac_c" 1>&6
  1688. else
  1689.   # One or both of the vars are not set, and there is no cached value.
  1690. ac_x_includes=NO ac_x_libraries=NO
  1691. rm -fr conftestdir
  1692. if mkdir conftestdir; then
  1693.   cd conftestdir
  1694.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1695.   cat > Imakefile <<'EOF'
  1696. acfindx:
  1697.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1698. EOF
  1699.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1700.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1701.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1702.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1703.     for ac_extension in a so sl; do
  1704.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1705.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1706.         ac_im_usrlibdir=$ac_im_libdir; break
  1707.       fi
  1708.     done
  1709.     # Screen out bogus values from the imake configuration.  They are
  1710.     # bogus both because they are the default anyway, and because
  1711.     # using them would break gcc on systems where it needs fixed includes.
  1712.     case "$ac_im_incroot" in
  1713.     /usr/include) ;;
  1714.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1715.     esac
  1716.     case "$ac_im_usrlibdir" in
  1717.     /usr/lib | /lib) ;;
  1718.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1719.     esac
  1720.   fi
  1721.   cd ..
  1722.   rm -fr conftestdir
  1723. fi
  1724.  
  1725. if test "$ac_x_includes" = NO; then
  1726.   # Guess where to find include files, by looking for this one X11 .h file.
  1727.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1728.  
  1729.   # First, try using that file with no special directory specified.
  1730. cat > conftest.$ac_ext <<EOF
  1731. #line 1732 "configure"
  1732. #include "confdefs.h"
  1733. #include <$x_direct_test_include>
  1734. EOF
  1735. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1736. { (eval echo configure:1737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1737. ac_err=`grep -v '^ *+' conftest.out`
  1738. if test -z "$ac_err"; then
  1739.   rm -rf conftest*
  1740.   # We can compile using X headers with no special include directory.
  1741. ac_x_includes=
  1742. else
  1743.   echo "$ac_err" >&5
  1744.   echo "configure: failed program was:" >&5
  1745.   cat conftest.$ac_ext >&5
  1746.   rm -rf conftest*
  1747.   # Look for the header file in a standard set of common directories.
  1748. # Check X11 before X11Rn because it is often a symlink to the current release.
  1749.   for ac_dir in               \
  1750.     /usr/X11/include          \
  1751.     /usr/X11R6/include        \
  1752.     /usr/X11R5/include        \
  1753.     /usr/X11R4/include        \
  1754.                               \
  1755.     /usr/include/X11          \
  1756.     /usr/include/X11R6        \
  1757.     /usr/include/X11R5        \
  1758.     /usr/include/X11R4        \
  1759.                               \
  1760.     /usr/local/X11/include    \
  1761.     /usr/local/X11R6/include  \
  1762.     /usr/local/X11R5/include  \
  1763.     /usr/local/X11R4/include  \
  1764.                               \
  1765.     /usr/local/include/X11    \
  1766.     /usr/local/include/X11R6  \
  1767.     /usr/local/include/X11R5  \
  1768.     /usr/local/include/X11R4  \
  1769.                               \
  1770.     /usr/X386/include         \
  1771.     /usr/x386/include         \
  1772.     /usr/XFree86/include/X11  \
  1773.                               \
  1774.     /usr/include              \
  1775.     /usr/local/include        \
  1776.     /usr/unsupported/include  \
  1777.     /usr/athena/include       \
  1778.     /usr/local/x11r5/include  \
  1779.     /usr/lpp/Xamples/include  \
  1780.                               \
  1781.     /usr/openwin/include      \
  1782.     /usr/openwin/share/include \
  1783.     ; \
  1784.   do
  1785.     if test -r "$ac_dir/$x_direct_test_include"; then
  1786.       ac_x_includes=$ac_dir
  1787.       break
  1788.     fi
  1789.   done
  1790. fi
  1791. rm -f conftest*
  1792. fi # $ac_x_includes = NO
  1793.  
  1794. if test "$ac_x_libraries" = NO; then
  1795.   # Check for the libraries.
  1796.  
  1797.   test -z "$x_direct_test_library" && x_direct_test_library=X11
  1798.   test -z "$x_direct_test_function" && x_direct_test_function=XFree
  1799.  
  1800.   # See if we find them without any special options.
  1801.   # Don't add to $LIBS permanently.
  1802.   ac_save_LIBS="$LIBS"
  1803.   LIBS="-l$x_direct_test_library $LIBS"
  1804. cat > conftest.$ac_ext <<EOF
  1805. #line 1806 "configure"
  1806. #include "confdefs.h"
  1807.  
  1808. int main() {
  1809. ${x_direct_test_function}()
  1810. ; return 0; }
  1811. EOF
  1812. if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1813.   rm -rf conftest*
  1814.   LIBS="$ac_save_LIBS"
  1815. # We can link X programs with no special library path.
  1816. ac_x_libraries=
  1817. else
  1818.   echo "configure: failed program was:" >&5
  1819.   cat conftest.$ac_ext >&5
  1820.   rm -rf conftest*
  1821.   LIBS="$ac_save_LIBS"
  1822. # First see if replacing the include by lib works.
  1823. # Check X11 before X11Rn because it is often a symlink to the current release.
  1824. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1825.     /usr/X11/lib          \
  1826.     /usr/X11R6/lib        \
  1827.     /usr/X11R5/lib        \
  1828.     /usr/X11R4/lib        \
  1829.                           \
  1830.     /usr/lib/X11          \
  1831.     /usr/lib/X11R6        \
  1832.     /usr/lib/X11R5        \
  1833.     /usr/lib/X11R4        \
  1834.                           \
  1835.     /usr/local/X11/lib    \
  1836.     /usr/local/X11R6/lib  \
  1837.     /usr/local/X11R5/lib  \
  1838.     /usr/local/X11R4/lib  \
  1839.                           \
  1840.     /usr/local/lib/X11    \
  1841.     /usr/local/lib/X11R6  \
  1842.     /usr/local/lib/X11R5  \
  1843.     /usr/local/lib/X11R4  \
  1844.                           \
  1845.     /usr/X386/lib         \
  1846.     /usr/x386/lib         \
  1847.     /usr/XFree86/lib/X11  \
  1848.                           \
  1849.     /usr/lib              \
  1850.     /usr/local/lib        \
  1851.     /usr/unsupported/lib  \
  1852.     /usr/athena/lib       \
  1853.     /usr/local/x11r5/lib  \
  1854.     /usr/lpp/Xamples/lib  \
  1855.     /lib/usr/lib/X11      \
  1856.                           \
  1857.     /usr/openwin/lib      \
  1858.     /usr/openwin/share/lib \
  1859.     ; \
  1860. do
  1861.   for ac_extension in a so sl; do
  1862.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1863.       ac_x_libraries=$ac_dir
  1864.       break 2
  1865.     fi
  1866.   done
  1867. done
  1868. fi
  1869. rm -f conftest*
  1870. fi # $ac_x_libraries = NO
  1871.  
  1872. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  1873.   # Didn't find X anywhere.  Cache the known absence of X.
  1874.   ac_cv_have_x="have_x=no"
  1875. else
  1876.   # Record where we found X for the cache.
  1877.   ac_cv_have_x="have_x=yes \
  1878.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1879. fi
  1880. fi
  1881.   fi
  1882.   eval "$ac_cv_have_x"
  1883. fi # $with_x != no
  1884.  
  1885. if test "$have_x" != yes; then
  1886.   echo "$ac_t""$have_x" 1>&6
  1887.   no_x=yes
  1888. else
  1889.   # If each of the values was on the command line, it overrides each guess.
  1890.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1891.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1892.   # Update the cache value to reflect the command line values.
  1893.   ac_cv_have_x="have_x=yes \
  1894.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1895.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  1896. fi
  1897.  
  1898. if test "$no_x" = yes; then
  1899.   # Not all programs may use this symbol, but it does not hurt to define it.
  1900.   cat >> confdefs.h <<\EOF
  1901. #define X_DISPLAY_MISSING 1
  1902. EOF
  1903.  
  1904.   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  1905. else
  1906.   if test -n "$x_includes"; then
  1907.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  1908.   fi
  1909.  
  1910.   # It would also be nice to do this for all -L options, not just this one.
  1911.   if test -n "$x_libraries"; then
  1912.     X_LIBS="$X_LIBS -L$x_libraries"
  1913.     # For Solaris; some versions of Sun CC require a space after -R and
  1914.     # others require no space.  Words are not sufficient . . . .
  1915.     case "`(uname -sr) 2>/dev/null`" in
  1916.     "SunOS 5"*)
  1917.       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  1918. echo "configure:1919: checking whether -R must be followed by a space" >&5
  1919.       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  1920.       cat > conftest.$ac_ext <<EOF
  1921. #line 1922 "configure"
  1922. #include "confdefs.h"
  1923.  
  1924. int main() {
  1925.  
  1926. ; return 0; }
  1927. EOF
  1928. if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1929.   rm -rf conftest*
  1930.   ac_R_nospace=yes
  1931. else
  1932.   echo "configure: failed program was:" >&5
  1933.   cat conftest.$ac_ext >&5
  1934.   rm -rf conftest*
  1935.   ac_R_nospace=no
  1936. fi
  1937. rm -f conftest*
  1938.       if test $ac_R_nospace = yes; then
  1939.     echo "$ac_t""no" 1>&6
  1940.     X_LIBS="$X_LIBS -R$x_libraries"
  1941.       else
  1942.     LIBS="$ac_xsave_LIBS -R $x_libraries"
  1943.     cat > conftest.$ac_ext <<EOF
  1944. #line 1945 "configure"
  1945. #include "confdefs.h"
  1946.  
  1947. int main() {
  1948.  
  1949. ; return 0; }
  1950. EOF
  1951. if { (eval echo configure:1952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1952.   rm -rf conftest*
  1953.   ac_R_space=yes
  1954. else
  1955.   echo "configure: failed program was:" >&5
  1956.   cat conftest.$ac_ext >&5
  1957.   rm -rf conftest*
  1958.   ac_R_space=no
  1959. fi
  1960. rm -f conftest*
  1961.     if test $ac_R_space = yes; then
  1962.       echo "$ac_t""yes" 1>&6
  1963.       X_LIBS="$X_LIBS -R $x_libraries"
  1964.     else
  1965.       echo "$ac_t""neither works" 1>&6
  1966.     fi
  1967.       fi
  1968.       LIBS="$ac_xsave_LIBS"
  1969.     esac
  1970.   fi
  1971.  
  1972.   # Check for system-dependent libraries X programs must link with.
  1973.   # Do this before checking for the system-independent R6 libraries
  1974.   # (-lICE), since we may need -lsocket or whatever for X linking.
  1975.  
  1976.   if test "$ISC" = yes; then
  1977.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  1978.   else
  1979.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  1980.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  1981.     # the Alpha needs dnet_stub (dnet does not exist).
  1982.     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  1983. echo "configure:1984: checking for dnet_ntoa in -ldnet" >&5
  1984. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  1985. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1986.   echo $ac_n "(cached) $ac_c" 1>&6
  1987. else
  1988.   ac_save_LIBS="$LIBS"
  1989. LIBS="-ldnet  $LIBS"
  1990. cat > conftest.$ac_ext <<EOF
  1991. #line 1992 "configure"
  1992. #include "confdefs.h"
  1993. /* Override any gcc2 internal prototype to avoid an error.  */
  1994. #ifdef __cplusplus
  1995. extern "C"
  1996. #endif
  1997. /* We use char because int might match the return type of a gcc2
  1998.     builtin and then its argument prototype would still apply.  */
  1999. char dnet_ntoa();
  2000.  
  2001. int main() {
  2002. dnet_ntoa()
  2003. ; return 0; }
  2004. EOF
  2005. if { (eval echo configure:2006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2006.   rm -rf conftest*
  2007.   eval "ac_cv_lib_$ac_lib_var=yes"
  2008. else
  2009.   echo "configure: failed program was:" >&5
  2010.   cat conftest.$ac_ext >&5
  2011.   rm -rf conftest*
  2012.   eval "ac_cv_lib_$ac_lib_var=no"
  2013. fi
  2014. rm -f conftest*
  2015. LIBS="$ac_save_LIBS"
  2016.  
  2017. fi
  2018. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2019.   echo "$ac_t""yes" 1>&6
  2020.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  2021. else
  2022.   echo "$ac_t""no" 1>&6
  2023. fi
  2024.  
  2025.     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  2026.       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  2027. echo "configure:2028: checking for dnet_ntoa in -ldnet_stub" >&5
  2028. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  2029. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2030.   echo $ac_n "(cached) $ac_c" 1>&6
  2031. else
  2032.   ac_save_LIBS="$LIBS"
  2033. LIBS="-ldnet_stub  $LIBS"
  2034. cat > conftest.$ac_ext <<EOF
  2035. #line 2036 "configure"
  2036. #include "confdefs.h"
  2037. /* Override any gcc2 internal prototype to avoid an error.  */
  2038. #ifdef __cplusplus
  2039. extern "C"
  2040. #endif
  2041. /* We use char because int might match the return type of a gcc2
  2042.     builtin and then its argument prototype would still apply.  */
  2043. char dnet_ntoa();
  2044.  
  2045. int main() {
  2046. dnet_ntoa()
  2047. ; return 0; }
  2048. EOF
  2049. if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2050.   rm -rf conftest*
  2051.   eval "ac_cv_lib_$ac_lib_var=yes"
  2052. else
  2053.   echo "configure: failed program was:" >&5
  2054.   cat conftest.$ac_ext >&5
  2055.   rm -rf conftest*
  2056.   eval "ac_cv_lib_$ac_lib_var=no"
  2057. fi
  2058. rm -f conftest*
  2059. LIBS="$ac_save_LIBS"
  2060.  
  2061. fi
  2062. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2063.   echo "$ac_t""yes" 1>&6
  2064.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  2065. else
  2066.   echo "$ac_t""no" 1>&6
  2067. fi
  2068.  
  2069.     fi
  2070.  
  2071.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  2072.     # to get the SysV transport functions.
  2073.     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
  2074.     # needs -lnsl.
  2075.     # The nsl library prevents programs from opening the X display
  2076.     # on Irix 5.2, according to dickey@clark.net.
  2077.     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  2078. echo "configure:2079: checking for gethostbyname" >&5
  2079. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  2080.   echo $ac_n "(cached) $ac_c" 1>&6
  2081. else
  2082.   cat > conftest.$ac_ext <<EOF
  2083. #line 2084 "configure"
  2084. #include "confdefs.h"
  2085. /* System header to define __stub macros and hopefully few prototypes,
  2086.     which can conflict with char gethostbyname(); below.  */
  2087. #include <assert.h>
  2088. /* Override any gcc2 internal prototype to avoid an error.  */
  2089. #ifdef __cplusplus
  2090. extern "C"
  2091. #endif
  2092. /* We use char because int might match the return type of a gcc2
  2093.     builtin and then its argument prototype would still apply.  */
  2094. char gethostbyname();
  2095.  
  2096. int main() {
  2097.  
  2098. /* The GNU C library defines this for functions which it implements
  2099.     to always fail with ENOSYS.  Some functions are actually named
  2100.     something starting with __ and the normal name is an alias.  */
  2101. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  2102. choke me
  2103. #else
  2104. gethostbyname();
  2105. #endif
  2106.  
  2107. ; return 0; }
  2108. EOF
  2109. if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2110.   rm -rf conftest*
  2111.   eval "ac_cv_func_gethostbyname=yes"
  2112. else
  2113.   echo "configure: failed program was:" >&5
  2114.   cat conftest.$ac_ext >&5
  2115.   rm -rf conftest*
  2116.   eval "ac_cv_func_gethostbyname=no"
  2117. fi
  2118. rm -f conftest*
  2119. fi
  2120.  
  2121. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  2122.   echo "$ac_t""yes" 1>&6
  2123.   :
  2124. else
  2125.   echo "$ac_t""no" 1>&6
  2126. fi
  2127.  
  2128.     if test $ac_cv_func_gethostbyname = no; then
  2129.       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  2130. echo "configure:2131: checking for gethostbyname in -lnsl" >&5
  2131. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  2132. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2133.   echo $ac_n "(cached) $ac_c" 1>&6
  2134. else
  2135.   ac_save_LIBS="$LIBS"
  2136. LIBS="-lnsl  $LIBS"
  2137. cat > conftest.$ac_ext <<EOF
  2138. #line 2139 "configure"
  2139. #include "confdefs.h"
  2140. /* Override any gcc2 internal prototype to avoid an error.  */
  2141. #ifdef __cplusplus
  2142. extern "C"
  2143. #endif
  2144. /* We use char because int might match the return type of a gcc2
  2145.     builtin and then its argument prototype would still apply.  */
  2146. char gethostbyname();
  2147.  
  2148. int main() {
  2149. gethostbyname()
  2150. ; return 0; }
  2151. EOF
  2152. if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2153.   rm -rf conftest*
  2154.   eval "ac_cv_lib_$ac_lib_var=yes"
  2155. else
  2156.   echo "configure: failed program was:" >&5
  2157.   cat conftest.$ac_ext >&5
  2158.   rm -rf conftest*
  2159.   eval "ac_cv_lib_$ac_lib_var=no"
  2160. fi
  2161. rm -f conftest*
  2162. LIBS="$ac_save_LIBS"
  2163.  
  2164. fi
  2165. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2166.   echo "$ac_t""yes" 1>&6
  2167.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  2168. else
  2169.   echo "$ac_t""no" 1>&6
  2170. fi
  2171.  
  2172.     fi
  2173.  
  2174.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  2175.     # socket/setsockopt and other routines are undefined under SCO ODT
  2176.     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  2177.     # on later versions), says simon@lia.di.epfl.ch: it contains
  2178.     # gethostby* variants that don't use the nameserver (or something).
  2179.     # -lsocket must be given before -lnsl if both are needed.
  2180.     # We assume that if connect needs -lnsl, so does gethostbyname.
  2181.     echo $ac_n "checking for connect""... $ac_c" 1>&6
  2182. echo "configure:2183: checking for connect" >&5
  2183. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  2184.   echo $ac_n "(cached) $ac_c" 1>&6
  2185. else
  2186.   cat > conftest.$ac_ext <<EOF
  2187. #line 2188 "configure"
  2188. #include "confdefs.h"
  2189. /* System header to define __stub macros and hopefully few prototypes,
  2190.     which can conflict with char connect(); below.  */
  2191. #include <assert.h>
  2192. /* Override any gcc2 internal prototype to avoid an error.  */
  2193. #ifdef __cplusplus
  2194. extern "C"
  2195. #endif
  2196. /* We use char because int might match the return type of a gcc2
  2197.     builtin and then its argument prototype would still apply.  */
  2198. char connect();
  2199.  
  2200. int main() {
  2201.  
  2202. /* The GNU C library defines this for functions which it implements
  2203.     to always fail with ENOSYS.  Some functions are actually named
  2204.     something starting with __ and the normal name is an alias.  */
  2205. #if defined (__stub_connect) || defined (__stub___connect)
  2206. choke me
  2207. #else
  2208. connect();
  2209. #endif
  2210.  
  2211. ; return 0; }
  2212. EOF
  2213. if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2214.   rm -rf conftest*
  2215.   eval "ac_cv_func_connect=yes"
  2216. else
  2217.   echo "configure: failed program was:" >&5
  2218.   cat conftest.$ac_ext >&5
  2219.   rm -rf conftest*
  2220.   eval "ac_cv_func_connect=no"
  2221. fi
  2222. rm -f conftest*
  2223. fi
  2224.  
  2225. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  2226.   echo "$ac_t""yes" 1>&6
  2227.   :
  2228. else
  2229.   echo "$ac_t""no" 1>&6
  2230. fi
  2231.  
  2232.     if test $ac_cv_func_connect = no; then
  2233.       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  2234. echo "configure:2235: checking for connect in -lsocket" >&5
  2235. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  2236. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2237.   echo $ac_n "(cached) $ac_c" 1>&6
  2238. else
  2239.   ac_save_LIBS="$LIBS"
  2240. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  2241. cat > conftest.$ac_ext <<EOF
  2242. #line 2243 "configure"
  2243. #include "confdefs.h"
  2244. /* Override any gcc2 internal prototype to avoid an error.  */
  2245. #ifdef __cplusplus
  2246. extern "C"
  2247. #endif
  2248. /* We use char because int might match the return type of a gcc2
  2249.     builtin and then its argument prototype would still apply.  */
  2250. char connect();
  2251.  
  2252. int main() {
  2253. connect()
  2254. ; return 0; }
  2255. EOF
  2256. if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2257.   rm -rf conftest*
  2258.   eval "ac_cv_lib_$ac_lib_var=yes"
  2259. else
  2260.   echo "configure: failed program was:" >&5
  2261.   cat conftest.$ac_ext >&5
  2262.   rm -rf conftest*
  2263.   eval "ac_cv_lib_$ac_lib_var=no"
  2264. fi
  2265. rm -f conftest*
  2266. LIBS="$ac_save_LIBS"
  2267.  
  2268. fi
  2269. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2270.   echo "$ac_t""yes" 1>&6
  2271.   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  2272. else
  2273.   echo "$ac_t""no" 1>&6
  2274. fi
  2275.  
  2276.     fi
  2277.  
  2278.     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
  2279.     echo $ac_n "checking for remove""... $ac_c" 1>&6
  2280. echo "configure:2281: checking for remove" >&5
  2281. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  2282.   echo $ac_n "(cached) $ac_c" 1>&6
  2283. else
  2284.   cat > conftest.$ac_ext <<EOF
  2285. #line 2286 "configure"
  2286. #include "confdefs.h"
  2287. /* System header to define __stub macros and hopefully few prototypes,
  2288.     which can conflict with char remove(); below.  */
  2289. #include <assert.h>
  2290. /* Override any gcc2 internal prototype to avoid an error.  */
  2291. #ifdef __cplusplus
  2292. extern "C"
  2293. #endif
  2294. /* We use char because int might match the return type of a gcc2
  2295.     builtin and then its argument prototype would still apply.  */
  2296. char remove();
  2297.  
  2298. int main() {
  2299.  
  2300. /* The GNU C library defines this for functions which it implements
  2301.     to always fail with ENOSYS.  Some functions are actually named
  2302.     something starting with __ and the normal name is an alias.  */
  2303. #if defined (__stub_remove) || defined (__stub___remove)
  2304. choke me
  2305. #else
  2306. remove();
  2307. #endif
  2308.  
  2309. ; return 0; }
  2310. EOF
  2311. if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2312.   rm -rf conftest*
  2313.   eval "ac_cv_func_remove=yes"
  2314. else
  2315.   echo "configure: failed program was:" >&5
  2316.   cat conftest.$ac_ext >&5
  2317.   rm -rf conftest*
  2318.   eval "ac_cv_func_remove=no"
  2319. fi
  2320. rm -f conftest*
  2321. fi
  2322.  
  2323. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  2324.   echo "$ac_t""yes" 1>&6
  2325.   :
  2326. else
  2327.   echo "$ac_t""no" 1>&6
  2328. fi
  2329.  
  2330.     if test $ac_cv_func_remove = no; then
  2331.       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  2332. echo "configure:2333: checking for remove in -lposix" >&5
  2333. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  2334. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2335.   echo $ac_n "(cached) $ac_c" 1>&6
  2336. else
  2337.   ac_save_LIBS="$LIBS"
  2338. LIBS="-lposix  $LIBS"
  2339. cat > conftest.$ac_ext <<EOF
  2340. #line 2341 "configure"
  2341. #include "confdefs.h"
  2342. /* Override any gcc2 internal prototype to avoid an error.  */
  2343. #ifdef __cplusplus
  2344. extern "C"
  2345. #endif
  2346. /* We use char because int might match the return type of a gcc2
  2347.     builtin and then its argument prototype would still apply.  */
  2348. char remove();
  2349.  
  2350. int main() {
  2351. remove()
  2352. ; return 0; }
  2353. EOF
  2354. if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2355.   rm -rf conftest*
  2356.   eval "ac_cv_lib_$ac_lib_var=yes"
  2357. else
  2358.   echo "configure: failed program was:" >&5
  2359.   cat conftest.$ac_ext >&5
  2360.   rm -rf conftest*
  2361.   eval "ac_cv_lib_$ac_lib_var=no"
  2362. fi
  2363. rm -f conftest*
  2364. LIBS="$ac_save_LIBS"
  2365.  
  2366. fi
  2367. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2368.   echo "$ac_t""yes" 1>&6
  2369.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  2370. else
  2371.   echo "$ac_t""no" 1>&6
  2372. fi
  2373.  
  2374.     fi
  2375.  
  2376.     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  2377.     echo $ac_n "checking for shmat""... $ac_c" 1>&6
  2378. echo "configure:2379: checking for shmat" >&5
  2379. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  2380.   echo $ac_n "(cached) $ac_c" 1>&6
  2381. else
  2382.   cat > conftest.$ac_ext <<EOF
  2383. #line 2384 "configure"
  2384. #include "confdefs.h"
  2385. /* System header to define __stub macros and hopefully few prototypes,
  2386.     which can conflict with char shmat(); below.  */
  2387. #include <assert.h>
  2388. /* Override any gcc2 internal prototype to avoid an error.  */
  2389. #ifdef __cplusplus
  2390. extern "C"
  2391. #endif
  2392. /* We use char because int might match the return type of a gcc2
  2393.     builtin and then its argument prototype would still apply.  */
  2394. char shmat();
  2395.  
  2396. int main() {
  2397.  
  2398. /* The GNU C library defines this for functions which it implements
  2399.     to always fail with ENOSYS.  Some functions are actually named
  2400.     something starting with __ and the normal name is an alias.  */
  2401. #if defined (__stub_shmat) || defined (__stub___shmat)
  2402. choke me
  2403. #else
  2404. shmat();
  2405. #endif
  2406.  
  2407. ; return 0; }
  2408. EOF
  2409. if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2410.   rm -rf conftest*
  2411.   eval "ac_cv_func_shmat=yes"
  2412. else
  2413.   echo "configure: failed program was:" >&5
  2414.   cat conftest.$ac_ext >&5
  2415.   rm -rf conftest*
  2416.   eval "ac_cv_func_shmat=no"
  2417. fi
  2418. rm -f conftest*
  2419. fi
  2420.  
  2421. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  2422.   echo "$ac_t""yes" 1>&6
  2423.   :
  2424. else
  2425.   echo "$ac_t""no" 1>&6
  2426. fi
  2427.  
  2428.     if test $ac_cv_func_shmat = no; then
  2429.       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  2430. echo "configure:2431: checking for shmat in -lipc" >&5
  2431. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  2432. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2433.   echo $ac_n "(cached) $ac_c" 1>&6
  2434. else
  2435.   ac_save_LIBS="$LIBS"
  2436. LIBS="-lipc  $LIBS"
  2437. cat > conftest.$ac_ext <<EOF
  2438. #line 2439 "configure"
  2439. #include "confdefs.h"
  2440. /* Override any gcc2 internal prototype to avoid an error.  */
  2441. #ifdef __cplusplus
  2442. extern "C"
  2443. #endif
  2444. /* We use char because int might match the return type of a gcc2
  2445.     builtin and then its argument prototype would still apply.  */
  2446. char shmat();
  2447.  
  2448. int main() {
  2449. shmat()
  2450. ; return 0; }
  2451. EOF
  2452. if { (eval echo configure:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2453.   rm -rf conftest*
  2454.   eval "ac_cv_lib_$ac_lib_var=yes"
  2455. else
  2456.   echo "configure: failed program was:" >&5
  2457.   cat conftest.$ac_ext >&5
  2458.   rm -rf conftest*
  2459.   eval "ac_cv_lib_$ac_lib_var=no"
  2460. fi
  2461. rm -f conftest*
  2462. LIBS="$ac_save_LIBS"
  2463.  
  2464. fi
  2465. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2466.   echo "$ac_t""yes" 1>&6
  2467.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  2468. else
  2469.   echo "$ac_t""no" 1>&6
  2470. fi
  2471.  
  2472.     fi
  2473.   fi
  2474.  
  2475.   # Check for libraries that X11R6 Xt/Xaw programs need.
  2476.   ac_save_LDFLAGS="$LDFLAGS"
  2477.   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  2478.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  2479.   # check for ICE first), but we must link in the order -lSM -lICE or
  2480.   # we get undefined symbols.  So assume we have SM if we have ICE.
  2481.   # These have to be linked with before -lX11, unlike the other
  2482.   # libraries we check for below, so use a different variable.
  2483.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  2484.   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  2485. echo "configure:2486: checking for IceConnectionNumber in -lICE" >&5
  2486. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  2487. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2488.   echo $ac_n "(cached) $ac_c" 1>&6
  2489. else
  2490.   ac_save_LIBS="$LIBS"
  2491. LIBS="-lICE  $LIBS"
  2492. cat > conftest.$ac_ext <<EOF
  2493. #line 2494 "configure"
  2494. #include "confdefs.h"
  2495. /* Override any gcc2 internal prototype to avoid an error.  */
  2496. #ifdef __cplusplus
  2497. extern "C"
  2498. #endif
  2499. /* We use char because int might match the return type of a gcc2
  2500.     builtin and then its argument prototype would still apply.  */
  2501. char IceConnectionNumber();
  2502.  
  2503. int main() {
  2504. IceConnectionNumber()
  2505. ; return 0; }
  2506. EOF
  2507. if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2508.   rm -rf conftest*
  2509.   eval "ac_cv_lib_$ac_lib_var=yes"
  2510. else
  2511.   echo "configure: failed program was:" >&5
  2512.   cat conftest.$ac_ext >&5
  2513.   rm -rf conftest*
  2514.   eval "ac_cv_lib_$ac_lib_var=no"
  2515. fi
  2516. rm -f conftest*
  2517. LIBS="$ac_save_LIBS"
  2518.  
  2519. fi
  2520. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2521.   echo "$ac_t""yes" 1>&6
  2522.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  2523. else
  2524.   echo "$ac_t""no" 1>&6
  2525. fi
  2526.  
  2527.   LDFLAGS="$ac_save_LDFLAGS"
  2528.  
  2529. fi
  2530.  
  2531. LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
  2532. CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  2533.  
  2534. ### Check for xforms and xpm (only if X has been found).
  2535. if test "$have_x" = yes ; then
  2536. # We surely need these two libraries and want to check carefully the
  2537. # version numbers... 
  2538.  
  2539. ### Check for Xpm library
  2540. echo $ac_n "checking for XpmCreateBufferFromImage in -lXpm""... $ac_c" 1>&6
  2541. echo "configure:2542: checking for XpmCreateBufferFromImage in -lXpm" >&5
  2542. ac_lib_var=`echo Xpm'_'XpmCreateBufferFromImage | sed 'y%./+-%__p_%'`
  2543. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2544.   echo $ac_n "(cached) $ac_c" 1>&6
  2545. else
  2546.   ac_save_LIBS="$LIBS"
  2547. LIBS="-lXpm $LYX_LIBS $LIBS"
  2548. cat > conftest.$ac_ext <<EOF
  2549. #line 2550 "configure"
  2550. #include "confdefs.h"
  2551. /* Override any gcc2 internal prototype to avoid an error.  */
  2552. #ifdef __cplusplus
  2553. extern "C"
  2554. #endif
  2555. /* We use char because int might match the return type of a gcc2
  2556.     builtin and then its argument prototype would still apply.  */
  2557. char XpmCreateBufferFromImage();
  2558.  
  2559. int main() {
  2560. XpmCreateBufferFromImage()
  2561. ; return 0; }
  2562. EOF
  2563. if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2564.   rm -rf conftest*
  2565.   eval "ac_cv_lib_$ac_lib_var=yes"
  2566. else
  2567.   echo "configure: failed program was:" >&5
  2568.   cat conftest.$ac_ext >&5
  2569.   rm -rf conftest*
  2570.   eval "ac_cv_lib_$ac_lib_var=no"
  2571. fi
  2572. rm -f conftest*
  2573. LIBS="$ac_save_LIBS"
  2574.  
  2575. fi
  2576. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2577.   echo "$ac_t""yes" 1>&6
  2578.   LYX_LIBS="-lXpm $LYX_LIBS"
  2579. else
  2580.   echo "$ac_t""no" 1>&6
  2581.  
  2582.  
  2583. lyx_error_txt="$lyx_error_txt
  2584. ** Can't find libXpm. Please check that the Xpm library
  2585.    is correctly installed on your system.
  2586. "
  2587. lyx_error=yes
  2588. fi
  2589.  
  2590.  
  2591. ### Check for Xpm headers
  2592. lyx_cv_xpm_h_location="<xpm.h>"
  2593. ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
  2594. echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
  2595. echo "configure:2596: checking for X11/xpm.h" >&5
  2596. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2597.   echo $ac_n "(cached) $ac_c" 1>&6
  2598. else
  2599.   cat > conftest.$ac_ext <<EOF
  2600. #line 2601 "configure"
  2601. #include "confdefs.h"
  2602. #include <X11/xpm.h>
  2603. EOF
  2604. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2605. { (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2606. ac_err=`grep -v '^ *+' conftest.out`
  2607. if test -z "$ac_err"; then
  2608.   rm -rf conftest*
  2609.   eval "ac_cv_header_$ac_safe=yes"
  2610. else
  2611.   echo "$ac_err" >&5
  2612.   echo "configure: failed program was:" >&5
  2613.   cat conftest.$ac_ext >&5
  2614.   rm -rf conftest*
  2615.   eval "ac_cv_header_$ac_safe=no"
  2616. fi
  2617. rm -f conftest*
  2618. fi
  2619. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2620.   echo "$ac_t""yes" 1>&6
  2621.   
  2622.   ac_cv_header_xpm_h=yes
  2623.   lyx_cv_xpm_h_location="<X11/xpm.h>"
  2624. else
  2625.   echo "$ac_t""no" 1>&6
  2626.  
  2627. ac_safe=`echo "xpm.h" | sed 'y%./+-%__p_%'`
  2628. echo $ac_n "checking for xpm.h""... $ac_c" 1>&6
  2629. echo "configure:2630: checking for xpm.h" >&5
  2630. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2631.   echo $ac_n "(cached) $ac_c" 1>&6
  2632. else
  2633.   cat > conftest.$ac_ext <<EOF
  2634. #line 2635 "configure"
  2635. #include "confdefs.h"
  2636. #include <xpm.h>
  2637. EOF
  2638. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2639. { (eval echo configure:2640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2640. ac_err=`grep -v '^ *+' conftest.out`
  2641. if test -z "$ac_err"; then
  2642.   rm -rf conftest*
  2643.   eval "ac_cv_header_$ac_safe=yes"
  2644. else
  2645.   echo "$ac_err" >&5
  2646.   echo "configure: failed program was:" >&5
  2647.   cat conftest.$ac_ext >&5
  2648.   rm -rf conftest*
  2649.   eval "ac_cv_header_$ac_safe=no"
  2650. fi
  2651. rm -f conftest*
  2652. fi
  2653. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2654.   echo "$ac_t""yes" 1>&6
  2655.   :
  2656. else
  2657.   echo "$ac_t""no" 1>&6
  2658.  
  2659.  
  2660.  
  2661. lyx_error_txt="$lyx_error_txt
  2662. ** Can't find xpm.h. Please check that the Xpm library
  2663.    is correctly installed on your system.
  2664. "
  2665. lyx_error=yes
  2666. fi
  2667.  
  2668. fi
  2669.  
  2670. cat >> confdefs.h <<EOF
  2671. #define XPM_H_LOCATION $lyx_cv_xpm_h_location
  2672. EOF
  2673.  
  2674.  
  2675. ### Test for the header version
  2676. if test $ac_cv_header_xpm_h = yes; then
  2677.   echo $ac_n "checking xpm header version""... $ac_c" 1>&6
  2678. echo "configure:2679: checking xpm header version" >&5
  2679. if eval "test \"`echo '$''{'lyx_cv_xpmversion'+set}'`\" = set"; then
  2680.   echo $ac_n "(cached) $ac_c" 1>&6
  2681. else
  2682.    cat > conftest.$ac_ext <<EOF
  2683. #line 2684 "configure"
  2684. #include "confdefs.h"
  2685.  
  2686. #include XPM_H_LOCATION
  2687. %%%lyx_cv_xpmv=XpmVersion;lyx_cv_xpmr=XpmRevision%%%
  2688. EOF
  2689.     eval `(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
  2690.       grep "^%%%"  2>/dev/null | \
  2691.       sed -e 's/^%%%\(.*\)%%%$/\1/' -e 's/ //g'`
  2692.     case "$lyx_cv_xpmr" in
  2693.  
  2694.      [0-9]) lyxxpmr_alpha=`echo $lyx_cv_xpmr |tr 123456789 abcdefghi`
  2695.             lyxxpmv_alpha=" (aka 3.$lyx_cv_xpmv$lyxxpmr_alpha)";;
  2696.  
  2697.          *) ;;
  2698.     esac
  2699.     lyx_cv_xpmversion="$lyx_cv_xpmv.$lyx_cv_xpmr$lyxxpmv_alpha"
  2700.     rm -f conftest*
  2701. fi
  2702.  
  2703. echo "$ac_t""$lyx_cv_xpmversion" 1>&6
  2704.   case "$lyx_cv_xpmr" in 
  2705.  
  2706.         [789]|[0-9][0-9]*) ;;
  2707.  
  2708.         *) 
  2709. lyx_warning_txt="$lyx_warning_txt
  2710. == Version $lyx_cv_xpmversion of the Xpm library is a bit old. 
  2711.    If you experience strange crashes with LyX, try to upgrade 
  2712.    to at least version 4.7 (aka 3.4g).
  2713.    If you have installed a newer version of the library, check whether you
  2714.    have an old xpm.h header file in your include path.
  2715. "
  2716. lyx_warning=yes;;
  2717.   esac
  2718. fi
  2719.  
  2720. ### Check for xforms library
  2721. echo $ac_n "checking for fl_initialize in -lforms""... $ac_c" 1>&6
  2722. echo "configure:2723: checking for fl_initialize in -lforms" >&5
  2723. ac_lib_var=`echo forms'_'fl_initialize | sed 'y%./+-%__p_%'`
  2724. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2725.   echo $ac_n "(cached) $ac_c" 1>&6
  2726. else
  2727.   ac_save_LIBS="$LIBS"
  2728. LIBS="-lforms $LYX_LIBS $LIBS"
  2729. cat > conftest.$ac_ext <<EOF
  2730. #line 2731 "configure"
  2731. #include "confdefs.h"
  2732. /* Override any gcc2 internal prototype to avoid an error.  */
  2733. #ifdef __cplusplus
  2734. extern "C"
  2735. #endif
  2736. /* We use char because int might match the return type of a gcc2
  2737.     builtin and then its argument prototype would still apply.  */
  2738. char fl_initialize();
  2739.  
  2740. int main() {
  2741. fl_initialize()
  2742. ; return 0; }
  2743. EOF
  2744. if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2745.   rm -rf conftest*
  2746.   eval "ac_cv_lib_$ac_lib_var=yes"
  2747. else
  2748.   echo "configure: failed program was:" >&5
  2749.   cat conftest.$ac_ext >&5
  2750.   rm -rf conftest*
  2751.   eval "ac_cv_lib_$ac_lib_var=no"
  2752. fi
  2753. rm -f conftest*
  2754. LIBS="$ac_save_LIBS"
  2755.  
  2756. fi
  2757. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2758.   echo "$ac_t""yes" 1>&6
  2759.   LYX_LIBS="-lforms $LYX_LIBS"
  2760. else
  2761.   echo "$ac_t""no" 1>&6
  2762. echo $ac_n "checking for fl_initialize in -lxforms""... $ac_c" 1>&6
  2763. echo "configure:2764: checking for fl_initialize in -lxforms" >&5
  2764. ac_lib_var=`echo xforms'_'fl_initialize | sed 'y%./+-%__p_%'`
  2765. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2766.   echo $ac_n "(cached) $ac_c" 1>&6
  2767. else
  2768.   ac_save_LIBS="$LIBS"
  2769. LIBS="-lxforms $LYX_LIBS $LIBS"
  2770. cat > conftest.$ac_ext <<EOF
  2771. #line 2772 "configure"
  2772. #include "confdefs.h"
  2773. /* Override any gcc2 internal prototype to avoid an error.  */
  2774. #ifdef __cplusplus
  2775. extern "C"
  2776. #endif
  2777. /* We use char because int might match the return type of a gcc2
  2778.     builtin and then its argument prototype would still apply.  */
  2779. char fl_initialize();
  2780.  
  2781. int main() {
  2782. fl_initialize()
  2783. ; return 0; }
  2784. EOF
  2785. if { (eval echo configure:2786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2786.   rm -rf conftest*
  2787.   eval "ac_cv_lib_$ac_lib_var=yes"
  2788. else
  2789.   echo "configure: failed program was:" >&5
  2790.   cat conftest.$ac_ext >&5
  2791.   rm -rf conftest*
  2792.   eval "ac_cv_lib_$ac_lib_var=no"
  2793. fi
  2794. rm -f conftest*
  2795. LIBS="$ac_save_LIBS"
  2796.  
  2797. fi
  2798. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2799.   echo "$ac_t""yes" 1>&6
  2800.   LYX_LIBS="-lxforms $LYX_LIBS"
  2801. else
  2802.   echo "$ac_t""no" 1>&6
  2803.  
  2804.  
  2805. lyx_error_txt="$lyx_error_txt
  2806. ** Can't find libforms or libxforms. Please check that the xforms library
  2807.    is correctly installed on your system.
  2808. "
  2809. lyx_error=yes
  2810. fi
  2811.  
  2812. fi
  2813.  
  2814.  
  2815. ### Check for xforms headers
  2816. lyx_cv_forms_h_location="<forms.h>"
  2817. ac_safe=`echo "X11/forms.h" | sed 'y%./+-%__p_%'`
  2818. echo $ac_n "checking for X11/forms.h""... $ac_c" 1>&6
  2819. echo "configure:2820: checking for X11/forms.h" >&5
  2820. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2821.   echo $ac_n "(cached) $ac_c" 1>&6
  2822. else
  2823.   cat > conftest.$ac_ext <<EOF
  2824. #line 2825 "configure"
  2825. #include "confdefs.h"
  2826. #include <X11/forms.h>
  2827. EOF
  2828. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2829. { (eval echo configure:2830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2830. ac_err=`grep -v '^ *+' conftest.out`
  2831. if test -z "$ac_err"; then
  2832.   rm -rf conftest*
  2833.   eval "ac_cv_header_$ac_safe=yes"
  2834. else
  2835.   echo "$ac_err" >&5
  2836.   echo "configure: failed program was:" >&5
  2837.   cat conftest.$ac_ext >&5
  2838.   rm -rf conftest*
  2839.   eval "ac_cv_header_$ac_safe=no"
  2840. fi
  2841. rm -f conftest*
  2842. fi
  2843. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2844.   echo "$ac_t""yes" 1>&6
  2845.   
  2846.   ac_cv_header_forms_h=yes
  2847.   lyx_cv_forms_h_location="<X11/forms.h>"
  2848. else
  2849.   echo "$ac_t""no" 1>&6
  2850.  
  2851. ac_safe=`echo "forms.h" | sed 'y%./+-%__p_%'`
  2852. echo $ac_n "checking for forms.h""... $ac_c" 1>&6
  2853. echo "configure:2854: checking for forms.h" >&5
  2854. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2855.   echo $ac_n "(cached) $ac_c" 1>&6
  2856. else
  2857.   cat > conftest.$ac_ext <<EOF
  2858. #line 2859 "configure"
  2859. #include "confdefs.h"
  2860. #include <forms.h>
  2861. EOF
  2862. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2863. { (eval echo configure:2864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2864. ac_err=`grep -v '^ *+' conftest.out`
  2865. if test -z "$ac_err"; then
  2866.   rm -rf conftest*
  2867.   eval "ac_cv_header_$ac_safe=yes"
  2868. else
  2869.   echo "$ac_err" >&5
  2870.   echo "configure: failed program was:" >&5
  2871.   cat conftest.$ac_ext >&5
  2872.   rm -rf conftest*
  2873.   eval "ac_cv_header_$ac_safe=no"
  2874. fi
  2875. rm -f conftest*
  2876. fi
  2877. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2878.   echo "$ac_t""yes" 1>&6
  2879.   :
  2880. else
  2881.   echo "$ac_t""no" 1>&6
  2882.  
  2883.  
  2884.  
  2885. lyx_error_txt="$lyx_error_txt
  2886. ** Can't find forms.h. Please check that the forms library
  2887.    is correctly installed on your system.
  2888. "
  2889. lyx_error=yes
  2890. fi
  2891.  
  2892. fi
  2893.  
  2894. cat >> confdefs.h <<EOF
  2895. #define FORMS_H_LOCATION $lyx_cv_forms_h_location
  2896. EOF
  2897.  
  2898. if test $ac_cv_header_forms_h = yes; then
  2899.   echo $ac_n "checking xforms header version""... $ac_c" 1>&6
  2900. echo "configure:2901: checking xforms header version" >&5
  2901. if eval "test \"`echo '$''{'lyx_cv_xfversion'+set}'`\" = set"; then
  2902.   echo $ac_n "(cached) $ac_c" 1>&6
  2903. else
  2904.    cat > conftest.$ac_ext <<EOF
  2905. #line 2906 "configure"
  2906. #include "confdefs.h"
  2907.  
  2908. #include FORMS_H_LOCATION
  2909. #if ! defined(FL_INCLUDE_VERSION)
  2910. %%%(unknown)%%%
  2911. #else
  2912. %%%FL_VERSION.FL_REVISION%%%
  2913. #endif
  2914. EOF
  2915. lyx_cv_xfversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
  2916.   grep "^%%%"  2>/dev/null | \
  2917.   sed -e 's/^%%%\(.*\)%%%$/\1/' -e 's/ //g'`
  2918. rm -f conftest*
  2919. fi
  2920.  
  2921. echo "$ac_t""$lyx_cv_xfversion" 1>&6
  2922. case "$lyx_cv_xfversion" in 
  2923.   "(unknown)"|0.82|0.83|0.84|0.85) 
  2924.      
  2925. lyx_error_txt="$lyx_error_txt
  2926. ** Version $lyx_cv_xfversion of xforms is not compatible with LyX. 
  2927.    This version of LyX works best with version 0.88, although it
  2928.    supports also versions 0.81, 0.86 and 0.87.
  2929. "
  2930. lyx_error=yes ;;
  2931.   0.81|0.86|0.87) 
  2932.      
  2933. lyx_warning_txt="$lyx_warning_txt
  2934. == While LyX is compatible with version $lyx_cv_xfversion of xforms, 
  2935.    it is recommended that you upgrade to version 0.88.
  2936. "
  2937. lyx_warning=yes ;;
  2938.      0.88) ;;
  2939.           *) 
  2940. lyx_warning_txt="$lyx_warning_txt
  2941. == Version $lyx_cv_xfversion of xforms might not be compatible with LyX, 
  2942.    since it is newer than 0.88. You might have slight problems with it.
  2943. "
  2944. lyx_warning=yes;;
  2945. esac
  2946. fi
  2947.  
  2948. else
  2949.  
  2950. lyx_error_txt="$lyx_error_txt
  2951. ** Cannot find X window libraries and/or headers. Check your installation. 
  2952.    If you use a Linux system, check that you have installed 
  2953.    the development tools.
  2954. "
  2955. lyx_error=yes
  2956. fi
  2957.  
  2958. ### Setup GNU gettext
  2959. ac_ext=c
  2960. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  2961. ac_cpp='$CPP $CPPFLAGS'
  2962. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  2963. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  2964. cross_compiling=$ac_cv_prog_cc_cross
  2965.  
  2966. # Check whether LC_MESSAGES is available in <locale.h>.
  2967. # Ulrich Drepper <drepper@cygnus.com>, 1995.
  2968.  
  2969. # serial 1
  2970.  
  2971.  
  2972.  
  2973. # Search path for a program which passes the given test.
  2974. # Ulrich Drepper <drepper@cygnus.com>, 1996.
  2975.  
  2976. # serial 1
  2977.  
  2978.  
  2979.  
  2980. # Macro to add for using GNU gettext.
  2981. # Ulrich Drepper <drepper@cygnus.com>, 1995.
  2982.  
  2983. # serial 3
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  2990. echo "configure:2991: checking how to run the C preprocessor" >&5
  2991. # On Suns, sometimes $CPP names a directory.
  2992. if test -n "$CPP" && test -d "$CPP"; then
  2993.   CPP=
  2994. fi
  2995. if test -z "$CPP"; then
  2996. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  2997.   echo $ac_n "(cached) $ac_c" 1>&6
  2998. else
  2999.     # This must be in double quotes, not single quotes, because CPP may get
  3000.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  3001.   CPP="${CC-cc} -E"
  3002.   # On the NeXT, cc -E runs the code through the compiler's parser,
  3003.   # not just through cpp.
  3004.   cat > conftest.$ac_ext <<EOF
  3005. #line 3006 "configure"
  3006. #include "confdefs.h"
  3007. #include <assert.h>
  3008. Syntax Error
  3009. EOF
  3010. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3011. { (eval echo configure:3012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3012. ac_err=`grep -v '^ *+' conftest.out`
  3013. if test -z "$ac_err"; then
  3014.   :
  3015. else
  3016.   echo "$ac_err" >&5
  3017.   echo "configure: failed program was:" >&5
  3018.   cat conftest.$ac_ext >&5
  3019.   rm -rf conftest*
  3020.   CPP="${CC-cc} -E -traditional-cpp"
  3021.   cat > conftest.$ac_ext <<EOF
  3022. #line 3023 "configure"
  3023. #include "confdefs.h"
  3024. #include <assert.h>
  3025. Syntax Error
  3026. EOF
  3027. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3028. { (eval echo configure:3029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3029. ac_err=`grep -v '^ *+' conftest.out`
  3030. if test -z "$ac_err"; then
  3031.   :
  3032. else
  3033.   echo "$ac_err" >&5
  3034.   echo "configure: failed program was:" >&5
  3035.   cat conftest.$ac_ext >&5
  3036.   rm -rf conftest*
  3037.   CPP=/lib/cpp
  3038. fi
  3039. rm -f conftest*
  3040. fi
  3041. rm -f conftest*
  3042.   ac_cv_prog_CPP="$CPP"
  3043. fi
  3044.   CPP="$ac_cv_prog_CPP"
  3045. else
  3046.   ac_cv_prog_CPP="$CPP"
  3047. fi
  3048. echo "$ac_t""$CPP" 1>&6
  3049.  
  3050. # Extract the first word of "ranlib", so it can be a program name with args.
  3051. set dummy ranlib; ac_word=$2
  3052. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3053. echo "configure:3054: checking for $ac_word" >&5
  3054. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  3055.   echo $ac_n "(cached) $ac_c" 1>&6
  3056. else
  3057.   if test -n "$RANLIB"; then
  3058.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  3059. else
  3060.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3061.   for ac_dir in $PATH; do
  3062.     test -z "$ac_dir" && ac_dir=.
  3063.     if test -f $ac_dir/$ac_word; then
  3064.       ac_cv_prog_RANLIB="ranlib"
  3065.       break
  3066.     fi
  3067.   done
  3068.   IFS="$ac_save_ifs"
  3069.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  3070. fi
  3071. fi
  3072. RANLIB="$ac_cv_prog_RANLIB"
  3073. if test -n "$RANLIB"; then
  3074.   echo "$ac_t""$RANLIB" 1>&6
  3075. else
  3076.   echo "$ac_t""no" 1>&6
  3077. fi
  3078.  
  3079. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  3080. echo "configure:3081: checking for ANSI C header files" >&5
  3081. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  3082.   echo $ac_n "(cached) $ac_c" 1>&6
  3083. else
  3084.   cat > conftest.$ac_ext <<EOF
  3085. #line 3086 "configure"
  3086. #include "confdefs.h"
  3087. #include <stdlib.h>
  3088. #include <stdarg.h>
  3089. #include <string.h>
  3090. #include <float.h>
  3091. EOF
  3092. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3093. { (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3094. ac_err=`grep -v '^ *+' conftest.out`
  3095. if test -z "$ac_err"; then
  3096.   rm -rf conftest*
  3097.   ac_cv_header_stdc=yes
  3098. else
  3099.   echo "$ac_err" >&5
  3100.   echo "configure: failed program was:" >&5
  3101.   cat conftest.$ac_ext >&5
  3102.   rm -rf conftest*
  3103.   ac_cv_header_stdc=no
  3104. fi
  3105. rm -f conftest*
  3106.  
  3107. if test $ac_cv_header_stdc = yes; then
  3108.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  3109. cat > conftest.$ac_ext <<EOF
  3110. #line 3111 "configure"
  3111. #include "confdefs.h"
  3112. #include <string.h>
  3113. EOF
  3114. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3115.   egrep "memchr" >/dev/null 2>&1; then
  3116.   :
  3117. else
  3118.   rm -rf conftest*
  3119.   ac_cv_header_stdc=no
  3120. fi
  3121. rm -f conftest*
  3122.  
  3123. fi
  3124.  
  3125. if test $ac_cv_header_stdc = yes; then
  3126.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  3127. cat > conftest.$ac_ext <<EOF
  3128. #line 3129 "configure"
  3129. #include "confdefs.h"
  3130. #include <stdlib.h>
  3131. EOF
  3132. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3133.   egrep "free" >/dev/null 2>&1; then
  3134.   :
  3135. else
  3136.   rm -rf conftest*
  3137.   ac_cv_header_stdc=no
  3138. fi
  3139. rm -f conftest*
  3140.  
  3141. fi
  3142.  
  3143. if test $ac_cv_header_stdc = yes; then
  3144.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  3145. if test "$cross_compiling" = yes; then
  3146.   :
  3147. else
  3148.   cat > conftest.$ac_ext <<EOF
  3149. #line 3150 "configure"
  3150. #include "confdefs.h"
  3151. #include <ctype.h>
  3152. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  3153. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  3154. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  3155. int main () { int i; for (i = 0; i < 256; i++)
  3156. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  3157. exit (0); }
  3158.  
  3159. EOF
  3160. if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3161. then
  3162.   :
  3163. else
  3164.   echo "configure: failed program was:" >&5
  3165.   cat conftest.$ac_ext >&5
  3166.   rm -fr conftest*
  3167.   ac_cv_header_stdc=no
  3168. fi
  3169. rm -fr conftest*
  3170. fi
  3171.  
  3172. fi
  3173. fi
  3174.  
  3175. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  3176. if test $ac_cv_header_stdc = yes; then
  3177.   cat >> confdefs.h <<\EOF
  3178. #define STDC_HEADERS 1
  3179. EOF
  3180.  
  3181. fi
  3182.  
  3183. echo $ac_n "checking for working const""... $ac_c" 1>&6
  3184. echo "configure:3185: checking for working const" >&5
  3185. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  3186.   echo $ac_n "(cached) $ac_c" 1>&6
  3187. else
  3188.   cat > conftest.$ac_ext <<EOF
  3189. #line 3190 "configure"
  3190. #include "confdefs.h"
  3191.  
  3192. int main() {
  3193.  
  3194. /* Ultrix mips cc rejects this.  */
  3195. typedef int charset[2]; const charset x;
  3196. /* SunOS 4.1.1 cc rejects this.  */
  3197. char const *const *ccp;
  3198. char **p;
  3199. /* NEC SVR4.0.2 mips cc rejects this.  */
  3200. struct point {int x, y;};
  3201. static struct point const zero = {0,0};
  3202. /* AIX XL C 1.02.0.0 rejects this.
  3203.    It does not let you subtract one const X* pointer from another in an arm
  3204.    of an if-expression whose if-part is not a constant expression */
  3205. const char *g = "string";
  3206. ccp = &g + (g ? g-g : 0);
  3207. /* HPUX 7.0 cc rejects these. */
  3208. ++ccp;
  3209. p = (char**) ccp;
  3210. ccp = (char const *const *) p;
  3211. { /* SCO 3.2v4 cc rejects this.  */
  3212.   char *t;
  3213.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  3214.  
  3215.   *t++ = 0;
  3216. }
  3217. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  3218.   int x[] = {25, 17};
  3219.   const int *foo = &x[0];
  3220.   ++foo;
  3221. }
  3222. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  3223.   typedef const int *iptr;
  3224.   iptr p = 0;
  3225.   ++p;
  3226. }
  3227. { /* AIX XL C 1.02.0.0 rejects this saying
  3228.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  3229.   struct s { int j; const int *ap[3]; };
  3230.   struct s *b; b->j = 5;
  3231. }
  3232. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  3233.   const int foo = 10;
  3234. }
  3235.  
  3236. ; return 0; }
  3237. EOF
  3238. if { (eval echo configure:3239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3239.   rm -rf conftest*
  3240.   ac_cv_c_const=yes
  3241. else
  3242.   echo "configure: failed program was:" >&5
  3243.   cat conftest.$ac_ext >&5
  3244.   rm -rf conftest*
  3245.   ac_cv_c_const=no
  3246. fi
  3247. rm -f conftest*
  3248. fi
  3249.  
  3250. echo "$ac_t""$ac_cv_c_const" 1>&6
  3251. if test $ac_cv_c_const = no; then
  3252.   cat >> confdefs.h <<\EOF
  3253. #define const 
  3254. EOF
  3255.  
  3256. fi
  3257.  
  3258. echo $ac_n "checking for inline""... $ac_c" 1>&6
  3259. echo "configure:3260: checking for inline" >&5
  3260. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  3261.   echo $ac_n "(cached) $ac_c" 1>&6
  3262. else
  3263.   ac_cv_c_inline=no
  3264. for ac_kw in inline __inline__ __inline; do
  3265.   cat > conftest.$ac_ext <<EOF
  3266. #line 3267 "configure"
  3267. #include "confdefs.h"
  3268.  
  3269. int main() {
  3270. } $ac_kw foo() {
  3271. ; return 0; }
  3272. EOF
  3273. if { (eval echo configure:3274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3274.   rm -rf conftest*
  3275.   ac_cv_c_inline=$ac_kw; break
  3276. else
  3277.   echo "configure: failed program was:" >&5
  3278.   cat conftest.$ac_ext >&5
  3279. fi
  3280. rm -f conftest*
  3281. done
  3282.  
  3283. fi
  3284.  
  3285. echo "$ac_t""$ac_cv_c_inline" 1>&6
  3286. case "$ac_cv_c_inline" in
  3287.   inline | yes) ;;
  3288.   no) cat >> confdefs.h <<\EOF
  3289. #define inline 
  3290. EOF
  3291.  ;;
  3292.   *)  cat >> confdefs.h <<EOF
  3293. #define inline $ac_cv_c_inline
  3294. EOF
  3295.  ;;
  3296. esac
  3297.  
  3298. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  3299. echo "configure:3300: checking for off_t" >&5
  3300. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  3301.   echo $ac_n "(cached) $ac_c" 1>&6
  3302. else
  3303.   cat > conftest.$ac_ext <<EOF
  3304. #line 3305 "configure"
  3305. #include "confdefs.h"
  3306. #include <sys/types.h>
  3307. #if STDC_HEADERS
  3308. #include <stdlib.h>
  3309. #include <stddef.h>
  3310. #endif
  3311. EOF
  3312. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3313.   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3314.   rm -rf conftest*
  3315.   ac_cv_type_off_t=yes
  3316. else
  3317.   rm -rf conftest*
  3318.   ac_cv_type_off_t=no
  3319. fi
  3320. rm -f conftest*
  3321.  
  3322. fi
  3323. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  3324. if test $ac_cv_type_off_t = no; then
  3325.   cat >> confdefs.h <<\EOF
  3326. #define off_t long
  3327. EOF
  3328.  
  3329. fi
  3330.  
  3331. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  3332. echo "configure:3333: checking for size_t" >&5
  3333. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  3334.   echo $ac_n "(cached) $ac_c" 1>&6
  3335. else
  3336.   cat > conftest.$ac_ext <<EOF
  3337. #line 3338 "configure"
  3338. #include "confdefs.h"
  3339. #include <sys/types.h>
  3340. #if STDC_HEADERS
  3341. #include <stdlib.h>
  3342. #include <stddef.h>
  3343. #endif
  3344. EOF
  3345. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3346.   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  3347.   rm -rf conftest*
  3348.   ac_cv_type_size_t=yes
  3349. else
  3350.   rm -rf conftest*
  3351.   ac_cv_type_size_t=no
  3352. fi
  3353. rm -f conftest*
  3354.  
  3355. fi
  3356. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  3357. if test $ac_cv_type_size_t = no; then
  3358.   cat >> confdefs.h <<\EOF
  3359. #define size_t unsigned
  3360. EOF
  3361.  
  3362. fi
  3363.  
  3364. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  3365. # for constant arguments.  Useless!
  3366. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  3367. echo "configure:3368: checking for working alloca.h" >&5
  3368. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  3369.   echo $ac_n "(cached) $ac_c" 1>&6
  3370. else
  3371.   cat > conftest.$ac_ext <<EOF
  3372. #line 3373 "configure"
  3373. #include "confdefs.h"
  3374. #include <alloca.h>
  3375. int main() {
  3376. char *p = alloca(2 * sizeof(int));
  3377. ; return 0; }
  3378. EOF
  3379. if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3380.   rm -rf conftest*
  3381.   ac_cv_header_alloca_h=yes
  3382. else
  3383.   echo "configure: failed program was:" >&5
  3384.   cat conftest.$ac_ext >&5
  3385.   rm -rf conftest*
  3386.   ac_cv_header_alloca_h=no
  3387. fi
  3388. rm -f conftest*
  3389. fi
  3390.  
  3391. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  3392. if test $ac_cv_header_alloca_h = yes; then
  3393.   cat >> confdefs.h <<\EOF
  3394. #define HAVE_ALLOCA_H 1
  3395. EOF
  3396.  
  3397. fi
  3398.  
  3399. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  3400. echo "configure:3401: checking for alloca" >&5
  3401. if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  3402.   echo $ac_n "(cached) $ac_c" 1>&6
  3403. else
  3404.   cat > conftest.$ac_ext <<EOF
  3405. #line 3406 "configure"
  3406. #include "confdefs.h"
  3407.  
  3408. #ifdef __GNUC__
  3409. # define alloca __builtin_alloca
  3410. #else
  3411. # if HAVE_ALLOCA_H
  3412. #  include <alloca.h>
  3413. # else
  3414. #  ifdef _AIX
  3415.  #pragma alloca
  3416. #  else
  3417. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  3418. char *alloca ();
  3419. #   endif
  3420. #  endif
  3421. # endif
  3422. #endif
  3423.  
  3424. int main() {
  3425. char *p = (char *) alloca(1);
  3426. ; return 0; }
  3427. EOF
  3428. if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3429.   rm -rf conftest*
  3430.   ac_cv_func_alloca_works=yes
  3431. else
  3432.   echo "configure: failed program was:" >&5
  3433.   cat conftest.$ac_ext >&5
  3434.   rm -rf conftest*
  3435.   ac_cv_func_alloca_works=no
  3436. fi
  3437. rm -f conftest*
  3438. fi
  3439.  
  3440. echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
  3441. if test $ac_cv_func_alloca_works = yes; then
  3442.   cat >> confdefs.h <<\EOF
  3443. #define HAVE_ALLOCA 1
  3444. EOF
  3445.  
  3446. fi
  3447.  
  3448. if test $ac_cv_func_alloca_works = no; then
  3449.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  3450.   # that cause trouble.  Some versions do not even contain alloca or
  3451.   # contain a buggy version.  If you still want to use their alloca,
  3452.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  3453.   ALLOCA=alloca.o
  3454.   cat >> confdefs.h <<\EOF
  3455. #define C_ALLOCA 1
  3456. EOF
  3457.  
  3458.  
  3459. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  3460. echo "configure:3461: checking whether alloca needs Cray hooks" >&5
  3461. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  3462.   echo $ac_n "(cached) $ac_c" 1>&6
  3463. else
  3464.   cat > conftest.$ac_ext <<EOF
  3465. #line 3466 "configure"
  3466. #include "confdefs.h"
  3467. #if defined(CRAY) && ! defined(CRAY2)
  3468. webecray
  3469. #else
  3470. wenotbecray
  3471. #endif
  3472.  
  3473. EOF
  3474. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3475.   egrep "webecray" >/dev/null 2>&1; then
  3476.   rm -rf conftest*
  3477.   ac_cv_os_cray=yes
  3478. else
  3479.   rm -rf conftest*
  3480.   ac_cv_os_cray=no
  3481. fi
  3482. rm -f conftest*
  3483.  
  3484. fi
  3485.  
  3486. echo "$ac_t""$ac_cv_os_cray" 1>&6
  3487. if test $ac_cv_os_cray = yes; then
  3488. for ac_func in _getb67 GETB67 getb67; do
  3489.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3490. echo "configure:3491: checking for $ac_func" >&5
  3491. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3492.   echo $ac_n "(cached) $ac_c" 1>&6
  3493. else
  3494.   cat > conftest.$ac_ext <<EOF
  3495. #line 3496 "configure"
  3496. #include "confdefs.h"
  3497. /* System header to define __stub macros and hopefully few prototypes,
  3498.     which can conflict with char $ac_func(); below.  */
  3499. #include <assert.h>
  3500. /* Override any gcc2 internal prototype to avoid an error.  */
  3501. /* We use char because int might match the return type of a gcc2
  3502.     builtin and then its argument prototype would still apply.  */
  3503. char $ac_func();
  3504.  
  3505. int main() {
  3506.  
  3507. /* The GNU C library defines this for functions which it implements
  3508.     to always fail with ENOSYS.  Some functions are actually named
  3509.     something starting with __ and the normal name is an alias.  */
  3510. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3511. choke me
  3512. #else
  3513. $ac_func();
  3514. #endif
  3515.  
  3516. ; return 0; }
  3517. EOF
  3518. if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3519.   rm -rf conftest*
  3520.   eval "ac_cv_func_$ac_func=yes"
  3521. else
  3522.   echo "configure: failed program was:" >&5
  3523.   cat conftest.$ac_ext >&5
  3524.   rm -rf conftest*
  3525.   eval "ac_cv_func_$ac_func=no"
  3526. fi
  3527. rm -f conftest*
  3528. fi
  3529.  
  3530. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3531.   echo "$ac_t""yes" 1>&6
  3532.   cat >> confdefs.h <<EOF
  3533. #define CRAY_STACKSEG_END $ac_func
  3534. EOF
  3535.  
  3536.   break
  3537. else
  3538.   echo "$ac_t""no" 1>&6
  3539. fi
  3540.  
  3541. done
  3542. fi
  3543.  
  3544. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  3545. echo "configure:3546: checking stack direction for C alloca" >&5
  3546. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  3547.   echo $ac_n "(cached) $ac_c" 1>&6
  3548. else
  3549.   if test "$cross_compiling" = yes; then
  3550.   ac_cv_c_stack_direction=0
  3551. else
  3552.   cat > conftest.$ac_ext <<EOF
  3553. #line 3554 "configure"
  3554. #include "confdefs.h"
  3555. find_stack_direction ()
  3556. {
  3557.   static char *addr = 0;
  3558.   auto char dummy;
  3559.   if (addr == 0)
  3560.     {
  3561.       addr = &dummy;
  3562.       return find_stack_direction ();
  3563.     }
  3564.   else
  3565.     return (&dummy > addr) ? 1 : -1;
  3566. }
  3567. main ()
  3568. {
  3569.   exit (find_stack_direction() < 0);
  3570. }
  3571. EOF
  3572. if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3573. then
  3574.   ac_cv_c_stack_direction=1
  3575. else
  3576.   echo "configure: failed program was:" >&5
  3577.   cat conftest.$ac_ext >&5
  3578.   rm -fr conftest*
  3579.   ac_cv_c_stack_direction=-1
  3580. fi
  3581. rm -fr conftest*
  3582. fi
  3583.  
  3584. fi
  3585.  
  3586. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  3587. cat >> confdefs.h <<EOF
  3588. #define STACK_DIRECTION $ac_cv_c_stack_direction
  3589. EOF
  3590.  
  3591. fi
  3592.  
  3593. for ac_hdr in unistd.h
  3594. do
  3595. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3596. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3597. echo "configure:3598: checking for $ac_hdr" >&5
  3598. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3599.   echo $ac_n "(cached) $ac_c" 1>&6
  3600. else
  3601.   cat > conftest.$ac_ext <<EOF
  3602. #line 3603 "configure"
  3603. #include "confdefs.h"
  3604. #include <$ac_hdr>
  3605. EOF
  3606. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3607. { (eval echo configure:3608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3608. ac_err=`grep -v '^ *+' conftest.out`
  3609. if test -z "$ac_err"; then
  3610.   rm -rf conftest*
  3611.   eval "ac_cv_header_$ac_safe=yes"
  3612. else
  3613.   echo "$ac_err" >&5
  3614.   echo "configure: failed program was:" >&5
  3615.   cat conftest.$ac_ext >&5
  3616.   rm -rf conftest*
  3617.   eval "ac_cv_header_$ac_safe=no"
  3618. fi
  3619. rm -f conftest*
  3620. fi
  3621. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3622.   echo "$ac_t""yes" 1>&6
  3623.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3624.   cat >> confdefs.h <<EOF
  3625. #define $ac_tr_hdr 1
  3626. EOF
  3627.  
  3628. else
  3629.   echo "$ac_t""no" 1>&6
  3630. fi
  3631. done
  3632.  
  3633. for ac_func in getpagesize
  3634. do
  3635. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3636. echo "configure:3637: checking for $ac_func" >&5
  3637. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3638.   echo $ac_n "(cached) $ac_c" 1>&6
  3639. else
  3640.   cat > conftest.$ac_ext <<EOF
  3641. #line 3642 "configure"
  3642. #include "confdefs.h"
  3643. /* System header to define __stub macros and hopefully few prototypes,
  3644.     which can conflict with char $ac_func(); below.  */
  3645. #include <assert.h>
  3646. /* Override any gcc2 internal prototype to avoid an error.  */
  3647. /* We use char because int might match the return type of a gcc2
  3648.     builtin and then its argument prototype would still apply.  */
  3649. char $ac_func();
  3650.  
  3651. int main() {
  3652.  
  3653. /* The GNU C library defines this for functions which it implements
  3654.     to always fail with ENOSYS.  Some functions are actually named
  3655.     something starting with __ and the normal name is an alias.  */
  3656. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3657. choke me
  3658. #else
  3659. $ac_func();
  3660. #endif
  3661.  
  3662. ; return 0; }
  3663. EOF
  3664. if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3665.   rm -rf conftest*
  3666.   eval "ac_cv_func_$ac_func=yes"
  3667. else
  3668.   echo "configure: failed program was:" >&5
  3669.   cat conftest.$ac_ext >&5
  3670.   rm -rf conftest*
  3671.   eval "ac_cv_func_$ac_func=no"
  3672. fi
  3673. rm -f conftest*
  3674. fi
  3675.  
  3676. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3677.   echo "$ac_t""yes" 1>&6
  3678.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3679.   cat >> confdefs.h <<EOF
  3680. #define $ac_tr_func 1
  3681. EOF
  3682.  
  3683. else
  3684.   echo "$ac_t""no" 1>&6
  3685. fi
  3686. done
  3687.  
  3688. echo $ac_n "checking for working mmap""... $ac_c" 1>&6
  3689. echo "configure:3690: checking for working mmap" >&5
  3690. if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  3691.   echo $ac_n "(cached) $ac_c" 1>&6
  3692. else
  3693.   if test "$cross_compiling" = yes; then
  3694.   ac_cv_func_mmap_fixed_mapped=no
  3695. else
  3696.   cat > conftest.$ac_ext <<EOF
  3697. #line 3698 "configure"
  3698. #include "confdefs.h"
  3699.  
  3700. /* Thanks to Mike Haertel and Jim Avera for this test.
  3701.    Here is a matrix of mmap possibilities:
  3702.     mmap private not fixed
  3703.     mmap private fixed at somewhere currently unmapped
  3704.     mmap private fixed at somewhere already mapped
  3705.     mmap shared not fixed
  3706.     mmap shared fixed at somewhere currently unmapped
  3707.     mmap shared fixed at somewhere already mapped
  3708.    For private mappings, we should verify that changes cannot be read()
  3709.    back from the file, nor mmap's back from the file at a different
  3710.    address.  (There have been systems where private was not correctly
  3711.    implemented like the infamous i386 svr4.0, and systems where the
  3712.    VM page cache was not coherent with the filesystem buffer cache
  3713.    like early versions of FreeBSD and possibly contemporary NetBSD.)
  3714.    For shared mappings, we should conversely verify that changes get
  3715.    propogated back to all the places they're supposed to be.
  3716.  
  3717.    Grep wants private fixed already mapped.
  3718.    The main things grep needs to know about mmap are:
  3719.    * does it exist and is it safe to write into the mmap'd area
  3720.    * how to use it (BSD variants)  */
  3721. #include <sys/types.h>
  3722. #include <fcntl.h>
  3723. #include <sys/mman.h>
  3724.  
  3725. /* This mess was copied from the GNU getpagesize.h.  */
  3726. #ifndef HAVE_GETPAGESIZE
  3727. # ifdef HAVE_UNISTD_H
  3728. #  include <unistd.h>
  3729. # endif
  3730.  
  3731. /* Assume that all systems that can run configure have sys/param.h.  */
  3732. # ifndef HAVE_SYS_PARAM_H
  3733. #  define HAVE_SYS_PARAM_H 1
  3734. # endif
  3735.  
  3736. # ifdef _SC_PAGESIZE
  3737. #  define getpagesize() sysconf(_SC_PAGESIZE)
  3738. # else /* no _SC_PAGESIZE */
  3739. #  ifdef HAVE_SYS_PARAM_H
  3740. #   include <sys/param.h>
  3741. #   ifdef EXEC_PAGESIZE
  3742. #    define getpagesize() EXEC_PAGESIZE
  3743. #   else /* no EXEC_PAGESIZE */
  3744. #    ifdef NBPG
  3745. #     define getpagesize() NBPG * CLSIZE
  3746. #     ifndef CLSIZE
  3747. #      define CLSIZE 1
  3748. #     endif /* no CLSIZE */
  3749. #    else /* no NBPG */
  3750. #     ifdef NBPC
  3751. #      define getpagesize() NBPC
  3752. #     else /* no NBPC */
  3753. #      ifdef PAGESIZE
  3754. #       define getpagesize() PAGESIZE
  3755. #      endif /* PAGESIZE */
  3756. #     endif /* no NBPC */
  3757. #    endif /* no NBPG */
  3758. #   endif /* no EXEC_PAGESIZE */
  3759. #  else /* no HAVE_SYS_PARAM_H */
  3760. #   define getpagesize() 8192    /* punt totally */
  3761. #  endif /* no HAVE_SYS_PARAM_H */
  3762. # endif /* no _SC_PAGESIZE */
  3763.  
  3764. #endif /* no HAVE_GETPAGESIZE */
  3765.  
  3766. #ifdef __cplusplus
  3767. extern "C" { void *malloc(unsigned); }
  3768. #else
  3769. char *malloc();
  3770. #endif
  3771.  
  3772. int
  3773. main()
  3774. {
  3775.     char *data, *data2, *data3;
  3776.     int i, pagesize;
  3777.     int fd;
  3778.  
  3779.     pagesize = getpagesize();
  3780.  
  3781.     /*
  3782.      * First, make a file with some known garbage in it.
  3783.      */
  3784.     data = malloc(pagesize);
  3785.     if (!data)
  3786.         exit(1);
  3787.     for (i = 0; i < pagesize; ++i)
  3788.         *(data + i) = rand();
  3789.     umask(0);
  3790.     fd = creat("conftestmmap", 0600);
  3791.     if (fd < 0)
  3792.         exit(1);
  3793.     if (write(fd, data, pagesize) != pagesize)
  3794.         exit(1);
  3795.     close(fd);
  3796.  
  3797.     /*
  3798.      * Next, try to mmap the file at a fixed address which
  3799.      * already has something else allocated at it.  If we can,
  3800.      * also make sure that we see the same garbage.
  3801.      */
  3802.     fd = open("conftestmmap", O_RDWR);
  3803.     if (fd < 0)
  3804.         exit(1);
  3805.     data2 = malloc(2 * pagesize);
  3806.     if (!data2)
  3807.         exit(1);
  3808.     data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
  3809.     if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
  3810.         MAP_PRIVATE | MAP_FIXED, fd, 0L))
  3811.         exit(1);
  3812.     for (i = 0; i < pagesize; ++i)
  3813.         if (*(data + i) != *(data2 + i))
  3814.             exit(1);
  3815.  
  3816.     /*
  3817.      * Finally, make sure that changes to the mapped area
  3818.      * do not percolate back to the file as seen by read().
  3819.      * (This is a bug on some variants of i386 svr4.0.)
  3820.      */
  3821.     for (i = 0; i < pagesize; ++i)
  3822.         *(data2 + i) = *(data2 + i) + 1;
  3823.     data3 = malloc(pagesize);
  3824.     if (!data3)
  3825.         exit(1);
  3826.     if (read(fd, data3, pagesize) != pagesize)
  3827.         exit(1);
  3828.     for (i = 0; i < pagesize; ++i)
  3829.         if (*(data + i) != *(data3 + i))
  3830.             exit(1);
  3831.     close(fd);
  3832.     unlink("conftestmmap");
  3833.     exit(0);
  3834. }
  3835.  
  3836. EOF
  3837. if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3838. then
  3839.   ac_cv_func_mmap_fixed_mapped=yes
  3840. else
  3841.   echo "configure: failed program was:" >&5
  3842.   cat conftest.$ac_ext >&5
  3843.   rm -fr conftest*
  3844.   ac_cv_func_mmap_fixed_mapped=no
  3845. fi
  3846. rm -fr conftest*
  3847. fi
  3848.  
  3849. fi
  3850.  
  3851. echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
  3852. if test $ac_cv_func_mmap_fixed_mapped = yes; then
  3853.   cat >> confdefs.h <<\EOF
  3854. #define HAVE_MMAP 1
  3855. EOF
  3856.  
  3857. fi
  3858.  
  3859.                               
  3860.    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
  3861. unistd.h values.h sys/param.h
  3862. do
  3863. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3864. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3865. echo "configure:3866: checking for $ac_hdr" >&5
  3866. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3867.   echo $ac_n "(cached) $ac_c" 1>&6
  3868. else
  3869.   cat > conftest.$ac_ext <<EOF
  3870. #line 3871 "configure"
  3871. #include "confdefs.h"
  3872. #include <$ac_hdr>
  3873. EOF
  3874. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3875. { (eval echo configure:3876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3876. ac_err=`grep -v '^ *+' conftest.out`
  3877. if test -z "$ac_err"; then
  3878.   rm -rf conftest*
  3879.   eval "ac_cv_header_$ac_safe=yes"
  3880. else
  3881.   echo "$ac_err" >&5
  3882.   echo "configure: failed program was:" >&5
  3883.   cat conftest.$ac_ext >&5
  3884.   rm -rf conftest*
  3885.   eval "ac_cv_header_$ac_safe=no"
  3886. fi
  3887. rm -f conftest*
  3888. fi
  3889. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3890.   echo "$ac_t""yes" 1>&6
  3891.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3892.   cat >> confdefs.h <<EOF
  3893. #define $ac_tr_hdr 1
  3894. EOF
  3895.  
  3896. else
  3897.   echo "$ac_t""no" 1>&6
  3898. fi
  3899. done
  3900.  
  3901.    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
  3902. __argz_count __argz_stringify __argz_next
  3903. do
  3904. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3905. echo "configure:3906: checking for $ac_func" >&5
  3906. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3907.   echo $ac_n "(cached) $ac_c" 1>&6
  3908. else
  3909.   cat > conftest.$ac_ext <<EOF
  3910. #line 3911 "configure"
  3911. #include "confdefs.h"
  3912. /* System header to define __stub macros and hopefully few prototypes,
  3913.     which can conflict with char $ac_func(); below.  */
  3914. #include <assert.h>
  3915. /* Override any gcc2 internal prototype to avoid an error.  */
  3916. /* We use char because int might match the return type of a gcc2
  3917.     builtin and then its argument prototype would still apply.  */
  3918. char $ac_func();
  3919.  
  3920. int main() {
  3921.  
  3922. /* The GNU C library defines this for functions which it implements
  3923.     to always fail with ENOSYS.  Some functions are actually named
  3924.     something starting with __ and the normal name is an alias.  */
  3925. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3926. choke me
  3927. #else
  3928. $ac_func();
  3929. #endif
  3930.  
  3931. ; return 0; }
  3932. EOF
  3933. if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3934.   rm -rf conftest*
  3935.   eval "ac_cv_func_$ac_func=yes"
  3936. else
  3937.   echo "configure: failed program was:" >&5
  3938.   cat conftest.$ac_ext >&5
  3939.   rm -rf conftest*
  3940.   eval "ac_cv_func_$ac_func=no"
  3941. fi
  3942. rm -f conftest*
  3943. fi
  3944.  
  3945. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3946.   echo "$ac_t""yes" 1>&6
  3947.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3948.   cat >> confdefs.h <<EOF
  3949. #define $ac_tr_func 1
  3950. EOF
  3951.  
  3952. else
  3953.   echo "$ac_t""no" 1>&6
  3954. fi
  3955. done
  3956.  
  3957.  
  3958.    if test "${ac_cv_func_stpcpy+set}" != "set"; then
  3959.      for ac_func in stpcpy
  3960. do
  3961. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3962. echo "configure:3963: checking for $ac_func" >&5
  3963. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3964.   echo $ac_n "(cached) $ac_c" 1>&6
  3965. else
  3966.   cat > conftest.$ac_ext <<EOF
  3967. #line 3968 "configure"
  3968. #include "confdefs.h"
  3969. /* System header to define __stub macros and hopefully few prototypes,
  3970.     which can conflict with char $ac_func(); below.  */
  3971. #include <assert.h>
  3972. /* Override any gcc2 internal prototype to avoid an error.  */
  3973. /* We use char because int might match the return type of a gcc2
  3974.     builtin and then its argument prototype would still apply.  */
  3975. char $ac_func();
  3976.  
  3977. int main() {
  3978.  
  3979. /* The GNU C library defines this for functions which it implements
  3980.     to always fail with ENOSYS.  Some functions are actually named
  3981.     something starting with __ and the normal name is an alias.  */
  3982. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3983. choke me
  3984. #else
  3985. $ac_func();
  3986. #endif
  3987.  
  3988. ; return 0; }
  3989. EOF
  3990. if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3991.   rm -rf conftest*
  3992.   eval "ac_cv_func_$ac_func=yes"
  3993. else
  3994.   echo "configure: failed program was:" >&5
  3995.   cat conftest.$ac_ext >&5
  3996.   rm -rf conftest*
  3997.   eval "ac_cv_func_$ac_func=no"
  3998. fi
  3999. rm -f conftest*
  4000. fi
  4001.  
  4002. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4003.   echo "$ac_t""yes" 1>&6
  4004.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4005.   cat >> confdefs.h <<EOF
  4006. #define $ac_tr_func 1
  4007. EOF
  4008.  
  4009. else
  4010.   echo "$ac_t""no" 1>&6
  4011. fi
  4012. done
  4013.  
  4014.    fi
  4015.    if test "${ac_cv_func_stpcpy}" = "yes"; then
  4016.      cat >> confdefs.h <<\EOF
  4017. #define HAVE_STPCPY 1
  4018. EOF
  4019.  
  4020.    fi
  4021.  
  4022.    if test $ac_cv_header_locale_h = yes; then
  4023.     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
  4024. echo "configure:4025: checking for LC_MESSAGES" >&5
  4025. if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
  4026.   echo $ac_n "(cached) $ac_c" 1>&6
  4027. else
  4028.   cat > conftest.$ac_ext <<EOF
  4029. #line 4030 "configure"
  4030. #include "confdefs.h"
  4031. #include <locale.h>
  4032. int main() {
  4033. return LC_MESSAGES
  4034. ; return 0; }
  4035. EOF
  4036. if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4037.   rm -rf conftest*
  4038.   am_cv_val_LC_MESSAGES=yes
  4039. else
  4040.   echo "configure: failed program was:" >&5
  4041.   cat conftest.$ac_ext >&5
  4042.   rm -rf conftest*
  4043.   am_cv_val_LC_MESSAGES=no
  4044. fi
  4045. rm -f conftest*
  4046. fi
  4047.  
  4048. echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
  4049.     if test $am_cv_val_LC_MESSAGES = yes; then
  4050.       cat >> confdefs.h <<\EOF
  4051. #define HAVE_LC_MESSAGES 1
  4052. EOF
  4053.  
  4054.     fi
  4055.   fi
  4056.    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
  4057. echo "configure:4058: checking whether NLS is requested" >&5
  4058.         # Check whether --enable-nls or --disable-nls was given.
  4059. if test "${enable_nls+set}" = set; then
  4060.   enableval="$enable_nls"
  4061.   USE_NLS=$enableval
  4062. else
  4063.   USE_NLS=yes
  4064. fi
  4065.  
  4066.     echo "$ac_t""$USE_NLS" 1>&6
  4067.     
  4068.  
  4069.     USE_INCLUDED_LIBINTL=no
  4070.  
  4071.         if test "$USE_NLS" = "yes"; then
  4072.       cat >> confdefs.h <<\EOF
  4073. #define ENABLE_NLS 1
  4074. EOF
  4075.  
  4076.       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
  4077. echo "configure:4078: checking whether included gettext is requested" >&5
  4078.       # Check whether --with-included-gettext or --without-included-gettext was given.
  4079. if test "${with_included_gettext+set}" = set; then
  4080.   withval="$with_included_gettext"
  4081.   nls_cv_force_use_gnu_gettext=$withval
  4082. else
  4083.   nls_cv_force_use_gnu_gettext=no
  4084. fi
  4085.  
  4086.       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
  4087.  
  4088.       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
  4089.       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
  4090.                                 nls_cv_header_intl=
  4091.     nls_cv_header_libgt=
  4092.     CATOBJEXT=NONE
  4093.  
  4094.     ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
  4095. echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
  4096. echo "configure:4097: checking for libintl.h" >&5
  4097. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4098.   echo $ac_n "(cached) $ac_c" 1>&6
  4099. else
  4100.   cat > conftest.$ac_ext <<EOF
  4101. #line 4102 "configure"
  4102. #include "confdefs.h"
  4103. #include <libintl.h>
  4104. EOF
  4105. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4106. { (eval echo configure:4107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4107. ac_err=`grep -v '^ *+' conftest.out`
  4108. if test -z "$ac_err"; then
  4109.   rm -rf conftest*
  4110.   eval "ac_cv_header_$ac_safe=yes"
  4111. else
  4112.   echo "$ac_err" >&5
  4113.   echo "configure: failed program was:" >&5
  4114.   cat conftest.$ac_ext >&5
  4115.   rm -rf conftest*
  4116.   eval "ac_cv_header_$ac_safe=no"
  4117. fi
  4118. rm -f conftest*
  4119. fi
  4120. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4121.   echo "$ac_t""yes" 1>&6
  4122.   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
  4123. echo "configure:4124: checking for gettext in libc" >&5
  4124. if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
  4125.   echo $ac_n "(cached) $ac_c" 1>&6
  4126. else
  4127.   cat > conftest.$ac_ext <<EOF
  4128. #line 4129 "configure"
  4129. #include "confdefs.h"
  4130. #include <libintl.h>
  4131. int main() {
  4132. return (int) gettext ("")
  4133. ; return 0; }
  4134. EOF
  4135. if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4136.   rm -rf conftest*
  4137.   gt_cv_func_gettext_libc=yes
  4138. else
  4139.   echo "configure: failed program was:" >&5
  4140.   cat conftest.$ac_ext >&5
  4141.   rm -rf conftest*
  4142.   gt_cv_func_gettext_libc=no
  4143. fi
  4144. rm -f conftest*
  4145. fi
  4146.  
  4147. echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
  4148.  
  4149.        if test "$gt_cv_func_gettext_libc" != "yes"; then
  4150.          echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
  4151. echo "configure:4152: checking for bindtextdomain in -lintl" >&5
  4152. ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
  4153. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4154.   echo $ac_n "(cached) $ac_c" 1>&6
  4155. else
  4156.   ac_save_LIBS="$LIBS"
  4157. LIBS="-lintl  $LIBS"
  4158. cat > conftest.$ac_ext <<EOF
  4159. #line 4160 "configure"
  4160. #include "confdefs.h"
  4161. /* Override any gcc2 internal prototype to avoid an error.  */
  4162. /* We use char because int might match the return type of a gcc2
  4163.     builtin and then its argument prototype would still apply.  */
  4164. char bindtextdomain();
  4165.  
  4166. int main() {
  4167. bindtextdomain()
  4168. ; return 0; }
  4169. EOF
  4170. if { (eval echo configure:4171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4171.   rm -rf conftest*
  4172.   eval "ac_cv_lib_$ac_lib_var=yes"
  4173. else
  4174.   echo "configure: failed program was:" >&5
  4175.   cat conftest.$ac_ext >&5
  4176.   rm -rf conftest*
  4177.   eval "ac_cv_lib_$ac_lib_var=no"
  4178. fi
  4179. rm -f conftest*
  4180. LIBS="$ac_save_LIBS"
  4181.  
  4182. fi
  4183. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4184.   echo "$ac_t""yes" 1>&6
  4185.   LIBS="-lintl $LIBS"
  4186.         echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
  4187. echo "configure:4188: checking for gettext in libintl" >&5
  4188. if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
  4189.   echo $ac_n "(cached) $ac_c" 1>&6
  4190. else
  4191.   cat > conftest.$ac_ext <<EOF
  4192. #line 4193 "configure"
  4193. #include "confdefs.h"
  4194.  
  4195. int main() {
  4196. return (int) gettext ("")
  4197. ; return 0; }
  4198. EOF
  4199. if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4200.   rm -rf conftest*
  4201.   gt_cv_func_gettext_libintl=yes
  4202. else
  4203.   echo "configure: failed program was:" >&5
  4204.   cat conftest.$ac_ext >&5
  4205.   rm -rf conftest*
  4206.   gt_cv_func_gettext_libintl=no
  4207. fi
  4208. rm -f conftest*
  4209. fi
  4210.  
  4211. echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
  4212. else
  4213.   echo "$ac_t""no" 1>&6
  4214. fi
  4215.  
  4216.        fi
  4217.  
  4218.        if test "$gt_cv_func_gettext_libc" = "yes" \
  4219.           || test "$gt_cv_func_gettext_libintl" = "yes"; then
  4220.           cat >> confdefs.h <<\EOF
  4221. #define HAVE_GETTEXT 1
  4222. EOF
  4223.  
  4224.           # Extract the first word of "msgfmt", so it can be a program name with args.
  4225. set dummy msgfmt; ac_word=$2
  4226. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4227. echo "configure:4228: checking for $ac_word" >&5
  4228. if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  4229.   echo $ac_n "(cached) $ac_c" 1>&6
  4230. else
  4231.   case "$MSGFMT" in
  4232.   /*)
  4233.   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  4234.   ;;
  4235.   *)
  4236.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4237.   for ac_dir in $PATH; do
  4238.     test -z "$ac_dir" && ac_dir=.
  4239.     if test -f $ac_dir/$ac_word; then
  4240.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
  4241.     ac_cv_path_MSGFMT="$ac_dir/$ac_word"
  4242.     break
  4243.       fi
  4244.     fi
  4245.   done
  4246.   IFS="$ac_save_ifs"
  4247.   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
  4248.   ;;
  4249. esac
  4250. fi
  4251. MSGFMT="$ac_cv_path_MSGFMT"
  4252. if test -n "$MSGFMT"; then
  4253.   echo "$ac_t""$MSGFMT" 1>&6
  4254. else
  4255.   echo "$ac_t""no" 1>&6
  4256. fi
  4257.           if test "$MSGFMT" != "no"; then
  4258.         for ac_func in dcgettext
  4259. do
  4260. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4261. echo "configure:4262: checking for $ac_func" >&5
  4262. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4263.   echo $ac_n "(cached) $ac_c" 1>&6
  4264. else
  4265.   cat > conftest.$ac_ext <<EOF
  4266. #line 4267 "configure"
  4267. #include "confdefs.h"
  4268. /* System header to define __stub macros and hopefully few prototypes,
  4269.     which can conflict with char $ac_func(); below.  */
  4270. #include <assert.h>
  4271. /* Override any gcc2 internal prototype to avoid an error.  */
  4272. /* We use char because int might match the return type of a gcc2
  4273.     builtin and then its argument prototype would still apply.  */
  4274. char $ac_func();
  4275.  
  4276. int main() {
  4277.  
  4278. /* The GNU C library defines this for functions which it implements
  4279.     to always fail with ENOSYS.  Some functions are actually named
  4280.     something starting with __ and the normal name is an alias.  */
  4281. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4282. choke me
  4283. #else
  4284. $ac_func();
  4285. #endif
  4286.  
  4287. ; return 0; }
  4288. EOF
  4289. if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4290.   rm -rf conftest*
  4291.   eval "ac_cv_func_$ac_func=yes"
  4292. else
  4293.   echo "configure: failed program was:" >&5
  4294.   cat conftest.$ac_ext >&5
  4295.   rm -rf conftest*
  4296.   eval "ac_cv_func_$ac_func=no"
  4297. fi
  4298. rm -f conftest*
  4299. fi
  4300.  
  4301. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4302.   echo "$ac_t""yes" 1>&6
  4303.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4304.   cat >> confdefs.h <<EOF
  4305. #define $ac_tr_func 1
  4306. EOF
  4307.  
  4308. else
  4309.   echo "$ac_t""no" 1>&6
  4310. fi
  4311. done
  4312.  
  4313.         # Extract the first word of "gmsgfmt", so it can be a program name with args.
  4314. set dummy gmsgfmt; ac_word=$2
  4315. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4316. echo "configure:4317: checking for $ac_word" >&5
  4317. if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  4318.   echo $ac_n "(cached) $ac_c" 1>&6
  4319. else
  4320.   case "$GMSGFMT" in
  4321.   /*)
  4322.   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  4323.   ;;
  4324.   *)
  4325.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4326.   for ac_dir in $PATH; do
  4327.     test -z "$ac_dir" && ac_dir=.
  4328.     if test -f $ac_dir/$ac_word; then
  4329.       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
  4330.       break
  4331.     fi
  4332.   done
  4333.   IFS="$ac_save_ifs"
  4334.   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  4335.   ;;
  4336. esac
  4337. fi
  4338. GMSGFMT="$ac_cv_path_GMSGFMT"
  4339. if test -n "$GMSGFMT"; then
  4340.   echo "$ac_t""$GMSGFMT" 1>&6
  4341. else
  4342.   echo "$ac_t""no" 1>&6
  4343. fi
  4344.  
  4345.         # Extract the first word of "xgettext", so it can be a program name with args.
  4346. set dummy xgettext; ac_word=$2
  4347. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4348. echo "configure:4349: checking for $ac_word" >&5
  4349. if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  4350.   echo $ac_n "(cached) $ac_c" 1>&6
  4351. else
  4352.   case "$XGETTEXT" in
  4353.   /*)
  4354.   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  4355.   ;;
  4356.   *)
  4357.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4358.   for ac_dir in $PATH; do
  4359.     test -z "$ac_dir" && ac_dir=.
  4360.     if test -f $ac_dir/$ac_word; then
  4361.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
  4362.     ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
  4363.     break
  4364.       fi
  4365.     fi
  4366.   done
  4367.   IFS="$ac_save_ifs"
  4368.   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  4369.   ;;
  4370. esac
  4371. fi
  4372. XGETTEXT="$ac_cv_path_XGETTEXT"
  4373. if test -n "$XGETTEXT"; then
  4374.   echo "$ac_t""$XGETTEXT" 1>&6
  4375. else
  4376.   echo "$ac_t""no" 1>&6
  4377. fi
  4378.  
  4379.         cat > conftest.$ac_ext <<EOF
  4380. #line 4381 "configure"
  4381. #include "confdefs.h"
  4382.  
  4383. int main() {
  4384. extern int _nl_msg_cat_cntr;
  4385.                    return _nl_msg_cat_cntr
  4386. ; return 0; }
  4387. EOF
  4388. if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4389.   rm -rf conftest*
  4390.   CATOBJEXT=.gmo
  4391.            DATADIRNAME=share
  4392. else
  4393.   echo "configure: failed program was:" >&5
  4394.   cat conftest.$ac_ext >&5
  4395.   rm -rf conftest*
  4396.   CATOBJEXT=.mo
  4397.            DATADIRNAME=lib
  4398. fi
  4399. rm -f conftest*
  4400.         INSTOBJEXT=.mo
  4401.           fi
  4402.         fi
  4403.     
  4404. else
  4405.   echo "$ac_t""no" 1>&6
  4406. fi
  4407.  
  4408.  
  4409.         if test "$CATOBJEXT" = "NONE"; then
  4410.       echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
  4411. echo "configure:4412: checking whether catgets can be used" >&5
  4412.       # Check whether --with-catgets or --without-catgets was given.
  4413. if test "${with_catgets+set}" = set; then
  4414.   withval="$with_catgets"
  4415.   nls_cv_use_catgets=$withval
  4416. else
  4417.   nls_cv_use_catgets=no
  4418. fi
  4419.  
  4420.       echo "$ac_t""$nls_cv_use_catgets" 1>&6
  4421.  
  4422.       if test "$nls_cv_use_catgets" = "yes"; then
  4423.                 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
  4424. echo "configure:4425: checking for main in -li" >&5
  4425. ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
  4426. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4427.   echo $ac_n "(cached) $ac_c" 1>&6
  4428. else
  4429.   ac_save_LIBS="$LIBS"
  4430. LIBS="-li  $LIBS"
  4431. cat > conftest.$ac_ext <<EOF
  4432. #line 4433 "configure"
  4433. #include "confdefs.h"
  4434.  
  4435. int main() {
  4436. main()
  4437. ; return 0; }
  4438. EOF
  4439. if { (eval echo configure:4440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4440.   rm -rf conftest*
  4441.   eval "ac_cv_lib_$ac_lib_var=yes"
  4442. else
  4443.   echo "configure: failed program was:" >&5
  4444.   cat conftest.$ac_ext >&5
  4445.   rm -rf conftest*
  4446.   eval "ac_cv_lib_$ac_lib_var=no"
  4447. fi
  4448. rm -f conftest*
  4449. LIBS="$ac_save_LIBS"
  4450.  
  4451. fi
  4452. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4453.   echo "$ac_t""yes" 1>&6
  4454.     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  4455.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  4456.   cat >> confdefs.h <<EOF
  4457. #define $ac_tr_lib 1
  4458. EOF
  4459.  
  4460.   LIBS="-li $LIBS"
  4461.  
  4462. else
  4463.   echo "$ac_t""no" 1>&6
  4464. fi
  4465.  
  4466.         echo $ac_n "checking for catgets""... $ac_c" 1>&6
  4467. echo "configure:4468: checking for catgets" >&5
  4468. if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
  4469.   echo $ac_n "(cached) $ac_c" 1>&6
  4470. else
  4471.   cat > conftest.$ac_ext <<EOF
  4472. #line 4473 "configure"
  4473. #include "confdefs.h"
  4474. /* System header to define __stub macros and hopefully few prototypes,
  4475.     which can conflict with char catgets(); below.  */
  4476. #include <assert.h>
  4477. /* Override any gcc2 internal prototype to avoid an error.  */
  4478. /* We use char because int might match the return type of a gcc2
  4479.     builtin and then its argument prototype would still apply.  */
  4480. char catgets();
  4481.  
  4482. int main() {
  4483.  
  4484. /* The GNU C library defines this for functions which it implements
  4485.     to always fail with ENOSYS.  Some functions are actually named
  4486.     something starting with __ and the normal name is an alias.  */
  4487. #if defined (__stub_catgets) || defined (__stub___catgets)
  4488. choke me
  4489. #else
  4490. catgets();
  4491. #endif
  4492.  
  4493. ; return 0; }
  4494. EOF
  4495. if { (eval echo configure:4496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4496.   rm -rf conftest*
  4497.   eval "ac_cv_func_catgets=yes"
  4498. else
  4499.   echo "configure: failed program was:" >&5
  4500.   cat conftest.$ac_ext >&5
  4501.   rm -rf conftest*
  4502.   eval "ac_cv_func_catgets=no"
  4503. fi
  4504. rm -f conftest*
  4505. fi
  4506.  
  4507. if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
  4508.   echo "$ac_t""yes" 1>&6
  4509.   cat >> confdefs.h <<\EOF
  4510. #define HAVE_CATGETS 1
  4511. EOF
  4512.  
  4513.            INTLOBJS="\$(CATOBJS)"
  4514.            # Extract the first word of "gencat", so it can be a program name with args.
  4515. set dummy gencat; ac_word=$2
  4516. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4517. echo "configure:4518: checking for $ac_word" >&5
  4518. if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
  4519.   echo $ac_n "(cached) $ac_c" 1>&6
  4520. else
  4521.   case "$GENCAT" in
  4522.   /*)
  4523.   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
  4524.   ;;
  4525.   *)
  4526.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4527.   for ac_dir in $PATH; do
  4528.     test -z "$ac_dir" && ac_dir=.
  4529.     if test -f $ac_dir/$ac_word; then
  4530.       ac_cv_path_GENCAT="$ac_dir/$ac_word"
  4531.       break
  4532.     fi
  4533.   done
  4534.   IFS="$ac_save_ifs"
  4535.   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
  4536.   ;;
  4537. esac
  4538. fi
  4539. GENCAT="$ac_cv_path_GENCAT"
  4540. if test -n "$GENCAT"; then
  4541.   echo "$ac_t""$GENCAT" 1>&6
  4542. else
  4543.   echo "$ac_t""no" 1>&6
  4544. fi
  4545.            if test "$GENCAT" != "no"; then
  4546.          # Extract the first word of "gmsgfmt", so it can be a program name with args.
  4547. set dummy gmsgfmt; ac_word=$2
  4548. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4549. echo "configure:4550: checking for $ac_word" >&5
  4550. if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  4551.   echo $ac_n "(cached) $ac_c" 1>&6
  4552. else
  4553.   case "$GMSGFMT" in
  4554.   /*)
  4555.   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  4556.   ;;
  4557.   *)
  4558.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4559.   for ac_dir in $PATH; do
  4560.     test -z "$ac_dir" && ac_dir=.
  4561.     if test -f $ac_dir/$ac_word; then
  4562.       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
  4563.       break
  4564.     fi
  4565.   done
  4566.   IFS="$ac_save_ifs"
  4567.   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
  4568.   ;;
  4569. esac
  4570. fi
  4571. GMSGFMT="$ac_cv_path_GMSGFMT"
  4572. if test -n "$GMSGFMT"; then
  4573.   echo "$ac_t""$GMSGFMT" 1>&6
  4574. else
  4575.   echo "$ac_t""no" 1>&6
  4576. fi
  4577.  
  4578.          if test "$GMSGFMT" = "no"; then
  4579.            # Extract the first word of "msgfmt", so it can be a program name with args.
  4580. set dummy msgfmt; ac_word=$2
  4581. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4582. echo "configure:4583: checking for $ac_word" >&5
  4583. if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  4584.   echo $ac_n "(cached) $ac_c" 1>&6
  4585. else
  4586.   case "$GMSGFMT" in
  4587.   /*)
  4588.   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  4589.   ;;
  4590.   *)
  4591.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4592.   for ac_dir in $PATH; do
  4593.     test -z "$ac_dir" && ac_dir=.
  4594.     if test -f $ac_dir/$ac_word; then
  4595.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
  4596.     ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
  4597.     break
  4598.       fi
  4599.     fi
  4600.   done
  4601.   IFS="$ac_save_ifs"
  4602.   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
  4603.   ;;
  4604. esac
  4605. fi
  4606. GMSGFMT="$ac_cv_path_GMSGFMT"
  4607. if test -n "$GMSGFMT"; then
  4608.   echo "$ac_t""$GMSGFMT" 1>&6
  4609. else
  4610.   echo "$ac_t""no" 1>&6
  4611. fi
  4612.  
  4613.          fi
  4614.          # Extract the first word of "xgettext", so it can be a program name with args.
  4615. set dummy xgettext; ac_word=$2
  4616. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4617. echo "configure:4618: checking for $ac_word" >&5
  4618. if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  4619.   echo $ac_n "(cached) $ac_c" 1>&6
  4620. else
  4621.   case "$XGETTEXT" in
  4622.   /*)
  4623.   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  4624.   ;;
  4625.   *)
  4626.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4627.   for ac_dir in $PATH; do
  4628.     test -z "$ac_dir" && ac_dir=.
  4629.     if test -f $ac_dir/$ac_word; then
  4630.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
  4631.     ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
  4632.     break
  4633.       fi
  4634.     fi
  4635.   done
  4636.   IFS="$ac_save_ifs"
  4637.   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  4638.   ;;
  4639. esac
  4640. fi
  4641. XGETTEXT="$ac_cv_path_XGETTEXT"
  4642. if test -n "$XGETTEXT"; then
  4643.   echo "$ac_t""$XGETTEXT" 1>&6
  4644. else
  4645.   echo "$ac_t""no" 1>&6
  4646. fi
  4647.  
  4648.          USE_INCLUDED_LIBINTL=yes
  4649.          CATOBJEXT=.cat
  4650.          INSTOBJEXT=.cat
  4651.          DATADIRNAME=lib
  4652.          INTLDEPS='$(top_builddir)/intl/libintl.a'
  4653.          INTLLIBS=$INTLDEPS
  4654.          LIBS=`echo $LIBS | sed -e 's/-lintl//'`
  4655.          nls_cv_header_intl=intl/libintl.h
  4656.          nls_cv_header_libgt=intl/libgettext.h
  4657.            fi
  4658. else
  4659.   echo "$ac_t""no" 1>&6
  4660. fi
  4661.  
  4662.       fi
  4663.         fi
  4664.  
  4665.         if test "$CATOBJEXT" = "NONE"; then
  4666.                   nls_cv_use_gnu_gettext=yes
  4667.         fi
  4668.       fi
  4669.  
  4670.       if test "$nls_cv_use_gnu_gettext" = "yes"; then
  4671.                 INTLOBJS="\$(GETTOBJS)"
  4672.         # Extract the first word of "msgfmt", so it can be a program name with args.
  4673. set dummy msgfmt; ac_word=$2
  4674. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4675. echo "configure:4676: checking for $ac_word" >&5
  4676. if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  4677.   echo $ac_n "(cached) $ac_c" 1>&6
  4678. else
  4679.   case "$MSGFMT" in
  4680.   /*)
  4681.   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  4682.   ;;
  4683.   *)
  4684.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4685.   for ac_dir in $PATH; do
  4686.     test -z "$ac_dir" && ac_dir=.
  4687.     if test -f $ac_dir/$ac_word; then
  4688.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
  4689.     ac_cv_path_MSGFMT="$ac_dir/$ac_word"
  4690.     break
  4691.       fi
  4692.     fi
  4693.   done
  4694.   IFS="$ac_save_ifs"
  4695.   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
  4696.   ;;
  4697. esac
  4698. fi
  4699. MSGFMT="$ac_cv_path_MSGFMT"
  4700. if test -n "$MSGFMT"; then
  4701.   echo "$ac_t""$MSGFMT" 1>&6
  4702. else
  4703.   echo "$ac_t""no" 1>&6
  4704. fi
  4705.  
  4706.         # Extract the first word of "gmsgfmt", so it can be a program name with args.
  4707. set dummy gmsgfmt; ac_word=$2
  4708. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4709. echo "configure:4710: checking for $ac_word" >&5
  4710. if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  4711.   echo $ac_n "(cached) $ac_c" 1>&6
  4712. else
  4713.   case "$GMSGFMT" in
  4714.   /*)
  4715.   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  4716.   ;;
  4717.   *)
  4718.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4719.   for ac_dir in $PATH; do
  4720.     test -z "$ac_dir" && ac_dir=.
  4721.     if test -f $ac_dir/$ac_word; then
  4722.       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
  4723.       break
  4724.     fi
  4725.   done
  4726.   IFS="$ac_save_ifs"
  4727.   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  4728.   ;;
  4729. esac
  4730. fi
  4731. GMSGFMT="$ac_cv_path_GMSGFMT"
  4732. if test -n "$GMSGFMT"; then
  4733.   echo "$ac_t""$GMSGFMT" 1>&6
  4734. else
  4735.   echo "$ac_t""no" 1>&6
  4736. fi
  4737.  
  4738.         # Extract the first word of "xgettext", so it can be a program name with args.
  4739. set dummy xgettext; ac_word=$2
  4740. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4741. echo "configure:4742: checking for $ac_word" >&5
  4742. if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  4743.   echo $ac_n "(cached) $ac_c" 1>&6
  4744. else
  4745.   case "$XGETTEXT" in
  4746.   /*)
  4747.   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  4748.   ;;
  4749.   *)
  4750.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4751.   for ac_dir in $PATH; do
  4752.     test -z "$ac_dir" && ac_dir=.
  4753.     if test -f $ac_dir/$ac_word; then
  4754.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
  4755.     ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
  4756.     break
  4757.       fi
  4758.     fi
  4759.   done
  4760.   IFS="$ac_save_ifs"
  4761.   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  4762.   ;;
  4763. esac
  4764. fi
  4765. XGETTEXT="$ac_cv_path_XGETTEXT"
  4766. if test -n "$XGETTEXT"; then
  4767.   echo "$ac_t""$XGETTEXT" 1>&6
  4768. else
  4769.   echo "$ac_t""no" 1>&6
  4770. fi
  4771.  
  4772.         
  4773.     USE_INCLUDED_LIBINTL=yes
  4774.         CATOBJEXT=.gmo
  4775.         INSTOBJEXT=.mo
  4776.         DATADIRNAME=share
  4777.     INTLDEPS='$(top_builddir)/intl/libintl.a'
  4778.     INTLLIBS=$INTLDEPS
  4779.     LIBS=`echo $LIBS | sed -e 's/-lintl//'`
  4780.         nls_cv_header_intl=intl/libintl.h
  4781.         nls_cv_header_libgt=intl/libgettext.h
  4782.       fi
  4783.  
  4784.             if test "$XGETTEXT" != ":"; then
  4785.             if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
  4786.       : ;
  4787.     else
  4788.       echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
  4789.       XGETTEXT=":"
  4790.     fi
  4791.       fi
  4792.  
  4793.       # We need to process the po/ directory.
  4794.       POSUB=po
  4795.     else
  4796.       DATADIRNAME=share
  4797.       nls_cv_header_intl=intl/libintl.h
  4798.       nls_cv_header_libgt=intl/libgettext.h
  4799.     fi
  4800.  
  4801.     # If this is used in GNU gettext we have to set USE_NLS to `yes'
  4802.     # because some of the sources are only built for this goal.
  4803.     if test "$PACKAGE" = gettext; then
  4804.       USE_NLS=yes
  4805.       USE_INCLUDED_LIBINTL=yes
  4806.     fi
  4807.  
  4808.                 for lang in $ALL_LINGUAS; do
  4809.       GMOFILES="$GMOFILES $lang.gmo"
  4810.       POFILES="$POFILES $lang.po"
  4811.     done
  4812.  
  4813.         
  4814.     
  4815.     
  4816.     
  4817.     
  4818.     
  4819.     
  4820.     
  4821.     
  4822.     
  4823.     
  4824.   
  4825.  
  4826.    if test "x$CATOBJEXT" != "x"; then
  4827.      if test "x$ALL_LINGUAS" = "x"; then
  4828.        LINGUAS=
  4829.      else
  4830.        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
  4831. echo "configure:4832: checking for catalogs to be installed" >&5
  4832.        NEW_LINGUAS=
  4833.        for lang in ${LINGUAS=$ALL_LINGUAS}; do
  4834.          case "$ALL_LINGUAS" in
  4835.           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
  4836.          esac
  4837.        done
  4838.        LINGUAS=$NEW_LINGUAS
  4839.        echo "$ac_t""$LINGUAS" 1>&6
  4840.      fi
  4841.  
  4842.           if test -n "$LINGUAS"; then
  4843.        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
  4844.      fi
  4845.    fi
  4846.  
  4847.             test -d intl || mkdir intl
  4848.    if test "$CATOBJEXT" = ".cat"; then
  4849.      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
  4850. echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
  4851. echo "configure:4852: checking for linux/version.h" >&5
  4852. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4853.   echo $ac_n "(cached) $ac_c" 1>&6
  4854. else
  4855.   cat > conftest.$ac_ext <<EOF
  4856. #line 4857 "configure"
  4857. #include "confdefs.h"
  4858. #include <linux/version.h>
  4859. EOF
  4860. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4861. { (eval echo configure:4862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4862. ac_err=`grep -v '^ *+' conftest.out`
  4863. if test -z "$ac_err"; then
  4864.   rm -rf conftest*
  4865.   eval "ac_cv_header_$ac_safe=yes"
  4866. else
  4867.   echo "$ac_err" >&5
  4868.   echo "configure: failed program was:" >&5
  4869.   cat conftest.$ac_ext >&5
  4870.   rm -rf conftest*
  4871.   eval "ac_cv_header_$ac_safe=no"
  4872. fi
  4873. rm -f conftest*
  4874. fi
  4875. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4876.   echo "$ac_t""yes" 1>&6
  4877.   msgformat=linux
  4878. else
  4879.   echo "$ac_t""no" 1>&6
  4880. msgformat=xopen
  4881. fi
  4882.  
  4883.  
  4884.                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
  4885.    fi
  4886.       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
  4887.      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
  4888.  
  4889.             if test "$PACKAGE" = "gettext"; then
  4890.      GT_NO="#NO#"
  4891.      GT_YES=
  4892.    else
  4893.      GT_NO=
  4894.      GT_YES="#YES#"
  4895.    fi
  4896.    
  4897.    
  4898.  
  4899.             MKINSTALLDIRS=
  4900.    if test -n "$ac_aux_dir"; then
  4901.      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
  4902.    fi
  4903.    if test -z "$MKINSTALLDIRS"; then
  4904.      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
  4905.    fi
  4906.    
  4907.  
  4908.       l=
  4909.    
  4910.  
  4911.          test -d po || mkdir po
  4912.    if test "x$srcdir" != "x."; then
  4913.      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
  4914.        posrcprefix="$srcdir/"
  4915.      else
  4916.        posrcprefix="../$srcdir/"
  4917.      fi
  4918.    else
  4919.      posrcprefix="../"
  4920.    fi
  4921.    rm -f po/POTFILES
  4922.    sed -e "/^#/d" -e "/^\$/d" -e "s,.*,    $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
  4923.     < $srcdir/po/POTFILES.in > po/POTFILES
  4924.   
  4925. # a hack for those who try to change LyX, but do not have gettext installed 
  4926. case  "${XGETTEXT}" in 
  4927.  *:) XGETTEXT='cp ${srcdir}/lyx.pot ./${PACKAGE}.po ; :'
  4928. esac
  4929. # The definition of MKINSTALLDIRS in gettext.m4 is not correct
  4930. MKINSTALLDIRS='config/mkinstalldirs'
  4931. # We want to have libintl.h in src/ and not in intl/
  4932. # This is a bit of a hack, indeed.
  4933. if test "x$nls_cv_header_intl" = xintl/libintl.h ; then
  4934.   nls_cv_header_intl=src/libintl.h
  4935. fi
  4936.  
  4937.  
  4938. ac_ext=C
  4939. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  4940. ac_cpp='$CXXCPP $CPPFLAGS'
  4941. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  4942. ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  4943. cross_compiling=$ac_cv_prog_cxx_cross
  4944.  
  4945.  
  4946. # some standard header files
  4947. ac_header_dirent=no
  4948. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  4949. do
  4950. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4951. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  4952. echo "configure:4953: checking for $ac_hdr that defines DIR" >&5
  4953. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  4954.   echo $ac_n "(cached) $ac_c" 1>&6
  4955. else
  4956.   cat > conftest.$ac_ext <<EOF
  4957. #line 4958 "configure"
  4958. #include "confdefs.h"
  4959. #include <sys/types.h>
  4960. #include <$ac_hdr>
  4961. int main() {
  4962. DIR *dirp = 0;
  4963. ; return 0; }
  4964. EOF
  4965. if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4966.   rm -rf conftest*
  4967.   eval "ac_cv_header_dirent_$ac_safe=yes"
  4968. else
  4969.   echo "configure: failed program was:" >&5
  4970.   cat conftest.$ac_ext >&5
  4971.   rm -rf conftest*
  4972.   eval "ac_cv_header_dirent_$ac_safe=no"
  4973. fi
  4974. rm -f conftest*
  4975. fi
  4976. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  4977.   echo "$ac_t""yes" 1>&6
  4978.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  4979.   cat >> confdefs.h <<EOF
  4980. #define $ac_tr_hdr 1
  4981. EOF
  4982.  ac_header_dirent=$ac_hdr; break
  4983. else
  4984.   echo "$ac_t""no" 1>&6
  4985. fi
  4986. done
  4987. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  4988. if test $ac_header_dirent = dirent.h; then
  4989. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  4990. echo "configure:4991: checking for opendir in -ldir" >&5
  4991. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  4992. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4993.   echo $ac_n "(cached) $ac_c" 1>&6
  4994. else
  4995.   ac_save_LIBS="$LIBS"
  4996. LIBS="-ldir  $LIBS"
  4997. cat > conftest.$ac_ext <<EOF
  4998. #line 4999 "configure"
  4999. #include "confdefs.h"
  5000. /* Override any gcc2 internal prototype to avoid an error.  */
  5001. #ifdef __cplusplus
  5002. extern "C"
  5003. #endif
  5004. /* We use char because int might match the return type of a gcc2
  5005.     builtin and then its argument prototype would still apply.  */
  5006. char opendir();
  5007.  
  5008. int main() {
  5009. opendir()
  5010. ; return 0; }
  5011. EOF
  5012. if { (eval echo configure:5013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5013.   rm -rf conftest*
  5014.   eval "ac_cv_lib_$ac_lib_var=yes"
  5015. else
  5016.   echo "configure: failed program was:" >&5
  5017.   cat conftest.$ac_ext >&5
  5018.   rm -rf conftest*
  5019.   eval "ac_cv_lib_$ac_lib_var=no"
  5020. fi
  5021. rm -f conftest*
  5022. LIBS="$ac_save_LIBS"
  5023.  
  5024. fi
  5025. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5026.   echo "$ac_t""yes" 1>&6
  5027.   LIBS="$LIBS -ldir"
  5028. else
  5029.   echo "$ac_t""no" 1>&6
  5030. fi
  5031.  
  5032. else
  5033. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  5034. echo "configure:5035: checking for opendir in -lx" >&5
  5035. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  5036. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5037.   echo $ac_n "(cached) $ac_c" 1>&6
  5038. else
  5039.   ac_save_LIBS="$LIBS"
  5040. LIBS="-lx  $LIBS"
  5041. cat > conftest.$ac_ext <<EOF
  5042. #line 5043 "configure"
  5043. #include "confdefs.h"
  5044. /* Override any gcc2 internal prototype to avoid an error.  */
  5045. #ifdef __cplusplus
  5046. extern "C"
  5047. #endif
  5048. /* We use char because int might match the return type of a gcc2
  5049.     builtin and then its argument prototype would still apply.  */
  5050. char opendir();
  5051.  
  5052. int main() {
  5053. opendir()
  5054. ; return 0; }
  5055. EOF
  5056. if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5057.   rm -rf conftest*
  5058.   eval "ac_cv_lib_$ac_lib_var=yes"
  5059. else
  5060.   echo "configure: failed program was:" >&5
  5061.   cat conftest.$ac_ext >&5
  5062.   rm -rf conftest*
  5063.   eval "ac_cv_lib_$ac_lib_var=no"
  5064. fi
  5065. rm -f conftest*
  5066. LIBS="$ac_save_LIBS"
  5067.  
  5068. fi
  5069. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5070.   echo "$ac_t""yes" 1>&6
  5071.   LIBS="$LIBS -lx"
  5072. else
  5073.   echo "$ac_t""no" 1>&6
  5074. fi
  5075.  
  5076. fi
  5077.  
  5078. echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
  5079. echo "configure:5080: checking whether sys/types.h defines makedev" >&5
  5080. if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
  5081.   echo $ac_n "(cached) $ac_c" 1>&6
  5082. else
  5083.   cat > conftest.$ac_ext <<EOF
  5084. #line 5085 "configure"
  5085. #include "confdefs.h"
  5086. #include <sys/types.h>
  5087. int main() {
  5088. return makedev(0, 0);
  5089. ; return 0; }
  5090. EOF
  5091. if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5092.   rm -rf conftest*
  5093.   ac_cv_header_sys_types_h_makedev=yes
  5094. else
  5095.   echo "configure: failed program was:" >&5
  5096.   cat conftest.$ac_ext >&5
  5097.   rm -rf conftest*
  5098.   ac_cv_header_sys_types_h_makedev=no
  5099. fi
  5100. rm -f conftest*
  5101.  
  5102. fi
  5103.  
  5104. echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
  5105.  
  5106. if test $ac_cv_header_sys_types_h_makedev = no; then
  5107. ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
  5108. echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
  5109. echo "configure:5110: checking for sys/mkdev.h" >&5
  5110. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5111.   echo $ac_n "(cached) $ac_c" 1>&6
  5112. else
  5113.   cat > conftest.$ac_ext <<EOF
  5114. #line 5115 "configure"
  5115. #include "confdefs.h"
  5116. #include <sys/mkdev.h>
  5117. EOF
  5118. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5119. { (eval echo configure:5120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5120. ac_err=`grep -v '^ *+' conftest.out`
  5121. if test -z "$ac_err"; then
  5122.   rm -rf conftest*
  5123.   eval "ac_cv_header_$ac_safe=yes"
  5124. else
  5125.   echo "$ac_err" >&5
  5126.   echo "configure: failed program was:" >&5
  5127.   cat conftest.$ac_ext >&5
  5128.   rm -rf conftest*
  5129.   eval "ac_cv_header_$ac_safe=no"
  5130. fi
  5131. rm -f conftest*
  5132. fi
  5133. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5134.   echo "$ac_t""yes" 1>&6
  5135.   cat >> confdefs.h <<\EOF
  5136. #define MAJOR_IN_MKDEV 1
  5137. EOF
  5138.  
  5139. else
  5140.   echo "$ac_t""no" 1>&6
  5141. fi
  5142.  
  5143.  
  5144.   if test $ac_cv_header_sys_mkdev_h = no; then
  5145. ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
  5146. echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
  5147. echo "configure:5148: checking for sys/sysmacros.h" >&5
  5148. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5149.   echo $ac_n "(cached) $ac_c" 1>&6
  5150. else
  5151.   cat > conftest.$ac_ext <<EOF
  5152. #line 5153 "configure"
  5153. #include "confdefs.h"
  5154. #include <sys/sysmacros.h>
  5155. EOF
  5156. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5157. { (eval echo configure:5158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5158. ac_err=`grep -v '^ *+' conftest.out`
  5159. if test -z "$ac_err"; then
  5160.   rm -rf conftest*
  5161.   eval "ac_cv_header_$ac_safe=yes"
  5162. else
  5163.   echo "$ac_err" >&5
  5164.   echo "configure: failed program was:" >&5
  5165.   cat conftest.$ac_ext >&5
  5166.   rm -rf conftest*
  5167.   eval "ac_cv_header_$ac_safe=no"
  5168. fi
  5169. rm -f conftest*
  5170. fi
  5171. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5172.   echo "$ac_t""yes" 1>&6
  5173.   cat >> confdefs.h <<\EOF
  5174. #define MAJOR_IN_SYSMACROS 1
  5175. EOF
  5176.  
  5177. else
  5178.   echo "$ac_t""no" 1>&6
  5179. fi
  5180.  
  5181.   fi
  5182. fi
  5183.  
  5184. echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  5185. echo "configure:5186: checking whether stat file-mode macros are broken" >&5
  5186. if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  5187.   echo $ac_n "(cached) $ac_c" 1>&6
  5188. else
  5189.   cat > conftest.$ac_ext <<EOF
  5190. #line 5191 "configure"
  5191. #include "confdefs.h"
  5192. #include <sys/types.h>
  5193. #include <sys/stat.h>
  5194.  
  5195. #if defined(S_ISBLK) && defined(S_IFDIR)
  5196. # if S_ISBLK (S_IFDIR)
  5197. You lose.
  5198. # endif
  5199. #endif
  5200.  
  5201. #if defined(S_ISBLK) && defined(S_IFCHR)
  5202. # if S_ISBLK (S_IFCHR)
  5203. You lose.
  5204. # endif
  5205. #endif
  5206.  
  5207. #if defined(S_ISLNK) && defined(S_IFREG)
  5208. # if S_ISLNK (S_IFREG)
  5209. You lose.
  5210. # endif
  5211. #endif
  5212.  
  5213. #if defined(S_ISSOCK) && defined(S_IFREG)
  5214. # if S_ISSOCK (S_IFREG)
  5215. You lose.
  5216. # endif
  5217. #endif
  5218.  
  5219. EOF
  5220. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5221.   egrep "You lose" >/dev/null 2>&1; then
  5222.   rm -rf conftest*
  5223.   ac_cv_header_stat_broken=yes
  5224. else
  5225.   rm -rf conftest*
  5226.   ac_cv_header_stat_broken=no
  5227. fi
  5228. rm -f conftest*
  5229.  
  5230. fi
  5231.  
  5232. echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
  5233. if test $ac_cv_header_stat_broken = yes; then
  5234.   cat >> confdefs.h <<\EOF
  5235. #define STAT_MACROS_BROKEN 1
  5236. EOF
  5237.  
  5238. fi
  5239.  
  5240. for ac_hdr in errno.h sys/time.h
  5241. do
  5242. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  5243. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5244. echo "configure:5245: checking for $ac_hdr" >&5
  5245. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5246.   echo $ac_n "(cached) $ac_c" 1>&6
  5247. else
  5248.   cat > conftest.$ac_ext <<EOF
  5249. #line 5250 "configure"
  5250. #include "confdefs.h"
  5251. #include <$ac_hdr>
  5252. EOF
  5253. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5254. { (eval echo configure:5255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5255. ac_err=`grep -v '^ *+' conftest.out`
  5256. if test -z "$ac_err"; then
  5257.   rm -rf conftest*
  5258.   eval "ac_cv_header_$ac_safe=yes"
  5259. else
  5260.   echo "$ac_err" >&5
  5261.   echo "configure: failed program was:" >&5
  5262.   cat conftest.$ac_ext >&5
  5263.   rm -rf conftest*
  5264.   eval "ac_cv_header_$ac_safe=no"
  5265. fi
  5266. rm -f conftest*
  5267. fi
  5268. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5269.   echo "$ac_t""yes" 1>&6
  5270.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  5271.   cat >> confdefs.h <<EOF
  5272. #define $ac_tr_hdr 1
  5273. EOF
  5274.  
  5275. else
  5276.   echo "$ac_t""no" 1>&6
  5277. fi
  5278. done
  5279.  
  5280. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  5281. echo "configure:5282: checking whether time.h and sys/time.h may both be included" >&5
  5282. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  5283.   echo $ac_n "(cached) $ac_c" 1>&6
  5284. else
  5285.   cat > conftest.$ac_ext <<EOF
  5286. #line 5287 "configure"
  5287. #include "confdefs.h"
  5288. #include <sys/types.h>
  5289. #include <sys/time.h>
  5290. #include <time.h>
  5291. int main() {
  5292. struct tm *tp;
  5293. ; return 0; }
  5294. EOF
  5295. if { (eval echo configure:5296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5296.   rm -rf conftest*
  5297.   ac_cv_header_time=yes
  5298. else
  5299.   echo "configure: failed program was:" >&5
  5300.   cat conftest.$ac_ext >&5
  5301.   rm -rf conftest*
  5302.   ac_cv_header_time=no
  5303. fi
  5304. rm -f conftest*
  5305. fi
  5306.  
  5307. echo "$ac_t""$ac_cv_header_time" 1>&6
  5308. if test $ac_cv_header_time = yes; then
  5309.   cat >> confdefs.h <<\EOF
  5310. #define TIME_WITH_SYS_TIME 1
  5311. EOF
  5312.  
  5313. fi
  5314.  
  5315.  
  5316. # some functions we'd like to have
  5317. # Check whether --with-broken-headers or --without-broken-headers was given.
  5318. if test "${with_broken_headers+set}" = set; then
  5319.   withval="$with_broken_headers"
  5320.   lyx_broken_headers=$withval
  5321. fi
  5322.  
  5323. if test "x$lyx_broken_headers" = "xyes"; then
  5324.   lyx_flags="$lyx_flags broken-headers"
  5325.   cat >> confdefs.h <<\EOF
  5326. #define BROKEN_HEADERS 1
  5327. EOF
  5328.  
  5329. fi
  5330. for ac_func in memmove memset strchr
  5331. do
  5332. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  5333. echo "configure:5334: checking for $ac_func" >&5
  5334. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  5335.   echo $ac_n "(cached) $ac_c" 1>&6
  5336. else
  5337.   cat > conftest.$ac_ext <<EOF
  5338. #line 5339 "configure"
  5339. #include "confdefs.h"
  5340. /* System header to define __stub macros and hopefully few prototypes,
  5341.     which can conflict with char $ac_func(); below.  */
  5342. #include <assert.h>
  5343. /* Override any gcc2 internal prototype to avoid an error.  */
  5344. #ifdef __cplusplus
  5345. extern "C"
  5346. #endif
  5347. /* We use char because int might match the return type of a gcc2
  5348.     builtin and then its argument prototype would still apply.  */
  5349. char $ac_func();
  5350.  
  5351. int main() {
  5352.  
  5353. /* The GNU C library defines this for functions which it implements
  5354.     to always fail with ENOSYS.  Some functions are actually named
  5355.     something starting with __ and the normal name is an alias.  */
  5356. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  5357. choke me
  5358. #else
  5359. $ac_func();
  5360. #endif
  5361.  
  5362. ; return 0; }
  5363. EOF
  5364. if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5365.   rm -rf conftest*
  5366.   eval "ac_cv_func_$ac_func=yes"
  5367. else
  5368.   echo "configure: failed program was:" >&5
  5369.   cat conftest.$ac_ext >&5
  5370.   rm -rf conftest*
  5371.   eval "ac_cv_func_$ac_func=no"
  5372. fi
  5373. rm -f conftest*
  5374. fi
  5375.  
  5376. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  5377.   echo "$ac_t""yes" 1>&6
  5378.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  5379.   cat >> confdefs.h <<EOF
  5380. #define $ac_tr_func 1
  5381. EOF
  5382.  
  5383. else
  5384.   echo "$ac_t""no" 1>&6
  5385. fi
  5386. done
  5387.  
  5388.  
  5389. # SunOS 4.1.3 does not have strerror and atexit
  5390. for ac_func in strerror atexit
  5391. do
  5392. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  5393. echo "configure:5394: checking for $ac_func" >&5
  5394. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  5395.   echo $ac_n "(cached) $ac_c" 1>&6
  5396. else
  5397.   cat > conftest.$ac_ext <<EOF
  5398. #line 5399 "configure"
  5399. #include "confdefs.h"
  5400. /* System header to define __stub macros and hopefully few prototypes,
  5401.     which can conflict with char $ac_func(); below.  */
  5402. #include <assert.h>
  5403. /* Override any gcc2 internal prototype to avoid an error.  */
  5404. #ifdef __cplusplus
  5405. extern "C"
  5406. #endif
  5407. /* We use char because int might match the return type of a gcc2
  5408.     builtin and then its argument prototype would still apply.  */
  5409. char $ac_func();
  5410.  
  5411. int main() {
  5412.  
  5413. /* The GNU C library defines this for functions which it implements
  5414.     to always fail with ENOSYS.  Some functions are actually named
  5415.     something starting with __ and the normal name is an alias.  */
  5416. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  5417. choke me
  5418. #else
  5419. $ac_func();
  5420. #endif
  5421.  
  5422. ; return 0; }
  5423. EOF
  5424. if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5425.   rm -rf conftest*
  5426.   eval "ac_cv_func_$ac_func=yes"
  5427. else
  5428.   echo "configure: failed program was:" >&5
  5429.   cat conftest.$ac_ext >&5
  5430.   rm -rf conftest*
  5431.   eval "ac_cv_func_$ac_func=no"
  5432. fi
  5433. rm -f conftest*
  5434. fi
  5435.  
  5436. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  5437.   echo "$ac_t""yes" 1>&6
  5438.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  5439.   cat >> confdefs.h <<EOF
  5440. #define $ac_tr_func 1
  5441. EOF
  5442.  
  5443. else
  5444.   echo "$ac_t""no" 1>&6
  5445. LIBOBJS="$LIBOBJS ${ac_func}.o"
  5446. fi
  5447. done
  5448.  
  5449.  
  5450.  
  5451. echo $ac_n "checking for bool type""... $ac_c" 1>&6
  5452. echo "configure:5453: checking for bool type" >&5
  5453. if eval "test \"`echo '$''{'lyx_cv_have_bool'+set}'`\" = set"; then
  5454.   echo $ac_n "(cached) $ac_c" 1>&6
  5455. else
  5456.   
  5457. cat > conftest.$ac_ext <<EOF
  5458. #line 5459 "configure"
  5459. #include "confdefs.h"
  5460.  
  5461. int main() {
  5462. bool foo = true;
  5463. ; return 0; }
  5464. EOF
  5465. if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  5466.   rm -rf conftest*
  5467.   lyx_cv_have_bool=yes
  5468. else
  5469.   echo "configure: failed program was:" >&5
  5470.   cat conftest.$ac_ext >&5
  5471.   rm -rf conftest*
  5472.   lyx_cv_have_bool=no
  5473. fi
  5474. rm -f conftest*
  5475. fi
  5476.  
  5477. echo "$ac_t""$lyx_cv_have_bool" 1>&6
  5478. test $lyx_cv_have_bool = 'yes' && cat >> confdefs.h <<\EOF
  5479. #define HAVE_bool 1
  5480. EOF
  5481.  
  5482.  
  5483. ### and now some special lyx flags.
  5484. # Check whether --with-two-colors or --without-two-colors was given.
  5485. if test "${with_two_colors+set}" = set; then
  5486.   withval="$with_two_colors"
  5487.   cat >> confdefs.h <<\EOF
  5488. #define TWO_COLOR_ICONS 1
  5489. EOF
  5490.  
  5491.    lyx_flags="$lyx_flags two-colors"
  5492. fi
  5493.  
  5494. # Check whether --with-debug or --without-debug was given.
  5495. if test "${with_debug+set}" = set; then
  5496.   withval="$with_debug"
  5497.   cat >> confdefs.h <<\EOF
  5498. #define DEBUG_AS_DEFAULT 1
  5499. EOF
  5500.  
  5501.    lyx_flags="$lyx_flags debug"
  5502. fi
  5503.  
  5504.  
  5505. ### See what is needed to install reLyX
  5506.  
  5507. echo $ac_n "checking for perl >= 5.002""... $ac_c" 1>&6
  5508. echo "configure:5509: checking for perl >= 5.002" >&5
  5509. for ac_prog in perl perl5 perl5.002 perl5.003 perl5.004 ; do
  5510. # Extract the first word of "$ac_prog", so it can be a program name with args.
  5511.   set dummy $ac_prog ; ac_word=$2
  5512.   if test ! -n "$PERL"; then
  5513.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  5514.     for ac_dir in $PATH; do
  5515.       test -z "$ac_dir" && ac_dir=.
  5516.       if test -f $ac_dir/$ac_word; then
  5517.         PERL="$ac_prog"
  5518.         break
  5519.       fi
  5520.     done
  5521.     IFS="$ac_save_ifs"
  5522.   fi
  5523.  
  5524.   if test -n "$PERL"; then
  5525.     ac_result=yes
  5526.   else
  5527.     ac_result=no
  5528.   fi
  5529.   
  5530. if echo 'require 5.002;exit' | $ac_dir/$ac_prog 2>&5
  5531. then
  5532.   PERL=$ac_dir/$ac_prog
  5533. else
  5534.   PERL=
  5535. fi
  5536.   test -n "$PERL" && break
  5537. done
  5538.  
  5539. if test -n "$PERL" ; then
  5540.   RELYXDIR=reLyX
  5541.   install_reLyX=install-reLyX
  5542.   output_reLyX=lib/reLyX/reLyX
  5543.   echo "$ac_t""$PERL" 1>&6
  5544. else
  5545.   RELYXDIR=
  5546.   install_reLyX=
  5547.   output_reLyX=
  5548.   echo "$ac_t""no" 1>&6
  5549.   
  5550. lyx_warning_txt="$lyx_warning_txt
  5551. == Configure has not been able to find a version 5.002 or better of Perl.
  5552.    The installation of reLyX has been disabled
  5553. "
  5554. lyx_warning=yes
  5555. fi
  5556.  
  5557.  
  5558.  
  5559.  
  5560. ### Finish the work.
  5561. LYX_DIR=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
  5562.  
  5563. INSTALL_TARGET=install-unix
  5564.  
  5565. subdirs="lib"
  5566.  
  5567. trap '' 1 2 15
  5568. cat > confcache <<\EOF
  5569. # This file is a shell script that caches the results of configure
  5570. # tests run on this system so they can be shared between configure
  5571. # scripts and configure runs.  It is not useful on other systems.
  5572. # If it contains results you don't want to keep, you may remove or edit it.
  5573. #
  5574. # By default, configure uses ./config.cache as the cache file,
  5575. # creating it if it does not exist already.  You can give configure
  5576. # the --cache-file=FILE option to use a different cache file; that is
  5577. # what configure does when it calls configure scripts in
  5578. # subdirectories, so they share the cache.
  5579. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  5580. # config.status only pays attention to the cache file if you give it the
  5581. # --recheck option to rerun configure.
  5582. #
  5583. EOF
  5584. # The following way of writing the cache mishandles newlines in values,
  5585. # but we know of no workaround that is simple, portable, and efficient.
  5586. # So, don't put newlines in cache variables' values.
  5587. # Ultrix sh set writes to stderr and can't be redirected directly,
  5588. # and sets the high bit in the cache file unless we assign to the vars.
  5589. (set) 2>&1 |
  5590.   case `(ac_space=' '; set) 2>&1` in
  5591.   *ac_space=\ *)
  5592.     # `set' does not quote correctly, so add quotes (double-quote substitution
  5593.     # turns \\\\ into \\, and sed turns \\ into \).
  5594.     sed -n \
  5595.       -e "s/'/'\\\\''/g" \
  5596.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  5597.     ;;
  5598.   *)
  5599.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  5600.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  5601.     ;;
  5602.   esac >> confcache
  5603. if cmp -s $cache_file confcache; then
  5604.   :
  5605. else
  5606.   if test -w $cache_file; then
  5607.     echo "updating cache $cache_file"
  5608.     cat confcache > $cache_file
  5609.   else
  5610.     echo "not updating unwritable cache $cache_file"
  5611.   fi
  5612. fi
  5613. rm -f confcache
  5614.  
  5615. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  5616.  
  5617. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  5618. # Let make expand exec_prefix.
  5619. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  5620.  
  5621. # Any assignment to VPATH causes Sun make to only execute
  5622. # the first set of double-colon rules, so remove it if not needed.
  5623. # If there is a colon in the path, we need to keep it.
  5624. if test "x$srcdir" = x.; then
  5625.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  5626. fi
  5627.  
  5628. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  5629.  
  5630. DEFS=-DHAVE_CONFIG_H
  5631.  
  5632. # Without the "./", some shells look in PATH for config.status.
  5633. : ${CONFIG_STATUS=./config.status}
  5634.  
  5635. echo creating $CONFIG_STATUS
  5636. rm -f $CONFIG_STATUS
  5637. cat > $CONFIG_STATUS <<EOF
  5638. #! /bin/sh
  5639. # Generated automatically by configure.
  5640. # Run this file to recreate the current configuration.
  5641. # This directory was configured as follows,
  5642. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  5643. #
  5644. # $0 $ac_configure_args
  5645. #
  5646. # Compiler output produced by configure, useful for debugging
  5647. # configure, is in ./config.log if it exists.
  5648.  
  5649. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  5650. for ac_option
  5651. do
  5652.   case "\$ac_option" in
  5653.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  5654.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  5655.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  5656.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  5657.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  5658.     exit 0 ;;
  5659.   -help | --help | --hel | --he | --h)
  5660.     echo "\$ac_cs_usage"; exit 0 ;;
  5661.   *) echo "\$ac_cs_usage"; exit 1 ;;
  5662.   esac
  5663. done
  5664.  
  5665. ac_given_srcdir=$srcdir
  5666. ac_given_INSTALL="$INSTALL"
  5667.  
  5668. trap 'rm -fr `echo "Makefile src/Makefile lib/Makefile intl/Makefile po/Makefile.in \
  5669.           $output_reLyX src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  5670. EOF
  5671. cat >> $CONFIG_STATUS <<EOF
  5672.  
  5673. # Protect against being on the right side of a sed subst in config.status.
  5674. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  5675.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  5676. $ac_vpsub
  5677. $extrasub
  5678. s%@CFLAGS@%$CFLAGS%g
  5679. s%@CPPFLAGS@%$CPPFLAGS%g
  5680. s%@CXXFLAGS@%$CXXFLAGS%g
  5681. s%@DEFS@%$DEFS%g
  5682. s%@LDFLAGS@%$LDFLAGS%g
  5683. s%@LIBS@%$LIBS%g
  5684. s%@exec_prefix@%$exec_prefix%g
  5685. s%@prefix@%$prefix%g
  5686. s%@program_transform_name@%$program_transform_name%g
  5687. s%@bindir@%$bindir%g
  5688. s%@sbindir@%$sbindir%g
  5689. s%@libexecdir@%$libexecdir%g
  5690. s%@datadir@%$datadir%g
  5691. s%@sysconfdir@%$sysconfdir%g
  5692. s%@sharedstatedir@%$sharedstatedir%g
  5693. s%@localstatedir@%$localstatedir%g
  5694. s%@libdir@%$libdir%g
  5695. s%@includedir@%$includedir%g
  5696. s%@oldincludedir@%$oldincludedir%g
  5697. s%@infodir@%$infodir%g
  5698. s%@mandir@%$mandir%g
  5699. s%@program_suffix@%$program_suffix%g
  5700. s%@PACKAGE@%$PACKAGE%g
  5701. s%@VERSION@%$VERSION%g
  5702. s%@lyx_devel_version@%$lyx_devel_version%g
  5703. s%@LYX@%$LYX%g
  5704. s%@PROGEXT@%$PROGEXT%g
  5705. s%@absbuilddir@%$absbuilddir%g
  5706. s%@abstopsrcdir@%$abstopsrcdir%g
  5707. s%@SET_MAKE@%$SET_MAKE%g
  5708. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  5709. s%@INSTALL_DATA@%$INSTALL_DATA%g
  5710. s%@CXX@%$CXX%g
  5711. s%@CXXCPP@%$CXXCPP%g
  5712. s%@CC@%$CC%g
  5713. s%@CXX_COMMAND@%$CXX_COMMAND%g
  5714. s%@X_CFLAGS@%$X_CFLAGS%g
  5715. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  5716. s%@X_LIBS@%$X_LIBS%g
  5717. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  5718. s%@LYX_LIBS@%$LYX_LIBS%g
  5719. s%@RANLIB@%$RANLIB%g
  5720. s%@CPP@%$CPP%g
  5721. s%@ALLOCA@%$ALLOCA%g
  5722. s%@USE_NLS@%$USE_NLS%g
  5723. s%@MSGFMT@%$MSGFMT%g
  5724. s%@GMSGFMT@%$GMSGFMT%g
  5725. s%@XGETTEXT@%$XGETTEXT%g
  5726. s%@GENCAT@%$GENCAT%g
  5727. s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
  5728. s%@CATALOGS@%$CATALOGS%g
  5729. s%@CATOBJEXT@%$CATOBJEXT%g
  5730. s%@DATADIRNAME@%$DATADIRNAME%g
  5731. s%@GMOFILES@%$GMOFILES%g
  5732. s%@INSTOBJEXT@%$INSTOBJEXT%g
  5733. s%@INTLDEPS@%$INTLDEPS%g
  5734. s%@INTLLIBS@%$INTLLIBS%g
  5735. s%@INTLOBJS@%$INTLOBJS%g
  5736. s%@POFILES@%$POFILES%g
  5737. s%@POSUB@%$POSUB%g
  5738. s%@GT_NO@%$GT_NO%g
  5739. s%@GT_YES@%$GT_YES%g
  5740. s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
  5741. s%@l@%$l%g
  5742. s%@LINGUAS@%$LINGUAS%g
  5743. s%@LIBOBJS@%$LIBOBJS%g
  5744. s%@PERL@%$PERL%g
  5745. s%@RELYXDIR@%$RELYXDIR%g
  5746. s%@install_reLyX@%$install_reLyX%g
  5747. s%@LYX_DIR@%$LYX_DIR%g
  5748. s%@INSTALL_TARGET@%$INSTALL_TARGET%g
  5749. s%@subdirs@%$subdirs%g
  5750.  
  5751. CEOF
  5752. EOF
  5753.  
  5754. cat >> $CONFIG_STATUS <<\EOF
  5755.  
  5756. # Split the substitutions into bite-sized pieces for seds with
  5757. # small command number limits, like on Digital OSF/1 and HP-UX.
  5758. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  5759. ac_file=1 # Number of current file.
  5760. ac_beg=1 # First line for current file.
  5761. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  5762. ac_more_lines=:
  5763. ac_sed_cmds=""
  5764. while $ac_more_lines; do
  5765.   if test $ac_beg -gt 1; then
  5766.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  5767.   else
  5768.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  5769.   fi
  5770.   if test ! -s conftest.s$ac_file; then
  5771.     ac_more_lines=false
  5772.     rm -f conftest.s$ac_file
  5773.   else
  5774.     if test -z "$ac_sed_cmds"; then
  5775.       ac_sed_cmds="sed -f conftest.s$ac_file"
  5776.     else
  5777.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  5778.     fi
  5779.     ac_file=`expr $ac_file + 1`
  5780.     ac_beg=$ac_end
  5781.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  5782.   fi
  5783. done
  5784. if test -z "$ac_sed_cmds"; then
  5785.   ac_sed_cmds=cat
  5786. fi
  5787. EOF
  5788.  
  5789. cat >> $CONFIG_STATUS <<EOF
  5790.  
  5791. CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile lib/Makefile intl/Makefile po/Makefile.in \
  5792.           $output_reLyX"}
  5793. EOF
  5794. cat >> $CONFIG_STATUS <<\EOF
  5795. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  5796.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  5797.   case "$ac_file" in
  5798.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  5799.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  5800.   *) ac_file_in="${ac_file}.in" ;;
  5801.   esac
  5802.  
  5803.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  5804.  
  5805.   # Remove last slash and all that follows it.  Not all systems have dirname.
  5806.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  5807.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  5808.     # The file is in a subdirectory.
  5809.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  5810.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  5811.     # A "../" for each directory in $ac_dir_suffix.
  5812.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  5813.   else
  5814.     ac_dir_suffix= ac_dots=
  5815.   fi
  5816.  
  5817.   case "$ac_given_srcdir" in
  5818.   .)  srcdir=.
  5819.       if test -z "$ac_dots"; then top_srcdir=.
  5820.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  5821.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  5822.   *) # Relative path.
  5823.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  5824.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  5825.   esac
  5826.  
  5827.   case "$ac_given_INSTALL" in
  5828.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  5829.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  5830.   esac
  5831.  
  5832.   echo creating "$ac_file"
  5833.   rm -f "$ac_file"
  5834.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  5835.   case "$ac_file" in
  5836.   *Makefile*) ac_comsub="1i\\
  5837. # $configure_input" ;;
  5838.   *) ac_comsub= ;;
  5839.   esac
  5840.  
  5841.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  5842.   sed -e "$ac_comsub
  5843. s%@configure_input@%$configure_input%g
  5844. s%@srcdir@%$srcdir%g
  5845. s%@top_srcdir@%$top_srcdir%g
  5846. s%@INSTALL@%$INSTALL%g
  5847. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  5848. fi; done
  5849. rm -f conftest.s*
  5850.  
  5851. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  5852. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  5853. #
  5854. # ac_d sets the value in "#define NAME VALUE" lines.
  5855. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  5856. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  5857. ac_dC='\3'
  5858. ac_dD='%g'
  5859. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  5860. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  5861. ac_uB='\([     ]\)%\1#\2define\3'
  5862. ac_uC=' '
  5863. ac_uD='\4%g'
  5864. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  5865. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  5866. ac_eB='$%\1#\2define\3'
  5867. ac_eC=' '
  5868. ac_eD='%g'
  5869.  
  5870. if test "${CONFIG_HEADERS+set}" != set; then
  5871. EOF
  5872. cat >> $CONFIG_STATUS <<EOF
  5873.   CONFIG_HEADERS="src/config.h"
  5874. EOF
  5875. cat >> $CONFIG_STATUS <<\EOF
  5876. fi
  5877. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  5878.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  5879.   case "$ac_file" in
  5880.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  5881.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  5882.   *) ac_file_in="${ac_file}.in" ;;
  5883.   esac
  5884.  
  5885.   echo creating $ac_file
  5886.  
  5887.   rm -f conftest.frag conftest.in conftest.out
  5888.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  5889.   cat $ac_file_inputs > conftest.in
  5890.  
  5891. EOF
  5892.  
  5893. # Transform confdefs.h into a sed script conftest.vals that substitutes
  5894. # the proper values into config.h.in to produce config.h.  And first:
  5895. # Protect against being on the right side of a sed subst in config.status.
  5896. # Protect against being in an unquoted here document in config.status.
  5897. rm -f conftest.vals
  5898. cat > conftest.hdr <<\EOF
  5899. s/[\\&%]/\\&/g
  5900. s%[\\$`]%\\&%g
  5901. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  5902. s%ac_d%ac_u%gp
  5903. s%ac_u%ac_e%gp
  5904. EOF
  5905. sed -n -f conftest.hdr confdefs.h > conftest.vals
  5906. rm -f conftest.hdr
  5907.  
  5908. # This sed command replaces #undef with comments.  This is necessary, for
  5909. # example, in the case of _POSIX_SOURCE, which is predefined and required
  5910. # on some systems where configure will not decide to define it.
  5911. cat >> conftest.vals <<\EOF
  5912. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  5913. EOF
  5914.  
  5915. # Break up conftest.vals because some shells have a limit on
  5916. # the size of here documents, and old seds have small limits too.
  5917.  
  5918. rm -f conftest.tail
  5919. while :
  5920. do
  5921.   ac_lines=`grep -c . conftest.vals`
  5922.   # grep -c gives empty output for an empty file on some AIX systems.
  5923.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  5924.   # Write a limited-size here document to conftest.frag.
  5925.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  5926.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  5927.   echo 'CEOF
  5928.   sed -f conftest.frag conftest.in > conftest.out
  5929.   rm -f conftest.in
  5930.   mv conftest.out conftest.in
  5931. ' >> $CONFIG_STATUS
  5932.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  5933.   rm -f conftest.vals
  5934.   mv conftest.tail conftest.vals
  5935. done
  5936. rm -f conftest.vals
  5937.  
  5938. cat >> $CONFIG_STATUS <<\EOF
  5939.   rm -f conftest.frag conftest.h
  5940.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  5941.   cat conftest.in >> conftest.h
  5942.   rm -f conftest.in
  5943.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  5944.     echo "$ac_file is unchanged"
  5945.     rm -f conftest.h
  5946.   else
  5947.     # Remove last slash and all that follows it.  Not all systems have dirname.
  5948.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  5949.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  5950.       # The file is in a subdirectory.
  5951.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  5952.     fi
  5953.     rm -f $ac_file
  5954.     mv conftest.h $ac_file
  5955.   fi
  5956. fi; done
  5957.  
  5958. EOF
  5959.  
  5960. cat >> $CONFIG_STATUS <<EOF
  5961. ac_sources="$nls_cv_header_libgt"
  5962. ac_dests="$nls_cv_header_intl"
  5963. EOF
  5964.  
  5965. cat >> $CONFIG_STATUS <<\EOF
  5966. srcdir=$ac_given_srcdir
  5967. while test -n "$ac_sources"; do
  5968.   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
  5969.   set $ac_sources; ac_source=$1; shift; ac_sources=$*
  5970.  
  5971.   echo "linking $srcdir/$ac_source to $ac_dest"
  5972.  
  5973.   if test ! -r $srcdir/$ac_source; then
  5974.     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
  5975.   fi
  5976.   rm -f $ac_dest
  5977.  
  5978.   # Make relative symlinks.
  5979.   # Remove last slash and all that follows it.  Not all systems have dirname.
  5980.   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
  5981.   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
  5982.     # The dest file is in a subdirectory.
  5983.     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
  5984.     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
  5985.     # A "../" for each directory in $ac_dest_dir_suffix.
  5986.     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
  5987.   else
  5988.     ac_dest_dir_suffix= ac_dots=
  5989.   fi
  5990.  
  5991.   case "$srcdir" in
  5992.   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
  5993.   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  5994.   esac
  5995.  
  5996.   # Make a symlink if possible; otherwise try a hard link.
  5997.   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
  5998.     ln $srcdir/$ac_source $ac_dest; then :
  5999.   else
  6000.     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
  6001.   fi
  6002. done
  6003. EOF
  6004. cat >> $CONFIG_STATUS <<EOF
  6005.  
  6006. EOF
  6007. cat >> $CONFIG_STATUS <<\EOF
  6008. sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
  6009.    test -n "lib/reLyX/reLyX" && chmod 755 "lib/reLyX/reLyX"
  6010. exit 0
  6011. EOF
  6012. chmod +x $CONFIG_STATUS
  6013. rm -fr confdefs* $ac_clean_files
  6014. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  6015.  
  6016. if test "$no_recursion" != yes; then
  6017.  
  6018.   # Remove --cache-file and --srcdir arguments so they do not pile up.
  6019.   ac_sub_configure_args=
  6020.   ac_prev=
  6021.   for ac_arg in $ac_configure_args; do
  6022.     if test -n "$ac_prev"; then
  6023.       ac_prev=
  6024.       continue
  6025.     fi
  6026.     case "$ac_arg" in
  6027.     -cache-file | --cache-file | --cache-fil | --cache-fi \
  6028.     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  6029.       ac_prev=cache_file ;;
  6030.     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  6031.     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  6032.       ;;
  6033.     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  6034.       ac_prev=srcdir ;;
  6035.     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  6036.       ;;
  6037.     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
  6038.     esac
  6039.   done
  6040.  
  6041.   for ac_config_dir in lib; do
  6042.  
  6043.     # Do not complain, so a configure script can configure whichever
  6044.     # parts of a large source tree are present.
  6045.     if test ! -d $srcdir/$ac_config_dir; then
  6046.       continue
  6047.     fi
  6048.  
  6049.     echo configuring in $ac_config_dir
  6050.  
  6051.     case "$srcdir" in
  6052.     .) ;;
  6053.     *)
  6054.       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
  6055.       else
  6056.         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
  6057.       fi
  6058.       ;;
  6059.     esac
  6060.  
  6061.     ac_popdir=`pwd`
  6062.     cd $ac_config_dir
  6063.  
  6064.       # A "../" for each directory in /$ac_config_dir.
  6065.       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
  6066.  
  6067.     case "$srcdir" in
  6068.     .) # No --srcdir option.  We are building in place.
  6069.       ac_sub_srcdir=$srcdir ;;
  6070.     /*) # Absolute path.
  6071.       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
  6072.     *) # Relative path.
  6073.       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
  6074.     esac
  6075.  
  6076.     # Check for guested configure; otherwise get Cygnus style configure.
  6077.     if test -f $ac_sub_srcdir/configure; then
  6078.       ac_sub_configure=$ac_sub_srcdir/configure
  6079.     elif test -f $ac_sub_srcdir/configure.in; then
  6080.       ac_sub_configure=$ac_configure
  6081.     else
  6082.       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
  6083.       ac_sub_configure=
  6084.     fi
  6085.  
  6086.     # The recursion is here.
  6087.     if test -n "$ac_sub_configure"; then
  6088.  
  6089.       # Make the cache file name correct relative to the subdirectory.
  6090.       case "$cache_file" in
  6091.       /*) ac_sub_cache_file=$cache_file ;;
  6092.       *) # Relative path.
  6093.         ac_sub_cache_file="$ac_dots$cache_file" ;;
  6094.       esac
  6095.   case "$ac_given_INSTALL" in
  6096.         [/$]*) INSTALL="$ac_given_INSTALL" ;;
  6097.         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  6098.         esac
  6099.  
  6100.       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
  6101.       # The eval makes quoting arguments work.
  6102.       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
  6103.       then :
  6104.       else
  6105.         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
  6106.       fi
  6107.     fi
  6108.  
  6109.     cd $ac_popdir
  6110.   done
  6111. fi
  6112.  
  6113.  
  6114. cat <<EOF
  6115.  
  6116. Configuration:
  6117.   Source code location:       ${srcdir}
  6118.   Compiler:                   ${CXX}
  6119.   Compiler flags:             ${CXXFLAGS}
  6120.   LyX binary dir:             `eval "echo \`eval \"echo ${bindir}\"\`"`
  6121.   LyX files dir:              `eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
  6122.   Special flags:              ${lyx_flags}
  6123.  
  6124. EOF
  6125.  
  6126. # Display a final warning if there has been a LYX_ERROR
  6127.  
  6128. if test x$lyx_error = xyes; then
  6129. cat <<EOF
  6130. **** The following problems have been detected by configure. 
  6131. **** Please check the messages below before running 'make'.
  6132. **** (see the section 'Problems' in the INSTALL file)
  6133. $lyx_error_txt
  6134. $lyx_warning_txt
  6135. deleting cache $cache_file
  6136. EOF
  6137.   rm -f $cache_file
  6138. else
  6139.  
  6140. if test x$lyx_warning = xyes; then
  6141. cat <<EOF
  6142. === The following minor problems have been detected by configure. 
  6143. === Please check the messages below before running 'make'.
  6144. === (see the section 'Problems' in the INSTALL file)
  6145. $lyx_warning_txt
  6146. EOF
  6147. fi
  6148. cat <<EOF
  6149. Configuration of LyX was successful.  
  6150. Type 'make' to compile the program, 
  6151. and then 'make install' to install it.
  6152. EOF
  6153. fi
  6154.  
  6155.