imexam-0.9.1/ 0000755 0006325 0002007 00000000000 13640504030 014532 5 ustar sosey STSCI\science 0000000 0000000 imexam-0.9.1/.gitignore 0000644 0006325 0002007 00000000734 13640457221 016537 0 ustar sosey STSCI\science 0000000 0000000 # Compiled files
*.py[co]
*.a
*.o
*.so
__pycache__
# Ignore .c files by default to avoid including generated code. If you want to
# add a non-generated .c extension, use `git add -f filename.c`.
*.c
# Other generated files
*/version.py
*/cython_version.py
htmlcov
.coverage
# Sphinx
docs/api
_build
# Packages/installer info
.eggs
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
distribute-*.tar.gz
# Other
.*.swp
*~
# Mac OSX
.DS_Store
imexam-0.9.1/.gitmodules 0000644 0006325 0002007 00000000133 13640457221 016715 0 ustar sosey STSCI\science 0000000 0000000 [submodule "cextern/xpa"]
path = cextern/xpa
url = https://github.com/ericmandel/xpa.git
imexam-0.9.1/.readthedocs.yml 0000644 0006325 0002007 00000001354 13640457221 017634 0 ustar sosey STSCI\science 0000000 0000000 # .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true
# Optionally build your docs in additional formats such as PDF and ePub
formats: all
build:
image: latest
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/rtd-pip-requirements
- method: pip
path: .
extra_requirements:
- docs
- method: setuptools
path: .
system_packages: false
submodules:
include: all imexam-0.9.1/.travis.yml 0000644 0006325 0002007 00000006715 13640457221 016665 0 ustar sosey STSCI\science 0000000 0000000 language: python
os: linux
services: xvfb
# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false
# Cache can be cleared from the travis settings menu, see docs currently at
# https://docs.travis-ci.com/user/caching#Clearing-Caches
cache:
- ccache
# The apt packages below are needed for sphinx builds, which can no longer
# be installed with sudo apt-get.
addons:
apt:
packages:
- dvipng
env:
global:
# https://docs.travis-ci.com/user/environment-variables/
- CONDA_DEPENDENCIES='scipy matplotlib pyqt ginga ipython Cython setuptools_scm pip pytest'
# PEP8 errors/warnings:
# E101 - mix of tabs and spaces
# W191 - use of tabs
# W291 - trailing whitespace
# W292 - no newline at end of file
# W293 - trailing whitespace
# W391 - blank line at end of file
# E111 - 4 spaces per indentation level
# E112 - 4 spaces per indentation level
# E113 - 4 spaces per indentation level
# E502 - the backslash is redundant between brackets
# E722 - do not use bare except
# E901 - SyntaxError or IndentationError
# E902 - IOError
- FLAKE8_OPT="--select=E101,W191,W291,W292,W293,E111,E112,E113,E502,E722,E901,E902"
jobs:
NUMPY=1.15
NUMPY=1.16
NUMPY=1.17
NUMPY=1.18
ASTROPY=4.0
ASTROPY=3.2.3
before_install:
# Install the latest version of Miniconda
- uname -a
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda3.sh
- chmod +x miniconda3.sh
- ./miniconda3.sh -b
- export PATH=/home/travis/miniconda3/bin:$PATH
- conda config --add channels conda-forge
- conda config --add channels astropy
- python --version
# travis clones submodules by default
# - git submodule update --init --recursive
install:
- conda create --yes -n test python=$PYTHON numpy=$NUMPY
- source activate test
- conda install -y astropy=$ASTROPY
- conda install -y $CONDA_DEPENDENCIES
- pip install pytest-pep8
- pip install pytest-cov
- pip install coveralls
- pip install sphinx-automodapi
- pip install photutils
- pip install flake8
- pip install sphinx-astropy
- pip install graphviz
- python setup.py build_ext --inplace
script: python setup.py test
jobs:
# Don't wait for allowed failures
fast_finish: true
include:
# Check for sphinx doc build warnings - we do this first because
- name: "Test documentation build"
env: NUMPY=1.17 PYTHON=3.7
script: python setup.py build_sphinx
# Try older numpy versions
- python: 3.6
env: NUMPY=1.15 ASTROPY=3.2.3
- python: 3.6
env: NUMPY=1.16 ASTROPY=4.0
- python: 3.6
env: NUMPY=1.17 ASTROPY=4.0
- python: 3.7
env: NUMPY=1.18 ASTROPY=4.0
- python: 3.7
env: NUMPY=1.17 ASTROPY=4.0
- python: 3.8
env: NUMPY=1.17 ASTROPY=4.0
- python: 3.8
env: NUMPY=1.18 ASTROPY=4.0
# Do coverage tests
- name: "Test coverage status"
python: 3.7
env: ASTROPY=4.0 NUMPY=1.17
script: py.test --cov
# Do a pep8 test
- name: "Test pep8 requirements"
env: PYTHON=3.7 ASTROPY=4.0 NUMPY=1.17
script: flake8 imexam --count $FLAKE8_OPT
after_success:
- coveralls --rcfile='imexam/tests/coveragerc'
imexam-0.9.1/CHANGES.rst 0000644 0006325 0002007 00000023433 13640503261 016346 0 ustar sosey STSCI\science 0000000 0000000 version 0.9.1 (2020-03-30)
--------------------------
- updated classifiers in pypi
- cleanup of branch
version 0.9 (2020-03-30)
---------------------------
- moved extension local to imexam
- cleanup of travis tests and general package reorg
- renamed xpa extension for compatibility and updated to version 2.1.19
- added option for center of mass to aperature photometry centering
- update aper_phot to return tuple of photometry information without plotting
- optional error array can be sent to aper_phot when using without plotting
- updated example jupyter notebooks to be compatible with current functionality
- changed the ext_build process a little and added a flag to skip remaking the c code
- remove leftover iraf variable names
- removed support for the grab function under Darwin
- add deleted import of xpa back to utils (#192)
- adapt for change to photutils API for aperture areas (#193)
- fix ginga display of HDUList
- add check for ds9 in alias as well as well as path
- python2->3 class and printing updates
- removed dependence on astropy_helpers
version 0.8.1 (2018-12-14)
--------------------------
** THIS WILL BE THE LAST VERSION THAT SUPPORT Python 2.7 **
- travis and appveyor testing updates
- radial profile plot centering fixed to more correctly calculate the fractional center offsets
- cumulative radial profile flux calculation should now be correct
- the fit_gauss_1d function call was changed to accept the radius and flux array so that they
could be constructed correctly for multiple circumstances
- documentation updated and new simple walkthrough added
- MEF fits images with IMAGE arrays in the primary HDU should be detected correctly now
- now possible to give load_fits an in-memory fits object
- code cleanup and minor bug fixes
- background fit added to 1D and 2D Gaussian fits
- plotting AiryDisk2D fit is now possible
- unit test updates
- new options added to the aperture phot parameter set that allow users to plot the used apertures
- ZScaleInterval added from astropy.virtualization to set the color range on the data for aperture photometry plot
- replaced the sigma to fwhm lambda with the astropy constant for conversion
- added cursor move recognition using the arrow keys during the imexam loop, however, depending how the user has their windowing focus set, the DS9 window may loose focus, forcing them to move the cursor manually back to the window. Cursor moves are only implemented for DS9, not Ginga.
version 0.8.0 (2017-11-06)
--------------------------
- fixed show_xpa_commands bug sending None instead of empty string
to the xpa library
- fixed logic of connect method. When a target is given, do not look
for an executable
- view method now supports loading cubes when there are 3 dimension in the given array
- logic bug in ds9 class init updated to warn when user specified target doesn't exist
version 0.7.1 (2017-02-06)
--------------------------
- fixed xpa bug holdout from updating for windows specific code
- changed default connection type from local to inet when XPA_METHOD not specified in users environment
version 0.7.0 (2017-01-19)
--------------------------
- fixed a text error in the display_help() so that now the correct version loads the documentation
- Windows users can now install from source. The setup will ignore the cython and xpa necessary to build the DS9 interaction, and users will only be able to use the Ginga HTML5 window, they can also use the Imexamine() functions without any graphical interface.
- Documentation updates, mostly specific information for Windows users
- Added python 3.6 to the test matrix as well as apveyor for the windows build
- Updated XPA module to v2.1.18
- Made fits checker smarter to deal with older simple fits files where EXTEND is true but there are no extensions
- fixed bug in fits loader for ds9 multi-extension FITS files, made load_fits() prefer the extension specified in the key rather than the image name
version 0.6.4dev (unreleased)
-----------------------------
- fixed a text error in the display_help() so that now the correct version loads the documentation
- Windows users can now install from source. The setup will ignore the cython and xpa necessary to build the DS9 interaction, and users will only be able to use the Ginga HTML5 window, they can also use the Imexamine() functions without any graphical interface.
- Documentation updates, mostly specific information for Windows users
- Added python 3.6 to the test matrix as well as apveyor for the windows build
- Updated XPA module to v2.1.18
- Made fits checker smarter to deal with older simple fits files where EXTEND is true but there are no extensions
- fixed bug in fits loader for ds9 multi-extension FITS files, made load_fits() prefer the extension specified in the key rather than the image name
version 0.6.3 (2017-01-01)
--------------------------
- Logging was updated to fix bugs as well allow for more user control of the log files. Additionally, most prints were moved to the stdout stream handler so that users could also shut off messages to the screen
- The imexamine class was updated so that analysis functions could be more easily called by external entities. This was primarily to support ginga plugins, and a new imexam plugin for ginga.
- A dictionary is now returned to the user when they request information on the active DS9 windows which are available.
- Tests updated to be consistent with new package logging
- Documentation and the jupyter examples updated
- Fixed bug with loading user specified fits extensions for both ginga and ds9
version 0.6.2 (2016-08-10)
--------------------------
- Unbinned radial plots were added, bins are still an available option
- documentation updates
version 0.6.1 (2016-07-16)
--------------------------
- Ginga viewer support for images in matplotlib and QT backend removed, but replaced with HTML5 canvas viewer which is faster and simpler for users to both use and install.
- replaced custom fits with astropy.modeling, enabling Gaussian2d, Gaussian1d, Moffat1D and MexicanHat1D fits for lines and centering
- General bug fixes and documentation updates, including example jupyter notebooks
- Updated the default title display on plots to use the image name or specify an array was used
- added astropy_helpers as a submodule
- made xpa a submodule
- if users pass an nddata object to view() without a data reference it assumes one, but you can always specify which extension
- added better user access function for changing plotting/function parameters used to make plots
- updated to Read The Docs new site name
- replaced ipython dependency in the docs build with jupyter
- removed local copy of doc build, referenced to RTD instead, users should make PDF copy for offline work
- added the ginga embed functionality so that users can choose to embed the viewing window inside the notebook
version 0.5.3dev (unreleased)
-----------------------------
- show with blocking deprecatedin matplotlib, changed the calls to pause
- added a radial profile plot under the r key, the curve of growth plot was moved to g
version 0.5.2 (2016-01-29)
--------------------------
- windows build change
version 0.5.1 (2016-01-29)
--------------------------
- version upgraded needed for the release on pypi so it would accept the upload
version 0.5 (2015-05-01)
------------------------
- Ginga viewer with matplotlib backend fully flushed out,
this uses an event driven examination which is activated by key-press
- general bug fixes
- documentation updates
version 0.4dev (unreleased)
---------------------------
- Ginga is added as an optional viewer
version 0.3.dev (unreleased)
----------------------------
- Fixed bug where a user displayed array reference was not getting reset when a fits image was loaded into the frame instead
- added suggested changes from 2to3, and set use_2to3 to False
- restructured docs for astropy style and added more detailed example information
- general bugs fixed as they were found
- full imexam() support for arrays loaded from memory added
- restructured how the code tracks what is in the viewer. It used to track just the
current frame, now it keeps a dictionary of what's loaded into the viewer which also
contains some specifics about the data in each respective frame. This was necessary to
allow user display and tracking of arrays, but also is a nicer way to store the information
and give users access to more details about the viewer in general if they are scripting something
themselves.
- the logging method dropped a reference in one of the last commits, this was fixed and logging the
session to a file for reference should be functioning correctly again.
- fixed an internal tracking problem in cases where the user loaded files through the gui and then
immediately issued the imexam() command. The viewer information for the object had not been updated in
between because it waits for a call to the window before checking - I added this check to the top of
imexam function.
version 0.2.dev (unreleased)
----------------------------
- zero-indexing bug fixed for data pixel display
- added support for x-D image cubes. They display, and are correctly tracked through
the imexam loop. Several new functions were added to support this.
- fixed the zoom(int) bug, you can supply an int or string to the zoom function and it will be happy
version 0.1.dev (unreleased)
----------------------------
This update should address all of the issues that chanley raised,, including:
- Removing the remaining blind exceptions
- Removing unused imports
- Setting an appropriate default value for the connect.current_frame
- the code now calls to the active window to set the frame
- I also updated related ds9 module frame method to set the frame to a decent default if not set
- the astropy.io.fits import was simplified
- In addition, some minor typos and bugs were fixed that appeared when making these updates.
imexam-0.9.1/CODE_OF_CONDUCT.md 0000644 0006325 0002007 00000006207 13640457221 017347 0 ustar sosey STSCI\science 0000000 0000000 # Spacetelescope Open Source Code of Conduct
We expect all "spacetelescope" organization projects to adopt a code of conduct that ensures a productive, respectful environment for all open source contributors and participants. We are committed to providing a strong and enforced code of conduct and expect everyone in our community to follow these guidelines when interacting with others in all forums. Our goal is to keep ours a positive, inclusive, successful, and growing community. The community of participants in open source Astronomy projects is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences success and continued growth.
As members of the community,
- We pledge to treat all people with respect and provide a harassment- and bullying-free environment, regardless of sex, sexual orientation and/or gender identity, disability, physical appearance, body size, race, nationality, ethnicity, and religion. In particular, sexual language and imagery, sexist, racist, or otherwise exclusionary jokes are not appropriate.
- We pledge to respect the work of others by recognizing acknowledgment/citation requests of original authors. As authors, we pledge to be explicit about how we want our own work to be cited or acknowledged.
- We pledge to welcome those interested in joining the community, and realize that including people with a variety of opinions and backgrounds will only serve to enrich our community. In particular, discussions relating to pros/cons of various technologies, programming languages, and so on are welcome, but these should be done with respect, taking proactive measure to ensure that all participants are heard and feel confident that they can freely express their opinions.
- We pledge to welcome questions and answer them respectfully, paying particular attention to those new to the community. We pledge to provide respectful criticisms and feedback in forums, especially in discussion threads resulting from code contributions.
- We pledge to be conscientious of the perceptions of the wider community and to respond to criticism respectfully. We will strive to model behaviors that encourage productive debate and disagreement, both within our community and where we are criticized. We will treat those outside our community with the same respect as people within our community.
- We pledge to help the entire community follow the code of conduct, and to not remain silent when we see violations of the code of conduct. We will take action when members of our community violate this code such as such as contacting conduct@stsci.edu (all emails sent to this address will be treated with the strictest confidence) or talking privately with the person.
This code of conduct applies to all community situations online and offline, including mailing lists, forums, social media, conferences, meetings, associated social events, and one-to-one interactions.
Parts of this code of conduct have been adapted from the Astropy and Numfocus codes of conduct.
http://www.astropy.org/code_of_conduct.html
https://www.numfocus.org/about/code-of-conduct/
imexam-0.9.1/MANIFEST.in 0000644 0006325 0002007 00000000734 13640457221 016305 0 ustar sosey STSCI\science 0000000 0000000 include README.rst
include CHANGES.rst
include ez_setup.py
include setup.py
include setup.cfg
recursive-include imexam *
recursive-include docs *
recursive-include licenses *
recursive-include scripts *
recursive-include wrappers *
recursive-include cextern *
exclude cextern/xpa/.git
exclude cextern/xpa/.gitignore
exclude cextern/xpa/man
exclude cextern/xpa/doc
exclude cextern/xpa/notes
global-exclude *.pyc *.o
prune docs/build
prune docs/api
prune build
prune dist
imexam-0.9.1/PKG-INFO 0000644 0006325 0002007 00000001442 13640504030 015630 0 ustar sosey STSCI\science 0000000 0000000 Metadata-Version: 2.1
Name: imexam
Version: 0.9.1
Summary: Astropy affiliated package
Home-page: http://imexam.readthedocs.io/
Author: Megan Sosey
Author-email: help@stsci.edu
License: BSD
Description: A package to help perform command-line image examination and plotting
Platform: UNKNOWN
Classifier: License :: OSI Approved :: BSD License
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides: imexam
Provides-Extra: docs
Provides-Extra: tests
Provides-Extra: photometry
imexam-0.9.1/README.rst 0000644 0006325 0002007 00000021372 13640457221 016237 0 ustar sosey STSCI\science 0000000 0000000 imexam
======
.. image:: https://travis-ci.org/spacetelescope/imexam.svg?branch=master
:target: https://travis-ci.org/spacetelescope/imexam
:alt: CI Testing Status
.. image:: https://readthedocs.org/projects/imexam/badge/?version=latest
:target: https://readthedocs.org/projects/imexam/?badge=latest
:alt: Documentation Status
.. image:: https://coveralls.io/repos/github/spacetelescope/imexam/badge.svg?branch=master
:target: https://coveralls.io/github/spacetelescope/imexam?branch=master
:alt: Test Coverage Status
.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
:target: http://www.astropy.org
:alt: Powered by Astropy Badge
.. image:: https://ci.appveyor.com/api/projects/status/github/spacetelescope/imexam?branch=master&svg=true
:target: https://ci.appveyor.com/project/spacetelescope/imexam/branch/master
:alt: Appveyor
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2283789.svg
:target: https://doi.org/10.5281/zenodo.2283789
imexam is an affiliated package of `AstroPy`_. It was designed to be a lightweight library which enables users to explore data from a command line interface, through a Jupyter notebook or through a Jupyter console. It can be used with multiple viewers, such as DS9 or Ginga, or without a viewer as a simple library to make plots and grab quick photometry information. It has been designed so that other viewers may be easily attached in the future.
For more information please see the `online documentation `_
Note: There is one git submodule in this package, a submodule for the xpa code that talks to DS9. If you are planning to work on developing new code or installing this package from a repo download, you need to pull the xpa code using the following command after you have cloned the repository and before you "python setup.py install"
::
git submodule update --init -- cextern/xpa
If you are cloning the repository for the first time, you can do both steps at once using a recursive clone:
::
git clone --recursive https://github.com/spacetelescope/imexam.git
You can also display the docs locally after install, import imexam and then issue the following command to display the help docs in your local browser:
::
imexam.display_help()
To install using pip:
::
pip install imexam #installs from the most recent pypi binaries
pip install git+https://github.com/spacetelescope/imexam #installs from the current master on this repo
pip install --upgrade imexam #if you already have an older version installed
If you receive a message like this on your Mac OSX Lion+ machine when imexam.imexam() runs:
::
2016-02-01 11:16:11.453 python[84657:2506524] ApplePersistenceIgnoreState: Existing state will not be touched.
Try turning off the resume state:
::
defaults write org.python.python ApplePersistenceIgnoreState NO
Contributing
============
Please open a new issue or new pull request for bugs, feedback, or new features
you would like to see. If there is an issue you would like to work on, please
leave a comment and we will be happy to assist. New contributions and
contributors are very welcome!
New to github or open source projects? If you are unsure about where to start
or haven't used github before, please feel free to contact `@sosey`.
Want more information about how to make a contribution? Take a look at
the astropy `contributing`_ and `developer`_ documentation.
Feedback and feature requests? Is there something missing you would like
to see? Please open an issue or send an email to `@sosey`. imexam follows the `Astropy Code of Conduct`_ and strives to provide a
welcoming community to all of our users and contributors.
License
=======
imexam is licensed under a 3-clause BSD style license (see the
``licenses/LICENSE.rst`` file).
.. _AstroPy: http://www.astropy.org/
.. _contributing: http://docs.astropy.org/en/stable/index.html#contributing
.. _developer: http://docs.astropy.org/en/stable/index.html#developer-documentation
.. _Astropy Code of Conduct: http://www.astropy.org/about.html#codeofconduct
Quick Instructions
==================
If you are having display issues, and you are using TkAgg, try setting your matplotlib backend to Qt4Agg or Qt5Agg. You can set this in your .matplotlib/matplotlibrc file. You may also want to switch your matplotlib backend to Qt if you have a mac with the default MacOS backend specified. If you don't already have matplotlibrc file in your home directory, you can download one from their documentation: http://matplotlib.org/_static/matplotlibrc
::
inside ~/.matplotlib/matplotlibrc:
backend: Qt4Agg
Using the Ginga HTML5 Viewer
----------------------------
If you have installed Ginga, you can use the HTML5 viewer for image display with either a jupyter console, qtconsole or Jupyter notebook session. If you are using a Windows machine you should install ginga to use as the viewer with this package. Make sure that you have installed the latest version, or you can download the development code here: https://github.com/ejeschke/ginga.
There is also a ginga plugin for imexam which is in the ginga repository in the experimental directory. This will load the imexam plotting and analysis library into the ginga gui framework.
Starting a connection to a Ginga HTML5 canvas backend for browser and Jupyter viewing:
::
a = imexam.connect(viewer='ginga')
You can optionally provide a port number to which the viewer is connected as well:
::
a=imexam.connect(viewer='ginga', port=9856)
Using imexam with DS9
---------------------
From a python terminal: using either the TkAGG or QT4Agg/QT5Agg backends:
::
import imexam
a = imexam.connect()
a.imexam()
From an ipython terminal: using either the TkAgg or QT4Agg/QT5Agg backends.
::
import imexam
a = imexam.connect()
If you are using TkAGG as the backend, from an ipython terminal, you may need to ctrl-D, then select n, to closeout the plotting window. This should not happen if you are running TkAgg and running from a regular python terminal. Looking into the closeout issue with TkAgg now.
From jupyter console/qtconsole: startup with the matplotlib magics to use the backend you specified for display:
::
In [1]: %matplotlib
import imexam
a = imexam.connect()
If you are using the Qt4Agg/Qt5Agg backend with ginga, the plots will display in the console window
Launching multiple DS9 windows
------------------------------
You can launch multiple ds9 windows either from this package or the command line. DS9 can be used to view images and arrays from any of the python terminals, consoles or the Jupyter notebook.
If you launch ds9 from outside the imexam package, you need supply the name of the window to imexam, this can be done in one of 2 ways:
* launch ds9 with a unique title name:
::
ds9 -title astronomy&
then supply imexam the name of the window:
::
a=imexam.ds9('astronomy')
* launch ds9 with nothing:
::
ds9&
then supply imexam with the XPA_METHOD from the XPA information window, this variable will
contain either the INET address or the local filename representing the socket:
::
a=imexam.connect('82a7e674:51763')
Starting a new connection with no target specified will open a new DS9 window using a local socket by default:
::
a=imexam.connect()
Connecting to a DS9 window which was started from the system prompt:
::
imexam.list_active_ds9() # will give you the INET address or names of the open session
a=imexam.connect('address from the above listing')
Examples can be found in the package documentation, online documentation, and imexam.display_help() will pull up the installed package documentation in a web browser. You can also download the examply Jupyter notebooks available in the example_notebooks directory above.
You can also just load the plotting library for use without a viewer:
---------------------------------------------------------------------
This is useful when you want to make batch plots or return information from scripts.
You can also save the lotting data returned and use it futher, or design your own plot.
::
from imexam.imexamine import Imexamine
import numpy as np
plots = Imexamine() #the plots object now has all available functions
data = np.random.rand(100,100) * np.ones((100,100)) #make some fake data
plots.plot_line(35,45,data) #shows a matplotlib window with a plot
plots.save() #saves the current plot to file
You can also set the data attribute of the plots object and then just call many plots without specifying the data again:
plots.set_data(data)
plots.plot_line(35,45)
imexam-0.9.1/appveyor.yml 0000644 0006325 0002007 00000003560 13640457221 017137 0 ustar sosey STSCI\science 0000000 0000000 # AppVeyor.com is a Continuous Integration service to build and run tests under
# Windows
platform:
- x64
environment:
# Appveyor machines come with miniconda already installed.
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
global:
MINICONDA_VERSION: "latest"
ASTROPY_USE_SYSTEM_PYTEST: 1
PYTHON_ARCH: "64" # needs to be set for CMD_IN_ENV to succeed. If a mix
# of 32 bit and 64 bit builds are needed, move this
# to the matrix section.
matrix:
- PYTHON_VERSION: "3.5"
NUMPY_VERION: "stable"
ASTROPY_VERSION: "stable"
- PYTHON_VERSION: "3.6"
NUMPY_VERSION: "stable"
ASTROPY_VERSION: "stable"
- PYTHON_VERSION: "3.7"
NUMPY_VERSION: "stable"
ASTROPY_VERSION: "stable"
- PYTHON_VERSION: "3.7"
NUMPY_VERSION: "stable"
ASTROPY_VERSION: "development"
- PYTHON_VERSION: "3.8"
NUMPY_VERSION: "stable"
ASTROPY_VERSION: "development"
matrix:
fast_finish: true
# os: Visual Studio 2015 Update 2
install:
- cmd: set OLDPATH=%PATH%
- cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\Scripts;%PATH%
- cmd: conda update --yes conda
- cmd: conda config --set always_yes true
- cmd: conda config --set show_channel_urls true
- cmd: conda config --set changeps1 no
- cmd: conda config --add channels conda-forge
- cmd: set PATH=%OLDPATH%
- cmd: set OLDPATH=
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- cmd: set PYTHONUNBUFFERED=1
- cmd: conda install scipy matplotlib numpy astropy ipython sphinx pytest pytest-cov
- cmd: git submodule update --init --recursive
- cmd: conda info -a
# Not a .NET project, we build in the install step instead
build: off
test_script:
- cmd: python setup.py test imexam-0.9.1/cextern/ 0000755 0006325 0002007 00000000000 13640504030 016202 5 ustar sosey STSCI\science 0000000 0000000 imexam-0.9.1/cextern/xpa/ 0000755 0006325 0002007 00000000000 13640504030 016772 5 ustar sosey STSCI\science 0000000 0000000 imexam-0.9.1/cextern/xpa/BUGS 0000644 0006325 0002007 00000003560 13640457670 017502 0 ustar sosey STSCI\science 0000000 0000000 using xpans as proxy for xpaset/xpaget (as in chandra-ed):
Currently, when xpans is used as a proxy connection, an xpaset or
xpaget command will return without waiting for the remote callback to
complete. This is because xpans sets the mode of XPASetFd()/XPAGetFd()
to "dofork=true", to ensure that the XPAClientLoopFork() in client.c
is used. That routine does not wait for the callback to complete. Instead
it forks the callback and then "fakes" the completion. Using the forked
loop and returning immediately prevents xpans from hanging during a long
xpaget/xpaset callback.
But starting with ds9 7.0, this causes problems: two successive xpaset calls
which both process regions will hang the connection to ds9. For example,
in chandra-ed's zhds9 script, a new region is generated by refinepos,
then the old region is deleted and the new region is sent to ds9 for
display:
# refinepos creates a new region ...
${XPASET:-xpaset} -p $XPA regions deleteall
${XPASET:-xpaset} $XPA regions < $OFILE
This will hang the xpans connection to ds9, starting with ds9 7.0. Bill reports
that the region parsing got slightly slower with 7.0 because he is creating
a C++ object to pass to the lexer. Somehow that causes a race condition?
To get around the problem, a delay is needed between the calls:
${XPASET:-xpaset} -p $XPA regions deleteall
# this is needed to avoid a race condition, due to the fact that
# xpaset returns immediately when run via xpans proxy
sleep 1
${XPASET:-xpaset} $XPA regions < $OFILE
How can this be handled automatically? Ideally, one would like to
fork() or create a thread at the "right" place in xpans to handle the
xpaset/xpaget call so that it can wait for completion. But its unclear
what that place is: the XPAHandler() is calling the send or receive
callback and expects a status response, and how can fork() deal with that??
imexam-0.9.1/cextern/xpa/INSTALL 0000644 0006325 0002007 00000032052 13640457670 020046 0 ustar sosey STSCI\science 0000000 0000000 Quick Summary
=============
To build and install the XPA package, simply execute:
./configure # site-specific configuration
make # build the software
make install # install it
make clean # clean up unneeded temp files
We strongly recommend that you install in a directory other than the
default of /usr/local, so as not to require root access. To do this,
configure for a different install directory:
./configure --prefix=
e.g.,
./configure --prefix=/soft/saord
Programs will be installed in /soft/saord/bin, libraries in /soft/saord/lib,
include files in /soft/saord/include, and man pages in /soft/saord/man.
Indeed, we do this at SAO and recommend it as a general rule, in order
to keep SAORD software in one place that does not conflict with other
installations. Note that you will need to add the bin directory to
your path and the man directory to MANPATH.
The build ("make") takes only a minute or so on modern machines. To
monitor its progress and/or check for errors, redirect output to a file
and use the 'tail' command:
make >& foo.log &; tail -f foo.log # csh
or
make 1>foo.log 2>&1 &; tail -f foo.log # sh, bash
Details of Installation
=======================
NB: These are generic installation instructions, modified for XPA.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
1. `cd' to the directory containing the package's source code and type
"./configure". This runs a configuration script created by GNU
autoconf, which configures XPA for your system and creates a
Makefile. The configure script allows you to customize the XPA
configuration for your site; for details on how you can do this,
type "./configure -help" or refer to the autoconf documentation (not
included here). The XPA "configure" script supports the following special
switch(es) in addition to the standard ones:
--enable-shared=yes|link
Build shared libraries in addition to the
default static library. There are two options:
If the value is "yes", shared libraries are
built but not used to link xpa programs.
If the value is "link", shared libraries are
used to link xpa programs. If therefore becomes
your responsibility to put the shared library
where it can be found (or use LD_LIBRARY_PATH).
--enable-threaded-xpans
Build xpans to support separate threads for
handling name server requests and xpa proxy
callbacks. This is recommended if you are going
to enable proxy handling in xpans (-P), since
XPA long callbacks via proxy can interfere
with the name server functions. (You still have
to start xpans with -P 2 to use 2 threads.)
--with-tcl=
Force build Tcl support using parameters found
in /tclConfig.sh. Configure will look for
the Tcl config script in standard places and
will enable Tcl support if found. It will abort
if tclConfig.sh points to a non-existent tcl.h
file (some versions of Linux have shown this
behavior). Use this switch to override the
standard locations or to force a build even
if tcl.h is not found (e.g. if you are going to
install tcl as part of a larger build). With
Tcl support enabled you can execute:
make tclxpa
to generate the XPA package as a shared Tcl
object, loadable using Tcl "package require".
Contact us with problems -- its been a bear to
get this even half-way right.
--with-threads
If you are going to link XPA into a threaded
program, you need to specify --with-threads.
This add -D_REENTRANT to the compiler flags,
which tells gcc to use thread-safe versions of
global system variables such as errno. No code
changes are made to XPA. Please note that all
XPA calls must be in a single thread: XPA is
not thread-safe in and of itself but does work
in threaded programs.
--with-gtk=
Build with support for adding xpa to a gtk
loop. The specified include directory must
contain the gtk directory which itself contains
gtk.h, e.g.:
--with-gtk=/usr/local/include/gtk-1.2
which contains gtk/gtk.h
Standard options are listed below. the most important of which
are --exec-prefix and --prefix (to specify where to install), and
--x-includes=DIR and --x-libraries=DIR (for non-standard X installations).
We recommend --prefix be set to a directory that will hold saord software
(e.g., --prefix=/soft/saord) in order to make management of our software
easier.
NB: be sure to use only absolute path names (those starting with "/")
in the --prefix and --exec_prefix options. (The configure options we
use at SAO for various machines are given as examples in the script
file called "saoconfig" in this directory.)
2. Type `make' to compile the package.
This will create a library archive called libxpa.a. It also will create
the programs xpaget, xpaset, xpainfo, xpaaccess, xpans, and xpamb. It
also will create the libxpa.so shared object if requested using the
--enable-shared switch
3. You can build the libxpa.so shared library manually by executing:
make shlib
at this point. This will not contain Xt or Tcl routines. If Tcl support
has been enabled (see --with-tcl above), you can build a shared library
called libtclxpa.so that supports the tclxpa package (i.e. Tcl routines
are contained in it) by executing:
make tclxpa
This shared library will be loaded automatically with the Tcl command:
package require tclxpa 2.1
assuming, of course, that your shared library can be found by Tcl.
4. Type "make install" to install XPA's libraries and binaries in
standard places. You'll need write permission on the installation
directories to do this. The installation directories are
determined by the "configure" script and may be specified with
the --prefix and --exec_prefix options to "configure". See the
Makefile for information on what directories were chosen; you
can override these choices by modifying the "prefix" and
"exec_prefix" variables in the Makefile.
5. There are .html help files in the doc directory. You can copy
these files to a more convenient location, if you like. We
did not automate this step because we did not know where to
copy these files by default. (NB: The help.html file is the
top level index file.)
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
You also can use this facility to specify a compiler other than the default
gcc (if it exists).
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/lib', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH':
e.g.,
./configure --prefix=/soft/saord
Programs will be installed in /soft/saord/bin, libraries in /soft/saord/lib,
and include files in /soft/saord/include. We recommend this as a general rule,
in order to keep SAORD software in one place that does not conflict with other
installations. Note that you will need to add the bin directory to your path.
You can specify separate installation prefixes for architecture-specific
files and architecture-independent files. If you give `configure' the option
`--exec-prefix=PATH', the package will use PATH as the prefix for installing
programs and libraries. Documentation and other data files will still use the
regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
If you have questions, please contact us at: saord@cfa.harvard.edu.
Eric Mandel
imexam-0.9.1/cextern/xpa/LICENSE 0000644 0006325 0002007 00000002200 13640457670 020012 0 ustar sosey STSCI\science 0000000 0000000 XPA is distributed under the terms of The MIT License (MIT), reproduced below.
Copyright (c) 2014-2016 Smithsonian Institution
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
imexam-0.9.1/cextern/xpa/Makefile 0000644 0006325 0002007 00000034455 13640502440 020450 0 ustar sosey STSCI\science 0000000 0000000 #
# This file is a Makefile for XPA. If it has the name "Makefile.in"
# then it is a template for a Makefile; to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
PACKAGE = xpa
VERSION = 2.1.18
DISTNAME = xpa-${VERSION}
DISTDIR = ../export/${DISTNAME}
FTPDIR = ../ftp
#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).
#----------------------------------------------------------------
# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix). The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.
prefix = /miniconda3/envs/testimexam
exec_prefix = ${prefix}
# The following definition can be set to non-null for special systems
# like AFS with replication. It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.
INSTALL_ROOT =
# Directory in which to install the .a or .so binary for the XPA library:
LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
# Directory in which to install the program wish:
BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
# Directory in which to install the include file xpa.h:
INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
# Top-level directory for manual entries:
MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
# Top-level directory for share entries:
MAN_SHARE_DIR = $(INSTALL_ROOT)$(prefix)/share/xpa
# Platform-specific X compiler flags (include file specifications)
X_CFLAGS =
# Platform-specific link directive for X libraries (-L specification)
X_LIBS =
# Platform-specific libraries that must go before -lXt
X_PRE_LIBS =
# Platform-specific libraries that must go after -lXt
X_EXTRA_LIBS =
# Platform-specific include files for Tcl
TCL_CFLAGS =
# Platform-specific libraries for Tcl
TCL_LIBS =
# Platform-specific include files for Gtk
GTK_CFLAGS =
# Platform-specific libraries for Gtk
GTK_LIBS =
# combine package cflags
PKG_CFLAGS = $(X_CFLAGS) $(TCL_CFLAGS) $(GTK_CFLAGS)
# extra Libs required to link (e.g. socket libraries)
LIBS =
# pthread lib needed to xpans
TLIB =
# To change the compiler switches, for example to change from -O
# to -g, change the following line:
CFLAGS = -g -O2
# To add ld switches, change the following line:
LDFLAGS = -g -O2
# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL = /bin/sh
# if enabled-shared was specified, this will exand to "shlib" and trigger
# building of the shared library
DOSHARED =
# There are just too many different versions of "install" around;
# better to use the install-sh script that comes with the distribution,
# which is slower but guaranteed to work.
INSTALL = ./install-sh -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in. You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------
AC_FLAGS = -DHAVE_CONFIG_H
RANLIB = ranlib
EXE =
#----------------------------------------------------------------
# The information below should be usable as is. The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------
RM = rm -f
CC = gcc
CC_SWITCHES = -I. ${CFLAGS} ${AC_FLAGS}
DEPEND_SWITCHES = -I. ${CFLAGS} ${PKG_CFLAGS} ${AC_FLAGS}
SRCS = xpa.c xpaio.c command.c acl.c remote.c clipboard.c port.c \
tcp.c client.c word.c xalloc.c find.c xlaunch.c timedconn.c \
tclloop.c tcl.c xtloop.c gtkloop.c \
xpaset.c xpaget.c xpainfo.c xpaaccess.c xpans.c xpamb.c
BASE_OBJS = xpa.o xpaio.o command.o acl.o remote.o clipboard.o port.o \
tcp.o client.o word.o xalloc.o find.o xlaunch.o timedconn.o
TCL_OBJS = tclloop.o tcl.o
XT_OBJS = xtloop.o
GTK_OBJS = gtkloop.o
INCL = xpa.h xpap.h
# these are all the modules going into the "normal" xpa library
LIBOBJS = ${BASE_OBJS} ${TCL_OBJS} ${XT_OBJS} ${GTK_OBJS}
LIB = libxpa.a
# used in link line
# LLIB= $(LIB)
LLIB= $(LIB)
PROGS = xpaset xpaget xpainfo xpaaccess xpans xpamb
TESTPROGS = ctest stest rtest
all: xpa.h lib $(PROGS)
testall: $(TESTPROGS)
All: all testall
install:: install-binaries
install:: $(DOSHARED)_install
install:: install-man
install:: install-share
install:: install-data
lib: $(LIB) $(DOSHARED)
$(LIB): $(LIBOBJS)
$(RM) $(LIB)
ar crv $(LIB) $(LIBOBJS)
$(RANLIB) $(LIB)
shlib: $(LIB)
@(rm -rf lib$(PACKAGE).tmp; mkdir lib$(PACKAGE).tmp; \
(cd lib$(PACKAGE).tmp && ar x ../lib$(PACKAGE).a); \
rm -f lib$(PACKAGE).tmp/xt*.o; \
rm -f lib$(PACKAGE).tmp/tcl*.o; \
CC='$(CC)' CXX=$(CXX) \
./mklib -o $(PACKAGE) lib$(PACKAGE).tmp/*.o; \
rm -rf lib$(PACKAGE).tmp)
mingw-dll: $(LIBOBJS)
$(CC) -I. -DHAVE_CONFIG_H -shared port.c tcp.c acl.c find.c \
remote.c timedconn.c client.c word.c xpaio.c clipboard.c \
xlaunch.c xalloc.c command.c xpa.c \
-Wl,--output-def,libxpa.def,--out-implib,libxpa_dll.a,-no-undefined,--enable-runtime-pseudo-reloc -o libxpa.dll \
-lwsock32
tclxpa: $(LIB)
@(rm -rf libtclxpa.tmp; mkdir libtclxpa.tmp; \
(cd libtclxpa.tmp && ar x ../lib$(PACKAGE).a); \
rm -f libtclxpa.tmp/xt*.o; \
CC='$(CC)' CXX=$(CXX) \
./mklib -o tclxpa libtclxpa.tmp/*.o $(TCL_LIBS); \
test -r libtclxpa.dylib && cp -p libtclxpa.dylib libtclxpa.so && echo "copying libtclxpa.dylib to libtclxpa.so"; \
rm -rf libtclxpa.tmp)
diff:
-(for f in `ls *.c`; \
do \
echo $$f; \
diff /soft/saord/xpa-2.1.[0-9]*/$$f .; \
done);
index: $(LIB)
@(test -r pkgIndex.tcl && mv pkgIndex.tcl pkgIndex.tcl-old; \
echo "pkg_mkIndex -direct -verbose . libtclxpa.so; exit"| tclsh)
xpaset: $(LIB) xpaset.o
$(CC) $(LDFLAGS) xpaset.o -o xpaset $(LLIB) $(LIBS)
xpaget: $(LIB) xpaget.o
$(CC) $(LDFLAGS) xpaget.o -o xpaget $(LLIB) $(LIBS)
xpainfo: $(LIB) xpainfo.o
$(CC) $(LDFLAGS) xpainfo.o -o xpainfo $(LLIB) $(LIBS)
xpaaccess: $(LIB) xpaaccess.o
$(CC) $(LDFLAGS) xpaaccess.o -o xpaaccess $(LLIB) $(LIBS)
xpans: $(LIB) xpans.o
$(CC) $(LDFLAGS) xpans.o -o xpans $(LLIB) $(LIBS) $(TLIB)
xpamb: $(LIB) xpamb.o
$(CC) $(LDFLAGS) xpamb.o -o xpamb $(LLIB) $(LIBS)
ctest: $(LIB) ctest.o
$(CC) $(LDFLAGS) ctest.o -o ctest $(LLIB) $(LIBS)
stest: $(LIB) stest.o
$(CC) $(LDFLAGS) stest.o -o stest $(LIB) $(LIBS)
rtest: $(LIB) rtest.o
$(CC) $(LDFLAGS) rtest.o -o rtest $(LIB) $(LIBS)
stestx: $(LIB) stest.o
$(CC) $(LDFLAGS) stest.o -o stest $(LIB) \
$(X_LIBS) -lXt $(X_PRE_LIBS) -lXext -lX11 $(LIBS)
# Smoke test: allows end-users to quickly discern basic usability
smoke: ctest stest
./stest smoke &
sleep 3
./ctest -e -b -l 1000 smoke
./xpaset -p smoke exit
# Note: before running ranlib below, must cd to target directory because
# some ranlibs write to current directory, and this might not always be
# possible (e.g. if installing as root).
# this nop-op gets executed if we are not building shared libraries
_install:
shlib_install:
@-(for i in `ls *.so* *.dylib *.sl 2>/dev/null` ; \
do \
if [ -h $$i ] ; then \
echo "Installing link $$i" ; \
tar cf - $$i | (cd $(LIB_INSTALL_DIR); tar xf -) ; \
else \
echo "Installing $$i" ; \
$(INSTALL_DATA) $$i $(LIB_INSTALL_DIR)/$$i ; \
chmod 555 $(LIB_INSTALL_DIR)/$$i; \
fi; \
done;)
install-binaries: $(LIB) $(PROGS)
@for i in $(LIB_INSTALL_DIR) $(INCLUDE_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
mkdir -p $$i; \
chmod 755 $$i; \
else true; \
fi; \
done;
@echo "Installing $(LIB)";
@$(INSTALL_DATA) $(LIB) $(LIB_INSTALL_DIR)/$(LIB);
@(cd $(LIB_INSTALL_DIR); $(RANLIB) $(LIB));
@chmod 555 $(LIB_INSTALL_DIR)/$(LIB);
@echo "Installing xpa.h"
@$(INSTALL_DATA) xpa.h $(INCLUDE_INSTALL_DIR)/xpa.h
@echo "Installing prsetup.h"
@$(INSTALL_DATA) prsetup.h $(INCLUDE_INSTALL_DIR)/prsetup.h
@for i in $(PROGS) ; \
do \
echo "Installing $$i$(EXE)" ; \
$(INSTALL_PROGRAM) $$i$(EXE) $(BIN_INSTALL_DIR)/$$i$(EXE) ; \
done;
install-man:
@if [ ! -d $(MAN_INSTALL_DIR) ] ; then \
echo "Making directory $(MAN_INSTALL_DIR)"; \
mkdir -p $(MAN_INSTALL_DIR); \
chmod 755 $(MAN_INSTALL_DIR); \
else true; \
fi;
@-(for i in `ls ./man/man?/*.?` ; \
do \
B=`basename $$i`; \
E=`echo $$i | awk -F. '{print $$NF}'`; \
M="$(MAN_INSTALL_DIR)/man$$E"; \
if [ ! -d $$M ] ; then \
echo "Making directory $$M"; \
mkdir -p $$M; \
chmod 755 $$M; \
else true; \
fi; \
echo "Installing $$B" ; \
$(INSTALL_DATA) $$i $$M/$$B; \
done;)
install-share:
@if [ ! -d $(MAN_SHARE_DIR) ] ; then \
echo "Making directory $(MAN_SHARE_DIR)"; \
mkdir -p $(MAN_SHARE_DIR); \
chmod 755 $(MAN_SHARE_DIR); \
else true; \
fi;
@-(for i in `ls ./doc/sman/xpa?.*` ; \
do \
B=`basename $$i`; \
echo "Installing $$B" ; \
$(INSTALL_DATA) $$i $(MAN_SHARE_DIR)/$$B; \
done;)
install-data: install-pkgconfig
install-pkgconfig:
@-(mkdir -p $(LIB_INSTALL_DIR)/pkgconfig; \
echo "Installing xpa.pc" ; \
$(INSTALL_DATA) xpa.pc $(LIB_INSTALL_DIR)/pkgconfig;)
Makefile: Makefile.in
$(SHELL) config.status
clean: FORCE
$(RM) *.a *.so *.so.* *.dylib *.o *.exe core \
errs *pure* .nfs* \
foo* *~ *.log \#* TAGS *.E a.out errors \
$(PROGS) $(TESTPROGS) dns \
gmon.out *.pg *.bak \
config.info config.log \
doc/*~ doc/*.bak man/*~
$(RM) -r autom4te.cache a.out.dSYM dns.dSYM
distclean: clean
$(RM) Makefile config.status config.cache config.log conf.h \
xpa.pc
maintainer-clean:: clean
$(RM) config.status config.cache config.log
depend:
makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
acl.o: acl.c $(INCL)
$(CC) -c $(CC_SWITCHES) acl.c
remote.o: remote.c $(INCL)
$(CC) -c $(CC_SWITCHES) remote.c
clipboard.o: clipboard.c $(INCL)
$(CC) -c $(CC_SWITCHES) clipboard.c
client.o: client.c $(INCL)
$(CC) -c $(CC_SWITCHES) client.c
command.o: command.c $(INCL)
$(CC) -c $(CC_SWITCHES) command.c
find.o: find.c
$(CC) -c $(CC_SWITCHES) find.c
xlaunch.o: xlaunch.c
$(CC) -c $(CC_SWITCHES) xlaunch.c
timedconn.o: timedconn.c
$(CC) -c $(CC_SWITCHES) timedconn.c
port.o: port.c $(INCL)
$(CC) -c $(CC_SWITCHES) port.c
tcl.o: tcl.c $(INCL)
$(CC) -c $(CC_SWITCHES) $(TCL_CFLAGS) tcl.c
tclloop.o: tclloop.c $(INCL)
$(CC) -c $(CC_SWITCHES) $(TCL_CFLAGS) tclloop.c
gtkloop.o: gtkloop.c $(INCL)
$(CC) -c $(CC_SWITCHES) $(GTK_CFLAGS) gtkloop.c
tcp.o: tcp.c
$(CC) -c $(CC_SWITCHES) tcp.c
word.o: word.c
$(CC) -c $(CC_SWITCHES) word.c
xalloc.o: xalloc.c
$(CC) -c $(CC_SWITCHES) xalloc.c
xpa.o: xpa.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpa.c
xpaio.o: xpaio.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpaio.c
xtloop.o: xtloop.c $(INCL)
$(CC) -c $(CC_SWITCHES) $(X_CFLAGS) xtloop.c
xpaaccess.o: xpaaccess.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpaaccess.c
xpaget.o: xpaget.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpaget.c
xpainfo.o: xpainfo.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpainfo.c
xpans.o: xpans.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpans.c
xpamb.o: xpamb.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpamb.c
xpaset.o: xpaset.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpaset.c
ctest.o: ctest.c
$(CC) -c $(CC_SWITCHES) ctest.c
stest.o: stest.c
$(CC) -c $(CC_SWITCHES) $(X_CFLAGS) stest.c
rtest.o: rtest.c
$(CC) -c $(CC_SWITCHES) $(X_CFLAGS) rtest.c
stestx.o: stest.c
$(CC) -o stest.o -c $(CC_SWITCHES) $(X_CFLAGS) \
-DBUILD_WITH_XT stest.c
strstr.o: ./compat/strstr.c
$(CC) -c $(CC_SWITCHES) -o strstr.o ./compat/strstr.c
xpa.h: configure.ac
@($(RM) -r oxpa.h; \
MAJOR=`echo "${VERSION}" | awk -F. '{print $$1}'`; \
MINOR=`echo "${VERSION}" | awk -F. '{print $$2}'`; \
PATCH=`echo "${VERSION}" | awk -F. '{print $$3}'`; \
sed "s/^#define XPA_VERSION.*/#define XPA_VERSION \"$(VERSION)\"/;s/^#define XPA_MAJOR_VERSION.*/#define XPA_MAJOR_VERSION $${MAJOR}/;s/^#define XPA_MINOR_VERSION.*/#define XPA_MINOR_VERSION $${MINOR}/;s/^#define XPA_PATCH_LEVEL.*/#define XPA_PATCH_LEVEL $${PATCH}/;" < xpa.h > nxpa.h; \
mv xpa.h oxpa.h; \
mv nxpa.h xpa.h)
configure: configure.ac
autoconf
dist: configure
($(RM) -r $(DISTDIR); \
mkdir -p $(DISTDIR); \
cp -p *.[ch] *.tcl $(DISTDIR)/.; \
cp -p pkgIndex.tcl $(DISTDIR)/.; \
cp -p Makefile.in $(DISTDIR)/.; \
chmod 664 $(DISTDIR)/Makefile.in; \
cp -p conf.h.in $(DISTDIR)/.; \
chmod 664 $(DISTDIR)/conf.h.in; \
cp -p configure.ac $(DISTDIR)/.; \
chmod 644 $(DISTDIR)/configure.ac; \
cp -p *.m4 $(DISTDIR)/.; \
chmod 644 $(DISTDIR)/*.m4; \
cp -p configure $(DISTDIR)/.; \
chmod 755 $(DISTDIR)/configure; \
cp -p config.sub config.guess $(DISTDIR)/.; \
chmod 755 $(DISTDIR)/config.sub $(DISTDIR)/config.guess; \
cp -p saoconfig $(DISTDIR)/.; \
chmod 755 $(DISTDIR)/saoconfig; \
cp -p mklib $(DISTDIR)/.; \
chmod 755 $(DISTDIR)/mklib; \
cp -p install-sh $(DISTDIR)/install-sh; \
chmod 755 $(DISTDIR)/install-sh; \
cp -p README INSTALL COPYING $(DISTDIR)/.; \
mkdir $(DISTDIR)/doc; \
cp -p ./doc/*.html $(DISTDIR)/doc/.; \
cp -p ./doc/*.ps ./doc/*.pdf $(DISTDIR)/doc/.; \
cp -p ./doc/Makefile $(DISTDIR)/doc/.; \
mkdir $(DISTDIR)/doc/sman; \
cp -p ./doc/sman/* $(DISTDIR)/doc/sman/.; \
mkdir $(DISTDIR)/man; \
cp -p -R ./man/* $(DISTDIR)/man/.)
release: dist
(cd $(DISTDIR); cd ..; \
tar cf - $(DISTNAME) | \
gzip -9 -c > $(FTPDIR)/$(DISTNAME).tar.gz)
tar: FORCE
($(RM) config.cache; \
cd ..; \
tar cf - $(DISTNAME) | gzip -9 -c > $(DISTNAME).tar.gz)
errcheck: FORCE
@(egrep '[^x]error|warning|ld:|collect2:|make:' foo | \
egrep -v "^lex.*but not used"; true)
itar: FORCE
(cd doc/sman; \
tar cf - . | gzip -9 -c > ../../../$(DISTNAME)-iman.tar.gz)
sman: FORCE
@(cd doc && $(MAKE) index)
docs:
@(cd doc; $(MAKE))
FORCE:
# DO NOT DELETE THIS LINE -- make depend depends on it.
imexam-0.9.1/cextern/xpa/Makefile.in 0000644 0006325 0002007 00000034664 13640457670 021075 0 ustar sosey STSCI\science 0000000 0000000 #
# This file is a Makefile for XPA. If it has the name "Makefile.in"
# then it is a template for a Makefile; to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
DISTNAME = xpa-${VERSION}
DISTDIR = ../export/${DISTNAME}
FTPDIR = ../ftp
#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).
#----------------------------------------------------------------
# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix). The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.
prefix = @prefix@
exec_prefix = @exec_prefix@
# The following definition can be set to non-null for special systems
# like AFS with replication. It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.
INSTALL_ROOT =
# Directory in which to install the .a or .so binary for the XPA library:
LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
# Directory in which to install the program wish:
BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
# Directory in which to install the include file xpa.h:
INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
# Top-level directory for manual entries:
MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
# Top-level directory for share entries:
MAN_SHARE_DIR = $(INSTALL_ROOT)$(prefix)/share/xpa
# Platform-specific X compiler flags (include file specifications)
X_CFLAGS = @X_CFLAGS@
# Platform-specific link directive for X libraries (-L specification)
X_LIBS = @X_LIBS@
# Platform-specific libraries that must go before -lXt
X_PRE_LIBS = @X_PRE_LIBS@
# Platform-specific libraries that must go after -lXt
X_EXTRA_LIBS = @X_EXTRA_LIBS@
# Platform-specific include files for Tcl
TCL_CFLAGS = @TCL_CFLAGS@
# Platform-specific libraries for Tcl
TCL_LIBS = @TCL_LIBS@
# Platform-specific include files for Gtk
GTK_CFLAGS = @GTK_CFLAGS@
# Platform-specific libraries for Gtk
GTK_LIBS = @GTK_LIBS@
# combine package cflags
PKG_CFLAGS = $(X_CFLAGS) $(TCL_CFLAGS) $(GTK_CFLAGS)
# extra Libs required to link (e.g. socket libraries)
LIBS = @EXTRA_LIBS@
# pthread lib needed to xpans
TLIB = @TLIB@
# To change the compiler switches, for example to change from -O
# to -g, change the following line:
CFLAGS = @CFLAGS@
# To add ld switches, change the following line:
LDFLAGS = @LDFLAGS@
# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL = /bin/sh
# if enabled-shared was specified, this will exand to "shlib" and trigger
# building of the shared library
DOSHARED = @DOSHARED@
# There are just too many different versions of "install" around;
# better to use the install-sh script that comes with the distribution,
# which is slower but guaranteed to work.
INSTALL = @srcdir@/install-sh -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in. You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------
AC_FLAGS = @DEFS@
RANLIB = @RANLIB@
EXE = @EXEEXT@
#----------------------------------------------------------------
# The information below should be usable as is. The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------
RM = rm -f
CC = @CC@
CC_SWITCHES = -I. ${CFLAGS} ${AC_FLAGS}
DEPEND_SWITCHES = -I. ${CFLAGS} ${PKG_CFLAGS} ${AC_FLAGS}
SRCS = xpa.c xpaio.c command.c acl.c remote.c clipboard.c port.c \
tcp.c client.c word.c xalloc.c find.c xlaunch.c timedconn.c \
tclloop.c tcl.c xtloop.c gtkloop.c \
xpaset.c xpaget.c xpainfo.c xpaaccess.c xpans.c xpamb.c
BASE_OBJS = xpa.o xpaio.o command.o acl.o remote.o clipboard.o port.o \
tcp.o client.o word.o xalloc.o find.o xlaunch.o timedconn.o
TCL_OBJS = tclloop.o tcl.o
XT_OBJS = xtloop.o
GTK_OBJS = gtkloop.o
INCL = xpa.h xpap.h
# these are all the modules going into the "normal" xpa library
LIBOBJS = ${BASE_OBJS} ${TCL_OBJS} ${XT_OBJS} ${GTK_OBJS}
LIB = libxpa.a
# used in link line
# LLIB= $(LIB)
LLIB= @LLIB@
PROGS = xpaset xpaget xpainfo xpaaccess xpans xpamb
TESTPROGS = ctest stest rtest
all: xpa.h lib $(PROGS)
testall: $(TESTPROGS)
All: all testall
install:: install-binaries
install:: $(DOSHARED)_install
install:: install-man
install:: install-share
install:: install-data
lib: $(LIB) $(DOSHARED)
$(LIB): $(LIBOBJS)
$(RM) $(LIB)
ar crv $(LIB) $(LIBOBJS)
$(RANLIB) $(LIB)
shlib: $(LIB)
@(rm -rf lib$(PACKAGE).tmp; mkdir lib$(PACKAGE).tmp; \
(cd lib$(PACKAGE).tmp && ar x ../lib$(PACKAGE).a); \
rm -f lib$(PACKAGE).tmp/xt*.o; \
rm -f lib$(PACKAGE).tmp/tcl*.o; \
CC='$(CC)' CXX=$(CXX) \
./mklib -o $(PACKAGE) lib$(PACKAGE).tmp/*.o; \
rm -rf lib$(PACKAGE).tmp)
mingw-dll: $(LIBOBJS)
$(CC) -I. -DHAVE_CONFIG_H -shared port.c tcp.c acl.c find.c \
remote.c timedconn.c client.c word.c xpaio.c clipboard.c \
xlaunch.c xalloc.c command.c xpa.c \
-Wl,--output-def,libxpa.def,--out-implib,libxpa_dll.a,-no-undefined,--enable-runtime-pseudo-reloc -o libxpa.dll \
-lwsock32
tclxpa: $(LIB)
@(rm -rf libtclxpa.tmp; mkdir libtclxpa.tmp; \
(cd libtclxpa.tmp && ar x ../lib$(PACKAGE).a); \
rm -f libtclxpa.tmp/xt*.o; \
CC='$(CC)' CXX=$(CXX) \
./mklib -o tclxpa libtclxpa.tmp/*.o $(TCL_LIBS); \
test -r libtclxpa.dylib && cp -p libtclxpa.dylib libtclxpa.so && echo "copying libtclxpa.dylib to libtclxpa.so"; \
rm -rf libtclxpa.tmp)
diff:
-(for f in `ls *.c`; \
do \
echo $$f; \
diff /soft/saord/xpa-2.1.[0-9]*/$$f .; \
done);
index: $(LIB)
@(test -r pkgIndex.tcl && mv pkgIndex.tcl pkgIndex.tcl-old; \
echo "pkg_mkIndex -direct -verbose . libtclxpa.so; exit"| tclsh)
xpaset: $(LIB) xpaset.o
$(CC) $(LDFLAGS) xpaset.o -o xpaset $(LLIB) $(LIBS)
xpaget: $(LIB) xpaget.o
$(CC) $(LDFLAGS) xpaget.o -o xpaget $(LLIB) $(LIBS)
xpainfo: $(LIB) xpainfo.o
$(CC) $(LDFLAGS) xpainfo.o -o xpainfo $(LLIB) $(LIBS)
xpaaccess: $(LIB) xpaaccess.o
$(CC) $(LDFLAGS) xpaaccess.o -o xpaaccess $(LLIB) $(LIBS)
xpans: $(LIB) xpans.o
$(CC) $(LDFLAGS) xpans.o -o xpans $(LLIB) $(LIBS) $(TLIB)
xpamb: $(LIB) xpamb.o
$(CC) $(LDFLAGS) xpamb.o -o xpamb $(LLIB) $(LIBS)
ctest: $(LIB) ctest.o
$(CC) $(LDFLAGS) ctest.o -o ctest $(LLIB) $(LIBS)
stest: $(LIB) stest.o
$(CC) $(LDFLAGS) stest.o -o stest $(LIB) $(LIBS)
rtest: $(LIB) rtest.o
$(CC) $(LDFLAGS) rtest.o -o rtest $(LIB) $(LIBS)
stestx: $(LIB) stest.o
$(CC) $(LDFLAGS) stest.o -o stest $(LIB) \
$(X_LIBS) -lXt $(X_PRE_LIBS) -lXext -lX11 $(LIBS)
# Smoke test: allows end-users to quickly discern basic usability
smoke: ctest stest
./stest smoke &
sleep 3
./ctest -e -b -l 1000 smoke
./xpaset -p smoke exit
# Note: before running ranlib below, must cd to target directory because
# some ranlibs write to current directory, and this might not always be
# possible (e.g. if installing as root).
# this nop-op gets executed if we are not building shared libraries
_install:
shlib_install:
@-(for i in `ls *.so* *.dylib *.sl 2>/dev/null` ; \
do \
if [ -h $$i ] ; then \
echo "Installing link $$i" ; \
tar cf - $$i | (cd $(LIB_INSTALL_DIR); tar xf -) ; \
else \
echo "Installing $$i" ; \
$(INSTALL_DATA) $$i $(LIB_INSTALL_DIR)/$$i ; \
chmod 555 $(LIB_INSTALL_DIR)/$$i; \
fi; \
done;)
install-binaries: $(LIB) $(PROGS)
@for i in $(LIB_INSTALL_DIR) $(INCLUDE_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
mkdir -p $$i; \
chmod 755 $$i; \
else true; \
fi; \
done;
@echo "Installing $(LIB)";
@$(INSTALL_DATA) $(LIB) $(LIB_INSTALL_DIR)/$(LIB);
@(cd $(LIB_INSTALL_DIR); $(RANLIB) $(LIB));
@chmod 555 $(LIB_INSTALL_DIR)/$(LIB);
@echo "Installing xpa.h"
@$(INSTALL_DATA) xpa.h $(INCLUDE_INSTALL_DIR)/xpa.h
@echo "Installing prsetup.h"
@$(INSTALL_DATA) prsetup.h $(INCLUDE_INSTALL_DIR)/prsetup.h
@for i in $(PROGS) ; \
do \
echo "Installing $$i$(EXE)" ; \
$(INSTALL_PROGRAM) $$i$(EXE) $(BIN_INSTALL_DIR)/$$i$(EXE) ; \
done;
install-man:
@if [ ! -d $(MAN_INSTALL_DIR) ] ; then \
echo "Making directory $(MAN_INSTALL_DIR)"; \
mkdir -p $(MAN_INSTALL_DIR); \
chmod 755 $(MAN_INSTALL_DIR); \
else true; \
fi;
@-(for i in `ls ./man/man?/*.?` ; \
do \
B=`basename $$i`; \
E=`echo $$i | awk -F. '{print $$NF}'`; \
M="$(MAN_INSTALL_DIR)/man$$E"; \
if [ ! -d $$M ] ; then \
echo "Making directory $$M"; \
mkdir -p $$M; \
chmod 755 $$M; \
else true; \
fi; \
echo "Installing $$B" ; \
$(INSTALL_DATA) $$i $$M/$$B; \
done;)
install-share:
@if [ ! -d $(MAN_SHARE_DIR) ] ; then \
echo "Making directory $(MAN_SHARE_DIR)"; \
mkdir -p $(MAN_SHARE_DIR); \
chmod 755 $(MAN_SHARE_DIR); \
else true; \
fi;
@-(for i in `ls ./doc/sman/xpa?.*` ; \
do \
B=`basename $$i`; \
echo "Installing $$B" ; \
$(INSTALL_DATA) $$i $(MAN_SHARE_DIR)/$$B; \
done;)
install-data: install-pkgconfig
install-pkgconfig:
@-(mkdir -p $(LIB_INSTALL_DIR)/pkgconfig; \
echo "Installing xpa.pc" ; \
$(INSTALL_DATA) xpa.pc $(LIB_INSTALL_DIR)/pkgconfig;)
Makefile: Makefile.in
$(SHELL) config.status
clean: FORCE
$(RM) *.a *.so *.so.* *.dylib *.o *.exe core \
errs *pure* .nfs* \
foo* *~ *.log \#* TAGS *.E a.out errors \
$(PROGS) $(TESTPROGS) dns \
gmon.out *.pg *.bak \
config.info config.log \
doc/*~ doc/*.bak man/*~
$(RM) -r autom4te.cache a.out.dSYM dns.dSYM
distclean: clean
$(RM) Makefile config.status config.cache config.log conf.h \
xpa.pc
maintainer-clean:: clean
$(RM) config.status config.cache config.log
depend:
makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
acl.o: acl.c $(INCL)
$(CC) -c $(CC_SWITCHES) acl.c
remote.o: remote.c $(INCL)
$(CC) -c $(CC_SWITCHES) remote.c
clipboard.o: clipboard.c $(INCL)
$(CC) -c $(CC_SWITCHES) clipboard.c
client.o: client.c $(INCL)
$(CC) -c $(CC_SWITCHES) client.c
command.o: command.c $(INCL)
$(CC) -c $(CC_SWITCHES) command.c
find.o: find.c
$(CC) -c $(CC_SWITCHES) find.c
xlaunch.o: xlaunch.c
$(CC) -c $(CC_SWITCHES) xlaunch.c
timedconn.o: timedconn.c
$(CC) -c $(CC_SWITCHES) timedconn.c
port.o: port.c $(INCL)
$(CC) -c $(CC_SWITCHES) port.c
tcl.o: tcl.c $(INCL)
$(CC) -c $(CC_SWITCHES) $(TCL_CFLAGS) tcl.c
tclloop.o: tclloop.c $(INCL)
$(CC) -c $(CC_SWITCHES) $(TCL_CFLAGS) tclloop.c
gtkloop.o: gtkloop.c $(INCL)
$(CC) -c $(CC_SWITCHES) $(GTK_CFLAGS) gtkloop.c
tcp.o: tcp.c
$(CC) -c $(CC_SWITCHES) tcp.c
word.o: word.c
$(CC) -c $(CC_SWITCHES) word.c
xalloc.o: xalloc.c
$(CC) -c $(CC_SWITCHES) xalloc.c
xpa.o: xpa.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpa.c
xpaio.o: xpaio.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpaio.c
xtloop.o: xtloop.c $(INCL)
$(CC) -c $(CC_SWITCHES) $(X_CFLAGS) xtloop.c
xpaaccess.o: xpaaccess.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpaaccess.c
xpaget.o: xpaget.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpaget.c
xpainfo.o: xpainfo.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpainfo.c
xpans.o: xpans.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpans.c
xpamb.o: xpamb.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpamb.c
xpaset.o: xpaset.c $(INCL)
$(CC) -c $(CC_SWITCHES) xpaset.c
ctest.o: ctest.c
$(CC) -c $(CC_SWITCHES) ctest.c
stest.o: stest.c
$(CC) -c $(CC_SWITCHES) $(X_CFLAGS) stest.c
rtest.o: rtest.c
$(CC) -c $(CC_SWITCHES) $(X_CFLAGS) rtest.c
stestx.o: stest.c
$(CC) -o stest.o -c $(CC_SWITCHES) $(X_CFLAGS) \
-DBUILD_WITH_XT stest.c
strstr.o: ./compat/strstr.c
$(CC) -c $(CC_SWITCHES) -o strstr.o ./compat/strstr.c
xpa.h: configure.ac
@($(RM) -r oxpa.h; \
MAJOR=`echo "${VERSION}" | awk -F. '{print $$1}'`; \
MINOR=`echo "${VERSION}" | awk -F. '{print $$2}'`; \
PATCH=`echo "${VERSION}" | awk -F. '{print $$3}'`; \
sed "s/^#define XPA_VERSION.*/#define XPA_VERSION \"$(VERSION)\"/;s/^#define XPA_MAJOR_VERSION.*/#define XPA_MAJOR_VERSION $${MAJOR}/;s/^#define XPA_MINOR_VERSION.*/#define XPA_MINOR_VERSION $${MINOR}/;s/^#define XPA_PATCH_LEVEL.*/#define XPA_PATCH_LEVEL $${PATCH}/;" < xpa.h > nxpa.h; \
mv xpa.h oxpa.h; \
mv nxpa.h xpa.h)
configure: configure.ac
autoconf
dist: configure
($(RM) -r $(DISTDIR); \
mkdir -p $(DISTDIR); \
cp -p *.[ch] *.tcl $(DISTDIR)/.; \
cp -p pkgIndex.tcl $(DISTDIR)/.; \
cp -p Makefile.in $(DISTDIR)/.; \
chmod 664 $(DISTDIR)/Makefile.in; \
cp -p conf.h.in $(DISTDIR)/.; \
chmod 664 $(DISTDIR)/conf.h.in; \
cp -p configure.ac $(DISTDIR)/.; \
chmod 644 $(DISTDIR)/configure.ac; \
cp -p *.m4 $(DISTDIR)/.; \
chmod 644 $(DISTDIR)/*.m4; \
cp -p configure $(DISTDIR)/.; \
chmod 755 $(DISTDIR)/configure; \
cp -p config.sub config.guess $(DISTDIR)/.; \
chmod 755 $(DISTDIR)/config.sub $(DISTDIR)/config.guess; \
cp -p saoconfig $(DISTDIR)/.; \
chmod 755 $(DISTDIR)/saoconfig; \
cp -p mklib $(DISTDIR)/.; \
chmod 755 $(DISTDIR)/mklib; \
cp -p install-sh $(DISTDIR)/install-sh; \
chmod 755 $(DISTDIR)/install-sh; \
cp -p README INSTALL COPYING $(DISTDIR)/.; \
mkdir $(DISTDIR)/doc; \
cp -p ./doc/*.html $(DISTDIR)/doc/.; \
cp -p ./doc/*.ps ./doc/*.pdf $(DISTDIR)/doc/.; \
cp -p ./doc/Makefile $(DISTDIR)/doc/.; \
mkdir $(DISTDIR)/doc/sman; \
cp -p ./doc/sman/* $(DISTDIR)/doc/sman/.; \
mkdir $(DISTDIR)/man; \
cp -p -R ./man/* $(DISTDIR)/man/.)
release: dist
(cd $(DISTDIR); cd ..; \
tar cf - $(DISTNAME) | \
gzip -9 -c > $(FTPDIR)/$(DISTNAME).tar.gz)
tar: FORCE
($(RM) config.cache; \
cd ..; \
tar cf - $(DISTNAME) | gzip -9 -c > $(DISTNAME).tar.gz)
errcheck: FORCE
@(egrep '[^x]error|warning|ld:|collect2:|make:' foo | \
egrep -v "^lex.*but not used"; true)
itar: FORCE
(cd doc/sman; \
tar cf - . | gzip -9 -c > ../../../$(DISTNAME)-iman.tar.gz)
sman: FORCE
@(cd doc && $(MAKE) index)
docs:
@(cd doc; $(MAKE))
FORCE:
# DO NOT DELETE THIS LINE -- make depend depends on it.
imexam-0.9.1/cextern/xpa/README 0000644 0006325 0002007 00000004242 13640457670 017675 0 ustar sosey STSCI\science 0000000 0000000 This is the directory for XPA 2.0.
The XPA messaging system provides seamless communication between many
kinds of Unix programs, including X programs and Tcl/Tk programs. It
also provides an easy way for users to communicate with XPA-enabled
programs by executing XPA client commands in the shell or by utilizing
such commands in scripts. Because XPA works both at the programming
level and the shell level, it is a powerful tool for unifying any
analysis environment: users and programmers have great flexibility in
choosing the best level or levels at which to access XPA services, and
client access can be extended or modified easily at any time.
A program becomes an XPA-enabled server by defining named points of
public access through which data and commands can be exchanged with
other client programs (and users). Using standard TCP sockets as a
transport mechanism, XPA supports both single-point and broadcast
messaging to and from these servers. It supports direct communication
between clients and servers, or indirect communication via an
intermediate message bus emulation program. Host-based access control
is implemented, as is as the ability to communicate with XPA servers
across a network.
XPA implements a layered interface that is designed to be useful both
to software developers and to users. The interface consists of a
library of XPA client and server routines for use in C/C++ programs and
a suite of high-level user programs built on top of these libraries.
Using the XPA library, access points can be added to Tcl/Tk programs,
Xt programs, or to Unix programs that use the XPA event loop or any
event loop based on select(). Client access subroutines can be added
to any Tcl/Tk, Xt, or Unix program. Client access also is supported at
the command line via a suite of high-level programs.
To build XPA, see the INSTALL instructions (which are based on
standard instructions for building software using GNU configure).
Documentation for XPA is contained in the doc subdirectory (where the
help.html file is the top-level index).
If you have questions, please contact us at: saord@cfa.harvard.edu.
Eric Mandel
XPA is distributed under the terms of The MIT License.
imexam-0.9.1/cextern/xpa/acl.c 0000644 0006325 0002007 00000027501 13640457670 017723 0 ustar sosey STSCI\science 0000000 0000000 /*
* Copyright (c) 1999-2003 Smithsonian Astrophysical Observatory
*/
/*
*
* acl.c -- xpa access control list management
*
*/
#include
/*
*----------------------------------------------------------------------------
*
*
* Private Routines
*
*
*----------------------------------------------------------------------------
*/
/* this is the head of the global list -- too lazy to do anything more */
static XACL aclhead=NULL;
#ifdef ANSI_FUNC
static XACL
XPAAclLookup (char *xclass, char *name, unsigned int ip, int exact)
#else
static XACL XPAAclLookup(xclass, name, ip, exact)
char *xclass;
char *name;
unsigned int ip;
int exact;
#endif
{
XACL cur;
/* look for exact match */
for(cur=aclhead; cur!=NULL; cur=cur->next){
if( !strcmp(xclass, cur->xclass) &&
!strcmp(name, cur->name) &&
((cur->ip == 0) || (cur->ip == ip)) ){
return(cur);
}
}
/* otherwise look for a template match (unless exact was specified) */
if( !exact ){
for(cur=aclhead; cur!=NULL; cur=cur->next){
if( tmatch(xclass, cur->xclass) &&
tmatch(name, cur->name) &&
((cur->ip == 0) || (cur->ip == ip)) ){
return(cur);
}
}
}
return(NULL);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAAclParse
*
* Purpose: parse acl list into components
*
* Returns: 0 on success, -1 on failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAAclParse (char *lbuf, char *xclass, char *name, unsigned int *ip,
char *acl, int len)
#else
static int XPAAclParse(lbuf, xclass, name, ip, acl, len)
char *lbuf;
char *xclass;
char *name;
unsigned int *ip;
char *acl;
int len;
#endif
{
char tbuf[SZ_LINE];
int lp=0;
/* class:name is required */
if( word(lbuf, tbuf, &lp) ){
XPAParseName(tbuf, xclass, name, len);
}
else
return(-1);
/* host is required but can be "*" for "all hosts" */
if( word(lbuf, tbuf, &lp) ){
if( !strcmp(tbuf, "*") )
*ip = 0;
else
*ip = gethostip(tbuf);
}
else
return(-1);
/* acl is required */
if( word(lbuf, tbuf, &lp) ){
if( !strcmp(tbuf, "+") )
strcpy(acl, XPA_ACLS);
else if( !strcmp(tbuf, "-") )
*acl = '\0';
else
strcpy(acl, tbuf);
return(0);
}
else
return(-1);
}
/*
*----------------------------------------------------------------------------
*
*
* Semi-Public Routines (used by command.c)
*
*
*----------------------------------------------------------------------------
*/
/*
*----------------------------------------------------------------------------
*
* Routine: XPAReceiveAcl
*
* Purpose: add or modify the acl for this access point
*
* Returns: 0 for success, -1 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAReceiveAcl (void *client_data, void *call_data, char *paramlist,
char *buf, size_t len)
#else
int XPAReceiveAcl(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
XPA xpa = (XPA)call_data;
XPAComm comm;
int i;
int got;
char *s=NULL;
char lbuf[SZ_LINE];
char tbuf[SZ_LINE];
if( paramlist && *paramlist ){
s = paramlist;
while( isspace((int)*s) )
s++;
snprintf(tbuf, SZ_LINE, "%s:%s %s\n", xpa->xclass, xpa->name, s);
if( XPAAclEdit(tbuf) < 0 ){
snprintf(lbuf, SZ_LINE, "invalid acl: %s\n", tbuf);
XPAError(xpa, lbuf);
return(-1);
}
}
else{
while((XPAGets(xpa, xpa_datafd(xpa), lbuf, SZ_LINE, XPAShortTimeout())>0)&&
*lbuf ){
snprintf(tbuf, SZ_LINE, "%s:%s %s\n", xpa->xclass, xpa->name, lbuf);
got = XPAAclEdit(tbuf);
if( got < 0 ){
snprintf(lbuf, SZ_LINE, "invalid acl: %s\n", tbuf);
XPAError(xpa, lbuf);
return(-1);
}
}
}
/* reset all acl flags for this xpa so acl is recalculated */
for(comm=xpa->commhead; comm!=NULL; comm=comm->next){
for(i=0; i<4; i++){
comm->acl[i] = -1;
}
}
return(0);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPASendAcl
*
* Purpose: return the acl for this access point
*
* Returns: 0 for success, -1 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPASendAcl (void *client_data, void *call_data, char *paramlist,
char **buf, size_t *len)
#else
int XPASendAcl(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char **buf;
size_t *len;
#endif
{
XPA xpa = (XPA)call_data;
XACL cur;
int got = 0;
char tbuf[SZ_LINE];
/* zero all flags */
for(cur=aclhead; cur!=NULL; cur=cur->next){
cur->flag = 0;
}
/* look for exact matches */
for(cur=aclhead; cur!=NULL; cur=cur->next){
if(!strcmp(xpa->xclass, cur->xclass) && !strcmp(xpa->name, cur->name)){
snprintf(tbuf, SZ_LINE, "%s:%s %s %s\n",
cur->xclass, cur->name, getiphost(cur->ip), cur->acl);
send(xpa_datafd(xpa), tbuf, strlen(tbuf), 0);
cur->flag = 1;
got++;
}
}
/* look for template matches that we have not printed yet */
for(cur=aclhead; cur!=NULL; cur=cur->next){
if( cur->flag == 0 ){
if(tmatch(xpa->xclass, cur->xclass) && tmatch(xpa->name, cur->name)){
snprintf(tbuf, SZ_LINE, "%s:%s %s %s\n",
cur->xclass, cur->name, getiphost(cur->ip), cur->acl);
send(xpa_datafd(xpa), tbuf, strlen(tbuf), 0);
got++;
}
}
}
/* zero all flags */
for(cur=aclhead; cur!=NULL; cur=cur->next){
cur->flag = 0;
}
if( got == 0 ){
send(xpa_datafd(xpa), "\n", 1, 0);
}
return(0);
}
/*
*----------------------------------------------------------------------------
*
*
* Public Routines
*
*
*----------------------------------------------------------------------------
*/
/*
*----------------------------------------------------------------------------
*
* Routine: XPAAclEdit
*
* Purpose: add or modify acl entry in the xpa acl list
*
* Returns: 0 on success, -1 on failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAAclEdit (char *lbuf)
#else
int XPAAclEdit(lbuf)
char *lbuf;
#endif
{
XACL cur;
char xclass[SZ_LINE];
char name[SZ_LINE];
char acl[SZ_LINE];
unsigned int ip;
if( XPAAclParse(lbuf, xclass, name, &ip, acl, SZ_LINE) < 0 )
return(-1);
if( ip == 0 )
return(-1);
cur = XPAAclLookup(xclass, name, ip, 1);
if( cur == NULL )
return(XPAAclAdd(lbuf));
else{
if( *acl == '\0' ){
XPAAclDel(cur);
}
else{
if( cur->acl )
xfree(cur->acl);
cur->acl = xstrdup(acl);
}
return(0);
}
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAAclAdd
*
* Purpose: add one acl entry to the xpa acl list
*
* Returns: 0 on success, -1 on failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAAclAdd (char *lbuf)
#else
int XPAAclAdd(lbuf)
char *lbuf;
#endif
{
XACL xnew;
XACL cur;
char xclass[SZ_LINE];
char name[SZ_LINE];
char acl[SZ_LINE];
unsigned int ip;
/* allocate acl struct */
if( (xnew = (XACL)xcalloc(1, sizeof(XACLRec))) == NULL )
goto error;
/* parse info from line buffer */
if( XPAAclParse(lbuf, xclass, name, &ip, acl, SZ_LINE) < 0 )
goto error;
/* fill in the blanks */
xnew->xclass = xstrdup(xclass);
xnew->name = xstrdup(name);
xnew->ip = ip;
xnew->acl = xstrdup(acl);
/* add this acl to end of list of acl's */
if( aclhead == NULL ){
aclhead = xnew;
}
else{
for(cur=aclhead; cur->next!=NULL; cur=cur->next)
;
cur->next = xnew;
}
return(0);
error:
if( xnew )
xfree(xnew);
return(-1);
}
/*
*---------------------------------------------------------------------------
*
* Routine: XPAAclDel
*
* Purpose: free up memory in the acl record structure
*
* Results: 0 on success, -1 for failure
*
*---------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAAclDel (XACL acl)
#else
int XPAAclDel(acl)
XACL acl;
#endif
{
XACL cur;
if( acl == NULL )
return(-1);
/* remove from list of acl's */
if( aclhead ){
if( aclhead == acl ){
aclhead = aclhead->next;
}
else{
for(cur=aclhead; cur!=NULL; cur=cur->next){
if( cur->next == acl ){
cur->next = (cur->next)->next;
break;
}
}
}
}
/* free up string space */
if( acl->xclass ) xfree(acl->xclass);
if( acl->name ) xfree(acl->name);
if( acl->acl ) xfree(acl->acl);
/* free up record struct */
xfree((char *)acl);
return(0);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAAclFree
*
* Purpose:
*
* Results: 1 on success, 0 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
void
XPAAclFree (void)
#else
void XPAAclFree()
#endif
{
XACL cur, tacl;
for(cur=aclhead; cur!=NULL; ){
tacl = cur->next;
XPAAclDel(cur);
cur = tacl;
}
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAAclNew
*
* Purpose: read or re-read the acl list
*
* Results: number of lines in list (including default)
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAAclNew (char *aname, int flag)
#else
int XPAAclNew(aname, flag)
char *aname;
int flag;
#endif
{
int got=0;
char lbuf[SZ_LINE];
char hostname[SZ_LINE];
char *s;
char *obuf;
char *aclname=NULL;
char *aclpath=NULL;
char *defacl=NULL;
char *defcopy=NULL;
char *keywords[10];
char *values[10];
int nkeys;
FILE *fp=NULL;
/* if there is an old list, free it */
if( flag == 0 )
XPAAclFree();
/* get acl file name */
if( aname && *aname )
aclname = aname;
else if( (aclname=(char *)getenv("XPA_ACLFILE")) == NULL )
aclname = XPA_ACLFILE;
/* get the default acl */
if( (defacl=(char *)getenv("XPA_DEFACL")) == NULL )
defacl = XPA_DEFACL;
/* macro-expand it to deal with the host name */
gethost(hostname, SZ_LINE);
nkeys = 0;
keywords[0] = "host"; values[0] = hostname; nkeys++;
/* open the acl file */
if( (aclpath=(char *)Access(aclname, "r")) != NULL ){
if( (fp=fopen(aclpath, "r")) != NULL ){
while( fgets(lbuf, SZ_LINE, fp) ){
if( *lbuf == '#' ){
continue;
}
if( (obuf=macro(lbuf, keywords, values, nkeys, NULL, NULL)) != NULL ){
if( XPAAclAdd(obuf) == 0 )
got++;
xfree(obuf);
}
}
fclose(fp);
}
xfree(aclpath);
}
/* add default acl (it very likely was overridden in the file) */
defcopy=(char *)xstrdup(defacl);
for(s=(char *)strtok(defcopy,";"); s!=NULL; s=(char *)strtok(NULL,";")){
if( (obuf = macro(s, keywords, values, nkeys, NULL, NULL)) != NULL ){
if( XPAAclAdd(obuf) == 0 )
got++;
xfree(obuf);
}
}
if( defcopy) xfree(defcopy);
/* return the news */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAAclCheck
*
* Purpose: validate an acl for a given class, name, and host
*
* Results: 1 on success, 0 on failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAAclCheck (XPA xpa, unsigned int ip, char *acl)
#else
int XPAAclCheck(xpa, ip, acl)
XPA xpa;
unsigned int ip;
char *acl;
#endif
{
char *s;
XACL cur;
if( !(cur = XPAAclLookup(xpa->xclass, xpa->name, ip, 0)) )
return(0);
else if( cur->acl == NULL )
return(0);
else{
for(s=acl; *s; s++){
if( !strchr(cur->acl, *s) )
return(0);
}
return(1);
}
}
imexam-0.9.1/cextern/xpa/aclocal.m4 0000644 0006325 0002007 00000000030 13640457670 020644 0 ustar sosey STSCI\science 0000000 0000000 builtin(include,tcl.m4)
imexam-0.9.1/cextern/xpa/client.c 0000644 0006325 0002007 00000236461 13640457670 020451 0 ustar sosey STSCI\science 0000000 0000000 /*
* Copyright (c) 1999-2003 Smithsonian Astrophysical Observatory
*/
#include
/*
*----------------------------------------------------------------------------
*
*
* Private Routines and Data
*
*
*----------------------------------------------------------------------------
*/
/* this is the head of the global list of client xpas */
static XPA xpaclienthead=NULL;
static char errbuf[SZ_LINE]; /* holds current error message */
static int id=0; /* id of current command */
#define DATA_CONNECT 1
#define DATA_ACCEPT 2
#define DATA_DATA 4
/* use of a double fork() call is used to prevent zombies which happen
if fork is a child of xpans started by an XPA server (i.e., for some
reason, the SIGCHLD signal does not get sent to xpans parent)
See Stevens, Advanced Programming in te Unix Environment, p. 202 */
#define USE_DOUBLE_FORK 1
#ifndef USE_DOUBLE_FORK
#ifdef ANSI_FUNC
void sig_chld(int signo)
#else
#endif
{
int stat;
while(waitpid(-1, &stat, WNOHANG) > 0){
;
}
return;
}
#endif
/*
*----------------------------------------------------------------------------
*
* Routine: rdl
*
* Purpose: read characters up a new-line
*
* Returns: number of characters read
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
rdl (int fd, char *buf, size_t len)
#else
static int rdl(fd, buf, len)
int fd;
char *buf;
int len;
#endif
{
int i=0;
int got;
/* start out clean */
*buf = '\0';
/* make sure we have a valid channel */
if( fd < 0 )
return(-1);
/* grab characters up to a new-line or max len */
while( i < (len-1) ){
got = read(fd, &(buf[i]), 1);
if( got < 1 )
break;
else if( buf[i++] == '\n' )
break;
}
buf[i] = '\0';
return(i);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAProxyAccept
*
* Purpose: accept a connection from an XPA proxy server
*
* Return: fd of accepted connection or -1
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static
int XPAProxyAccept(XPA xpa, char *method, char *xclass, char *name, int ifd,
unsigned int *rip, unsigned short *rport, char *rname)
#else
static
int XPAProxyAccept(xpa, method, xclass, name, ifd, rip, rport, rname)
XPA xpa;
char *method;
char *xclass;
char *name;
int ifd;
unsigned int *rip;
unsigned short *rport;
char *rname;
#endif
{
int sock;
int got;
int oum;
int ofd;
int niter;
int swidth=FD_SETSIZE;
int keep_alive=1;
int reuse_addr=1;
unsigned int ip;
unsigned short port;
char tbuf[SZ_LINE];
char amethod[SZ_LINE];
char *tptr;
socklen_t slen;
struct sockaddr_in sock_in;
#if HAVE_SYS_UN_H
struct sockaddr_un sock_un;
#endif
struct timeval tv;
struct timeval *tvp;
fd_set readfds;
/* initialize results */
if( rip ) *rip = 0;
if( rport ) *rport = 0;
if( rname ) *rname = '\0';
switch(XPAMethod(method)){
case XPA_INET:
if( !XPAParseIpPort(method, &ip, &port) ){
goto error;
}
/* open a socket for data connections */
if( (sock = xsocket(AF_INET, SOCK_STREAM, 0)) < 0 ){
PERROR(("xpaaccept socket"));
goto error;
}
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE,
(char *)&keep_alive, sizeof(keep_alive));
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
(char *)&reuse_addr, sizeof(reuse_addr));
memset((char *)&sock_in, 0, sizeof(sock_in));
sock_in.sin_family = AF_INET;
sock_in.sin_addr.s_addr = htonl(INADDR_ANY);
sock_in.sin_port = htons(port);
/* bind to the ip:port */
if( xbind(sock, (struct sockaddr *)&sock_in, sizeof(sock_in)) < 0 ){
PERROR(("xpaaccept bind"));
xclose(sock);
goto error;
}
snprintf(amethod, SZ_LINE, "%x:%d", ip, port);
break;
#if HAVE_SYS_UN_H
case XPA_UNIX:
ip = 0;
port = 0;
/* get filename part, composed of class and name and unique id */
snprintf(tbuf, SZ_LINE, "%s_%s.%d", xclass, name, (int)time(NULL));
/* change "/" to "_" for filename */
for(tptr = tbuf; *tptr != '\0'; tptr++){
if( *tptr == '/' ) *tptr = '_';
}
/* create full pathname */
snprintf(amethod, SZ_LINE, "%s/%s", XPATmpdir(), tbuf);
/* delete old copy */
unlink (amethod);
/* open a socket and fill in socket information */
if( (sock = xsocket(AF_UNIX, SOCK_STREAM, 0)) < 0 ){
goto error;
}
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE,
(char *)&keep_alive, sizeof(keep_alive));
memset((char *)&sock_un, 0, sizeof(sock_un));
sock_un.sun_family = AF_UNIX;
strcpy(sock_un.sun_path, amethod);
/* unset umask so that everyone can read and write */
oum = umask(0);
/* bind to the file */
got = xbind(sock, (struct sockaddr *)&sock_un, sizeof(sock_un));
/* reset umask to previous */
umask(oum);
/* now check for bind error */
if( got < 0 ){
xclose(sock);
goto error;
}
break;
#endif
default:
goto error;
}
/* send port to client so they can connect */
/* first listen for the connection */
if( listen(sock, XPA_MAXLISTEN) < 0 ){
PERROR(("xpaaccept listen"));
xclose(sock);
goto error;
}
/* and tell the client that we are listening */
snprintf(tbuf, SZ_LINE, "xpaaccept %s (%s:%s %s)\n",
amethod, xclass, name, method);
FPRINTF((stderr, "%sXPAProxyAccept: sending command to %d:\n%s",
_sp, ifd, tbuf));
if( XPAPuts(NULL, ifd, tbuf, XPAShortTimeout()) <= 0 ){
PERROR(("client xpaaccept write"));
xclose(sock);
goto error;
}
/* we will iterate on xselect */
if( XPAShortTimeout() > 0 )
niter = XPAShortTimeout()*100;
else
niter = XPA_SHORT_TIMEOUT*100;
again:
/* this has to be able to time out */
tv.tv_sec = 0;
tv.tv_usec = 10000;
tvp = &tv;
/* wait for this socket and XPA sockets */
FD_ZERO(&readfds);
FD_SET(sock, &readfds);
XPAAddSelect(NULL, &readfds);
/* wait for the connection */
got = xselect(swidth, &readfds, NULL, NULL, tvp);
/* process results of select */
if( got > 0 ){
if( !FD_ISSET(sock, &readfds)){
XPAProcessSelect(&readfds, 0);
goto again;
}
switch(XPAMethod(method)){
case XPA_INET:
while( 1 ){
slen = sizeof(struct sockaddr_in);
if((ofd=xaccept(sock, (struct sockaddr *)&sock_in, &slen)) >= 0){
break;
}
else{
if( xerrno == EINTR )
continue;
else{
PERROR(("xpaaccept acccept"));
xclose(sock);
goto error;
}
}
}
break;
#if HAVE_SYS_UN_H
case XPA_UNIX:
while( 1 ){
slen = sizeof(struct sockaddr_un);
if((ofd=xaccept(sock, (struct sockaddr *)&sock_un, &slen)) >= 0){
break;
}
else{
if( xerrno == EINTR )
continue;
else{
PERROR(("xpaaccept acccept"));
xclose(sock);
goto error;
}
}
}
break;
#endif
default:
xclose(sock);
goto error;
}
}
/* timeout? */
else if( got == 0 ){
if( --niter > 0 ){
goto again;
}
else{
xclose(sock);
FPRINTF((stderr, "%sXPAProxyAccept: select timed out\n", _sp));
goto error;
}
}
/* error */
else{
if( xerrno == EINTR ){
PERROR(("xpaaccept select"));
goto again;
}
else{
xclose(sock);
goto error;
}
}
/* done with listening */
xclose(sock);
/* fill in return information */
if( rip ) *rip = ip;
if( rport ) *rport = port;
if( rname ){
strncpy(rname, amethod, SZ_LINE-1);
rname[SZ_LINE-1] = '\0';
}
return(ofd);
error:
return(-1);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientNewInput
*
* Purpose: allocate a new input struct for reading data from stdin
*
* Return: input struct, or NULL on error
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static XPAInput
XPAClientNewInput(XPA xpa)
#else
static XPAInput XPAClientNewInput(xpa)
XPA xpa;
#endif
{
XPAInput xnew, inp;
/* allocate a new record */
if( (xnew=(XPAInput)xcalloc(1, sizeof(XPAInputRec))) == NULL ){
return(NULL);
}
/* allocate the data buffer */
xnew->buf = (char *)xmalloc(XPA_BIOSIZE);
/* this buffer starts (and currently ends) at the current byte count */
xnew->start = xpa->inpbytes;
xnew->end = xpa->inpbytes;
xnew->bytes = 0;
/* add this input to end of list of input's */
if( xpa->inphead == NULL ){
xpa->inphead = xnew;
}
else{
for(inp=xpa->inphead; inp->next!=NULL; inp=inp->next)
;
inp->next = xnew;
}
/* return the record struct */
return(xnew);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientFreeInput
*
* Purpose: free a input buffer once its been sent to all targets
*
* Return: 0 on success, -1 on failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static void
XPAClientFreeInput (XPA xpa, XPAInput inp)
#else
static void XPAClientFreeInput(xpa, inp)
XPA xpa;
XPAInput inp;
#endif
{
XPAInput cur;
if( !xpa || !inp )
return;
if( inp == xpa->inphead ){
xpa->inphead = inp->next;
}
else{
for(cur=xpa->inphead; cur!=NULL; cur=cur->next){
if( cur->next == inp ){
cur->next = inp->next;
break;
}
}
}
/* free current record */
if( inp != NULL ){
if( inp->buf != NULL )
xfree(inp->buf );
xfree(inp);
}
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientFreeAllInputs
*
* Purpose: free remaining input buffers
*
* Return: 0 on success, -1 on failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static void
XPAClientFreeAllInputs (XPA xpa)
#else
static void XPAClientFreeAllInputs(xpa)
XPA xpa;
#endif
{
XPAInput cur, tmp;
if( !xpa )
return;
for(cur=xpa->inphead; cur!=NULL; ){
tmp = cur->next;
XPAClientFreeInput(xpa, cur);
cur = tmp;
}
xpa->inpbytes = 0;
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientProcessInput
*
* Purpose: read input from stdin and store in an input struct
*
* Return: bytes read
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAClientProcessInput(XPA xpa)
#else
static int XPAClientProcessInput(xpa)
XPA xpa;
#endif
{
static XPAInput cur=NULL;
int get, got;
/* set up next buffer, if necessary */
for(cur=xpa->inphead; cur!=NULL; cur=cur->next){
if( cur->bytes < XPA_BIOSIZE )
break;
}
if( cur == NULL ){
cur = XPAClientNewInput(xpa);
}
/* read data from stdin */
get = MIN(XPA_IOSIZE, XPA_BIOSIZE - cur->bytes);
if( isatty(xpa->ifd) ){
got = rdl(xpa->ifd, &(cur->buf[cur->bytes]), get);
}
else{
got = read(xpa->ifd, &(cur->buf[cur->bytes]), get);
}
switch(got){
case -1:
if( XPAVerbosity() ){
PERROR(("XPA client read"));
}
return(0);
case 0:
xpa->ifd = -1;
FPRINTF((stderr, "%sXPAClientProcessInput: signalling EOF\n", _sp));
break;
default:
break;
}
cur->bytes += got;
cur->end += got;
xpa->inpbytes += got;
#ifdef FIXEDBYCYGWIN
#if HAVE_CYGWIN
/* on non-NT Windows machines, Cygwin select() does not work once a pipe
gets EOF. It should show the fd ready for reading (and read 0 bytes),
but does not, so we have to hack a manual check */
/* GetVersion is a Windows call */
if( GetVersion() >= 0x80000000L ){
if( got < get ){
xpa->ifd = -1;
}
}
#endif
#endif
/* verify to stdout, if necessary */
if( xpa->client_mode & XPA_CLIENT_VERIFY ){
fwrite(&(cur->buf[cur->bytes-got]), sizeof(char), got, stdout);
}
/* return the number of bytes just read */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientFree
*
* Purpose: free a client record and remove from list
*
* Returns: none
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static void
XPAClientFree (XPA xpa, XPAClient client)
#else
static void XPAClientFree(xpa, client)
XPA xpa;
XPAClient client;
#endif
{
XPAClient cur;
/* remove from list of xpa's */
if( xpa->clienthead ){
if( xpa->clienthead == client ){
xpa->clienthead = client->next;
}
else{
for(cur=xpa->clienthead; cur!=NULL; cur=cur->next){
if( cur->next == client ){
cur->next = client->next;
break;
}
}
}
}
if( client->cmdfd >= 0 ){
#if HAVE_CYGWIN
shutdown(client->cmdfd, SHUT_RDWR);
#endif
xclose(client->cmdfd);
}
if( client->datafd >= 0 ){
#if HAVE_CYGWIN
shutdown(client->datafd, SHUT_RDWR);
#endif
xclose(client->datafd);
}
if( client->dataname ){
unlink(client->dataname);
xfree(client->dataname);
}
if( client->method )
xfree(client->method);
if( client->info )
xfree(client->info);
if( client->xtemplate )
xfree(client->xtemplate);
if( client->xclass )
xfree(client->xclass);
if( client->name )
xfree(client->name);
if( client->id )
xfree(client->id);
/* xpaget's fd mode has an alloc'ed bufptr and lenptr */
if( (client->type == 'g') && (client->mode & XPA_CLIENT_FD) ){
if( client->bufptr && *(client->bufptr) )
xfree(*(client->bufptr));
if( client->bufptr )
xfree(client->bufptr);
if( client->lenptr )
xfree(client->lenptr);
}
xfree(client);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientDataSent
*
* Purpose: data is sent, so close data channel and change status to
* signal that we are waiting for the server
*
* Returns: none
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static void
XPAClientDataSent (XPA xpa, XPAClient client)
#else
static void XPAClientDataSent(xpa, client)
XPA xpa;
XPAClient client;
#endif
{
FPRINTF((stderr, "%sXPAClientDataSent: for cmd %d data %d\n", _sp,
client->cmdfd, client->datafd));
/* close the data channel, which should trigger a result from the server */
if( client->datafd >= 0 ){
#if HAVE_CYGWIN
shutdown(client->datafd, SHUT_RDWR);
#endif
xclose(client->datafd);
client->datafd = -1;
}
/* we are now waiting for the server to complete the calllback */
client->status = XPA_CLIENT_WAITING;
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientEnd
*
* Purpose: finish up with this client
*
* Returns: error message or null
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static char *
XPAClientEnd (XPA xpa, XPAClient client)
#else
static char *XPAClientEnd(xpa, client)
XPA xpa;
XPAClient client;
#endif
{
char *error=NULL;
char *eptr;
FPRINTF((stderr, "%sXPAClientEnd: for cmd %d data %d\n", _sp,
client->cmdfd, client->datafd));
/* always read the status line -- if we are not ack'ing, we'll get an
OK from the server before the calllback and we can exit quickly */
/* don't do this if client is xpainfo and we're not ack'ing */
if( !((client->type == 'i') && !(client->mode & XPA_CLIENT_ACK)) ){
retry:
if( XPAGets(NULL, client->cmdfd, errbuf, SZ_LINE, XPALongTimeout()) >0 ){
FPRINTF((stderr, "%sXPAClientEnd: read %s\n", _sp, errbuf));
eptr = errbuf;
/* this should never happen */
if( *eptr == '?' ){
snprintf(errbuf, SZ_LINE,
"XPA$WARNING: protocol mismatch - missing id\n%s", eptr);
error = NULL;
}
else{
/* make sure we are dealing with a proper message */
if( strncmp(eptr, client->id, strlen(client->id)) ){
if( XPAVerbosity() > 1 ){
fprintf(stderr,
"XPA$WARNING: ignoring out of sync server message:\n");
fprintf(stderr, "%s", errbuf);
}
goto retry;
}
/* go past id */
eptr += strlen(client->id);
while( isspace((int)*eptr) ) eptr++;
if( !strncmp(eptr, "XPA$OK", 6) ){
error = NULL;
}
else{
error = eptr;
}
}
}
else{
if( XPAVerbosity() > 1 ){
fprintf(stderr,
"XPA$WARNING: no reply from server callback (assuming OK)\n");
}
error = NULL;
}
}
else
error = NULL;
/* store the error return */
if( client->errptr )
*(client->errptr) = xstrdup(error);
/* remove this client if we are not meant to persist */
if( !xpa->persist ){
XPAClientFree(xpa, client);
}
/* otherwise mark as inactive */
else{
client->status = XPA_CLIENT_IDLE;
client->bytes = 0;
}
/* return error status */
return(error);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientNew
*
* Purpose: allocate a new xpa client
*
* Returns: xpa client struct
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static XPAClient
XPAClientNew (XPA xpa, char *mode, char *xtemplate, int type,
char *xclass, char *name, char *method, char *info)
#else
static XPAClient XPAClientNew(xpa, mode, xtemplate, type,
xclass, name, method, info)
XPA xpa;
char *mode;
char *xtemplate;
int type;
char *xclass;
char *name;
char *method;
char *info;
#endif
{
XPAClient xnew, client;
struct sockaddr_in sock_in;
#if HAVE_SYS_UN_H
struct sockaddr_un sock_un;
#endif
char xmode[SZ_LINE];
char tbuf[SZ_LINE];
char amethod[SZ_LINE];
char *s=NULL;
unsigned short port;
unsigned int ip=0;
int fd;
int pfd;
int tries=0;
int nsproxy=0;
int keep_alive=1;
FPRINTF((stderr, "%sXPAClientNew: entering with %s %s %s %s\n", _sp,
xclass, name, method, info));
/* no errors as yet */
*errbuf = '\0';
/* look for reuse of xpans fd (used in conjunction with the xpans proxy) */
*xmode = '\0';
if( mode ){
strncpy(xmode, mode, SZ_LINE-1);
xmode[SZ_LINE-1] = '\0';
}
if( keyword(xmode, "nsproxy", tbuf, SZ_LINE) ){
nsproxy = 1;
pfd = strtol(tbuf, &s, 0);
fd = XPAProxyAccept(xpa, XPANSMethod(NULL,2),
xclass, name, pfd, &ip, &port, amethod);
/* make sure we got a valid int fd */
if( fd < 0 ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server on proxyaccept (%s:%s%s)\n",
xclass, name, XPATimestamp());
FPRINTF((stderr, "%sXPAClientNew: %s", _sp, errbuf));
PERROR(("XPAClientNew"));
return(NULL);
}
}
/* normal usage: connect to server */
else{
switch(XPAMethod(method)){
case XPA_INET:
again1:
if( !XPAParseIpPort(method, &ip, &port) )
return(NULL);
/* use $localhost over $host (we do not trust host to be correct) */
if( (ip == gethostip("$host")) && (tries == 0) )
ip = gethostip("$localhost");
/* connect to the server before we go further */
if( (fd = xsocket(AF_INET, SOCK_STREAM, 0)) < 0 ){
return(NULL);
}
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,
(char *)&keep_alive, sizeof(keep_alive));
memset((char *)&sock_in, 0, sizeof(sock_in));
sock_in.sin_family = AF_INET;
sock_in.sin_addr.s_addr = htonl(ip);
sock_in.sin_port = htons(port);
/* make the connection with the server */
if( connect(fd, (struct sockaddr *)&sock_in, sizeof(sock_in)) <0 ){
xclose(fd);
/* if localhost doesn't work, make one try with the host ip */
/* we also try again just in case there was an odd error such
as "permission denied", which we have seen once or twice */
if( tries < 2 ){
tries++;
goto again1;
}
/* give up */
else{
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server on connect (%s:%s%s)\n",
xclass, name, XPATimestamp());
PERROR(("XPAClientNew"));
return(NULL);
}
}
/* make sure we close on exec */
xfcntl(fd, F_SETFD, FD_CLOEXEC);
FPRINTF((stderr, "%sXPAClientNew: inet connect returns fd %d\n",
_sp, fd));
break;
#if HAVE_SYS_UN_H
case XPA_UNIX:
again2:
/* open a socket and fill in socket information */
if( (fd = xsocket(AF_UNIX, SOCK_STREAM, 0)) < 0 ){
return(NULL);
}
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,
(char *)&keep_alive, sizeof(keep_alive));
memset((char *)&sock_un, 0, sizeof(sock_un));
sock_un.sun_family = AF_UNIX;
strcpy(sock_un.sun_path, method);
/* make the connection with the server */
if( connect(fd, (struct sockaddr *)&sock_un, sizeof(sock_un)) <0 ){
xclose(fd);
/* Unix sockets get ECONNREFUSED when the listen queue is full,
so we try a few times to give the server a chance to recover */
if( (xerrno == ECONNREFUSED) && (tries < XPA_RETRIES) ){
tries++;
XPASleep(10);
goto again2;
}
/* give up */
else{
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server on connect (%s:%s%s)\n",
xclass, name, XPATimestamp());
PERROR(("XPAClientNew"));
return(NULL);
}
}
/* make sure we close on exec */
xfcntl(fd, F_SETFD, FD_CLOEXEC);
FPRINTF((stderr, "%sXPAClientNew: unix connect returns fd %d\n",
_sp, fd));
break;
#endif
default:
return(NULL);
}
strncpy(amethod, method, SZ_LINE-1);
amethod[SZ_LINE-1] = '\0';
}
/* allocate new send record */
if( (xnew=(XPAClient)xcalloc(1, sizeof(XPAClientRec))) == NULL ){
xclose(fd);
return(NULL);
}
/* fill in the blanks */
xnew->xtemplate = xstrdup(xtemplate);
xnew->type = type;
xnew->cmdfd = fd;
xnew->datafd = -1;
xnew->xclass = xstrdup(xclass);
xnew->name = xstrdup(name);
xnew->method = xstrdup(amethod);
xnew->info = xstrdup(info);
xnew->ip = ip;
xnew->nsproxy = nsproxy;
xnew->status = XPA_CLIENT_ACTIVE;
/* now that we have a valid client, add to list */
if( xpa->clienthead == NULL ){
xpa->clienthead = xnew;
}
else{
for(client=xpa->clienthead; client->next!=NULL; client=client->next)
;
client->next = xnew;
}
FPRINTF((stderr, "%sXPAClientNew: new fd %d\n", _sp, xnew->cmdfd));
/* return the good news */
return(xnew);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientAddSelect
*
* Purpose: add one or more xpa client sockets to the select flags
*
* Return: number of clients that were added to the select flags
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAClientAddSelect (XPA xpa, fd_set *readfdsptr, fd_set *writefdsptr)
#else
int XPAClientAddSelect(xpa, readfdsptr, writefdsptr)
XPA xpa;
fd_set *readfdsptr;
fd_set *writefdsptr;
#endif
{
XPAClient client;
int got=0;
int loop=0;
/* better have some place to set the flags */
if( readfdsptr == NULL )
return(0);
/* if no xpa is specified, do them all */
if( xpa == NULL ){
if( xpaclienthead == NULL ) return(0);
xpa = xpaclienthead;
loop = 1;
}
loop:
/* set select flags for all clients */
for(client=xpa->clienthead; client!=NULL; client=client->next){
/* if this client is processing */
if( (client->status == XPA_CLIENT_PROCESSING) && (client->datafd >= 0) ){
if( client->type == 'g' ){
FPRINTF((stderr, "%sXPAClientAddSelect(get): adding fd %d\n", _sp,
client->datafd));
FD_SET(client->datafd, readfdsptr);
got++;
}
else if( client->type == 's' ){
FPRINTF((stderr, "%sXPAClientAddSelect(set): adding fd %d\n", _sp,
client->datafd));
FD_SET(client->datafd, writefdsptr);
got++;
}
}
/* if this client is waiting */
else if( (client->status == XPA_CLIENT_WAITING) && (client->cmdfd >= 0) ){
FPRINTF((stderr, "%sXPAClientAddSelect(waiting): adding fd %d\n", _sp,
client->cmdfd));
FD_SET(client->cmdfd, readfdsptr);
got++;
}
}
/* loop if necessary */
if( loop && (xpa=xpa->next) ) goto loop;
/* return the news */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientGet
*
* Purpose: process an xpaget request for a given client
*
* Return: 0 on success, -1 on failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAClientGet (XPA xpa, XPAClient client)
#else
static int XPAClientGet(xpa, client)
XPA xpa;
XPAClient client;
#endif
{
int status;
char tbuf[SZ_LINE];
/* allocate the first buffer, if necessary */
if( *(client->bufptr) == NULL ){
client->bufsize = XPA_IOSIZE;
*(client->bufptr) = (char *)xmalloc(client->bufsize);
*(client->lenptr) = 0;
}
if( (*(client->lenptr) + XPA_IOSIZE) > client->bufsize ){
client->bufsize += (XPA_IOSIZE*10);
*(client->bufptr) = (char *)xrealloc(*(client->bufptr), client->bufsize);
}
/* now retrieve the data from the server */
status = recv(client->datafd, *(client->bufptr) + *(client->lenptr),
XPA_IOSIZE, 0);
/* status < 0 means error */
switch(status){
/* error */
case -1:
/* socket would block */
if((xerrno == EINPROGRESS) || (xerrno == EWOULDBLOCK)){
return(0);
}
/* clean up after error */
if( *(client->bufptr) ){
xfree(*(client->bufptr));
*(client->bufptr) = NULL;
client->bufsize = 0;
}
*(client->lenptr) = 0;
XPAClientDataSent(xpa, client);
#ifdef OLD
(void)XPAClientEnd(xpa, client);
/* we need to flag some sort of error, if nothing came across */
if( *(client->errptr) == NULL ){
*(client->errptr) = xstrdup(
"XPA$ERROR: incomplete transmission from server\n");
}
#endif
break;
/* eof */
case 0:
/* if we have multiple clients, we now need to write this one */
if( client->mode & XPA_CLIENT_FD ){
if( xpa->nclient > 1 ){
snprintf(tbuf, SZ_LINE, "XPA$BEGIN %s:%s %s\n",
client->xclass, client->name, client->method);
if( write(client->fd, tbuf, strlen(tbuf)) < 0 ){
fprintf(stderr, "warning: XPA client can't write header\n");
}
}
if( write(client->fd, *(client->bufptr), *(client->lenptr)) < 0 ){
fprintf(stderr, "warning: XPA client can't write data\n");
}
if( xpa->nclient > 1 ){
snprintf(tbuf, SZ_LINE, "XPA$END %s:%s %s\n",
client->xclass, client->name, client->method);
if( write(client->fd, tbuf, strlen(tbuf)) < 0 ){
fprintf(stderr, "warning: XPA client can't write header\n");
}
}
/* we can free buf, since its not being passed back */
if( *(client->bufptr) ){
xfree(*(client->bufptr));
*(client->bufptr) = NULL;
client->bufsize = 0;
}
}
else{
/* set final buffer size and put a convenience null at the end */
if( *(client->bufptr) ){
client->bufsize = *(client->lenptr)+1;
*(client->bufptr) = (char *)xrealloc(*(client->bufptr),client->bufsize);
*(*(client->bufptr)+*(client->lenptr)) = '\0';
}
}
/* for all clients, we need to clean up */
XPAClientDataSent(xpa, client);
#ifdef OLD
(void)XPAClientEnd(xpa, client);
#endif
break;
/* status > 0: bytes read */
default:
*(client->lenptr) += status;
/* for single client fd mode, we write immediately -- this deals with
the important case of one client with a large amount of data */
if( (client->mode & XPA_CLIENT_FD) && (xpa->nclient == 1) ){
if( write(client->fd, *(client->bufptr), *(client->lenptr)) < 0 ){
fprintf(stderr, "warning: XPA client can't write data\n");
}
/* reset buf for next read */
if( *(client->bufptr) ) xfree(*(client->bufptr));
*(client->bufptr) = NULL;
*(client->lenptr) = 0;
}
break;
}
return(status);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientSet
*
* Purpose: process an xpaset request for a given client
*
* Return: 0 on success, -1 on failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAClientSet (XPA xpa, XPAClient client)
#else
static int XPAClientSet(xpa, client)
XPA xpa;
XPAClient client;
#endif
{
int status;
int left;
int got;
int len;
XPAInput inp;
if( client->mode & XPA_CLIENT_BUF ){
while( 1 ){
len = MIN(XPA_IOSIZE, client->len - client->bytes);
/* see if we have written it all */
if( len == 0 ){
status = 1;
goto done;
}
/* write the next chunk */
FPRINTF((stderr,
"%sXPAClientSet: fd %d sending %lu bytes (%lu - %lu)\n", _sp,
client->datafd, (unsigned long)len,
(unsigned long)client->len, (unsigned long)client->bytes));
got=send(client->datafd, &(client->buf[client->bytes]), len, 0);
if( got >= 0 ){
client->bytes += got;
if( XPALevelGet() >0 )
return(got);
}
else{
PERROR(("XPAClientSet"));
/* check for error */
if( (xerrno != EWOULDBLOCK) && (xerrno != EAGAIN) ){
status = -1;
goto done;
}
/* write would block, so we return and wait the server */
else{
return(0);
}
}
}
}
/* reading from stdin and writing to servers */
else{
/* find the input buf that contains the data we need */
for(inp=xpa->inphead; inp!=NULL; inp=inp->next){
if( (client->bytes >= inp->start) && (client->bytes < inp->end) ){
break;
}
}
/* if we can't find a buffer ... */
if( !inp ){
/* ... and we have all the input, we are done */
if( xpa->ifd < 0 ){
FPRINTF((stderr, "%sXPAClientSet: all data read\n", _sp));
status = 1;
goto done;
}
/* ... but there is more input to come, return */
else{
return(0);
}
}
/* optimization: don't write a buffer until its full (or until eof) */
if( (xpa->ifd >=0) && (inp->bytes < XPA_BIOSIZE) ){
return(0);
}
/* write bytes until we would block or until end of this buffer, etc */
while( 1 ){
len = MIN(XPA_IOSIZE, inp->end - client->bytes);
FPRINTF((stderr, "%sXPAClientSet: has %lu=min(%d,(%lu-%lu)) [%d]\n",
_sp, (unsigned long)len, XPA_IOSIZE,
(unsigned long)inp->end, (unsigned long)client->bytes,
client->status));
/* if we are done with this buffer, just return */
if( (client->status == XPA_CLIENT_PROCESSING) && (len <=0) ){
/* see if everyone else is done with this buffer as well,
in which case we can free it */
left = 0;
for(client=xpa->clienthead; client!=NULL; client=client->next){
if( (client->type != 's') || !(client->mode & XPA_CLIENT_FD) )
continue;
/* in order to be totally written out, the following must be true:
* 1. send->bytes must be past the end of this buffer
* and
* 2. this buffer must be filled or else we hit eof
*/
FPRINTF((stderr,
"%sXPAClientSet: %lu>=%lu && ((%lu>=%d) or %d<0)) .. ",
_sp, client->bytes, (unsigned long)inp->end,
(unsigned long)inp->bytes, XPA_BIOSIZE,
xpa->ifd));
if( (client->bytes >= inp->end) &&
((inp->bytes >= XPA_BIOSIZE) || (xpa->ifd < 0)) ){
/* buffer complete written */
FPRINTF((stderr, "%sEOF (%lu)\n",
_sp, (unsigned long)xpa->inpbytes));
;
}
else{
FPRINTF((stderr, "%s\n", _sp));
/* buffer not complete written */
left++;
break;
}
}
/* if nothing is left, we can free this input struct */
if( !left ){
XPAClientFreeInput(xpa, inp);
}
return(0);
}
/* write to the server */
FPRINTF((stderr,
"%sXPAClientSet: fd %d sending %lu bytes (%lu):\n", _sp,
client->datafd,
(unsigned long)len, (unsigned long)client->bytes));
got = send(client->datafd, &(inp->buf[client->bytes-inp->start]),len,0);
/* check for success */
if( got >= 0 ){
/* update the number of bytes we wrote */
client->bytes += got;
FPRINTF((stderr, "%sXPAClientSet: sent %lu bytes (total is %lu)\n",
_sp, (unsigned long)got, (unsigned long)client->bytes));
/* go back for more */
if( XPALevelGet() >0 )
return(got);
else
continue;
}
/* check for error */
else{
PERROR(("XPAClientSet"));
/* anything but a "would block" error is bad */
if( (xerrno != EWOULDBLOCK) && (xerrno != EAGAIN) ){
status = -1;
goto done;
}
/* write would block, so we return and wait the server */
else{
FPRINTF((stderr, "%sXPAClientSet: waiting for more data\n", _sp));
return(0);
}
}
}
}
done:
XPAClientDataSent(xpa, client);
#ifdef OLD
(void)XPAClientEnd(xpa, client);
#endif
return(status);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientProcessSelect
*
* Purpose: process xpas that have pending reads or writes
*
* Return: number of xpas processed
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAClientProcessSelect (XPA xpa,
fd_set *readfdsptr, fd_set *writefdsptr, int maxreq)
#else
int XPAClientProcessSelect(xpa, readfdsptr, writefdsptr, maxreq)
XPA xpa;
fd_set *readfdsptr;
fd_set *writefdsptr;
int maxreq;
#endif
{
int got=0;
int loop=0;
XPAClient client;
/* <= 0 means do all of them */
if( maxreq < 0 ){
maxreq = 0;
}
/* if no xpa is specified, do them all */
if( xpa == NULL ){
if( xpaclienthead == NULL ) return(0);
xpa = xpaclienthead;
loop = 1;
}
loop:
/* first process any new input before we write output */
if( xfd_isset_stdin(xpa->ifd, readfdsptr) ){
xfd_clr_stdin(xpa->ifd, readfdsptr);
XPAClientProcessInput(xpa);
}
/* look at all clients */
again:
for(client=xpa->clienthead; client!=NULL; client=client->next){
/* if we are processing */
if( (client->status == XPA_CLIENT_PROCESSING) && (client->datafd>=0) ){
/* then handle new requests */
if((client->type == 'g') && FD_ISSET(client->datafd, readfdsptr)){
FD_CLR(client->datafd, readfdsptr);
XPAClientGet(xpa, client);
got++;
if( maxreq && (got >= maxreq) ) return(got);
goto again;
}
else if((client->type == 's') && FD_ISSET(client->datafd, writefdsptr)){
FD_CLR(client->datafd, writefdsptr);
/* if the return is > 0, we completed the send */
if( XPAClientSet(xpa, client) > 0 )
got++;
if( maxreq && (got >= maxreq) ) return(got);
goto again;
}
}
/* if this client is waiting */
else if( (client->status == XPA_CLIENT_WAITING) && (client->cmdfd >= 0) ){
if( FD_ISSET(client->cmdfd, readfdsptr)){
FD_CLR(client->cmdfd, readfdsptr);
XPAClientEnd(xpa, client);
got++;
if( maxreq && (got >= maxreq) ) return(got);
goto again;
}
}
}
/* loop if necessary */
if( loop && (xpa=xpa->next) ) goto loop;
/* return the news */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientLoop
*
* Purpose: non-X programs event loop for handling XPA client events
*
* Returns: none
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAClientLoop (XPA xpa, int mode)
#else
static int XPAClientLoop(xpa, mode)
XPA xpa;
int mode;
#endif
{
int got=0;
int sgot;
int doxpa=1;
int ltimeout;
char *s=NULL;
fd_set readfds;
fd_set writefds;
static int width=0;
struct timeval tv;
struct timeval *tvp;
/* set width once */
if( width == 0 ){
width = FD_SETSIZE;
}
/* allow environment to turn off xpa server processing in client loop */
if( (s=getenv("XPA_CLIENT_DOXPA")) && isfalse(s) ){
doxpa = 0;
}
ltimeout = XPALongTimeout();
FD_ZERO(&readfds);
FD_ZERO(&writefds);
while( XPAClientAddSelect(xpa, &readfds, &writefds) ){
/* add other XPA's and process them as we process the client */
if( (mode & XPA_CLIENT_SEL_XPA) && doxpa ){
FPRINTF((stderr, "%sXPAClientLoop: will handle server reqs ...\n", _sp));
XPAAddSelect(NULL, &readfds);
}
/* hopefully, a server will respond in a finite amount of time */
if( ltimeout > 0 ){
tv.tv_sec = ltimeout;
tv.tv_usec = 0;
tvp = &tv;
}
/* wait forever, if necessary */
else{
tvp = NULL;
}
/* add stdin to select, if there is one */
if( xpa->ifd >= 0 ){
xfd_set_stdin(xpa->ifd, &readfds);
#if HAVE_MINGW32
/* BUT: for windows, we can't add stdin to select and therefore we
must set a short timeout and look manually */
tv.tv_sec = 0;
tv.tv_usec = 10000;
/* this is the number of window iterations we will perform */
if( ltimeout > 0 )
ltimeout *= 100;
tvp = &tv;
#endif
}
/* wait for a server to respond */
FPRINTF((stderr, "%sXPAClientLoop: waiting on select() ...\n", _sp));
sgot = xselect(width, &readfds, &writefds, NULL, tvp);
FPRINTF((stderr, "%sXPAClientLoop: select returns: %d\n", _sp, sgot));
/* error -- what should we do? */
if( sgot < 0 ){
if( xerrno == EINTR ){
FD_ZERO(&readfds);
FD_ZERO(&writefds);
continue;
}
if( XPAVerbosity() ){
perror("XPAClientLoop() select");
}
exit(1);
}
/* timed out -- no one responded */
else if( sgot == 0 ){
#if HAVE_MINGW32
if( xpa->ifd >= 0 ){
if( ltimeout > 0 ){
if( --ltimeout <= 0 )
break;
}
}
else{
break;
}
#else
break;
#endif
}
else{
got += XPAClientProcessSelect(xpa, &readfds, &writefds, 0);
if( (mode & XPA_CLIENT_SEL_XPA) && doxpa ){
got += XPAProcessSelect(&readfds, 0);
}
}
FD_ZERO(&readfds);
FD_ZERO(&writefds);
}
return(got);
}
#if HAVE_MINGW32==0
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientLoopFork
*
* Purpose: non-X programs forked event loop for handling XPA client events
*
* Returns: number of clients "processed"
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAClientLoopFork (XPA xpa, int mode)
#else
static int XPAClientLoopFork(xpa, mode)
XPA xpa;
int mode;
#endif
{
XPAClient client, tclient;
pid_t pid;
int got;
int fd[2];
char active=1;
#ifndef USE_DOUBLE_FORK
struct sigaction act;
/* set up the signal handler to reap children (to avoid zombies) */
act.sa_handler = sig_chld;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
#ifdef SA_RESTART
act.sa_flags |= SA_RESTART;
#endif
#ifdef SA_NOCLDWAIT
act.sa_flags |= SA_NOCLDWAIT;
#endif
sigaction(SIGCHLD, &act, NULL);
#endif
if( pipe(fd) < 0 ){
got = 0;
}
else if( (pid = fork()) < 0 ){
close(fd[0]);
close(fd[1]);
got=0;
}
else if( pid == 0 ){ /* child */
/* child write to parent that he is active */
close(fd[0]);
if( write(fd[1], &active, 1) >= 0 ){
close(fd[1]);
}
#ifdef USE_DOUBLE_FORK
/* second fork prevents zombies:
when child/parent exits, second child is inherited
by init and thus is not a child of original parent */
if( (pid = fork()) >= 0 ){
/* child/parent exits */
if( pid > 0 )
exit(0);
/* new child goes on under init ... */
}
#endif
/* enter the main loop and process */
XPAIOCallsXPA(0);
XPAClientLoop(xpa, mode);
exit(0);
} else { /* parent */
/* parent waits for child to wake up */
close(fd[1]);
if( read(fd[0], &active, 1) >= 0 ){
close(fd[0]);
}
#ifdef USE_DOUBLE_FORK
/* for double fork, also wait for intermediate process to exit */
waitpid(pid, NULL, 0);
#endif
/* fake end of clients */
for(got=0, client=xpa->clienthead; client!=NULL; ){
got++;
tclient = client->next;
if( (client->status == XPA_CLIENT_PROCESSING) && (client->datafd >=0) ){
#if HAVE_CYGWIN
/* In Cygwin, we call shutdown (as well as close) to avoid Windows
problems. The parent can't do this since the child is using the
sockets, so we just close the sockets explicitly here */
xclose(client->datafd);
client->datafd = -1;
if( !xpa->persist ){
xclose(client->cmdfd);
client->cmdfd = -1;
}
#endif
client->errptr = NULL;
/* remove this client if we are not meant to persist */
if( !xpa->persist ){
XPAClientFree(xpa, client);
}
/* otherwise mark as inactive */
else{
client->status = XPA_CLIENT_IDLE;
client->bytes = 0;
}
}
client = tclient;
}
}
return(got);
}
#endif
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientConnect
*
* Purpose: go to name service and get new names, merge with old,
* and connect to servers
*
* Returns: number of connections
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAClientConnect (XPA xpa, char *mode, char *xtemplate, int type)
#else
static int XPAClientConnect(xpa, mode, xtemplate, type)
XPA xpa;
char *mode;
char *xtemplate;
int type;
#endif
{
int i;
int n;
int got;
int lp=0;
int total=0;
char **xclasses;
char **names;
char **methods;
char **infos;
char xtype[2];
char xmode[SZ_LINE];
char tbuf[SZ_LINE];
char lbuf[SZ_LINE];
XPAClient client;
/* do some initialization */
XPAInitEnv();
/* make sure we have a target */
if( !xtemplate || !*xtemplate )
return(0);
/* make a string out of the type for the lookup */
xtype[0] = type;
xtype[1] = '\0';
/* reset the number of clients we are processing */
xpa->nclient = 0;
/* look for specific proxy info */
*xmode = '\0';
if( mode ){
strncpy(xmode, mode, SZ_LINE-1);
xmode[SZ_LINE-1] = '\0';
}
if( keyword(xmode, "ns", lbuf, SZ_LINE) ){
FPRINTF((stderr, "%sXPAClientConnect: using ns info: %s\n", _sp, lbuf));
newdtable("(),");
xclasses = (char **)xmalloc(sizeof(char *));
names = (char **)xmalloc(sizeof(char *));
methods = (char **)xmalloc(sizeof(char *));
infos = (char **)xmalloc(sizeof(char *));
if( word(lbuf, tbuf, &lp) )
xclasses[0] = xstrdup(tbuf);
if( word(lbuf, tbuf, &lp) )
names[0] = xstrdup(tbuf);
if( word(lbuf, tbuf, &lp) )
methods[0] = xstrdup(tbuf);
infos[0] = xstrdup(XPA_DEF_CLIENT_INFO);
n = 1;
freedtable();
}
/* else ask xpans for access points matching the template */
else{
n = XPANSLookup(xpa,
xtemplate, xtype, &xclasses, &names, &methods, &infos);
}
/* mark existing clients who do not match this template */
for(got=0, client=xpa->clienthead; client !=NULL; client=client->next){
for(i=0; itype == type) &&
(!strcmp(client->xclass, xclasses[i])) &&
(!strcmp(client->name, names[i])) &&
(!strcmp(client->method, methods[i])) &&
(!strcmp(client->info, infos[i])) ){
got++;
}
}
/* don't unmark if its a different type -- someone else might be active */
if( !got && (client->type == type) ){
client->status = XPA_CLIENT_IDLE;
}
}
/* add new clients for this type */
for(i=0; iclienthead; client !=NULL; client=client->next){
if( (client->type == type) &&
(!strcmp(client->xclass, xclasses[i])) &&
(!strcmp(client->name, names[i])) &&
(!strcmp(client->method, methods[i])) &&
(!strcmp(client->info, infos[i])) ){
/* might have to change the template */
if( strcmp(client->xtemplate, xtemplate) ){
xfree(client->xtemplate);
client->xtemplate = xstrdup(xtemplate);
}
client->status = XPA_CLIENT_ACTIVE;
got++;
total++;
FPRINTF((stderr, "%sXPAClientConnect: existing match: %s %s %s\n",
_sp, xclasses[i], names[i], methods[i]));
break;
}
}
if( !got ){
FPRINTF((stderr, "%sXPAClientConnect: calls XPAClientNew for %s:%s %s\n",
_sp, xclasses[i], names[i], methods[i]));
if( XPAClientNew(xpa, mode, xtemplate, type,
xclasses[i], names[i], methods[i], infos[i]) )
total++;
}
/* done with these strings */
xfree(xclasses[i]);
xfree(names[i]);
xfree(methods[i]);
xfree(infos[i]);
}
/* free up arrays alloc'ed by names server */
if( n > 0 ){
xfree(xclasses);
xfree(names);
xfree(methods);
xfree(infos);
}
return(total);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClientStart
*
* Purpose: send init string to server and perform other authentication
* tasks
*
* Returns: 0 if success, -1 otherwise
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAClientStart (XPA xpa, XPAClient client, char *paramlist, char *mode)
#else
static int XPAClientStart(xpa, client, paramlist, mode)
XPA xpa;
XPAClient client;
char *paramlist;
char *mode;
#endif
{
int fd=0;
int lp=0;
int flags;
int tries=0;
int dmode=0;
int keep_alive=1;
unsigned int ip=0;
unsigned short port;
char tbuf[SZ_LINE];
char tbuf2[SZ_LINE];
char lbuf[SZ_LINE];
char *cmd=NULL;
char *method=NULL;
struct sockaddr_in sock_in;
#if HAVE_SYS_UN_H
struct sockaddr_un sock_un;
#endif
switch(client->type){
case 'a':
cmd = "xpaaccess";
break;
case 'g':
cmd = "xpaget";
break;
case 'i':
cmd = "xpainfo";
break;
case 's':
cmd = "xpaset";
break;
}
/* get mode flags */
XPAMode(mode, &(client->mode), "ack", XPA_CLIENT_ACK, 1);
if( client->type == 's' )
XPAMode(mode, &(xpa->client_mode), "verify", XPA_CLIENT_VERIFY, 0);
/* package up and send the initialization message */
strcpy(lbuf, cmd);
/* set and save the id value */
snprintf(tbuf, SZ_LINE, "%c%d", client->type, id++);
if( client->id ) xfree(client->id);
client->id = xstrdup(tbuf);
/* if we are using the xpans proxy, we will want to call
accept() (server calls connect()) for the data channel */
if( client->nsproxy )
strcat(lbuf, " -a");
/* set the value of the client big-endian-ness */
snprintf(tbuf, SZ_LINE, " -e %s", XPAEndian() ? "big" : "little");
strcat(lbuf, tbuf);
snprintf(tbuf, SZ_LINE, " -i %s", client->id);
strcat(lbuf, tbuf);
if( !(client->mode & XPA_CLIENT_ACK) )
strcat(lbuf, " -n");
if( strcmp(client->info, XPA_DEF_CLIENT_INFO) ){
snprintf(tbuf, SZ_LINE, " -p %s", client->info);
strcat(lbuf, tbuf);
}
snprintf(tbuf, SZ_LINE, " %s:%s", client->xclass, client->name);
strcat(lbuf, tbuf);
if( paramlist && *paramlist ){
strcat(lbuf, " ");
strncat(lbuf, paramlist, MAX(0,(int)(SZ_LINE-(int)strlen(lbuf)-2)));
}
strcat(lbuf, "\n");
FPRINTF((stderr, "%sXPAClientStart: fd %d sends:\n%s",
_sp, client->cmdfd, lbuf));
if( XPAPuts(NULL, client->cmdfd, lbuf, XPAShortTimeout()) <= 0 ){
goto error;
}
/* if xpainfo and no ack'ing, we are basically done */
if( (client->type == 'i') && !(client->mode & XPA_CLIENT_ACK) ){
goto done;
}
/* authentication */
retry:
lp = 0;
if( XPAGets(NULL, client->cmdfd, lbuf, SZ_LINE, XPAShortTimeout()) >0 ){
FPRINTF((stderr, "%sXPAClientStart: fd %d received cmd:\n%s", _sp,
client->cmdfd, lbuf));
/* this should never happen */
if( !word(lbuf, tbuf, &lp) || (*tbuf == '?') ){
snprintf(errbuf, SZ_LINE,
"XPA$WARNING: Protocol mismatch: id\n%s", lbuf);
goto error;
}
/* make sure we are dealing with a proper message */
if( strcmp(tbuf, client->id) ){
FPRINTF((stderr, "%sXPA$WARNING: ignoring out of sync message:\n", _sp));
FPRINTF((stderr, "%s", lbuf));
if( XPAVerbosity() > 1 ){
fprintf(stderr, "XPA$WARNING: ignoring out of sync server message:\n");
fprintf(stderr, "%s", lbuf);
}
goto retry;
}
/* this should never happen */
if( !word(lbuf, tbuf, &lp) ){
snprintf(errbuf, SZ_LINE, "XPA$WARNING: missing BUF request\n%s", lbuf);
goto error;
}
if( !strcmp(tbuf, "XPA$NODATA") || !strcmp(tbuf, "XPA$NOBUF") ){
xpa->nclient += 1;
goto started;
}
/* support 2.2 (DATA) and 2.0,2.1 (BUF) */
else if( !strcmp(tbuf, "XPA$DATA") || !strcmp(tbuf, "XPA$BUF") ){
if( !strcmp(tbuf, "XPA$DATA") ){
dmode |= DATA_DATA;
if( !word(lbuf, tbuf, &lp) ){
snprintf(errbuf, SZ_LINE,
"XPA$WARNING: missing DATA request type\n%s", lbuf);
goto error;
}
if( !strcmp(tbuf, "connect") ){
method = client->method;
dmode |= DATA_CONNECT;
}
else if( !strcmp(tbuf, "accept") ){
method = client->method;
dmode |= DATA_ACCEPT;
}
else{
snprintf(errbuf, SZ_LINE,
"XPA$WARNING: invalid data connection request: %s (%s:%s)\n",
tbuf, client->xclass, client->name);
goto error;
}
}
else if( !strcmp(tbuf, "XPA$BUF") ){
if( !word(lbuf, tbuf, &lp) ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: missing data buffer method (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
goto error;
}
method = tbuf;
dmode |= DATA_CONNECT;
}
/* handle connect-type requests */
if( dmode & DATA_CONNECT ){
switch(XPAMethod(method)){
case XPA_INET:
XPAParseIpPort(method, &ip, &port);
/* connect to the server before we go further */
if( (fd = xsocket(AF_INET, SOCK_STREAM, 0)) < 0 ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: bad socket for data chan (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
if( XPAVerbosity() ){
perror("XPA client socket");
}
goto error;
}
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,
(char *)&keep_alive, sizeof(keep_alive));
memset((char *)&sock_in, 0, sizeof(sock_in));
sock_in.sin_family = AF_INET;
/* connect using the same ip we used for the command channel
(i.e., could be localhost) */
sock_in.sin_addr.s_addr = htonl(client->ip);
sock_in.sin_port = htons(port);
FPRINTF((stderr,
"%sXPAClientStart: attempting dchan connect: %s\n",
_sp, method));
if( connect(fd, (struct sockaddr *)&sock_in, sizeof(sock_in)) < 0 ){
PERROR(("dchan connect"));
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: can't connect to data chan (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
if( XPAVerbosity() ){
perror("XPA client connect");
}
xclose(fd);
goto error;
}
break;
#if HAVE_SYS_UN_H
case XPA_UNIX:
again:
/* open a socket and fill in socket information */
if( (fd = xsocket(AF_UNIX, SOCK_STREAM, 0)) < 0 ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: bad socket for data chan (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
if( XPAVerbosity() ){
perror("XPA client socket");
}
goto error;
}
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,
(char *)&keep_alive, sizeof(keep_alive));
memset((char *)&sock_un, 0, sizeof(sock_un));
sock_un.sun_family = AF_UNIX;
strcpy(sock_un.sun_path, method);
FPRINTF((stderr,
"%sXPAClientStart: attempting dchan connect: %s\n",
_sp, method));
if( connect(fd, (struct sockaddr *)&sock_un, sizeof(sock_un)) < 0 ){
PERROR(("dchan connect"));
xclose(fd);
if( (xerrno == ECONNREFUSED) && (tries < XPA_RETRIES) ){
tries++;
xclose(fd);
XPASleep(10);
goto again;
}
/* give up */
else{
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: can't connect to data chan (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
if( XPAVerbosity() ){
perror("XPA client connect");
}
goto error;
}
}
break;
#endif
default:
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: unknown connection method (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
goto error;
}
}
/* handle "doaccept" requests */
else if( dmode & DATA_ACCEPT ){
fd = XPAProxyAccept(xpa, XPANSMethod(NULL,2),
client->xclass, client->name, client->cmdfd,
NULL, NULL, tbuf2);
if( fd < 0 ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: can't connect to proxy server (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
goto error;
}
else if( *tbuf2 ){
client->dataname = xstrdup(tbuf2);
}
}
/* common code for either type of data connect request */
client->datafd = fd;
/* make sure we close on exec */
xfcntl(client->datafd, F_SETFD, FD_CLOEXEC);
/* for senders, set to no block mode */
if( client->type == 's' ){
/* save state and set in non-blocking mode */
xfcntl_nonblock(client->datafd, flags);
}
xpa->nclient += 1;
goto started;
}
/* handle error message */
else if( !strcmp(tbuf, "XPA$ERROR") ){
snprintf(errbuf, SZ_LINE, "%s", &lbuf[lp]);
goto error;
}
/* everything else is an error */
else{
snprintf(errbuf, SZ_LINE, "%s", &lbuf[lp]);
goto error;
}
}
else{
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server during handshake (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
goto error;
}
error:
FPRINTF((stderr, "Error in XPAClientStart: %s", errbuf));
XPAClientFree(xpa, client);
return(-1);
started:
/* it is necessary to add this this extra hack/ack between the
authentication ack and the error return (both from the server)
to avoid getting Nagle buffered. if we already did an accept,
however, we already sent a message and need not repeat it */
if( !(dmode & DATA_ACCEPT) ){
FPRINTF((stderr, "%sXPAClientStart: %d sending nagle\n",
_sp, client->cmdfd));
XPAPuts(NULL, client->cmdfd, "xpanagle\n", XPAShortTimeout());
}
/* write a "data request" to the server on the data channel, supplying
the arguments to allow the server to find the associated command */
if( dmode & DATA_DATA ){
if( !word(lbuf, tbuf, &lp) )
strcpy(tbuf, "?");
if( !word(lbuf, tbuf2, &lp) )
strcpy(tbuf2, "?");
snprintf(lbuf, SZ_LINE, "xpadata -f %s %s\n", tbuf, tbuf2);
FPRINTF((stderr,
"%sXPAClientStart: sending data channel %d request: %s", _sp,
client->datafd, lbuf));
if( XPAPuts(NULL, client->datafd, lbuf, XPAShortTimeout()) <0 ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: unable to issue data request: %s (%s:%s%s)\n",
lbuf, client->xclass, client->name, XPATimestamp());
FPRINTF((stderr, "%sXPAClientStart: error returned is %s", _sp, errbuf));
goto error;
}
}
done:
/* mark as active and started */
client->status = XPA_CLIENT_PROCESSING;
return(0);
}
/*
*----------------------------------------------------------------------------
*
*
* Public Routines
*
*
*----------------------------------------------------------------------------
*/
/*
*---------------------------------------------------------------------------
*
* Routine: XPAClientValid
*
* Purpose: see if the xpa client struct is valid
*
* Results: 1 on success, 0 for failure
*
*---------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAClientValid (XPA xpa)
#else
int XPAClientValid(xpa)
XPA xpa;
#endif
{
return(_XPAValid(xpaclienthead, xpa, "c"));
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAOpen
*
* Purpose: open a persistent XPA client connection
*
* Returns: XPA struct on success
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
XPA
XPAOpen (char *mode)
#else
XPA XPAOpen(mode)
char *mode;
#endif
{
XPA xpa;
/* allocate xpa struct */
if( (xpa = (XPA)xcalloc(1, sizeof(XPARec))) == NULL )
return(NULL);
/* add version */
xpa->version = xstrdup(XPA_VERSION);
/* mark this as a client struct */
xpa->type = xstrdup("c");
/* mark as persistent so we don't destroy at the end of the transfer */
xpa->persist = 1;
/* add this xpa to end of list of client xpas */
XPAListAdd(&xpaclienthead, xpa);
return(xpa);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAClose
*
* Purpose: close a persistent XPA client connection
*
* Returns: none
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
void
XPAClose (XPA xpa)
#else
void XPAClose(xpa)
XPA xpa;
#endif
{
XPAClient client, tclient;
NS ns, tns;
/* ignore struct if its not a client struct */
if( !XPAClientValid(xpa) )
return;
/* remove from list of client xpas */
XPAListDel(&xpaclienthead, xpa);
/* free each remaining client */
for(client=xpa->clienthead; client!=NULL; ){
tclient = client->next;
XPAClientFree(xpa, client);
client = tclient;
}
/* close down the name server and all of the remotes for this xpa */
for(ns=xpa->nshead; ns!=NULL; ){
tns = ns->next;
XPANSClose(xpa, ns);
ns = tns;
}
/* free string space */
if( xpa->version )
xfree(xpa->version);
if( xpa->type )
xfree(xpa->type);
if( xpa )
xfree(xpa);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAGet
*
* Purpose: get XPA values
*
* Returns: 0 for success, -1 for failure
* len bytes of data returned in buf
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAGet (XPA xpa, char *xtemplate, char *paramlist, char *mode,
char **bufs, size_t *lens, char **names, char **messages, int n)
#else
int XPAGet(xpa, xtemplate, paramlist, mode, bufs, lens, names, messages, n)
XPA xpa;
char *xtemplate;
char *paramlist;
char *mode;
char **bufs;
size_t *lens;
char **names;
char **messages;
int n;
#endif
{
int i;
int oldmode=0;
int xmode=0;
int type='g';
int idef=1;
int got=0;
char tbuf[SZ_LINE];
XPAClient client, tclient;
FPRINTF((stderr, "%sXPAGet: starting\n", _sp));
/* if not persistent, we need a temp xpa struct;
(also ignore passed struct if its not a client struct) */
if( (xpa == NULL) || strcmp(xpa->type, "c") ){
if( (xpa = XPAOpen(NULL)) == NULL )
return(-1);
/* mark this as not persistent */
xpa->persist = 0;
}
/* save xpa mode -- this call might override */
else{
/* make sure we have a valid client handle */
if( !XPAClientValid(xpa) ){
if( XPAVerbosity() ){
fprintf(stderr, "XPA$ERROR: invalid xpa client handle\n");
}
return(-1);
}
oldmode = xpa->client_mode;
}
/* these arrays are required */
if( (bufs == NULL) || (lens == NULL) ){
got = -1;
goto done;
}
/* flag that we don't read from stdin */
xpa->ifd = -1;
/* zero out the return buffers */
memset((char *)bufs, 0, ABS(n)*sizeof(char *));
memset((char *)lens, 0, ABS(n)*sizeof(size_t));
if( names != NULL )
memset((char *)names, 0, ABS(n)*sizeof(char *));
if( messages != NULL )
memset((char *)messages, 0, ABS(n)*sizeof(char *));
/* connect to clients and grab data */
if( XPAClientConnect(xpa, mode, xtemplate, type) >0 ){
/* retrieve data from n active clients */
for(client=xpa->clienthead; client!=NULL; ){
tclient = client->next;
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(gotxclass, client->name, client->method);
names[got] = xstrdup(tbuf);
}
if( XPAClientStart(xpa, client, paramlist, mode) >=0 ){
/* we fill buffers */
client->mode |= XPA_CLIENT_BUF;
client->bufptr = &(bufs[got]);
client->lenptr = &(lens[got]);
if( names != NULL )
client->nameptr = &(names[got]);
if( messages != NULL )
client->errptr = &(messages[got]);
}
else{
if( messages != NULL )
messages[got] = xstrdup(errbuf);
}
got++;
}
client = tclient;
}
/* if we have active clients */
if( got ){
#if HAVE_MINGW32==0
/* check for loop modes */
XPAMode(mode, &xmode, "dofork", XPA_CLIENT_SEL_FORK, 0);
/* dofork implies don't do xpa */
if( xmode & XPA_CLIENT_SEL_FORK )
idef = 0;
XPAMode(mode, &xmode, "doxpa", XPA_CLIENT_SEL_XPA, idef);
if( xmode & XPA_CLIENT_SEL_FORK ){
XPAClientLoopFork(xpa, xmode);
}
else{
/* enter the main loop and process */
XPAClientLoop(xpa, xmode);
}
#else
XPAMode(mode, &xmode, "doxpa", XPA_CLIENT_SEL_XPA, idef);
XPAClientLoop(xpa, xmode);
#endif
}
}
done:
/* look for clients who timed out */
for(i=0, client=xpa->clienthead; client!=NULL; client=client->next){
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(istatus == XPA_CLIENT_PROCESSING) && ( messages != NULL) ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server callback (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
messages[i] = xstrdup(errbuf);
}
}
}
/* remove this xpa if we are not meant to persist */
if( xpa && !xpa->persist )
XPAClose(xpa);
/* restore xpa mode -- this call might override */
else
xpa->client_mode = oldmode;
/* return number of clients processes (including errors) */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAGetFd
*
* Purpose: get XPA values
*
* Returns: 0 for success, -1 for failure
* len bytes of data returned in buf
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAGetFd (XPA xpa, char *xtemplate, char *paramlist, char *mode,
int *fds, char **names, char **messages, int n)
#else
int XPAGetFd(xpa, xtemplate, paramlist, mode, fds, names, messages, n)
XPA xpa;
char *xtemplate;
char *paramlist;
int *fds;
char *mode;
char **names;
char **messages;
int n;
#endif
{
int i;
int oldmode=0;
int xmode=0;
int got=0;
int type='g';
int idef=1;
char tbuf[SZ_LINE];
XPAClient client, tclient;
FPRINTF((stderr, "%sXPAGetFd: starting\n", _sp));
/* if not persistent, we need a temp xpa struct;
(also ignore passed struct if its not a client struct) */
if( (xpa == NULL) || strcmp(xpa->type, "c") ){
if( (xpa = XPAOpen(NULL)) == NULL )
return(-1);
/* mark this as not persistent */
xpa->persist = 0;
}
/* save xpa mode -- this call might override */
else{
/* make sure we have a valid client handle */
if( !XPAClientValid(xpa) ){
if( XPAVerbosity() ){
fprintf(stderr, "XPA$ERROR: invalid xpa client handle\n");
}
return(-1);
}
oldmode = xpa->client_mode;
}
/* flag that we don't read from stdin */
xpa->ifd = -1;
/* zero out the return buffers */
if( names != NULL )
memset((char *)names, 0, ABS(n)*sizeof(char *));
if( messages != NULL )
memset((char *)messages, 0, ABS(n)*sizeof(char *));
/* connect to clients and grab data */
if( XPAClientConnect(xpa, mode, xtemplate, type) > 0 ){
/* retrieve data from n active clients */
for(client=xpa->clienthead; client!=NULL; ){
tclient = client->next;
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(gotxclass, client->name, client->method);
names[got] = xstrdup(tbuf);
}
if( XPAClientStart(xpa, client, paramlist, mode) >= 0 ){
/* we write to an fd */
client->mode |= XPA_CLIENT_FD;
/* negative value => one channel for all clients */
if( n < 0 )
client->fd = fds[0];
else
client->fd = fds[got];
client->bufptr = (char **)xcalloc(1, sizeof(char *));
client->lenptr = (size_t *)xcalloc(1, sizeof(size_t));
if( names != NULL )
client->nameptr = &(names[got]);
if( messages != NULL )
client->errptr = &(messages[got]);
}
else{
if( messages != NULL )
messages[got] = xstrdup(errbuf);
}
got++;
}
client = tclient;
}
/* if we have active clients */
if( got ){
#if HAVE_MINGW32==0
/* check for loop modes */
XPAMode(mode, &xmode, "dofork", XPA_CLIENT_SEL_FORK, 0);
/* dofork implies don't do xpa */
if( xmode & XPA_CLIENT_SEL_FORK )
idef = 0;
XPAMode(mode, &xmode, "doxpa", XPA_CLIENT_SEL_XPA, idef);
if( xmode & XPA_CLIENT_SEL_FORK ){
XPAClientLoopFork(xpa, xmode);
}
else{
/* enter the main loop and process */
XPAClientLoop(xpa, xmode);
}
#else
XPAMode(mode, &xmode, "doxpa", XPA_CLIENT_SEL_XPA, idef);
XPAClientLoop(xpa, xmode);
#endif
}
}
/* look for clients who timed out */
for(i=0, client=xpa->clienthead; client!=NULL; client=client->next){
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(istatus == XPA_CLIENT_PROCESSING) && ( messages != NULL) ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server callback (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
messages[i] = xstrdup(errbuf);
}
}
}
/* remove this xpa if we are not meant to persist */
if( xpa && !xpa->persist )
XPAClose(xpa);
/* restore xpa mode -- this call might override */
else
xpa->client_mode = oldmode;
/* return number of clients processes (including errors) */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPASet
*
* Purpose: set XPA values
*
* Returns: 0 for success, -1 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPASet (XPA xpa, char *xtemplate, char *paramlist, char *mode,
char *buf, size_t len, char **names, char **messages, int n)
#else
int XPASet(xpa, xtemplate, paramlist, mode, buf, len, names, messages, n)
XPA xpa;
char *xtemplate;
char *paramlist;
char *mode;
char *buf;
size_t len;
char **names;
char **messages;
int n;
#endif
{
int i;
int oldmode=0;
int xmode=0;
int got=0;
int type='s';
int idef=1;
char tbuf[SZ_LINE];
XPAClient client, tclient;
FPRINTF((stderr, "%sXPASet: starting\n", _sp));
/* if not persistent, we need a temp xpa struct;
(also ignore passed struct if its not a client struct) */
if( (xpa == NULL) || strcmp(xpa->type, "c") ){
if( (xpa = XPAOpen(NULL)) == NULL )
return(-1);
/* mark this as not persistent */
xpa->persist = 0;
}
/* save xpa mode -- this call might override */
else{
/* make sure we have a valid client handle */
if( !XPAClientValid(xpa) ){
if( XPAVerbosity() ){
fprintf(stderr, "XPA$ERROR: invalid xpa client handle\n");
}
return(-1);
}
oldmode = xpa->client_mode;
}
/* flag that we don't read from stdin */
xpa->ifd = -1;
/* zero out the return buffers */
if( names != NULL )
memset((char *)names, 0, ABS(n)*sizeof(char *));
if( messages != NULL )
memset((char *)messages, 0, ABS(n)*sizeof(char *));
/* connect to clients and grab data */
if( XPAClientConnect(xpa, mode, xtemplate, type) >0 ){
/* retrieve data from n active clients */
for(client=xpa->clienthead; client!=NULL; ){
tclient = client->next;
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(gotxclass, client->name, client->method);
names[got] = xstrdup(tbuf);
}
if( XPAClientStart(xpa, client, paramlist, mode) >= 0 ){
/* we fill buffers */
client->mode |= XPA_CLIENT_BUF;
client->buf = buf;
client->len = len;
if( names != NULL )
client->nameptr = &(names[got]);
if( messages != NULL )
client->errptr = &(messages[got]);
}
else{
if( messages != NULL )
messages[got] = xstrdup(errbuf);
}
got++;
}
client = tclient;
}
/* if we have active clients */
if( got ){
#if HAVE_MINGW32==0
/* check for loop modes */
XPAMode(mode, &xmode, "dofork", XPA_CLIENT_SEL_FORK, 0);
/* dofork implies don't do xpa */
if( xmode & XPA_CLIENT_SEL_FORK )
idef = 0;
XPAMode(mode, &xmode, "doxpa", XPA_CLIENT_SEL_XPA, idef);
if( xmode & XPA_CLIENT_SEL_FORK ){
XPAClientLoopFork(xpa, xmode);
}
else{
/* enter the main loop and process */
XPAClientLoop(xpa, xmode);
}
#else
XPAMode(mode, &xmode, "doxpa", XPA_CLIENT_SEL_XPA, idef);
XPAClientLoop(xpa, xmode);
#endif
}
}
/* look for clients who timed out */
for(i=0, client=xpa->clienthead; client!=NULL; client=client->next){
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(istatus == XPA_CLIENT_PROCESSING) && ( messages != NULL) ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server callback (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
messages[i] = xstrdup(errbuf);
}
}
}
/* remove this xpa if we are not meant to persist */
if( xpa && !xpa->persist )
XPAClose(xpa);
/* restore xpa mode -- this call might override */
else
xpa->client_mode = oldmode;
/* return number of clients processes (including errors) */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPASetFd
*
* Purpose: set XPA values
*
* Returns: 0 for success, -1 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPASetFd (XPA xpa, char *xtemplate, char *paramlist, char *mode,
int fd, char **names, char **messages, int n)
#else
int XPASetFd(xpa, xtemplate, paramlist, mode, fd, names, messages, n)
XPA xpa;
char *xtemplate;
char *paramlist;
char *mode;
int fd;
char **names;
char **messages;
int n;
#endif
{
int i;
int oldmode=0;
int xmode=0;
int got=0;
int got2=0;
int type='s';
int idef=1;
int flags=0;
char *s;
char tbuf[SZ_LINE];
XPAClient client, tclient;
FPRINTF((stderr, "%sXPASetFd: starting\n", _sp));
/* if not persistent, we need a temp xpa struct;
(also ignore passed struct if its not a client struct) */
if( (xpa == NULL) || strcmp(xpa->type, "c") ){
if( (xpa = XPAOpen(NULL)) == NULL )
return(-1);
/* mark this as not persistent */
xpa->persist = 0;
}
/* save xpa mode -- this call might override */
else{
/* make sure we have a valid client handle */
if( !XPAClientValid(xpa) ){
if( XPAVerbosity() ){
fprintf(stderr, "XPA$ERROR: invalid xpa client handle\n");
}
return(-1);
}
oldmode = xpa->client_mode;
}
/* Set non-blocking mode for the input fd, if its not a tty */
xpa->ifd = fd;
if( isatty(xpa->ifd) == 0 ){
/* save state and set in non-blocking mode */
xfcntl_nonblock(xpa->ifd, flags);
}
/* zero out the return buffers */
if( names != NULL )
memset((char *)names, 0, ABS(n)*sizeof(char *));
if( messages != NULL )
memset((char *)messages, 0, ABS(n)*sizeof(char *));
/* connect to clients and grab data */
if( XPAClientConnect(xpa, mode, xtemplate, type) >0 ){
/* open clients all at once */
for(client=xpa->clienthead; client!=NULL; ){
tclient = client->next;
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(gotxclass, client->name, client->method);
names[got] = xstrdup(tbuf);
}
if( XPAClientStart(xpa, client, paramlist, mode) >= 0 ){
/* we fill buffers */
client->mode |= XPA_CLIENT_FD;
if( names != NULL )
client->nameptr = &(names[got]);
if( messages != NULL )
client->errptr = &(messages[got]);
}
else{
if( messages != NULL )
messages[got] = xstrdup(errbuf);
}
got++;
}
client = tclient;
}
/* if we have active clients */
if( got ){
/* if fd is null, user did not want to send data, just the paramlist */
if( fd < 0 ){
for(client=xpa->clienthead; client!=NULL; ){
tclient = client->next;
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(gotclienthead; client!=NULL; client=client->next){
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(istatus == XPA_CLIENT_PROCESSING) && ( messages != NULL) ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server callback (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
messages[i] = xstrdup(errbuf);
}
}
}
/* reset flags, if necessary */
if( xpa->ifd >=0 && (isatty(xpa->ifd) ==0) ){
xfcntl(xpa->ifd, F_SETFL, flags);
}
/* free all input structs */
XPAClientFreeAllInputs(xpa);
/* remove this xpa if we are not meant to persist */
if( xpa && !xpa->persist )
XPAClose(xpa);
/* restore xpa mode -- this call might override */
else
xpa->client_mode = oldmode;
/* return number of clients processes (including errors) */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAInfo
*
* Purpose: send XPA info
*
* Returns: 0 for success, -1 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAInfo (XPA xpa, char *xtemplate, char *paramlist, char *mode,
char **names, char **messages, int n)
#else
int XPAInfo(xpa, xtemplate, paramlist, mode, names, messages, n)
XPA xpa;
char *xtemplate;
char *paramlist;
char *mode;
char **names;
char **messages;
int n;
#endif
{
int i;
int oldmode=0;
int got=0;
char type='i';
char *s;
char tbuf[SZ_LINE];
XPAClient client, tclient;
/* if not persistent, we need a temp xpa struct;
(also ignore passed struct if its not a client struct) */
if( (xpa == NULL) || strcmp(xpa->type, "c") ){
if( (xpa = XPAOpen(NULL)) == NULL )
return(-1);
/* mark this as not persistent */
xpa->persist = 0;
}
/* save xpa mode -- this call might override */
else{
/* make sure we have a valid client handle */
if( !XPAClientValid(xpa) ){
if( XPAVerbosity() ){
fprintf(stderr, "XPA$ERROR: invalid xpa client handle\n");
}
return(-1);
}
oldmode = xpa->client_mode;
}
/* flag that we don't read from stdin */
xpa->ifd = -1;
/* zero out the return buffers */
if( names != NULL )
memset((char *)names, 0, ABS(n)*sizeof(char *));
if( messages != NULL )
memset((char *)messages, 0, ABS(n)*sizeof(char *));
/* connect to clients and grab data */
if( XPAClientConnect(xpa, mode, xtemplate, type) >0 ){
/* retrieve data from n active clients */
for(client=xpa->clienthead; client!=NULL; ){
tclient = client->next;
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(gotxclass, client->name, client->method);
names[got] = xstrdup(tbuf);
}
if( XPAClientStart(xpa, client, paramlist, mode) >= 0 ){
XPAClientDataSent(xpa, client);
s = XPAClientEnd(xpa, client);
if( (messages != NULL) && (messages[got] == NULL) )
messages[got] = xstrdup(s);
}
else{
if( (messages != NULL) && (messages[got] == NULL) )
messages[got] = xstrdup(errbuf);
}
got++;
}
client = tclient;
}
}
/* look for clients who timed out */
for(i=0, client=xpa->clienthead; client!=NULL; client=client->next){
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(istatus == XPA_CLIENT_PROCESSING) && ( messages != NULL) ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server callback (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
messages[i] = xstrdup(errbuf);
}
}
}
/* remove this xpa if we are not meant to persist */
if( xpa && !xpa->persist )
XPAClose(xpa);
/* restore xpa mode -- this call might override */
else
xpa->client_mode = oldmode;
/* return number of clients processes (including errors) */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAAccess
*
* Purpose: determine if XPA access point is available
*
* Returns: 0 for success, -1 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAAccess (XPA xpa, char *xtemplate, char *paramlist, char *mode,
char **names, char **messages, int n)
#else
int XPAAccess(xpa, xtemplate, paramlist, mode, names, messages, n)
XPA xpa;
char *xtemplate;
char *paramlist;
char *mode;
char **names;
char **messages;
int n;
#endif
{
int i;
int oldmode=0;
int xmode=0;
int got=0;
int type='a';
char *s;
char *ind1, *ind2;
char tbuf[SZ_LINE];
XPAClient client, tclient;
/* if not persistent, we need a temp xpa struct;
(also ignore passed struct if its not a client struct) */
if( (xpa == NULL) || strcmp(xpa->type, "c") ){
if( (xpa = XPAOpen(NULL)) == NULL )
return(-1);
/* mark this as not persistent */
xpa->persist = 0;
}
/* save xpa mode -- this call might override */
else{
/* make sure we have a valid client handle */
if( !XPAClientValid(xpa) ){
if( XPAVerbosity() ){
fprintf(stderr, "XPA$ERROR: invalid xpa client handle\n");
}
return(-1);
}
oldmode = xpa->client_mode;
}
/* flag that we don't read from stdin */
xpa->ifd = -1;
/* zero out the return buffers */
if( names != NULL )
memset((char *)names, 0, ABS(n)*sizeof(char *));
if( messages != NULL )
memset((char *)messages, 0, ABS(n)*sizeof(char *));
/* connect to clients and grab data */
if( XPAClientConnect(xpa, mode, xtemplate, type) >0 ){
/* retrieve data from n active clients */
for(client=xpa->clienthead; client!=NULL; ){
tclient = client->next;
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(gotxclass, client->name, client->method);
names[got] = xstrdup(tbuf);
}
if( XPAClientStart(xpa, client, paramlist, mode) >=0 ){
XPAClientDataSent(xpa, client);
s = XPAClientEnd(xpa, client);
if( (messages != NULL) && (messages[got] == NULL) )
messages[got] = xstrdup(s);
}
else{
if( (messages != NULL) && (messages[got] == NULL) )
messages[got] = xstrdup(errbuf);
}
/* might have to fix the name if was an explicit mach:port */
if( names && names[got] && *errbuf &&
!strncmp(names[got], "?:?", 3) &&
(ind1=strrchr(errbuf, '(')) && (ind2=strrchr(errbuf, ')')) ){
ind1++;
strncpy(tbuf, ind1, ind2-ind1);
tbuf[ind2-ind1] = '\0';
xfree(names[got]);
names[got] = xstrdup(tbuf);
}
got++;
}
client = tclient;
}
/* if we have active clients */
if( got ){
/* check for loop modes */
XPAMode(mode, &xmode, "doxpa", XPA_CLIENT_SEL_XPA, 1);
/* enter the main loop and process */
XPAClientLoop(xpa, xmode);
}
}
/* look for clients who timed out */
for(i=0, client=xpa->clienthead; client!=NULL; client=client->next){
if( (client->type == type) && (client->status != XPA_CLIENT_IDLE) &&
(istatus == XPA_CLIENT_PROCESSING) && ( messages != NULL) ){
snprintf(errbuf, SZ_LINE,
"XPA$ERROR: no response from server callback (%s:%s%s)\n",
client->xclass, client->name, XPATimestamp());
messages[i] = xstrdup(errbuf);
}
}
}
/* remove this xpa if we are not meant to persist */
if( xpa && !xpa->persist )
XPAClose(xpa);
/* restore xpa mode -- this call might override */
else
xpa->client_mode = oldmode;
/* return number of clients processes (including errors) */
return(got);
}
imexam-0.9.1/cextern/xpa/clipboard.c 0000644 0006325 0002007 00000014776 13640457670 021135 0 ustar sosey STSCI\science 0000000 0000000 /*
* Copyright (c) 1999-2003 Smithsonian Astrophysical Observatory
*/
/*
*
* remote.c -- xpa access control list management
*
*/
#include
/*
*----------------------------------------------------------------------------
*
*
* Private Routines
*
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static XPAClip
ClipBoardNew(XPA xpa, char *name)
#else
static XPAClip ClipBoardNew(xpa, name)
XPA xpa;
char *name;
#endif
{
XPAClip cur, xnew;
if( (xnew = (XPAClip)xcalloc(1, sizeof(XPAClipRec))) == NULL )
return(NULL);
/* fill in record structure */
xnew->name = xstrdup(name);
xnew->ip = xpa->comm->cmdip;
/* add to the end of list */
if( xpa->cliphead == NULL ){
xpa->cliphead = xnew;
}
else{
for(cur=xpa->cliphead; cur->next!=NULL; cur=cur->next){
;
}
cur->next = xnew;
}
return xnew;
}
#ifdef ANSI_FUNC
static XPAClip
ClipBoardLookup(XPA xpa, char *name)
#else
static XPAClip ClipBoardLookup(xpa, name)
XPA xpa;
char *name;
#endif
{
XPAClip cur;
/* look for reserved keywords that have callbacks */
for(cur=xpa->cliphead; cur!=NULL; cur=cur->next){
if( !strcmp(name, cur->name) && (xpa->comm->cmdip == cur->ip) ){
return(cur);
}
}
return NULL;
}
#ifdef ANSI_FUNC
static int
ClipBoardAdd(XPA xpa, char *name, char *paramlist, char *buf)
#else
static int
ClipBoardAdd(xpa, name, paramlist, buf)
XPA xpa;
char *name;
char *paramlist;
char *buf;
#endif
{
XPAClip cur;
if( !(cur = ClipBoardLookup(xpa, name)) )
cur = ClipBoardNew(xpa, name);
if( !cur )
return -1;
if( cur->value )
xfree(cur->value);
cur->value = xstrdup(buf);
return 0;
}
#ifdef ANSI_FUNC
static int
ClipBoardAppend(XPA xpa, char *name, char *paramlist, char *buf)
#else
static int
ClipBoardAppend(xpa, name, paramlist, buf)
XPA xpa;
char *name;
char *paramlist;
char *buf;
#endif
{
XPAClip cur;
if( !(cur = ClipBoardLookup(xpa, name)) )
cur = ClipBoardNew(xpa, name);
if( !cur )
return -1;
if( cur->value ){
if( (cur->value = (char *)xrealloc(cur->value,
strlen(cur->value)+strlen(buf)+1)) )
strcat(cur->value, buf);
else
return -1;
}
else{
cur->value = xstrdup(buf);
}
return 0;
}
#ifdef ANSI_FUNC
static int
ClipBoardDelete(XPA xpa, char *name, char *paramlist)
#else
static int
ClipBoardDelete(xpa, name, paramlist)
XPA xpa;
char *name;
char *paramlist;
#endif
{
XPAClip cur;
if( (cur = ClipBoardLookup(xpa, name)) ){
ClipBoardFree(xpa, cur);
return 0;
}
else
return -1;
}
/*
*----------------------------------------------------------------------------
*
*
* Semi-Public Routines (used by xpa.c and command.c)
*
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
ClipBoardFree(XPA xpa, XPAClip clip)
#else
int ClipBoardFree(xpa, clip)
XPA xpa;
XPAClip clip;
#endif
{
XPAClip cur;
if( !clip )
return 0;
/* remove from list */
if( xpa->cliphead ){
if( xpa->cliphead == clip ){
xpa->cliphead = clip->next;
}
else{
for(cur=xpa->cliphead; cur!=NULL; cur=cur->next){
if( cur->next == clip ){
cur->next = clip->next;
break;
}
}
}
}
if( clip->name ) xfree(clip->name);
if( clip->value ) xfree(clip->value);
xfree(clip);
return 1;
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAReceiveClipboard
*
* Purpose: add a new clipboard entry
*
* Returns: xpa callback error codes
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAReceiveClipboard (void *client_data, void *call_data, char *paramlist,
char *buf, size_t len)
#else
int XPAReceiveClipboard(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
XPA xpa = (XPA)call_data;
char cmd[SZ_LINE];
char name[SZ_LINE];
char tbuf[SZ_LINE];
int lp=0;
int status = -1;
*cmd = '\0';
*name = '\0';
if( paramlist && *paramlist ){
if( !word(paramlist, cmd, &lp) || !word(paramlist, name, &lp) )
goto done;
/* lookup the command */
if( !strcmp(cmd, "add") ){
status = ClipBoardAdd(xpa, name, ¶mlist[lp], buf);
}
else if( !strncmp(cmd, "app", 3) ){
status = ClipBoardAppend(xpa, name, ¶mlist[lp], buf);
}
else if( !strncmp(cmd, "del", 3) ){
status = ClipBoardDelete(xpa, name, ¶mlist[lp]);
}
#ifdef LATER
else if( !strncmp(cmd, "loa", 3) ){
status = ClipBoardLoad(xpa, name, ¶mlist[lp], buf);
}
else if( !strncmp(cmd, "sav", 3) ){
status = ClipBoardSave(xpa, name, ¶mlist[lp]);
}
#endif
}
done:
if( status < 0 ){
if( !*cmd || !*name ){
XPAError(xpa, "XPA clipboard requires: add|append|delete name\n");
}
else{
snprintf(tbuf, SZ_LINE,
"XPA clipboard invalid cmd or name: %s %s\n", cmd, name);
XPAError(xpa, tbuf);
}
}
return(status);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPASendClipboard
*
* Purpose: return clipboard information
*
* Returns: 0 for success, -1 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPASendClipboard (void *client_data, void *call_data, char *paramlist,
char **buf, size_t *len)
#else
int XPASendClipboard(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char **buf;
size_t *len;
#endif
{
XPA xpa = (XPA)call_data;
char name[SZ_LINE];
char tbuf[SZ_LINE];
int lp=0;
int status = -1;
XPAClip cur;
*name = '\0';
if( paramlist && *paramlist ){
if( !word(paramlist, name, &lp) )
goto done;
if( !(cur = ClipBoardLookup(xpa, name)) )
goto done;
if( cur->value ){
send(xpa_datafd(xpa), cur->value, strlen(cur->value), 0);
status = 0;
}
}
done:
if( status < 0 ){
if( !*name ){
XPAError(xpa, "XPA clipboard requires: name\n");
}
else{
snprintf(tbuf, SZ_LINE, "XPA clipboard invalid name: %s\n", name);
XPAError(xpa, tbuf);
}
}
return(status);
}
/*
*----------------------------------------------------------------------------
*
*
* Public Routines
*
*
*----------------------------------------------------------------------------
*/
imexam-0.9.1/cextern/xpa/command.c 0000644 0006325 0002007 00000073241 13640457670 020604 0 ustar sosey STSCI\science 0000000 0000000 /*
* Copyright (c) 1999-2003 Smithsonian Astrophysical Observatory
*/
#include
/*
*----------------------------------------------------------------------------
*
*
* Private Routines and Data
*
*
*----------------------------------------------------------------------------
*/
/* this is the static xpa struct that holds the reserved commands */
static XPA rxpa=NULL;
/*
*----------------------------------------------------------------------------
*
* Routine: XPACmdParseNames
*
* Purpose: massage a name string, changing multiple sequential spaces
* into a single space
*
* Returns: new name, with spaces massaged (also number of spacess)
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static char *
XPACmdParseNames(char *lbuf, int *ntokens)
#else
static char *XPACmdParseNames(lbuf, ntokens)
char *lbuf;
int *ntokens;
#endif
{
char tbuf[SZ_LINE];
int lp=0;
char *buf;
/* can't be larger than the original string */
buf = (char *)xmalloc(strlen(lbuf)+1);
*buf = '\0';
*ntokens = 0;
/* pick off each word, separating by a single space */
while( word(lbuf, tbuf, &lp)){
if( *buf != '\0' )
strcat(buf, " ");
strcat(buf, tbuf);
*ntokens += 1;
}
/* make the string the right size */
buf = (char *)xrealloc(buf, strlen(buf)+1);
return(buf);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAReceiveNSConnect
*
* Purpose: reset and re-establish connection to name server
*
* Returns: xpa callback error codes
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAReceiveNSConnect (void *client_data, void *call_data, char *paramlist,
char *buf, size_t len)
#else
static int XPAReceiveNSConnect(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
XPA xpa = (XPA)call_data;
XPA txpa;
char tbuf[SZ_LINE];
int doall=0;
int lp=0;
if( paramlist && *paramlist ){
if( word(paramlist, tbuf, &lp) && !strcmp(tbuf, "-all") ){
doall = 1;
}
}
if( doall ){
for(txpa=XPAListHead(); txpa!=NULL; txpa=txpa->next){
XPANSAdd(txpa, NULL, NULL);
}
}
else{
XPANSAdd(xpa, NULL, NULL);
}
return(0);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAReceiveNSDisconnect
*
* Purpose: break connection to name server
*
* Returns: xpa callback error codes
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAReceiveNSDisconnect (void *client_data, void *call_data, char *paramlist,
char *buf, size_t len)
#else
static int XPAReceiveNSDisconnect(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
XPA xpa = (XPA)call_data;
XPA txpa;
NS ns, tns;
char tbuf[SZ_LINE];
int doall=0;
int lp=0;
if( paramlist && *paramlist ){
if( word(paramlist, tbuf, &lp) && !strcmp(tbuf, "-all") ){
doall = 1;
}
}
if( doall ){
for(txpa=XPAListHead(); txpa!=NULL; txpa=txpa->next){
for(ns=txpa->nshead; ns!= NULL; ){
tns = ns->next;
XPANSClose(txpa, ns);
ns = tns;
}
}
}
else{
for(ns=xpa->nshead; ns!= NULL; ){
tns = ns->next;
XPANSClose(xpa, ns);
ns = tns;
}
}
return(0);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAReceiveEnv
*
* Purpose: set an environment variable
*
* Returns: xpa callback error codes
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAReceiveEnv (void *client_data, void *call_data, char *paramlist,
char *buf, size_t len)
#else
static int XPAReceiveEnv(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
XPA xpa = (XPA)call_data;
char name[SZ_LINE];
char value[SZ_LINE];
char *tbuf;
int lp=0;
if( word(paramlist, name, &lp) ){
if( word(paramlist, value, &lp) ){
tbuf = (char *)xmalloc(strlen(name)+1+strlen(value)+1);
snprintf(tbuf, SZ_LINE, "%s=%s", name, value);
putenv(tbuf);
return(0);
}
else{
if( strchr(name, '=') != NULL ){
tbuf = xstrdup(name);
putenv(tbuf);
return(0);
}
else{
XPAError(xpa, "XPA setenv requires name and value pair\n");
return(-1);
}
}
}
else{
XPAError(xpa, "XPA setenv requires name and value pair\n");
return(-1);
}
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPASendEnv
*
* Purpose: return an environment variable to client
*
* Returns: xpa callback error codes
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPASendEnv (void *client_data, void *call_data, char *paramlist,
char **buf, size_t *len)
#else
static int XPASendEnv(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char **buf;
size_t *len;
#endif
{
int tlen;
char *tbuf;
char *ebuf;
if( (ebuf = (char *)getenv(paramlist)) != NULL ){
tlen = strlen(ebuf)+2;
tbuf = (char *)xmalloc(tlen);
snprintf(tbuf, tlen, "%s\n", ebuf);
*buf = tbuf;
*len = strlen(tbuf);
}
else{
*buf = xstrdup("\n");
*len = 1;
}
return(0);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAReceiveReserved
*
* Purpose: execute reserved command
*
* Returns: xpa callback error codes
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPAReceiveReserved (void *client_data, void *call_data, char *paramlist,
char *buf, size_t len)
#else
static int XPAReceiveReserved(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
char *cmd = (char *)client_data;
XPA xpa = (XPA)call_data;
if( !strcmp(cmd, "end") ){
xpa->comm->status |= XPA_STATUS_ENDBUF;
return(0);
}
else if( !strcmp(cmd, "exec") ){
xpa->comm->status |= XPA_STATUS_READBUF;
return(0);
}
else{
return(-1);
}
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPASendHelp
*
* Purpose: send help strings
*
* Returns: xpa callback error codes
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPASendHelp (void *client_data, void *call_data, char *paramlist,
char **buf, size_t *len)
#else
static int XPASendHelp(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char **buf;
size_t *len;
#endif
{
XPA xpa = (XPA)call_data;
XPACmd cmd;
int lp=0;
int slen;
char tbuf[SZ_LINE];
char lbuf[SZ_LINE];
char *sbuf;
if( !paramlist || !*paramlist ){
if( xpa->version != NULL ){
snprintf(lbuf, SZ_LINE, "XPA version: %s\n", xpa->version);
send(xpa_datafd(xpa), lbuf, strlen(lbuf), 0);
}
}
if( xpa->commands == NULL ){
if( xpa->help != NULL ){
slen = strlen(xpa->help)+SZ_LINE;
sbuf = (char *)xmalloc(slen);
snprintf(sbuf, slen, "%s\n", xpa->help);
send(xpa_datafd(xpa), sbuf, strlen(sbuf), 0);
xfree(sbuf);
}
else{
strcpy(lbuf, "\n");
send(xpa_datafd(xpa), lbuf, strlen(lbuf), 0);
}
}
else{
if( paramlist && *paramlist ){
while( word(paramlist, tbuf, &lp) ){
for(cmd=xpa->commands; cmd!=NULL; cmd=cmd->next){
if( !strcmp(tbuf, cmd->name) ){
if( cmd->help != NULL ){
slen = strlen(cmd->name)+strlen(cmd->help)+SZ_LINE;
sbuf = (char *)xmalloc(slen);
snprintf(sbuf, slen, "%s:\t%s\n", cmd->name, cmd->help);
send(xpa_datafd(xpa), sbuf, strlen(sbuf), 0);
xfree(sbuf);
}
else{
snprintf(lbuf, SZ_LINE, "%s:\t(no help available)\n", cmd->name);
send(xpa_datafd(xpa), lbuf, strlen(lbuf), 0);
}
}
}
}
}
else{
for(cmd=xpa->commands; cmd!=NULL; cmd=cmd->next){
if( cmd->help != NULL ){
slen = strlen(cmd->name)+strlen(cmd->help)+SZ_LINE;
sbuf = (char *)xmalloc(slen);
snprintf(sbuf, slen, "%s:\t%s\n", cmd->name, cmd->help);
send(xpa_datafd(xpa), sbuf, strlen(sbuf), 0);
xfree(sbuf);
}
else{
snprintf(lbuf, SZ_LINE, "%s:\t(no help available)\n", cmd->name);
send(xpa_datafd(xpa), lbuf, strlen(lbuf), 0);
}
}
}
}
return(0);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPASendVersion
*
* Purpose: send XPA version string
*
* Returns: xpa callback error codes
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
static int
XPASendVersion (void *client_data, void *call_data, char *paramlist,
char **buf, size_t *len)
#else
static int XPASendVersion(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char **buf;
size_t *len;
#endif
{
XPA xpa = (XPA)call_data;
char lbuf[SZ_LINE];
if( xpa->version != NULL )
snprintf(lbuf, SZ_LINE, "%s\n", xpa->version);
else
strcpy(lbuf, "\n");
send(xpa_datafd(xpa), lbuf, strlen(lbuf), 0);
return(0);
}
/*
*----------------------------------------------------------------------------
*
*
* Semi-Public Routines and Data
*
* These routines are used by XPAHandler and XPANew
*
*
*----------------------------------------------------------------------------
*/
/*
*----------------------------------------------------------------------------
*
* Routine: XPAInitReserved
*
* Purpose: add the reserved commands to the reserved xpa struct
*
* Results: none
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
void
XPAInitReserved (void)
#else
void XPAInitReserved()
#endif
{
if( !rxpa ){
if( (rxpa = (XPA)xcalloc(1, sizeof(struct xparec))) == NULL )
return;
/* XPACmdAdd requires that the callbacks be defined explicitly in rxpa */
rxpa->send_callback = XPASendCommands;
rxpa->receive_callback = XPAReceiveCommands;
/* add reserved commands */
XPACmdAdd(rxpa, "-acl",
"\tget (set) the access control list\n\t\t options: host type acl",
XPASendAcl, NULL, NULL, XPAReceiveAcl, NULL, "fillbuf=false");
XPACmdAdd(rxpa, "-env",
"\tget (set) an environment variable\n\t\t options: name (value)",
XPASendEnv, NULL, NULL, XPAReceiveEnv, NULL, NULL);
XPACmdAdd(rxpa, "-exec",
"\texecute commands from buffer\n\t\t options: none",
NULL, NULL, NULL, XPAReceiveReserved, (void *)"exec", NULL);
XPACmdAdd(rxpa, "-help",
"\treturn help string for specified XPA\n\t\t options: cmd name (commands only)",
XPASendHelp, NULL, NULL, NULL, NULL, NULL);
XPACmdAdd(rxpa, "-ltimeout",
"\tget (set) long timeout\n\t\t options: seconds|reset",
XPASendLTimeout, NULL, NULL, XPAReceiveLTimeout, NULL, NULL);
XPACmdAdd(rxpa, "-nsconnect",
"\tre-establish name server connection to this XPA\n\t\t options: -all",
NULL, NULL, NULL, XPAReceiveNSConnect, NULL, NULL);
XPACmdAdd(rxpa, "-nsdisconnect",
"\tbreak name server connection to this XPA\n\t\t options: -all",
NULL, NULL, NULL, XPAReceiveNSDisconnect, NULL, NULL);
XPACmdAdd(rxpa, "-remote",
"\tconnect to remote name service with specified acl \n\t\t options: host:port +|-|acl -proxy",
XPASendRemote, NULL, NULL, XPAReceiveRemote, NULL, "fillbuf=false");
XPACmdAdd(rxpa, "-clipboard",
"\tset/get clipboard information \n\t\t options: [cmd] name",
XPASendClipboard, NULL, NULL, XPAReceiveClipboard, NULL, NULL);
XPACmdAdd(rxpa, "-stimeout",
"\tget (set) short timeout\n\t\t options: seconds|reset",
XPASendSTimeout, NULL, NULL, XPAReceiveSTimeout, NULL, NULL);
XPACmdAdd(rxpa, "-version",
"\treturn XPA version string\n\t\t options: none",
XPASendVersion, NULL, NULL, NULL, NULL, NULL);
}
}
#ifdef ANSI_FUNC
void
XPAFreeReserved (void)
#else
void XPAFreeReserved()
#endif
{
XPACmd cmd, tcmd;
if( !rxpa ) return;
/* free reserved commands */
for(cmd=rxpa->commands; cmd!=NULL; ){
tcmd = cmd->next;
XPACmdDel(rxpa, cmd);
cmd = tcmd;
}
xfree(rxpa);
rxpa = NULL;
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPACmdLookupReserved
*
* Purpose: lookup a reserved command name
*
* Results: cmd struct or null
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
XPACmd
XPACmdLookupReserved (XPA xpa, char *lbuf, int *lp)
#else
XPACmd XPACmdLookupReserved(xpa, lbuf, lp)
XPA xpa;
char *lbuf;
int *lp;
#endif
{
XPACmd cmd;
int lp2=0;
char *lptr;
char name[SZ_LINE];
/* make sure we have something to work with */
if( (rxpa==NULL) || (lbuf==NULL) || (lbuf[*lp]=='\0') )
return(NULL);
/* this is where we start parsing */
lptr = &(lbuf[*lp]);
/* to simplify life, we assume reserved words are 1 token */
if( !word(lptr, name, &lp2) )
return(NULL);
/* look for reserved keywords that have callbacks */
for(cmd=rxpa->commands; cmd!=NULL; cmd=cmd->next){
if( !strcmp(name, cmd->name) ){
*lp += lp2;
return(cmd);
}
}
/* nothing, nowhere */
return(NULL);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPACmdLookup
*
* Purpose: lookup a user-defined command name
*
* Results: cmd struct or null
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
XPACmd
XPACmdLookup (XPA xpa, char *lbuf, int *lp)
#else
XPACmd XPACmdLookup(xpa, lbuf, lp)
XPA xpa;
char *lbuf;
int *lp;
#endif
{
XPACmd cmd;
int i;
int lp2;
int len, tlen;
char *lptr;
char tbuf[SZ_LINE];
char name[SZ_LINE];
/* make sure we have something to work with */
if( (xpa==NULL) || (lbuf==NULL) || (lbuf[*lp]=='\0') )
return(NULL);
/* this is where we start parsing */
lptr = &(lbuf[*lp]);
/* look up commands for this name */
for(cmd=xpa->commands; cmd!=NULL; cmd=cmd->next){
/* make up a name with the required number of tokens for this command */
*name = '\0';
lp2 = 0;
tlen = 0;
for(i=0; intokens; i++){
if( word(lptr, tbuf, &lp2)){
len = strlen(tbuf)+1;
if( (tlen+len) <= (SZ_LINE-1) ){
if( *name != '\0' )
strcat(name, " ");
strcat(name, tbuf);
tlen += len;
}
/* not enough room */
else{
*name = '\0';
break;
}
}
}
/* we now have the name, see if its what we want */
if( *name && !strcmp(cmd->name, name) ){
*lp += lp2;
return(cmd);
}
}
/* did not find the command in this xpa -- now look through reserved */
return(XPACmdLookupReserved(xpa, lbuf, lp));
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAReceiveCommands
*
* Purpose: process a list of commands from xpaset
*
* Results: number of commands processed
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPAReceiveCommands (void *client_data, void *call_data, char *paramlist,
char *buf, size_t len)
#else
int XPAReceiveCommands(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
XPA xpa = (XPA)call_data;
XPACmd cmd;
int lp;
int savelp;
int plen;
int bgot;
int got=0;
int gotbuf=0;
int freebuf=1;
char lbuf[SZ_LINE];
char tbuf[SZ_LINE];
char tbuf1[SZ_LINE];
/* use ";" as a command separator (as well as \n) */
newdtable(";");
/* if we already have buf, there will be no need to get it */
if( buf )
gotbuf++;
/* if we have no paramlist, we read from the socket */
if( (xpa_datafd(xpa) >=0) && (!paramlist || (*paramlist == '\0')) ){
xpa->comm->status |= XPA_STATUS_READBUF;
XPAGets(xpa, xpa_datafd(xpa), lbuf, SZ_LINE, XPALongTimeout());
FPRINTF((stderr, "%sXPAReceiveCommands: read %s\n", _sp, lbuf));
}
else{
xpa->comm->status &= ~XPA_STATUS_READBUF;
nowhite(paramlist, lbuf);
}
/* we must have something to start with */
if( *lbuf == '\0' ){
XPAError(xpa, xpaMessbuf[XPA_RTN_NOCMD2]);
got = -1;
goto done;
}
/* This look either executes the one set of commands in paramlist,
or reads one line at a time from the socket and executes commands.
In the latter case, each callback can read the socket as well */
while( 1 ){
FPRINTF((stderr, "%sXPAReceiveCommands: top of loop: %s\n", _sp, lbuf));
lp = 0;
while( lbuf[lp] != '\0' ){
if( (cmd = XPACmdLookup(xpa, lbuf, &lp)) == NULL ){
XPAError(xpa, xpaMessbuf[XPA_RTN_UNCMD]);
got = -1;
goto done;
}
/* reserved commands can only be called from the same host as the server,
or from local (unix) sockets */
if( (cmd->xpa == rxpa) &&
strcmp(cmd->name, "-help") && strcmp(cmd->name, "-version") ){
if( XPAMtype() == XPA_INET ){
if( (!xpa->comm || !LOCALIP(xpa->comm->cmdip)) ){
FPRINTF((stderr, "%sXPAReceiveCommands: rejecting reserved: %s\n",
_sp, cmd->name));
XPAError(xpa, xpaMessbuf[XPA_RTN_NOAUTH]);
got = -1;
goto done;
}
}
}
FPRINTF((stderr, "%sXPAReceiveCommands: cmd->name: %s\n",
_sp, cmd->name));
*tbuf = '\0';
if( (lastdelim() != ';') && (lastdelim() != '\n') ){
/* skip white space between command and params */
while( isspace((int)lbuf[lp]) )
lp++;
/* here is where the params start */
savelp = lp;
/* look for command delimiter -- the end of the params */
while( word(lbuf, tbuf1, &lp) ){
if( (lastdelim() == ';') || (lastdelim() == '\n') ){
break;
}
/* make sure a command-ending delim is not next */
while( isspace((int)lbuf[lp]) )
lp++;
if( (lbuf[lp] == ';') || (lbuf[lp] == '\n') ){
break;
}
}
/* get length of parameter list */
plen = lp - savelp;
/* but skip final delim */
if( (plen>0) && ((lastdelim() == ';')||(lastdelim() == '\n')) )
plen--;
/* copy the params up to the command delimiter */
if( plen > 0 ){
strncpy(tbuf, &(lbuf[savelp]), plen);
tbuf[plen] = '\0';
}
}
/* execute the associated XPA callback */
if( cmd->receive_callback != NULL ){
/* get buf now, if its needed */
if( !gotbuf && (xpa_datafd(xpa) >= 0) &&
(cmd->receive_mode & XPA_MODE_FILLBUF) ){
/* read buf -- this buf will stay around for all commands */
FPRINTF((stderr, "%sXPAReceiveCommands: at XPAGetBuf\n", _sp));
bgot = XPAGetBuf(xpa, xpa_datafd(xpa), &buf, &len, -1);
/* close the data channel */
XPACloseData(xpa, xpa->comm);
if( bgot >= 0 ){
/* got the buffer */
gotbuf++;
}
/* error getting buf */
else{
XPAError(xpa, xpaMessbuf[XPA_RTN_NODATA]);
got = -1;
goto done;
}
}
got = (cmd->receive_callback)(cmd->receive_data, call_data,
tbuf, buf, len);
/* if we don't want to free the buffer, mark it for saving */
if( (buf != NULL) && !(cmd->receive_mode & XPA_MODE_FREEBUF) ){
freebuf=0;
}
if( got != 0 ){
goto done;
}
}
else{
XPAError(xpa, xpaMessbuf[XPA_RTN_NOREC]);
got = -1;
goto done;
}
}
/* conditions for exiting the command loop: */
/* if we processed the END command, we are done */
if( xpa->comm->status & XPA_STATUS_ENDBUF )
break;
/* if we are not reading the data buffer, we are done */
if( !(xpa->comm->status & XPA_STATUS_READBUF) )
break;
/* if we got EOF or error reading the data buffer, we are done */
if( XPAGets(xpa, xpa_datafd(xpa), lbuf, SZ_LINE, XPALongTimeout()) <=0 )
break;
}
done:
/* if no one wants buf, free it now */
if( freebuf )
xfree(buf);
/* restore last delimiter table */
freedtable();
/* return error code */
return(got);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPASendCommands
*
* Purpose: process a list of commands from xpaget
*
* Results: number of commands processed (currently 0 or 1)
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPASendCommands (void *client_data, void *call_data, char *paramlist,
char **buf, size_t *len)
#else
int XPASendCommands(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char **buf;
size_t *len;
#endif
{
XPA xpa = (XPA)call_data;
XPACmd cmd;
char tbuf[SZ_LINE];
int lp=0;
int got=0;
/* return help as default */
if( *paramlist == '\0' ){
paramlist = "-help";
}
/* lookup the command and execute */
if( (cmd = XPACmdLookup(xpa, paramlist, &lp)) != NULL ){
/* reserved commands can only be called from the same host as the server,
or from local (unix) sockets */
if( (cmd->xpa == rxpa) &&
strcmp(cmd->name, "-help") && strcmp(cmd->name, "-version") ){
if( XPAMtype() == XPA_INET ){
if( (!xpa->comm || !LOCALIP(xpa->comm->cmdip)) ){
FPRINTF((stderr, "%sXPAReceiveCommands: rejecting reserved: %s\n",
_sp, cmd->name));
XPAError(xpa, xpaMessbuf[XPA_RTN_NOAUTH]);
got = -1;
goto done;
}
}
}
/* execute the associated XPA send callback,
using the remaining command string as an argument */
strcpy(tbuf, ¶mlist[lp]);
nocr(tbuf);
if( !strcmp(tbuf, "-help") ){
if( cmd->help != NULL )
snprintf(tbuf, SZ_LINE, "%s\n", cmd->help);
else
snprintf(tbuf, SZ_LINE, "\n");
send(xpa_datafd(xpa), tbuf, strlen(tbuf), 0);
got = 0;
}
else if( cmd->send_callback != NULL ){
got = (cmd->send_callback)(cmd->send_data, call_data,
¶mlist[lp], buf, len);
}
else{
XPAError(xpa, xpaMessbuf[XPA_RTN_NOSEND]);
got = -1;
goto done;
}
}
else{
XPAError(xpa, xpaMessbuf[XPA_RTN_UNCMD]);
got = -1;
goto done;
}
done:
/* return error code */
return(got);
}
/*
*----------------------------------------------------------------------------
*
*
* Public Routines and Data
*
*
*----------------------------------------------------------------------------
*/
/*
*----------------------------------------------------------------------------
*
* Routine: XPACmdNew
*
* Purpose: define a named command access point
*
* Results: XPA struct or NULL
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
XPA
XPACmdNew (char *xclass, char *name)
#else
XPA XPACmdNew(xclass, name)
char *xclass;
char *name;
#endif
{
XPA xpa;
char tbuf[SZ_LINE];
/* we need a name */
if( (name == NULL) || (*name == '\0') )
return(NULL);
/* we need some valid class */
if( (xclass == NULL) || (*xclass == '\0') )
xclass = "*";
/* help string */
snprintf(tbuf, SZ_LINE, "XPA commands for %s:%s\n\t\t options: see -help",
xclass, name);
/* create a new XPA with command callbacks */
xpa = XPANew(xclass, name, tbuf,
XPASendCommands, NULL, NULL,
XPAReceiveCommands, NULL, "fillbuf=false");
/* return the good news */
return(xpa);
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPACmdAdd
*
* Purpose: add a command to a named command access point
*
* Results: 0 on success, -1 for failure
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
XPACmd
XPACmdAdd (XPA xpa, char *name, char *help,
SendCb send_callback, void *send_data, char *send_mode,
ReceiveCb rec_callback, void *rec_data, char *rec_mode)
#else
XPACmd XPACmdAdd(xpa, name, help,
send_callback, send_data, send_mode,
rec_callback, rec_data, rec_mode)
XPA xpa;
char *name;
char *help;
SendCb send_callback;
void *send_data;
char *send_mode;
ReceiveCb rec_callback;
void *rec_data;
char *rec_mode;
#endif
{
XPACmd xnew;
XPACmd cur;
XPACmd prev;
/* make sure we have a valid command record */
if( !xpa ||
(xpa->send_callback != XPASendCommands) ||
(xpa->receive_callback != XPAReceiveCommands) ){
return(NULL);
}
/* we need either a send or a receive or both */
if( (send_callback == NULL) && (rec_callback == NULL ) ){
return(NULL);
}
/* limit the size of the cmd name designation */
if( strlen(name) > XPA_NAMELEN ){
return(NULL);
}
/* allocate space for a new record */
xnew = (XPACmd)xcalloc(1, sizeof(struct xpacmdrec));
/* backlink to xpa */
xnew->xpa = xpa;
/* fill in the blanks */
xnew->name = XPACmdParseNames(name, &(xnew->ntokens));
xnew->help = xstrdup(help);
/* receive callback */
xnew->send_callback = send_callback;
xnew->send_data = send_data;
xnew->send_mode = XPA_DEF_MODE_SEND;
XPAMode(send_mode, &(xnew->send_mode), "freebuf", XPA_MODE_FREEBUF,1);
/* acl is a global mode */
XPAMode(send_mode, &(xpa->send_mode), "acl", XPA_MODE_ACL, 1);
/* receive callback */
xnew->receive_callback = rec_callback;
xnew->receive_data = rec_data;
/* process the mode string */
xnew->receive_mode = XPA_DEF_MODE_REC;
XPAMode(rec_mode, &(xnew->receive_mode), "usebuf", XPA_MODE_BUF,1);
XPAMode(rec_mode, &(xnew->receive_mode), "fillbuf", XPA_MODE_FILLBUF,1);
XPAMode(rec_mode, &(xnew->receive_mode), "freebuf", XPA_MODE_FREEBUF,1);
/* acl is a global mode */
XPAMode(rec_mode, &(xpa->receive_mode), "acl", XPA_MODE_ACL, 1);
/* enter into list, in alphabetical order */
if( xpa->commands == NULL ){
xpa->commands = xnew;
return(xnew);
}
else{
for(prev=NULL, cur=xpa->commands; cur!=NULL; prev=cur, cur=cur->next){
/* if new name is an existing name, add it before */
if( strcmp(xnew->name, cur->name) ==0 )
goto addname;
/* if existing name is a subset of new name, add it before */
else if( !strncmp(xnew->name, cur->name, strlen(cur->name)) )
goto addname;
/* if new name is a subset of existing name, add it after */
else if( !strncmp(xnew->name, cur->name, strlen(xnew->name)) )
continue;
/* if new name is lexically greater than existing name, add it after */
else if( strcmp(xnew->name, cur->name) >0 )
continue;
addname:
/* add the new name here and return */
if( prev == NULL ){
xpa->commands = xnew;
xnew->next = cur;
return(xnew);
}
else{
prev->next = xnew;
xnew->next = cur;
return(xnew);
}
}
/* if we are still here, we did not find a place to insert, i.e.,
we are at the end of the list */
prev->next = xnew;
return(xnew);
}
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPACmdDel
*
* Purpose: free a named command access point
*
* Results: none
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPACmdDel (XPA xpa, XPACmd cmd)
#else
int XPACmdDel(xpa, cmd)
XPA xpa;
XPACmd cmd;
#endif
{
XPACmd cur;
int got=0;
/* gotta have something to free */
if( cmd == NULL )
return(-1);
/* remove from list of xpa's commands */
if( xpa && xpa->commands ){
if( xpa->commands == cmd ){
xpa->commands = cmd->next;
got++;
}
else{
for(cur=xpa->commands; cur!=NULL; cur=cur->next){
if( cur->next == cmd ){
cur->next = cmd->next;
got++;
break;
}
}
}
}
/* free up space */
if( got ){
if( cmd->name )
xfree(cmd->name);
if( cmd->help )
xfree(cmd->help);
xfree(cmd);
return(0);
}
else{
return(-1);
}
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPACmdInternalReceive
*
* Purpose: internal execute of the receive callback for this command
*
* Results: number of commands processed
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPACmdInternalReceive (void *client_data, void *call_data,
char *paramlist, char *buf, size_t len)
#else
int XPACmdInternalReceive(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
XPA xpa = (XPA)call_data;
/* make sure we have something */
if( xpa == NULL )
return(-1);
/* make the call */
return(XPAReceiveCommands(client_data, xpa, paramlist, buf, len));
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPACmdInternalSend
*
* Purpose: internal execute of the send callback for this command
*
* Results: number of commands processed (currently 0 or 1)
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
int
XPACmdInternalSend (void *client_data, void *call_data,
char *paramlist, char **buf, size_t *len)
#else
int XPACmdInternalSend(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char **buf;
size_t *len;
#endif
{
XPA xpa = (XPA)call_data;
/* make sure we have something */
if( xpa == NULL )
return(-1);
/* make the call */
return(XPASendCommands(client_data, xpa, paramlist, buf, len));
}
/*
*----------------------------------------------------------------------------
*
* Routine: XPAGetReserved
*
* Purpose: return xpa handle for reserved xpa commands
*
* Return: xpa handle
*
*----------------------------------------------------------------------------
*/
#ifdef ANSI_FUNC
XPA
XPAGetReserved (void)
#else
XPA XPAGetReserved()
#endif
{
return(rxpa);
}
imexam-0.9.1/cextern/xpa/conf.h 0000644 0006325 0002007 00000004407 13640476376 020122 0 ustar sosey STSCI\science 0000000 0000000 /* conf.h. Generated by configure. */
/*
* Copyright (c) 1999-2003 Smithsonian Astrophysical Observatory
*/
/* Define as 1 if you have string.h */
#define HAVE_STRING_H 1
/* Define as 1 if you have strings.h */
#define HAVE_STRINGS_H 1
/* Define as 1 if you have stdlib.h */
#define HAVE_STDLIB_H 1
/* Define as 1 if you have stdint.h */
#define HAVE_STDINT_H 1
/* Define as 1 if you have malloc.h */
/* #undef HAVE_MALLOC_H */
/* Define as 1 if you have unistd.h */
#define HAVE_UNISTD_H 1
/* Define as 1 if you have getopt.h */
#define HAVE_GETOPT_H 1
/* Define as 1 if you have pwd.h */
#define HAVE_PWD_H 1
/* Define as 1 if you have values.h */
/* #undef HAVE_VALUES_H */
/* Define as 1 if you have dlfcn.h */
#define HAVE_DLFCN_H 1
/* Define as 1 if you have sys/un.h */
#define HAVE_SYS_UN_H 1
/* Define as 1 if you have sys/shm.h */
#define HAVE_SYS_SHM_H 1
/* Define as 1 if you have sys/mman.h */
#define HAVE_SYS_MMAN_H 1
/* Define as 1 if you have sys/select.h */
#define HAVE_SYS_SELECT_H 1
/* Define as 1 if you have sys/ipc.h */
#define HAVE_SYS_IPC_H 1
/* Define as 1 if you have setjmp.h */
#define HAVE_SETJMP_H 1
/* Define as 1 if you have socklen_t */
#define HAVE_SOCKLEN_T 1
/* Define as 1 if you have strchr */
#define HAVE_STRCHR 1
/* Define as 1 if you have memcpy */
#define HAVE_MEMCPY 1
/* Define as 1 if you have snprintf */
#define HAVE_SNPRINTF 1
/* Define as 1 if you have setenv */
#define HAVE_SETENV 1
/* Define as 1 if you have posix_spawn */
/* #undef HAVE_POSIX_SPAWN */
/* Define as 1 if you have crt_externs.h */
/* #undef HAVE_CRT_EXTERNS_H */
/* Define as 1 if you have NSGetEvniron */
/* #undef HAVE__NSGETENVIRON */
/* Define as 1 if you have atexit */
#define HAVE_ATEXIT 1
/* Define as 1 if you have getaddrinfo */
#define HAVE_GETADDRINFO 1
/* Define as 1 if you have pthread library */
/* #undef HAVE_LIBPTHREAD */
/* Define as 1 if you need reentrant errno, etc. */
/* #undef _REENTRANT */
/* Define as 1 if you have Tcl */
/* #undef HAVE_TCL */
/* Define as 1 if you have Xt */
/* #undef HAVE_XT */
/* Define as 1 if you have Gtk */
/* #undef HAVE_GTK */
/* Define as 1 if you are running Cygwin. */
/* #undef HAVE_CYGWIN */
/* Define as 1 if you are running MinGW. */
/* #undef HAVE_MINGW32 */
imexam-0.9.1/cextern/xpa/conf.h.in 0000644 0006325 0002007 00000004130 13640457670 020514 0 ustar sosey STSCI\science 0000000 0000000 /*
* Copyright (c) 1999-2003 Smithsonian Astrophysical Observatory
*/
/* Define as 1 if you have string.h */
#undef HAVE_STRING_H
/* Define as 1 if you have strings.h */
#undef HAVE_STRINGS_H
/* Define as 1 if you have stdlib.h */
#undef HAVE_STDLIB_H
/* Define as 1 if you have stdint.h */
#undef HAVE_STDINT_H
/* Define as 1 if you have malloc.h */
#undef HAVE_MALLOC_H
/* Define as 1 if you have unistd.h */
#undef HAVE_UNISTD_H
/* Define as 1 if you have getopt.h */
#undef HAVE_GETOPT_H
/* Define as 1 if you have pwd.h */
#undef HAVE_PWD_H
/* Define as 1 if you have values.h */
#undef HAVE_VALUES_H
/* Define as 1 if you have dlfcn.h */
#undef HAVE_DLFCN_H
/* Define as 1 if you have sys/un.h */
#undef HAVE_SYS_UN_H
/* Define as 1 if you have sys/shm.h */
#undef HAVE_SYS_SHM_H
/* Define as 1 if you have sys/mman.h */
#undef HAVE_SYS_MMAN_H
/* Define as 1 if you have sys/select.h */
#undef HAVE_SYS_SELECT_H
/* Define as 1 if you have sys/ipc.h */
#undef HAVE_SYS_IPC_H
/* Define as 1 if you have setjmp.h */
#undef HAVE_SETJMP_H
/* Define as 1 if you have socklen_t */
#undef HAVE_SOCKLEN_T
/* Define as 1 if you have strchr */
#undef HAVE_STRCHR
/* Define as 1 if you have memcpy */
#undef HAVE_MEMCPY
/* Define as 1 if you have snprintf */
#undef HAVE_SNPRINTF
/* Define as 1 if you have setenv */
#undef HAVE_SETENV
/* Define as 1 if you have posix_spawn */
#undef HAVE_POSIX_SPAWN
/* Define as 1 if you have crt_externs.h */
#undef HAVE_CRT_EXTERNS_H
/* Define as 1 if you have NSGetEvniron */
#undef HAVE__NSGETENVIRON
/* Define as 1 if you have atexit */
#undef HAVE_ATEXIT
/* Define as 1 if you have getaddrinfo */
#undef HAVE_GETADDRINFO
/* Define as 1 if you have pthread library */
#undef HAVE_LIBPTHREAD
/* Define as 1 if you need reentrant errno, etc. */
#undef _REENTRANT
/* Define as 1 if you have Tcl */
#undef HAVE_TCL
/* Define as 1 if you have Xt */
#undef HAVE_XT
/* Define as 1 if you have Gtk */
#undef HAVE_GTK
/* Define as 1 if you are running Cygwin. */
#undef HAVE_CYGWIN
/* Define as 1 if you are running MinGW. */
#undef HAVE_MINGW32
imexam-0.9.1/cextern/xpa/config.guess 0000755 0006325 0002007 00000125644 13640457670 021347 0 ustar sosey STSCI\science 0000000 0000000 #! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2016-10-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to .
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help" >&2
exit 1 ;;
* )
break ;;
esac
done
if test $# != 0; then
echo "$me: too many arguments$help" >&2
exit 1
fi
trap 'exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || \
echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
machine=${arch}${endian}-unknown
;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
;;
*)
os=netbsd
;;
esac
# Determine ABI tags.
case "${UNAME_MACHINE_ARCH}" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
;;
esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:Sortix:*:*)
echo ${UNAME_MACHINE}-unknown-sortix
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
UNAME_MACHINE=alpha ;;
"EV5 (21164)")
UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit ;;
*:z/VM:*:*)
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c &&
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
SYSTEM_NAME=`$dummy $dummyarg` &&
{ echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos${UNAME_RELEASE}
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
[ ${TARGET_BINARY_INTERFACE}x = x ]
then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
then
echo "$SYSTEM_NAME"
else
echo rs6000-ibm-aix3.2.5
fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/lslpp ] ; then
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include
#include
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = hppa2.0w ]
then
eval $set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
# generating 64-bit code. GNU and HP use different nomenclature:
#
# $ CC_FOR_BUILD=cc ./config.guess
# => hppa2.0w-hp-hpux11.23
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH=hppa2.0w
else
HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
e2k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64el:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
paragon:*:*:*)
echo i860-intel-osf1
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit ;;
M68*:*:R3V[5678]*:*)
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes .
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
echo ${UNAME_MACHINE}-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
SX-ACE:SUPER-UX:*:*)
echo sxace-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
esac ;;
*:XENIX:*:SysV)
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
cat >&2 </dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
hostinfo = `(hostinfo) 2>/dev/null`
/bin/universe = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
EOF
exit 1
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
imexam-0.9.1/cextern/xpa/config.log 0000644 0006325 0002007 00000073404 13640502440 020755 0 ustar sosey STSCI\science 0000000 0000000 This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xpa configure 2.1.18, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --prefix=/miniconda3/envs/testimexam
## --------- ##
## Platform. ##
## --------- ##
hostname = chirakan.local
uname -m = x86_64
uname -r = 17.7.0
uname -s = Darwin
uname -v = Darwin Kernel Version 17.7.0: Thu Jan 23 07:05:23 PST 2020; root:xnu-4570.71.69~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = Mach kernel version:
Darwin Kernel Version 17.7.0: Thu Jan 23 07:05:23 PST 2020; root:xnu-4570.71.69~1/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 493 tasks, 2339 threads, 8 processors
Load average: 3.19, Mach factor: 4.80
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /miniconda3/envs/testimexam/bin
PATH: /miniconda3/condabin
PATH: /Applications/SAOImageDS9.app/Contents/MacOS
PATH: /sw/bin
PATH: /sw/sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/texbin
PATH: ~/bin
PATH: /sw/lib/perl5/ExtUtils
PATH: /sw/bin
PATH: /sw/sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /Library/TeX/texbin
PATH: /opt/X11/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1360: checking build system type
configure:1378: result: x86_64-apple-darwin17.7.0
configure:1386: checking host system type
configure:1400: result: x86_64-apple-darwin17.7.0
configure:1461: checking for gcc
configure:1477: found /usr/bin/gcc
configure:1487: result: gcc
configure:1731: checking for C compiler version
configure:1734: gcc --version &5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:1737: $? = 0
configure:1739: gcc -v &5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:1742: $? = 0
configure:1744: gcc -V &5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:1747: $? = 1
configure:1770: checking for C compiler default output file name
configure:1773: gcc conftest.c >&5
configure:1776: $? = 0
configure:1822: result: a.out
configure:1827: checking whether the C compiler works
configure:1833: ./a.out
configure:1836: $? = 0
configure:1853: result: yes
configure:1860: checking whether we are cross compiling
configure:1862: result: no
configure:1865: checking for suffix of executables
configure:1867: gcc -o conftest conftest.c >&5
configure:1870: $? = 0
configure:1895: result:
configure:1901: checking for suffix of object files
configure:1922: gcc -c conftest.c >&5
configure:1925: $? = 0
configure:1947: result: o
configure:1951: checking whether we are using the GNU C compiler
configure:1975: gcc -c conftest.c >&5
configure:1981: $? = 0
configure:1985: test -z
|| test ! -s conftest.err
configure:1988: $? = 0
configure:1991: test -s conftest.o
configure:1994: $? = 0
configure:2007: result: yes
configure:2013: checking whether gcc accepts -g
configure:2034: gcc -c -g conftest.c >&5
configure:2040: $? = 0
configure:2044: test -z
|| test ! -s conftest.err
configure:2047: $? = 0
configure:2050: test -s conftest.o
configure:2053: $? = 0
configure:2064: result: yes
configure:2081: checking for gcc option to accept ANSI C
configure:2151: gcc -c -g -O2 conftest.c >&5
configure:2157: $? = 0
configure:2161: test -z
|| test ! -s conftest.err
configure:2164: $? = 0
configure:2167: test -s conftest.o
configure:2170: $? = 0
configure:2188: result: none needed
configure:2206: gcc -c -g -O2 conftest.c >&5
conftest.c:2:3: error: unknown type name 'choke'
choke me
^
conftest.c:2:11: error: expected ';' after top level declarator
choke me
^
;
2 errors generated.
configure:2212: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:2357: checking how to run the C preprocessor
configure:2392: gcc -E conftest.c
configure:2398: $? = 0
configure:2430: gcc -E conftest.c
conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
configure:2436: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "xpa"
| #define PACKAGE_TARNAME "xpa"
| #define PACKAGE_VERSION "2.1.18"
| #define PACKAGE_STRING "xpa 2.1.18"
| #define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
| /* end confdefs.h. */
| #include
configure:2475: result: gcc -E
configure:2499: gcc -E conftest.c
configure:2505: $? = 0
configure:2537: gcc -E conftest.c
conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
configure:2543: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "xpa"
| #define PACKAGE_TARNAME "xpa"
| #define PACKAGE_VERSION "2.1.18"
| #define PACKAGE_STRING "xpa 2.1.18"
| #define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
| /* end confdefs.h. */
| #include
configure:2587: checking for egrep
configure:2597: result: grep -E
configure:2602: checking for ANSI C header files
configure:2627: gcc -c -g -O2 conftest.c >&5
configure:2633: $? = 0
configure:2637: test -z
|| test ! -s conftest.err
configure:2640: $? = 0
configure:2643: test -s conftest.o
configure:2646: $? = 0
configure:2735: gcc -o conftest -g -O2 conftest.c >&5
conftest.c:26:7: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration]
exit(2);
^
conftest.c:26:7: note: include the header or explicitly provide a declaration for 'exit'
1 warning generated.
configure:2738: $? = 0
configure:2740: ./conftest
configure:2743: $? = 0
configure:2758: result: yes
configure:2782: checking for sys/types.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2782: checking for sys/stat.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2782: checking for stdlib.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2782: checking for string.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2782: checking for memory.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2782: checking for strings.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2782: checking for inttypes.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2782: checking for stdint.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2782: checking for unistd.h
configure:2798: gcc -c -g -O2 conftest.c >&5
configure:2804: $? = 0
configure:2808: test -z
|| test ! -s conftest.err
configure:2811: $? = 0
configure:2814: test -s conftest.o
configure:2817: $? = 0
configure:2828: result: yes
configure:2840: checking for long
configure:2864: gcc -c -g -O2 conftest.c >&5
configure:2870: $? = 0
configure:2874: test -z
|| test ! -s conftest.err
configure:2877: $? = 0
configure:2880: test -s conftest.o
configure:2883: $? = 0
configure:2894: result: yes
configure:2897: checking size of long
configure:3216: gcc -o conftest -g -O2 conftest.c >&5
configure:3219: $? = 0
configure:3221: ./conftest
configure:3224: $? = 0
configure:3247: result: 8
configure:3298: checking for ranlib
configure:3314: found /usr/bin/ranlib
configure:3325: result: ranlib
configure:3338: checking for ANSI C header files
configure:3494: result: yes
configure:3518: checking malloc.h usability
configure:3530: gcc -c -g -O2 conftest.c >&5
conftest.c:55:10: fatal error: 'malloc.h' file not found
#include
^~~~~~~~~~
1 error generated.
configure:3536: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "xpa"
| #define PACKAGE_TARNAME "xpa"
| #define PACKAGE_VERSION "2.1.18"
| #define PACKAGE_STRING "xpa 2.1.18"
| #define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SIZEOF_LONG 8
| #define STDC_HEADERS 1
| /* end confdefs.h. */
| #include
| #if HAVE_SYS_TYPES_H
| # include
| #endif
| #if HAVE_SYS_STAT_H
| # include
| #endif
| #if STDC_HEADERS
| # include
| # include
| #else
| # if HAVE_STDLIB_H
| # include
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| # include
| # endif
| # include
| #endif
| #if HAVE_STRINGS_H
| # include
| #endif
| #if HAVE_INTTYPES_H
| # include
| #else
| # if HAVE_STDINT_H
| # include
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include
| #endif
| #include
configure:3559: result: no
configure:3563: checking malloc.h presence
configure:3573: gcc -E conftest.c
conftest.c:21:10: fatal error: 'malloc.h' file not found
#include
^~~~~~~~~~
1 error generated.
configure:3579: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "xpa"
| #define PACKAGE_TARNAME "xpa"
| #define PACKAGE_VERSION "2.1.18"
| #define PACKAGE_STRING "xpa 2.1.18"
| #define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SIZEOF_LONG 8
| #define STDC_HEADERS 1
| /* end confdefs.h. */
| #include
configure:3599: result: no
configure:3634: checking for malloc.h
configure:3641: result: no
configure:3668: checking getopt.h usability
configure:3680: gcc -c -g -O2 conftest.c >&5
configure:3686: $? = 0
configure:3690: test -z
|| test ! -s conftest.err
configure:3693: $? = 0
configure:3696: test -s conftest.o
configure:3699: $? = 0
configure:3709: result: yes
configure:3713: checking getopt.h presence
configure:3723: gcc -E conftest.c
configure:3729: $? = 0
configure:3749: result: yes
configure:3784: checking for getopt.h
configure:3791: result: yes
configure:3818: checking pwd.h usability
configure:3830: gcc -c -g -O2 conftest.c >&5
configure:3836: $? = 0
configure:3840: test -z
|| test ! -s conftest.err
configure:3843: $? = 0
configure:3846: test -s conftest.o
configure:3849: $? = 0
configure:3859: result: yes
configure:3863: checking pwd.h presence
configure:3873: gcc -E conftest.c
configure:3879: $? = 0
configure:3899: result: yes
configure:3934: checking for pwd.h
configure:3941: result: yes
configure:3968: checking values.h usability
configure:3980: gcc -c -g -O2 conftest.c >&5
conftest.c:57:10: fatal error: 'values.h' file not found
#include
^~~~~~~~~~
1 error generated.
configure:3986: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "xpa"
| #define PACKAGE_TARNAME "xpa"
| #define PACKAGE_VERSION "2.1.18"
| #define PACKAGE_STRING "xpa 2.1.18"
| #define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SIZEOF_LONG 8
| #define STDC_HEADERS 1
| #define HAVE_GETOPT_H 1
| #define HAVE_PWD_H 1
| /* end confdefs.h. */
| #include
| #if HAVE_SYS_TYPES_H
| # include
| #endif
| #if HAVE_SYS_STAT_H
| # include
| #endif
| #if STDC_HEADERS
| # include
| # include
| #else
| # if HAVE_STDLIB_H
| # include
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| # include
| # endif
| # include
| #endif
| #if HAVE_STRINGS_H
| # include
| #endif
| #if HAVE_INTTYPES_H
| # include
| #else
| # if HAVE_STDINT_H
| # include
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include
| #endif
| #include
configure:4009: result: no
configure:4013: checking values.h presence
configure:4023: gcc -E conftest.c
conftest.c:23:10: fatal error: 'values.h' file not found
#include
^~~~~~~~~~
1 error generated.
configure:4029: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "xpa"
| #define PACKAGE_TARNAME "xpa"
| #define PACKAGE_VERSION "2.1.18"
| #define PACKAGE_STRING "xpa 2.1.18"
| #define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SIZEOF_LONG 8
| #define STDC_HEADERS 1
| #define HAVE_GETOPT_H 1
| #define HAVE_PWD_H 1
| /* end confdefs.h. */
| #include
configure:4049: result: no
configure:4084: checking for values.h
configure:4091: result: no
configure:4118: checking dlfcn.h usability
configure:4130: gcc -c -g -O2 conftest.c >&5
configure:4136: $? = 0
configure:4140: test -z
|| test ! -s conftest.err
configure:4143: $? = 0
configure:4146: test -s conftest.o
configure:4149: $? = 0
configure:4159: result: yes
configure:4163: checking dlfcn.h presence
configure:4173: gcc -E conftest.c
configure:4179: $? = 0
configure:4199: result: yes
configure:4234: checking for dlfcn.h
configure:4241: result: yes
configure:4268: checking setjmp.h usability
configure:4280: gcc -c -g -O2 conftest.c >&5
configure:4286: $? = 0
configure:4290: test -z
|| test ! -s conftest.err
configure:4293: $? = 0
configure:4296: test -s conftest.o
configure:4299: $? = 0
configure:4309: result: yes
configure:4313: checking setjmp.h presence
configure:4323: gcc -E conftest.c
configure:4329: $? = 0
configure:4349: result: yes
configure:4384: checking for setjmp.h
configure:4391: result: yes
configure:4418: checking sys/un.h usability
configure:4430: gcc -c -g -O2 conftest.c >&5
configure:4436: $? = 0
configure:4440: test -z
|| test ! -s conftest.err
configure:4443: $? = 0
configure:4446: test -s conftest.o
configure:4449: $? = 0
configure:4459: result: yes
configure:4463: checking sys/un.h presence
configure:4473: gcc -E conftest.c
configure:4479: $? = 0
configure:4499: result: yes
configure:4534: checking for sys/un.h
configure:4541: result: yes
configure:4568: checking sys/shm.h usability
configure:4580: gcc -c -g -O2 conftest.c >&5
configure:4586: $? = 0
configure:4590: test -z
|| test ! -s conftest.err
configure:4593: $? = 0
configure:4596: test -s conftest.o
configure:4599: $? = 0
configure:4609: result: yes
configure:4613: checking sys/shm.h presence
configure:4623: gcc -E conftest.c
configure:4629: $? = 0
configure:4649: result: yes
configure:4684: checking for sys/shm.h
configure:4691: result: yes
configure:4718: checking sys/mman.h usability
configure:4730: gcc -c -g -O2 conftest.c >&5
configure:4736: $? = 0
configure:4740: test -z
|| test ! -s conftest.err
configure:4743: $? = 0
configure:4746: test -s conftest.o
configure:4749: $? = 0
configure:4759: result: yes
configure:4763: checking sys/mman.h presence
configure:4773: gcc -E conftest.c
configure:4779: $? = 0
configure:4799: result: yes
configure:4834: checking for sys/mman.h
configure:4841: result: yes
configure:4868: checking sys/ipc.h usability
configure:4880: gcc -c -g -O2 conftest.c >&5
configure:4886: $? = 0
configure:4890: test -z
|| test ! -s conftest.err
configure:4893: $? = 0
configure:4896: test -s conftest.o
configure:4899: $? = 0
configure:4909: result: yes
configure:4913: checking sys/ipc.h presence
configure:4923: gcc -E conftest.c
configure:4929: $? = 0
configure:4949: result: yes
configure:4984: checking for sys/ipc.h
configure:4991: result: yes
configure:5018: checking sys/select.h usability
configure:5030: gcc -c -g -O2 conftest.c >&5
configure:5036: $? = 0
configure:5040: test -z
|| test ! -s conftest.err
configure:5043: $? = 0
configure:5046: test -s conftest.o
configure:5049: $? = 0
configure:5059: result: yes
configure:5063: checking sys/select.h presence
configure:5073: gcc -E conftest.c
configure:5079: $? = 0
configure:5099: result: yes
configure:5134: checking for sys/select.h
configure:5141: result: yes
configure:5155: checking for socklen_t
configure:5180: gcc -c -g -O2 conftest.c >&5
configure:5186: $? = 0
configure:5190: test -z
|| test ! -s conftest.err
configure:5193: $? = 0
configure:5196: test -s conftest.o
configure:5199: $? = 0
configure:5210: result: yes
configure:5222: checking for an ANSI C-conforming const
configure:5289: gcc -c -g -O2 conftest.c >&5
configure:5295: $? = 0
configure:5299: test -z
|| test ! -s conftest.err
configure:5302: $? = 0
configure:5305: test -s conftest.o
configure:5308: $? = 0
configure:5319: result: yes
configure:5339: checking for strchr
configure:5396: gcc -o conftest -g -O2 conftest.c >&5
conftest.c:55:6: warning: incompatible redeclaration of library function 'strchr' [-Wincompatible-library-redeclaration]
char strchr ();
^
conftest.c:55:6: note: 'strchr' is a builtin with type 'char *(const char *, int)'
1 warning generated.
configure:5402: $? = 0
configure:5406: test -z
|| test ! -s conftest.err
configure:5409: $? = 0
configure:5412: test -s conftest
configure:5415: $? = 0
configure:5427: result: yes
configure:5339: checking for memcpy
configure:5396: gcc -o conftest -g -O2 conftest.c >&5
conftest.c:56:6: warning: incompatible redeclaration of library function 'memcpy' [-Wincompatible-library-redeclaration]
char memcpy ();
^
conftest.c:56:6: note: 'memcpy' is a builtin with type 'void *(void *, const void *, unsigned long)'
1 warning generated.
configure:5402: $? = 0
configure:5406: test -z
|| test ! -s conftest.err
configure:5409: $? = 0
configure:5412: test -s conftest
configure:5415: $? = 0
configure:5427: result: yes
configure:5339: checking for snprintf
configure:5396: gcc -o conftest -g -O2 conftest.c >&5
conftest.c:57:6: warning: incompatible redeclaration of library function 'snprintf' [-Wincompatible-library-redeclaration]
char snprintf ();
^
conftest.c:57:6: note: 'snprintf' is a builtin with type 'int (char *, unsigned long, const char *, ...)'
1 warning generated.
configure:5402: $? = 0
configure:5406: test -z
|| test ! -s conftest.err
configure:5409: $? = 0
configure:5412: test -s conftest
configure:5415: $? = 0
configure:5427: result: yes
configure:5339: checking for atexit
configure:5396: gcc -o conftest -g -O2 conftest.c >&5
configure:5402: $? = 0
configure:5406: test -z
|| test ! -s conftest.err
configure:5409: $? = 0
configure:5412: test -s conftest
configure:5415: $? = 0
configure:5427: result: yes
configure:5339: checking for setenv
configure:5396: gcc -o conftest -g -O2 conftest.c >&5
configure:5402: $? = 0
configure:5406: test -z
|| test ! -s conftest.err
configure:5409: $? = 0
configure:5412: test -s conftest
configure:5415: $? = 0
configure:5427: result: yes
configure:5339: checking for getaddrinfo
configure:5396: gcc -o conftest -g -O2 conftest.c >&5
configure:5402: $? = 0
configure:5406: test -z
|| test ! -s conftest.err
configure:5409: $? = 0
configure:5412: test -s conftest
configure:5415: $? = 0
configure:5427: result: yes
configure:5438: checking for connect
configure:5495: gcc -o conftest -g -O2 conftest.c >&5
configure:5501: $? = 0
configure:5505: test -z
|| test ! -s conftest.err
configure:5508: $? = 0
configure:5511: test -s conftest
configure:5514: $? = 0
configure:5526: result: yes
configure:5599: checking for gethostbyname
configure:5656: gcc -o conftest -g -O2 conftest.c >&5
configure:5662: $? = 0
configure:5666: test -z
|| test ! -s conftest.err
configure:5669: $? = 0
configure:5672: test -s conftest
configure:5675: $? = 0
configure:5687: result: yes
configure:5766: checking for threaded xpans
configure:5862: result: no
configure:5867: checking for shared library build
configure:5890: result: no
configure:5893: checking for request to use posix_spawn
configure:5902: result: no
configure:6160: checking for X
configure:6265: gcc -E conftest.c
conftest.c:37:10: fatal error: 'X11/Intrinsic.h' file not found
#include
^~~~~~~~~~~~~~~~~
1 error generated.
configure:6271: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "xpa"
| #define PACKAGE_TARNAME "xpa"
| #define PACKAGE_VERSION "2.1.18"
| #define PACKAGE_STRING "xpa 2.1.18"
| #define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SIZEOF_LONG 8
| #define STDC_HEADERS 1
| #define HAVE_GETOPT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_SETJMP_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SOCKLEN_T 1
| #define HAVE_STRCHR 1
| #define HAVE_MEMCPY 1
| #define HAVE_SNPRINTF 1
| #define HAVE_ATEXIT 1
| #define HAVE_SETENV 1
| #define HAVE_GETADDRINFO 1
| /* end confdefs.h. */
| #include
configure:6321: gcc -o conftest -g -O2 conftest.c -lXt >&5
conftest.c:37:10: fatal error: 'X11/Intrinsic.h' file not found
#include
^~~~~~~~~~~~~~~~~
1 error generated.
configure:6327: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "xpa"
| #define PACKAGE_TARNAME "xpa"
| #define PACKAGE_VERSION "2.1.18"
| #define PACKAGE_STRING "xpa 2.1.18"
| #define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SIZEOF_LONG 8
| #define STDC_HEADERS 1
| #define HAVE_GETOPT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_SETJMP_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SOCKLEN_T 1
| #define HAVE_STRCHR 1
| #define HAVE_MEMCPY 1
| #define HAVE_SNPRINTF 1
| #define HAVE_ATEXIT 1
| #define HAVE_SETENV 1
| #define HAVE_GETADDRINFO 1
| /* end confdefs.h. */
| #include
| int
| main ()
| {
| XtMalloc (0)
| ;
| return 0;
| }
configure:6380: result: no
configure:7571: checking for Tcl configuration
configure:7641: result: can't find Tcl configuration definitions
configure:7744: checking for incorporation of thread support
configure:7759: result: no
configure:7763: checking for gtk
configure:7785: result: no
configure:7794: checking darwin17.7.0 configuration
configure:8014: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by xpa config.status 2.1.18, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on chirakan.local
config.status:674: creating Makefile
config.status:674: creating xpa.pc
config.status:777: creating conf.h
config.status:917: conf.h is unchanged
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-apple-darwin17.7.0
ac_cv_build_alias=x86_64-apple-darwin17.7.0
ac_cv_c_compiler_gnu=yes
ac_cv_c_const=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_func_atexit=yes
ac_cv_func_connect=yes
ac_cv_func_getaddrinfo=yes
ac_cv_func_gethostbyname=yes
ac_cv_func_memcpy=yes
ac_cv_func_setenv=yes
ac_cv_func_snprintf=yes
ac_cv_func_strchr=yes
ac_cv_have_x=have_x=no
ac_cv_header_dlfcn_h=yes
ac_cv_header_getopt_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_malloc_h=no
ac_cv_header_memory_h=yes
ac_cv_header_pwd_h=yes
ac_cv_header_setjmp_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_ipc_h=yes
ac_cv_header_sys_mman_h=yes
ac_cv_header_sys_select_h=yes
ac_cv_header_sys_shm_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_sys_un_h=yes
ac_cv_header_unistd_h=yes
ac_cv_header_values_h=no
ac_cv_host=x86_64-apple-darwin17.7.0
ac_cv_host_alias=x86_64-apple-darwin17.7.0
ac_cv_objext=o
ac_cv_path_INTLTOOL_PERL=/usr/bin/perl
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_RANLIB=ranlib
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=
ac_cv_prog_egrep='grep -E'
ac_cv_sizeof_long=8
ac_cv_type_long=yes
ac_cv_type_socklen_t=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
CC='gcc'
CFLAGS='-g -O2'
CPP='gcc -E'
CPPFLAGS=''
DEFS='-DHAVE_CONFIG_H'
DOSHARED=''
ECHO_C='ECHO_N=''
ECHO_T=''
EGREP='grep -E'
EXEEXT=''
EXTRA_LIBS=''
GTK_CFLAGS=''
GTK_LIBS=''
LDFLAGS=' -g -O2'
LIBOBJS=''
LIBS=''
LLIB='$(LIB)'
LTLIBOBJS=''
OBJEXT='o'
PACKAGE_BUGREPORT='eric@cfa.harvard.edu'
PACKAGE_NAME='xpa'
PACKAGE_STRING='xpa 2.1.18'
PACKAGE_TARNAME='xpa'
PACKAGE_VERSION='2.1.18'
PATH_SEPARATOR=':'
RANLIB='ranlib'
SHELL='/bin/sh'
SZ_LONG='8'
TCL_BIN_DIR='# no Tcl configs found'
TCL_CFLAGS=''
TCL_LIBS=''
TCL_LIB_FILE=''
TCL_LIB_FLAG=''
TCL_LIB_SPEC=''
TCL_SRC_DIR=''
TCL_STUB_LIB_FILE=''
TCL_STUB_LIB_FLAG=''
TCL_STUB_LIB_SPEC=''
TCL_VERSION=''
TLIB=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_ct_CC='gcc'
ac_ct_RANLIB='ranlib'
bindir='${exec_prefix}/bin'
build='x86_64-apple-darwin17.7.0'
build_alias=''
build_cpu='x86_64'
build_os='darwin17.7.0'
build_vendor='apple'
datadir='${prefix}/share'
exec_prefix='${prefix}'
host='x86_64-apple-darwin17.7.0'
host_alias=''
host_cpu='x86_64'
host_os='darwin17.7.0'
host_vendor='apple'
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/miniconda3/envs/testimexam'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define HAVE_ATEXIT 1
#define HAVE_DLFCN_H 1
#define HAVE_GETADDRINFO 1
#define HAVE_GETOPT_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_MEMCPY 1
#define HAVE_MEMORY_H 1
#define HAVE_PWD_H 1
#define HAVE_SETENV 1
#define HAVE_SETJMP_H 1
#define HAVE_SNPRINTF 1
#define HAVE_SOCKLEN_T 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRCHR 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_IPC_H 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SHM_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_UN_H 1
#define HAVE_UNISTD_H 1
#define PACKAGE_BUGREPORT "eric@cfa.harvard.edu"
#define PACKAGE_NAME "xpa"
#define PACKAGE_STRING "xpa 2.1.18"
#define PACKAGE_TARNAME "xpa"
#define PACKAGE_VERSION "2.1.18"
#define SIZEOF_LONG 8
#define STDC_HEADERS 1
#define STDC_HEADERS 1
#define X_DISPLAY_MISSING 1
configure: exit 0
imexam-0.9.1/cextern/xpa/config.status 0000755 0006325 0002007 00000073513 13640502437 021531 0 ustar sosey STSCI\science 0000000 0000000 #! /bin/sh
# Generated by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=${CONFIG_SHELL-/bin/sh}
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
for as_var in \
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
fi
done
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" || {
# Find who we are. Look in the path if we contain no path at all
# relative or not.
case $0 in
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
{ { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
{ (exit 1); exit 1; }; }
fi
case $CONFIG_SHELL in
'')
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for as_base in sh bash ksh sh5; do
case $as_dir in
/*)
if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
fi;;
esac
done
done
;;
esac
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
# line-number line before each line; the second 'sed' does the real
# work. The second script uses 'N' to pair each line-number line
# with the numbered line, and appends trailing '-' during
# substitution so that $LINENO is not a special case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
# second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
sed '=' <$as_myself |
sed '
N
s,$,-,
: loop
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
s,-$,,
s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensible to this).
. ./$as_me.lineno
# Exit status is that of the last command.
exit
}
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conf$$.exe; then
# Don't use ln at all; we don't have any links
as_ln_s='cp -p'
else
as_ln_s='ln -s'
fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH
exec 6>&1
# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. Logging --version etc. is OK.
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by xpa $as_me 2.1.18, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
_CSEOF
echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
echo >&5
config_files=" Makefile xpa.pc"
config_headers=" conf.h"
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
-V, --version print version number, then exit
-q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
$config_files
Configuration headers:
$config_headers
Report bugs to ."
ac_cs_version="\
xpa config.status 2.1.18
configured by ./configure, generated by GNU Autoconf 2.59,
with options \"'--prefix=/miniconda3/envs/testimexam'\"
Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=.
# If no file are specified by the user, then we need to provide default
# value. By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=*)
ac_option=`expr "x$1" : 'x\([^=]*\)='`
ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ac_shift=:
;;
-*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
*) # This is not an option, so the user has probably given explicit
# arguments.
ac_option=$1
ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
{ { echo "$as_me:$LINENO: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
{ (exit 1); exit 1; }; };;
--help | --hel | -h )
echo "$ac_cs_usage"; exit 0 ;;
--debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
CONFIG_FILES="$CONFIG_FILES $ac_optarg"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
-*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
{ (exit 1); exit 1; }; } ;;
*) ac_config_targets="$ac_config_targets $1" ;;
esac
shift
done
ac_configure_extra_args=
if $ac_cs_silent; then
exec 6>/dev/null
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
if $ac_cs_recheck; then
echo "running /bin/sh ./configure " '--prefix=/miniconda3/envs/testimexam' $ac_configure_extra_args " --no-create --no-recursion" >&6
exec /bin/sh ./configure '--prefix=/miniconda3/envs/testimexam' $ac_configure_extra_args --no-create --no-recursion
fi
for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"xpa.pc" ) CONFIG_FILES="$CONFIG_FILES xpa.pc" ;;
"conf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS conf.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
fi
# Have a temporary directory for convenience. Make it in the build tree
# simply because there is no reason to put it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
trap '{ (exit 1); exit 1; }' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
{
tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
#
# CONFIG_FILES section.
#
# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "$CONFIG_FILES"; then
# Protect against being on the right side of a sed subst in config.status.
sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
s,@SHELL@,/bin/sh,;t t
s,@PATH_SEPARATOR@,:,;t t
s,@PACKAGE_NAME@,xpa,;t t
s,@PACKAGE_TARNAME@,xpa,;t t
s,@PACKAGE_VERSION@,2.1.18,;t t
s,@PACKAGE_STRING@,xpa 2.1.18,;t t
s,@PACKAGE_BUGREPORT@,eric@cfa.harvard.edu,;t t
s,@exec_prefix@,${prefix},;t t
s,@prefix@,/miniconda3/envs/testimexam,;t t
s,@program_transform_name@,s,x,x,,;t t
s,@bindir@,${exec_prefix}/bin,;t t
s,@sbindir@,${exec_prefix}/sbin,;t t
s,@libexecdir@,${exec_prefix}/libexec,;t t
s,@datadir@,${prefix}/share,;t t
s,@sysconfdir@,${prefix}/etc,;t t
s,@sharedstatedir@,${prefix}/com,;t t
s,@localstatedir@,${prefix}/var,;t t
s,@libdir@,${exec_prefix}/lib,;t t
s,@includedir@,${prefix}/include,;t t
s,@oldincludedir@,/usr/include,;t t
s,@infodir@,${prefix}/info,;t t
s,@mandir@,${prefix}/man,;t t
s,@build_alias@,,;t t
s,@host_alias@,,;t t
s,@target_alias@,,;t t
s,@DEFS@,-DHAVE_CONFIG_H,;t t
s,@ECHO_C@,\c,;t t
s,@ECHO_N@,,;t t
s,@ECHO_T@,,;t t
s,@LIBS@,,;t t
s,@build@,x86_64-apple-darwin17.7.0,;t t
s,@build_cpu@,x86_64,;t t
s,@build_vendor@,apple,;t t
s,@build_os@,darwin17.7.0,;t t
s,@host@,x86_64-apple-darwin17.7.0,;t t
s,@host_cpu@,x86_64,;t t
s,@host_vendor@,apple,;t t
s,@host_os@,darwin17.7.0,;t t
s,@CC@,gcc,;t t
s,@CFLAGS@,-g -O2,;t t
s,@LDFLAGS@, -g -O2,;t t
s,@CPPFLAGS@,,;t t
s,@ac_ct_CC@,gcc,;t t
s,@EXEEXT@,,;t t
s,@OBJEXT@,o,;t t
s,@CPP@,gcc -E,;t t
s,@EGREP@,grep -E,;t t
s,@SZ_LONG@,8,;t t
s,@RANLIB@,ranlib,;t t
s,@ac_ct_RANLIB@,ranlib,;t t
s,@TLIB@,,;t t
s,@DOSHARED@,,;t t
s,@LLIB@,$(LIB),;t t
s,@X_CFLAGS@,,;t t
s,@X_PRE_LIBS@,,;t t
s,@X_LIBS@,,;t t
s,@X_EXTRA_LIBS@,,;t t
s,@TCL_VERSION@,,;t t
s,@TCL_BIN_DIR@,# no Tcl configs found,;t t
s,@TCL_SRC_DIR@,,;t t
s,@TCL_LIB_FILE@,,;t t
s,@TCL_LIB_FLAG@,,;t t
s,@TCL_LIB_SPEC@,,;t t
s,@TCL_STUB_LIB_FILE@,,;t t
s,@TCL_STUB_LIB_FLAG@,,;t t
s,@TCL_STUB_LIB_SPEC@,,;t t
s,@TCL_CFLAGS@,,;t t
s,@TCL_LIBS@,,;t t
s,@GTK_CFLAGS@,,;t t
s,@GTK_LIBS@,,;t t
s,@EXTRA_LIBS@,,;t t
s,@LIBOBJS@,,;t t
s,@LTLIBOBJS@,,;t t
CEOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_lines=48
ac_sed_frag=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_lines # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
else
sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
if test ! -s $tmp/subs.frag; then
ac_more_lines=false
else
# The purpose of the label and of the branching condition is to
# speed up the sed processing (if there are no `@' at all, there
# is no need to browse any of the substitutions).
# These are the two extra sed commands mentioned above.
(echo ':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
else
ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
fi
ac_sed_frag=`expr $ac_sed_frag + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_lines`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
fi # test -n "$CONFIG_FILES"
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
cat >$tmp/stdin
ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
while test ! -d "$as_dir"; do
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
done
test ! -n "$as_dirs" || mkdir $as_dirs
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
case "$ac_dir" in
.) ac_abs_builddir=`pwd`;;
[\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
*) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
.) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
*) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
.) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
*) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
.) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
*) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
configure_input=
else
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
for f in $ac_file_in; do
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo "$f";;
*) # Relative
if test -f "$f"; then
# Build tree
echo "$f"
elif test -f "$srcdir/$f"; then
# Source tree
echo "$srcdir/$f"
else
# /dev/null tree
{ { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
sed "/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ ]*$//;
}
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@abs_srcdir@,$ac_abs_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
s,@builddir@,$ac_builddir,;t t
s,@abs_builddir@,$ac_abs_builddir,;t t
s,@top_builddir@,$ac_top_builddir,;t t
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
if test x"$ac_file" != x-; then
mv $tmp/out $ac_file
else
cat $tmp/out
rm -f $tmp/out
fi
done
#
# CONFIG_HEADER section.
#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='[ ].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
cat >$tmp/stdin
ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
for f in $ac_file_in; do
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
# Do quote $f, to prevent DOS paths from being IFS'd.
echo "$f";;
*) # Relative
if test -f "$f"; then
# Build tree
echo "$f"
elif test -f "$srcdir/$f"; then
# Source tree
echo "$srcdir/$f"
else
# /dev/null tree
{ { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
# Handle all the #define templates only if necessary.
if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then
# If there are no defines, we may have an empty if/fi
:
cat >$tmp/defines.sed <$tmp/out
rm -f $tmp/in
mv $tmp/out $tmp/in
fi # grep
# Handle all the #undef templates
cat >$tmp/undefs.sed <$tmp/out
rm -f $tmp/in
mv $tmp/out $tmp/in
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
echo "/* Generated by configure. */" >$tmp/config.h
else
echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
fi
cat $tmp/in >>$tmp/config.h
rm -f $tmp/in
if test x"$ac_file" != x-; then
if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
while test ! -d "$as_dir"; do
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
done
test ! -n "$as_dirs" || mkdir $as_dirs
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }; }
rm -f $ac_file
mv $tmp/config.h $ac_file
fi
else
cat $tmp/config.h
rm -f $tmp/config.h
fi
done
{ (exit 0); exit 0; }
imexam-0.9.1/cextern/xpa/config.sub 0000755 0006325 0002007 00000106723 13640457670 021007 0 ustar sosey STSCI\science 0000000 0000000 #! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2016-09-05'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to .
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo $1
exit ;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
amigaos | amigados)
basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
asmjs)
basic_machine=asmjs-unknown
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
e500v[12])
basic_machine=powerpc-unknown
os=$os"spe"
;;
e500v[12]-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
go32)
basic_machine=i386-pc
os=-go32
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
basic_machine=x86_64-pc
os=-mingw64
;;
mingw32)
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
moxiebox)
basic_machine=moxie-unknown
os=-moxiebox
;;
msdos)
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
nonstopux)
basic_machine=mips-compaq
os=-nonstopux
;;
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
pw32)
basic_machine=i586-unknown
os=-pw32
;;
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tile*)
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos* | -phoenix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
;;
-nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-ios)
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
;;
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-cnk*|-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
imexam-0.9.1/cextern/xpa/configure 0000755 0006325 0002007 00001024011 13640457670 020721 0 ustar sosey STSCI\science 0000000 0000000 #! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for xpa 2.1.18.
#
# Report bugs to .
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
for as_var in \
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
fi
done
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" || {
# Find who we are. Look in the path if we contain no path at all
# relative or not.
case $0 in
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
{ echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
{ (exit 1); exit 1; }; }
fi
case $CONFIG_SHELL in
'')
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for as_base in sh bash ksh sh5; do
case $as_dir in
/*)
if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
fi;;
esac
done
done
;;
esac
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
# line-number line before each line; the second 'sed' does the real
# work. The second script uses 'N' to pair each line-number line
# with the numbered line, and appends trailing '-' during
# substitution so that $LINENO is not a special case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
# second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
sed '=' <$as_myself |
sed '
N
s,$,-,
: loop
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
s,-$,,
s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensible to this).
. ./$as_me.lineno
# Exit status is that of the last command.
exit
}
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conf$$.exe; then
# Don't use ln at all; we don't have any links
as_ln_s='cp -p'
else
as_ln_s='ln -s'
fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
exec 6>&1
#
# Initializations.
#
ac_default_prefix=/usr/local
ac_config_libobj_dir=.
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
# This variable seems obsolete. It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME='xpa'
PACKAGE_TARNAME='xpa'
PACKAGE_VERSION='2.1.18'
PACKAGE_STRING='xpa 2.1.18'
PACKAGE_BUGREPORT='eric@cfa.harvard.edu'
ac_unique_file="./xpa.h"
# Factoring default headers for most tests.
ac_includes_default="\
#include
#if HAVE_SYS_TYPES_H
# include
#endif
#if HAVE_SYS_STAT_H
# include
#endif
#if STDC_HEADERS
# include
# include
#else
# if HAVE_STDLIB_H
# include
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include
# endif
# include
#endif
#if HAVE_STRINGS_H
# include
#endif
#if HAVE_INTTYPES_H
# include
#else
# if HAVE_STDINT_H
# include
# endif
#endif
#if HAVE_UNISTD_H
# include
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SZ_LONG RANLIB ac_ct_RANLIB TLIB DOSHARED LLIB X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_CFLAGS TCL_LIBS GTK_CFLAGS GTK_LIBS EXTRA_LIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE
# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file=$ac_optarg ;;
--config-cache | -C)
cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir=$ac_optarg ;;
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
case $ac_option in
*=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he | -h)
ac_init_help=long ;;
-help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
ac_init_help=recursive ;;
-help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
ac_init_help=short ;;
-host | --host | --hos | --ho)
ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers | -V)
ac_init_version=: ;;
-with-* | --with-*)
ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
case $ac_option in
*=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
ac_package=`echo $ac_package | sed 's/-/_/g'`
eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
-*) { echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; }
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
eval "$ac_envvar='$ac_optarg'"
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
{ echo "$as_me: error: missing argument to $ac_option" >&2
{ (exit 1); exit 1; }; }
fi
# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* | NONE | '' ) ;;
*) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* ) ;;
*) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias
# FIXME: To remove some day.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
fi
ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$0" : 'X\(//\)[^/]' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
{ (exit 1); exit 1; }; }
else
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
fi
fi
(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
{ echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
{ (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures xpa 2.1.18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
_ACEOF
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
_ACEOF
cat <<\_ACEOF
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xpa 2.1.18:";;
esac
cat <<\_ACEOF
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-threaded-xpans build threaded xpans
--enable-shared build shared libraries
--enable-posix_spawn use posix_spawn() if available
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-x use the X Window System
--with-tcl directory containing tcl configuration (tclConfig.sh)
--with-threads build for use in threaded programs
--with-gtk= include directory for gtk e.g. /usr/include/gtk-1.2
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L if you have libraries in a
nonstandard directory
CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have
headers in a nonstandard directory
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to .
_ACEOF
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
test -d $ac_dir || continue
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
case "$ac_dir" in
.) ac_abs_builddir=`pwd`;;
[\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
*) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
.) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
*) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
.) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
*) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
.) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
*) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
if test -f $ac_srcdir/configure.gnu; then
echo
$SHELL $ac_srcdir/configure.gnu --help=recursive
elif test -f $ac_srcdir/configure; then
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
cd $ac_popdir
done
fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
xpa configure 2.1.18
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit 0
fi
exec 5>config.log
cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xpa $as_me 2.1.18, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
_ACEOF
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
_ASUNAME
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
echo "PATH: $as_dir"
done
} >&5
cat >&5 <<_ACEOF
## ----------- ##
## Core tests. ##
## ----------- ##
_ACEOF
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
for ac_arg
do
case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
2)
ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
case $ac_arg in
*=* | --config-cache | -C | -disable-* | --disable-* \
| -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
| -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
| -with-* | --with-* | -without-* | --without-* | --x)
case "$ac_configure_args0 " in
"$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
esac
;;
-* ) ac_must_keep_next=true ;;
esac
fi
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
# Get rid of the leading space.
ac_sep=" "
;;
esac
done
done
$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Be sure not to use single quotes in there, as some shells,
# such as our DU 5.0 friend, will then `close' the trap.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
{
(set) 2>&1 |
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
echo
cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
echo
for ac_var in $ac_subst_vars
do
eval ac_val=$`echo $ac_var`
echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
if test -n "$ac_subst_files"; then
cat <<\_ASBOX
## ------------- ##
## Output files. ##
## ------------- ##
_ASBOX
echo
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
if test -s confdefs.h; then
cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
echo
sed "/^$/d" confdefs.h | sort
echo
fi
test "$ac_signal" != 0 &&
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo >confdefs.h
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
{ echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
{ echo "$as_me:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
*) . ./$cache_file;;
esac
fi
else
{ echo "$as_me:$LINENO: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val="\$ac_cv_env_${ac_var}_value"
eval ac_new_val="\$ac_env_${ac_var}_value"
case $ac_old_set,$ac_new_set in
set,)
{ echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
{ echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
{ echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
{ echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
*) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
{ echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
{ { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers conf.h"
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
elif test -f $ac_dir/shtool; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
{ (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
{ { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
{ (exit 1); exit 1; }; }
echo "$as_me:$LINENO: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_build_alias=$build_alias
test -z "$ac_cv_build_alias" &&
ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
{ { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
{ (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
{ { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_host_alias=$host_alias
test -z "$ac_cv_host_alias" &&
ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
{ { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# save LDFLAGS
XLDFLAGS="$LDFLAGS"
#
# checks that we use in most projects
#
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
for ac_prog in cl
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
for ac_prog in cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$ac_ct_CC" && break
done
CC=$ac_ct_CC
fi
fi
test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
echo "$as_me:$LINENO:" \
"checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
(eval $ac_compiler --version &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5
(eval $ac_compiler -v &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5
(eval $ac_compiler -V &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Find the output, starting from the most likely. This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.
# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
# b.out is created by i960 compilers.
for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
;;
conftest.$ac_ext )
# This is the source file.
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
# FIXME: I believe we export ac_cv_exeext for Libtool,
# but it would be cool to find out if it's true. Does anybody
# maintain Libtool? --akim.
export ac_cv_exeext
break;;
* )
break;;
esac
done
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
ac_exeext=$ac_cv_exeext
echo "$as_me:$LINENO: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6
echo "$as_me:$LINENO: checking for suffix of executables" >&5
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
export ac_cv_exeext
break;;
* ) break;;
esac
done
else
{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest$ac_cv_exeext
echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
#ifndef __GNUC__
choke me
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include
#include
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
char **p;
int i;
{
return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
char *s;
va_list v;
va_start (v,p);
s = g (p, va_arg (v,int));
va_end (v);
return s;
}
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
as 'x'. The following induces an error, until -std1 is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
that's true only with -std1. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
# HP-UX 10.20 and later -Ae
# HP-UX older versions -Aa -D_HPUX_SOURCE
# SVR4 -Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_stdc=$ac_arg
break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
fi
case "x$ac_cv_prog_cc_stdc" in
x|xno)
echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
*)
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
# Some people use a C++ compiler to compile C. Since we use `exit',
# in C++ we need to declare it. In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
'' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
#include
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
echo '#endif' >>confdefs.h
fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test x"${EXEEXT}" = "xno"; then
EXEEXT=""
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
break
fi
done
ac_cv_prog_CPP=$CPP
fi
CPP=$ac_cv_prog_CPP
else
ac_cv_prog_CPP=$CPP
fi
echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
if test "${ac_cv_prog_egrep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if echo a | (grep -E '(a|b)') >/dev/null 2>&1
then ac_cv_prog_egrep='grep -E'
else ac_cv_prog_egrep='egrep'
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
echo "${ECHO_T}$ac_cv_prog_egrep" >&6
EGREP=$ac_cv_prog_egrep
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include
#include
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
echo "$as_me:$LINENO: checking for long" >&5
echo $ECHO_N "checking for long... $ECHO_C" >&6
if test "${ac_cv_type_long+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
if ((long *) 0)
return 0;
if (sizeof (long))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_long=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_long=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6
echo "$as_me:$LINENO: checking size of long" >&5
echo $ECHO_N "checking size of long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$ac_cv_type_long" = yes; then
# The cast to unsigned long works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
if test "$cross_compiling" = yes; then
# Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_lo=0 ac_mid=0
while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_hi=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_lo=`expr $ac_mid + 1`
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
break
fi
ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_hi=-1 ac_mid=-1
while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_lo=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_hi=`expr '(' $ac_mid ')' - 1`
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
break
fi
ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_lo= ac_hi=
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_hi=$ac_mid
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long=$ac_lo;;
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
if test "$cross_compiling" = yes; then
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
long longval () { return (long) (sizeof (long)); }
unsigned long ulongval () { return (long) (sizeof (long)); }
#include
#include
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (! f)
exit (1);
if (((long) (sizeof (long))) < 0)
{
long i = longval ();
if (i != ((long) (sizeof (long))))
exit (1);
fprintf (f, "%ld\n", i);
}
else
{
unsigned long i = ulongval ();
if (i != ((long) (sizeof (long))))
exit (1);
fprintf (f, "%lu\n", i);
}
exit (ferror (f) || fclose (f) != 0);
;
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_long=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute sizeof (long), 77
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
rm -f conftest.val
else
ac_cv_sizeof_long=0
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
cat >>confdefs.h <<_ACEOF
#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF
SZ_LONG=$ac_cv_sizeof_long
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
echo "$as_me:$LINENO: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
RANLIB=$ac_ct_RANLIB
else
RANLIB="$ac_cv_prog_RANLIB"
fi
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include
#include
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF
fi
for ac_header in malloc.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in getopt.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in pwd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in values.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in dlfcn.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in setjmp.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in sys/un.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in sys/shm.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in sys/mman.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in sys/ipc.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in sys/select.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
echo "$as_me:$LINENO: checking for socklen_t" >&5
echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
if test "${ac_cv_type_socklen_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
int
main ()
{
if ((socklen_t *) 0)
return 0;
if (sizeof (socklen_t))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_socklen_t=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_socklen_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
if test $ac_cv_type_socklen_t = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_SOCKLEN_T 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
typedef int charset[2];
const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
}
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_const=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_const=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
cat >>confdefs.h <<\_ACEOF
#define const
_ACEOF
fi
for ac_func in strchr memcpy snprintf atexit setenv getaddrinfo
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case declares $ac_func.
For example, HP-UX 11i declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != $ac_func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
echo "$as_me:$LINENO: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6
if test "${ac_cv_func_connect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define connect to an innocuous variant, in case declares connect.
For example, HP-UX 11i declares gettimeofday. */
#define connect innocuous_connect
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef connect
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
char (*f) () = connect;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != connect;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_connect=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_connect=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6
if test $ac_cv_func_connect = no; then
echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect ();
int
main ()
{
connect ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_socket_connect=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_socket_connect=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
EXTRA_LIBS="$EXTRA_LIBS -lsocket"
fi
fi
echo "$as_me:$LINENO: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define gethostbyname to an innocuous variant, in case declares gethostbyname.
For example, HP-UX 11i declares gettimeofday. */
#define gethostbyname innocuous_gethostbyname
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef gethostbyname
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
char (*f) () = gethostbyname;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != gethostbyname;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
if test $ac_cv_func_gethostbyname = no; then
echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname ();
int
main ()
{
gethostbyname ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_nsl_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
EXTRA_LIBS="$EXTRA_LIBS -lnsl"
fi
fi
# AC_CHECK_LIB(db, snprintf, EXTRA_LIBS="$EXTRA_LIBS -ldb")
#
# checks specific to this project
#
echo "$as_me:$LINENO: checking for threaded xpans" >&5
echo $ECHO_N "checking for threaded xpans... $ECHO_C" >&6
# Check whether --enable-threaded-xpans or --disable-threaded-xpans was given.
if test "${enable_threaded_xpans+set}" = set; then
enableval="$enable_threaded_xpans"
fun_ok=$enableval
else
fun_ok=no
fi;
if test "$fun_ok" = "yes"; then
echo "$as_me:$LINENO: result: $fun_ok" >&5
echo "${ECHO_T}$fun_ok" >&6
echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create ();
int
main ()
{
pthread_create ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pthread_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pthread_pthread_create=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
if test $ac_cv_lib_pthread_pthread_create = yes; then
have_pthread=yes
fi
if test x"${have_pthread}" = x"yes"; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
#define _REENTRANT 1
_ACEOF
TLIB="-lpthread"
else
{ { echo "$as_me:$LINENO: error: no threads found ... can't use enable-threaded-xpans" >&5
echo "$as_me: error: no threads found ... can't use enable-threaded-xpans" >&2;}
{ (exit 1); exit 1; }; }
fi
else
echo "$as_me:$LINENO: result: $fun_ok" >&5
echo "${ECHO_T}$fun_ok" >&6
fi
echo "$as_me:$LINENO: checking for shared library build" >&5
echo $ECHO_N "checking for shared library build... $ECHO_C" >&6
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
fun_ok=$enableval
else
fun_ok=no
fi;
if test "$fun_ok" != "no"; then
fpic="yes"
DOSHARED=shlib
if test "$fun_ok" = "link"; then
LLIB="-L. -l$PACKAGE_NAME"
else
LLIB='$(LIB)'
fi
else
DOSHARED=""
LLIB='$(LIB)'
fi
echo "$as_me:$LINENO: result: $fun_ok" >&5
echo "${ECHO_T}$fun_ok" >&6
echo "$as_me:$LINENO: checking for request to use posix_spawn" >&5
echo $ECHO_N "checking for request to use posix_spawn... $ECHO_C" >&6
# Check whether --enable-posix_spawn or --disable-posix_spawn was given.
if test "${enable_posix_spawn+set}" = set; then
enableval="$enable_posix_spawn"
fun_ok=$enableval
else
fun_ok=no
fi;
echo "$as_me:$LINENO: result: $fun_ok" >&5
echo "${ECHO_T}$fun_ok" >&6
if test "$fun_ok" = "yes"; then
for ac_func in posix_spawn _NSGetEnviron
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case declares $ac_func.
For example, HP-UX 11i declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != $ac_func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in crt_externs.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to eric@cfa.harvard.edu ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
fi
echo "$as_me:$LINENO: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
withval="$with_x"
fi;
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
# The user explicitly disabled X.
have_x=disabled
else
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
# Both variables are already set.
have_x=yes
else
if test "${ac_cv_have_x+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
rm -fr conftest.dir
if mkdir conftest.dir; then
cd conftest.dir
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
cat >Imakefile <<'_ACEOF'
acfindx:
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
_ACEOF
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
for ac_extension in a so sl; do
if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
test -f $ac_im_libdir/libX11.$ac_extension; then
ac_im_usrlibdir=$ac_im_libdir; break
fi
done
# Screen out bogus values from the imake configuration. They are
# bogus both because they are the default anyway, and because
# using them would break gcc on systems where it needs fixed includes.
case $ac_im_incroot in
/usr/include) ;;
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
esac
case $ac_im_usrlibdir in
/usr/lib | /lib) ;;
*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
esac
fi
cd ..
rm -fr conftest.dir
fi
# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/usr/X11/include
/usr/X11R6/include
/usr/X11R5/include
/usr/X11R4/include
/usr/include/X11
/usr/include/X11R6
/usr/include/X11R5
/usr/include/X11R4
/usr/local/X11/include
/usr/local/X11R6/include
/usr/local/X11R5/include
/usr/local/X11R4/include
/usr/local/include/X11
/usr/local/include/X11R6
/usr/local/include/X11R5
/usr/local/include/X11R4
/usr/X386/include
/usr/x386/include
/usr/XFree86/include/X11
/usr/include
/usr/local/include
/usr/unsupported/include
/usr/athena/include
/usr/local/x11r5/include
/usr/lpp/Xamples/include
/usr/openwin/include
/usr/openwin/share/include'
if test "$ac_x_includes" = no; then
# Guess where to find include files, by looking for Intrinsic.h.
# First, try using that file with no special directory specified.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# We can compile using X headers with no special include directory.
ac_x_includes=
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
for ac_dir in $ac_x_header_dirs; do
if test -r "$ac_dir/X11/Intrinsic.h"; then
ac_x_includes=$ac_dir
break
fi
done
fi
rm -f conftest.err conftest.$ac_ext
fi # $ac_x_includes = no
if test "$ac_x_libraries" = no; then
# Check for the libraries.
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
LIBS="-lXt $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
int
main ()
{
XtMalloc (0)
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
LIBS=$ac_save_LIBS
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
# Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl; do
if test -r $ac_dir/libXt.$ac_extension; then
ac_x_libraries=$ac_dir
break 2
fi
done
done
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no
if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
# Didn't find X anywhere. Cache the known absence of X.
ac_cv_have_x="have_x=no"
else
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes \
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi
fi
eval "$ac_cv_have_x"
fi # $with_x != no
if test "$have_x" != yes; then
echo "$as_me:$LINENO: result: $have_x" >&5
echo "${ECHO_T}$have_x" >&6
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes \
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
fi
if test "$no_x" = yes; then
# Not all programs may use this symbol, but it does not hurt to define it.
cat >>confdefs.h <<\_ACEOF
#define X_DISPLAY_MISSING 1
_ACEOF
X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
if test -n "$x_includes"; then
X_CFLAGS="$X_CFLAGS -I$x_includes"
fi
# It would also be nice to do this for all -L options, not just this one.
if test -n "$x_libraries"; then
X_LIBS="$X_LIBS -L$x_libraries"
# For Solaris; some versions of Sun CC require a space after -R and
# others require no space. Words are not sufficient . . . .
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*)
echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_R_nospace=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_R_nospace=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test $ac_R_nospace = yes; then
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
X_LIBS="$X_LIBS -R$x_libraries"
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_R_space=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_R_space=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test $ac_R_space = yes; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
X_LIBS="$X_LIBS -R $x_libraries"
else
echo "$as_me:$LINENO: result: neither works" >&5
echo "${ECHO_T}neither works" >&6
fi
fi
LIBS=$ac_xsave_LIBS
esac
fi
# Check for system-dependent libraries X programs must link with.
# Do this before checking for the system-independent R6 libraries
# (-lICE), since we may need -lsocket or whatever for X linking.
if test "$ISC" = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
else
# Martyn Johnson says this is needed for Ultrix, if the X
# libraries were built with DECnet support. And Karl Berry says
# the Alpha needs dnet_stub (dnet does not exist).
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XOpenDisplay ();
int
main ()
{
XOpenDisplay ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_ntoa ();
int
main ()
{
dnet_ntoa ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dnet_dnet_ntoa=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dnet_dnet_ntoa=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_ntoa ();
int
main ()
{
dnet_ntoa ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dnet_stub_dnet_ntoa=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi
fi
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$ac_xsave_LIBS"
# msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
# to get the SysV transport functions.
# Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
# needs -lnsl.
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to T.E. Dickey.
# The functions gethostbyname, getservbyname, and inet_addr are
# in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
echo "$as_me:$LINENO: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define gethostbyname to an innocuous variant, in case declares gethostbyname.
For example, HP-UX 11i declares gettimeofday. */
#define gethostbyname innocuous_gethostbyname
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef gethostbyname
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
char (*f) () = gethostbyname;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != gethostbyname;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
if test $ac_cv_func_gethostbyname = no; then
echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname ();
int
main ()
{
gethostbyname ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_nsl_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi
if test $ac_cv_lib_nsl_gethostbyname = no; then
echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname ();
int
main ()
{
gethostbyname ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_bsd_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_bsd_gethostbyname=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
if test $ac_cv_lib_bsd_gethostbyname = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
fi
fi
fi
# lieder@skyler.mavd.honeywell.com says without -lsocket,
# socket/setsockopt and other routines are undefined under SCO ODT
# 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
# on later versions), says Simon Leinen: it contains gethostby*
# variants that don't use the name server (or something). -lsocket
# must be given before -lnsl if both are needed. We assume that
# if connect needs -lnsl, so does gethostbyname.
echo "$as_me:$LINENO: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6
if test "${ac_cv_func_connect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define connect to an innocuous variant, in case declares connect.
For example, HP-UX 11i declares gettimeofday. */
#define connect innocuous_connect
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef connect
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
char (*f) () = connect;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != connect;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_connect=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_connect=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6
if test $ac_cv_func_connect = no; then
echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect ();
int
main ()
{
connect ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_socket_connect=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_socket_connect=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi
fi
# Guillermo Gomez says -lposix is necessary on A/UX.
echo "$as_me:$LINENO: checking for remove" >&5
echo $ECHO_N "checking for remove... $ECHO_C" >&6
if test "${ac_cv_func_remove+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define remove to an innocuous variant, in case declares remove.
For example, HP-UX 11i declares gettimeofday. */
#define remove innocuous_remove
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef remove
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char remove ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_remove) || defined (__stub___remove)
choke me
#else
char (*f) () = remove;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != remove;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_remove=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_remove=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6
if test $ac_cv_func_remove = no; then
echo "$as_me:$LINENO: checking for remove in -lposix" >&5
echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
if test "${ac_cv_lib_posix_remove+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char remove ();
int
main ()
{
remove ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_posix_remove=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_posix_remove=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
if test $ac_cv_lib_posix_remove = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi
fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo "$as_me:$LINENO: checking for shmat" >&5
echo $ECHO_N "checking for shmat... $ECHO_C" >&6
if test "${ac_cv_func_shmat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define shmat to an innocuous variant, in case declares shmat.
For example, HP-UX 11i declares gettimeofday. */
#define shmat innocuous_shmat
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef shmat
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shmat ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
#else
char (*f) () = shmat;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != shmat;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_shmat=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_shmat=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6
if test $ac_cv_func_shmat = no; then
echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shmat ();
int
main ()
{
shmat ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ipc_shmat=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ipc_shmat=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
if test $ac_cv_lib_ipc_shmat = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
fi
fi
fi
# Check for libraries that X11R6 Xt/Xaw programs need.
ac_save_LDFLAGS=$LDFLAGS
test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
# check for ICE first), but we must link in the order -lSM -lICE or
# we get undefined symbols. So assume we have SM if we have ICE.
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# John Interrante, Karl Berry
echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char IceConnectionNumber ();
int
main ()
{
IceConnectionNumber ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ICE_IceConnectionNumber=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ICE_IceConnectionNumber=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi
LDFLAGS=$ac_save_LDFLAGS
fi
if test x"${have_x}" = "xyes"; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_XT 1
_ACEOF
fi
#
# Ok, lets find the tcl configuration
# First, look for one uninstalled.
# the alternative search directory is invoked by --with-tcl
#
if test x"${no_tcl}" = x ; then
# we reset no_tcl in case something fails here
no_tcl=true
# Check whether --with-tcl or --without-tcl was given.
if test "${with_tcl+set}" = set; then
withval="$with_tcl"
with_tclconfig=${withval}
fi;
echo "$as_me:$LINENO: checking for Tcl configuration" >&5
echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
if test x"${withval}" != xno ; then
if test "${ac_cv_c_tclconfig+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# First check to see if --with-tcl was specified.
if test x"${with_tclconfig}" != x ; then
if test -f "${with_tclconfig}/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
else
echo "$as_me:$LINENO: result: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
echo "${ECHO_T}${with_tclconfig} directory doesn't contain tclConfig.sh" >&6
fi
fi
# then check for a private Tcl installation
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in \
../tcl \
`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
../../tcl \
`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
../../../tcl \
`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
if test -f "$i/unix/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
break
fi
done
fi
# check in a few common install locations
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in `ls -d ${libdir} 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i; pwd)`
break
fi
done
fi
# check in a few other private locations
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in \
${srcdir}/../tcl \
`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
if test -f "$i/unix/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
break
fi
done
fi
fi
else
echo "$as_me:$LINENO: result: skipping Tcl configuration" >&5
echo "${ECHO_T}skipping Tcl configuration" >&6
ac_cv_c_tclconfig="none"
fi
if test x"${ac_cv_c_tclconfig}" = x ; then
TCL_BIN_DIR="# no Tcl configs found"
echo "$as_me:$LINENO: result: can't find Tcl configuration definitions" >&5
echo "${ECHO_T}can't find Tcl configuration definitions" >&6
# no Tcl is OK egm 03/25/03
# AC_MSG_WARN(Can't find Tcl configuration definitions)
# exit 0
elif test x"${ac_cv_c_tclconfig}" = xnone ; then
TCL_BIN_DIR=""
else
no_tcl=
TCL_BIN_DIR=${ac_cv_c_tclconfig}
echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
echo "${ECHO_T}found $TCL_BIN_DIR/tclConfig.sh" >&6
fi
fi
if test x"${no_tcl}" = x ; then
echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig.sh... $ECHO_C" >&6
if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
echo "$as_me:$LINENO: result: loading" >&5
echo "${ECHO_T}loading" >&6
. $TCL_BIN_DIR/tclConfig.sh
else
echo "$as_me:$LINENO: result: file not found" >&5
echo "${ECHO_T}file not found" >&6
fi
#
# If the TCL_BIN_DIR is the build directory (not the install directory),
# then set the common variable name to the value of the build variables.
# For example, the variable TCL_LIB_SPEC will be set to the value
# of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
# instead of TCL_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
#
if test -f $TCL_BIN_DIR/Makefile ; then
TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
fi
#
# eval is required to do the TCL_DBGX substitution
#
eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
if test -r $TCL_PREFIX/include/tcl.h; then
TCL_CFLAGS="$TCL_INCLUDE_SPEC"
if test x"$DOSHARED" != x -a x"$TCL_SUPPORTS_STUBS" = x1; then
TCL_LIBS="$TCL_STUB_LIB_SPEC"
TCL_CFLAGS="$TCL_CFLAGS -DUSE_TCL_STUBS=1"
echo "$as_me:$LINENO: result: Tcl support will utilize stubs library: $TCL_LIBS" >&5
echo "${ECHO_T}Tcl support will utilize stubs library: $TCL_LIBS" >&6
else
TCL_LIBS="$TCL_LIB_SPEC"
echo "$as_me:$LINENO: result: Tcl support will utilize library: $TCL_LIBS" >&5
echo "${ECHO_T}Tcl support will utilize library: $TCL_LIBS" >&6
fi
cat >>confdefs.h <<\_ACEOF
#define HAVE_TCL 1
_ACEOF
else
if test x"${with_tclconfig}" != x ; then
TCL_CFLAGS="$TCL_INCLUDE_SPEC"
TCL_LIBS="$TCL_LIB_SPEC"
cat >>confdefs.h <<\_ACEOF
#define HAVE_TCL 1
_ACEOF
echo "$as_me:$LINENO: result: warning: tcl.h not found with --with-tcl ... tcl build might fail" >&5
echo "${ECHO_T}warning: tcl.h not found with --with-tcl ... tcl build might fail" >&6
else
echo "$as_me:$LINENO: result: $TCL_PREFIX/include/tcl.h not found ... use --with-tcl to build tcl explicitly" >&5
echo "${ECHO_T}$TCL_PREFIX/include/tcl.h not found ... use --with-tcl to build tcl explicitly" >&6
fi
fi
fi
echo "$as_me:$LINENO: checking for incorporation of thread support" >&5
echo $ECHO_N "checking for incorporation of thread support... $ECHO_C" >&6
# Check whether --with-threads or --without-threads was given.
if test "${with_threads+set}" = set; then
withval="$with_threads"
thr=1
else
thr=0
fi;
if test x"$thr" = x1 ; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
CFLAGS="$CFLAGS -D_REENTRANT"
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
echo "$as_me:$LINENO: checking for gtk" >&5
echo $ECHO_N "checking for gtk... $ECHO_C" >&6
# Check whether --with-gtk or --without-gtk was given.
if test "${with_gtk+set}" = set; then
withval="$with_gtk"
havelib=1
else
havelib=0
fi;
if test x"$havelib" = x1 ; then
echo "$as_me:$LINENO: result: yes ($withval)" >&5
echo "${ECHO_T}yes ($withval)" >&6
GTK_CFLAGS="`pkg-config gtk+-2.0 --cflags` -DHAVE_GTK=1"
GTK_LIBS="`pkg-config gtk+-2.0 --libs`"
cat >>confdefs.h <<\_ACEOF
#define HAVE_GTK 1
_ACEOF
else
GTK_CFLAGS=""
GTK_LIBS=""
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
# restore LDFLAGS
LDFLAGS="$LDFLAGS $XLDFLAGS"
echo "$as_me:$LINENO: checking $host_os configuration" >&5
echo $ECHO_N "checking $host_os configuration... $ECHO_C" >&6
case $host_os in
*cygwin*|*Cygwin* )
cat >>confdefs.h <<\_ACEOF
#define HAVE_CYGWIN 1
_ACEOF
echo "$as_me:$LINENO: result: flagging Cygwin" >&5
echo "${ECHO_T}flagging Cygwin" >&6
;;
*mingw32*|*Mingw32*)
CFLAGS="$CFLAGS -mconsole"
EXTRA_LIBS="$EXTRA_LIBS -lwsock32"
cat >>confdefs.h <<\_ACEOF
#define HAVE_MINGW32 1
_ACEOF
echo "$as_me:$LINENO: result: flagging MinGW" >&5
echo "${ECHO_T}flagging MinGW" >&6
;;
*darwin*|*Darwin*)
LDFLAGS="$LDFLAGS $CFLAGS"
if test x"$TCL_PREFIX" = x"/usr/local"; then
TCL_CFLAGS=""
echo "$as_me:$LINENO: result: removing -I/usr/local/include" >&5
echo "${ECHO_T}removing -I/usr/local/include" >&6
fi
;;
*osf*|*Osf*)
echo "$as_me:$LINENO: checking for snprintf in -ldb" >&5
echo $ECHO_N "checking for snprintf in -ldb... $ECHO_C" >&6
if test "${ac_cv_lib_db_snprintf+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldb $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char snprintf ();
int
main ()
{
snprintf ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_db_snprintf=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_db_snprintf=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_db_snprintf" >&5
echo "${ECHO_T}$ac_cv_lib_db_snprintf" >&6
if test $ac_cv_lib_db_snprintf = yes; then
EXTRA_LIBS="$EXTRA_LIBS -ldb"
fi
;;
* )
if test x"$fpic" = x"yes" ; then
if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
CFLAGS="$CFLAGS -fPIC"
echo "$as_me:$LINENO: result: adding -fPIC to gcc" >&5
echo "${ECHO_T}adding -fPIC to gcc" >&6
else
echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6
fi
else
echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6
fi
;;
esac
ac_config_files="$ac_config_files Makefile"
# generate pkg-config meta-data file
ac_config_files="$ac_config_files xpa.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems. If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
_ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n \
"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
} |
sed '
t clear
: clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
: end' >>confcache
if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ ]*$//;
}'
fi
DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_i=`echo "$ac_i" |
sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
# 2. Add them.
ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
for as_var in \
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
fi
done
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" || {
# Find who we are. Look in the path if we contain no path at all
# relative or not.
case $0 in
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
{ { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
{ (exit 1); exit 1; }; }
fi
case $CONFIG_SHELL in
'')
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for as_base in sh bash ksh sh5; do
case $as_dir in
/*)
if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
fi;;
esac
done
done
;;
esac
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
# line-number line before each line; the second 'sed' does the real
# work. The second script uses 'N' to pair each line-number line
# with the numbered line, and appends trailing '-' during
# substitution so that $LINENO is not a special case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
# second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
sed '=' <$as_myself |
sed '
N
s,$,-,
: loop
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
s,-$,,
s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensible to this).
. ./$as_me.lineno
# Exit status is that of the last command.
exit
}
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conf$$.exe; then
# Don't use ln at all; we don't have any links
as_ln_s='cp -p'
else
as_ln_s='ln -s'
fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH
exec 6>&1
# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. Logging --version etc. is OK.
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by xpa $as_me 2.1.18, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
_CSEOF
echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
echo >&5
_ACEOF
# Files that config.status was made for.
if test -n "$ac_config_files"; then
echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi
if test -n "$ac_config_headers"; then
echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi
if test -n "$ac_config_links"; then
echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi
if test -n "$ac_config_commands"; then
echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi
cat >>$CONFIG_STATUS <<\_ACEOF
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
-V, --version print version number, then exit
-q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
$config_files
Configuration headers:
$config_headers
Report bugs to ."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
xpa config.status 2.1.18
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
# If no file are specified by the user, then we need to provide default
# value. By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=*)
ac_option=`expr "x$1" : 'x\([^=]*\)='`
ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ac_shift=:
;;
-*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
*) # This is not an option, so the user has probably given explicit
# arguments.
ac_option=$1
ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
{ { echo "$as_me:$LINENO: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
{ (exit 1); exit 1; }; };;
--help | --hel | -h )
echo "$ac_cs_usage"; exit 0 ;;
--debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
CONFIG_FILES="$CONFIG_FILES $ac_optarg"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
-*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
{ (exit 1); exit 1; }; } ;;
*) ac_config_targets="$ac_config_targets $1" ;;
esac
shift
done
ac_configure_extra_args=
if $ac_cs_silent; then
exec 6>/dev/null
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"xpa.pc" ) CONFIG_FILES="$CONFIG_FILES xpa.pc" ;;
"conf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS conf.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
fi
# Have a temporary directory for convenience. Make it in the build tree
# simply because there is no reason to put it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
trap '{ (exit 1); exit 1; }' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
{
tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
#
# CONFIG_FILES section.
#
# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
# Protect against being on the right side of a sed subst in config.status.
sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@DEFS@,$DEFS,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
s,@build_os@,$build_os,;t t
s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@SZ_LONG@,$SZ_LONG,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@TLIB@,$TLIB,;t t
s,@DOSHARED@,$DOSHARED,;t t
s,@LLIB@,$LLIB,;t t
s,@X_CFLAGS@,$X_CFLAGS,;t t
s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
s,@X_LIBS@,$X_LIBS,;t t
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
s,@TCL_VERSION@,$TCL_VERSION,;t t
s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
s,@TCL_CFLAGS@,$TCL_CFLAGS,;t t
s,@TCL_LIBS@,$TCL_LIBS,;t t
s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
s,@GTK_LIBS@,$GTK_LIBS,;t t
s,@EXTRA_LIBS@,$EXTRA_LIBS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_lines=48
ac_sed_frag=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_lines # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
else
sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
if test ! -s $tmp/subs.frag; then
ac_more_lines=false
else
# The purpose of the label and of the branching condition is to
# speed up the sed processing (if there are no `@' at all, there
# is no need to browse any of the substitutions).
# These are the two extra sed commands mentioned above.
(echo ':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
else
ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
fi
ac_sed_frag=`expr $ac_sed_frag + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_lines`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
fi # test -n "$CONFIG_FILES"
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
cat >$tmp/stdin
ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
while test ! -d "$as_dir"; do
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
done
test ! -n "$as_dirs" || mkdir $as_dirs
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
case "$ac_dir" in
.) ac_abs_builddir=`pwd`;;
[\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
*) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
.) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
*) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
.) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
*) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
.) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
*) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
configure_input=
else
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
for f in $ac_file_in; do
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo "$f";;
*) # Relative
if test -f "$f"; then
# Build tree
echo "$f"
elif test -f "$srcdir/$f"; then
# Source tree
echo "$srcdir/$f"
else
# /dev/null tree
{ { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@abs_srcdir@,$ac_abs_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
s,@builddir@,$ac_builddir,;t t
s,@abs_builddir@,$ac_abs_builddir,;t t
s,@top_builddir@,$ac_top_builddir,;t t
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
if test x"$ac_file" != x-; then
mv $tmp/out $ac_file
else
cat $tmp/out
rm -f $tmp/out
fi
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_HEADER section.
#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='[ ].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
cat >$tmp/stdin
ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
for f in $ac_file_in; do
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
# Do quote $f, to prevent DOS paths from being IFS'd.
echo "$f";;
*) # Relative
if test -f "$f"; then
# Build tree
echo "$f"
elif test -f "$srcdir/$f"; then
# Source tree
echo "$srcdir/$f"
else
# /dev/null tree
{ { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
_ACEOF
# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h. The first handles `#define'
# templates, and the second `#undef' templates.
# And first: Protect against being on the right side of a sed subst in
# config.status. Protect against being in an unquoted here document
# in config.status.
rm -f conftest.defines conftest.undefs
# Using a here document instead of a string reduces the quoting nightmare.
# Putting comments in sed scripts is not portable.
#
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\_ACEOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
_ACEOF
# If some macros were called several times there might be several times
# the same #defines, which is useless. Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\_ACEOF
s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
_ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
# Write a limited-size here document to $tmp/defines.sed.
echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS
# Speed up: don't consider the non `#define' lines.
echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
echo 'CEOF
sed -f $tmp/defines.sed $tmp/in >$tmp/out
rm -f $tmp/in
mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
rm -f conftest.defines
mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo ' fi # grep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS
# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
# Write a limited-size here document to $tmp/undefs.sed.
echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS
# Speed up: don't consider the non `#undef'
echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
sed -f $tmp/undefs.sed $tmp/in >$tmp/out
rm -f $tmp/in
mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
rm -f conftest.undefs
mv conftest.tail conftest.undefs
done
rm -f conftest.undefs
cat >>$CONFIG_STATUS <<\_ACEOF
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
echo "/* Generated by configure. */" >$tmp/config.h
else
echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
fi
cat $tmp/in >>$tmp/config.h
rm -f $tmp/in
if test x"$ac_file" != x-; then
if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
while test ! -d "$as_dir"; do
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
done
test ! -n "$as_dirs" || mkdir $as_dirs
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }; }
rm -f $ac_file
mv $tmp/config.h $ac_file
fi
else
cat $tmp/config.h
rm -f $tmp/config.h
fi
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
{ (exit 0); exit 0; }
_ACEOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded. So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status. When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
ac_config_status_args=
test "$silent" = yes &&
ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
$SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; }
fi
imexam-0.9.1/cextern/xpa/configure.ac 0000644 0006325 0002007 00000012754 13640457670 021312 0 ustar sosey STSCI\science 0000000 0000000 # This file is an input file used by the GNU "autoconf" program to
# generate the file "configure", which is run during XPA installation
# to configure the system for the local environment.
AC_INIT(xpa, 2.1.18, eric@cfa.harvard.edu, xpa)
AC_CONFIG_HEADERS([conf.h])
AC_CONFIG_SRCDIR(./xpa.h)
AC_CANONICAL_HOST
# save LDFLAGS
XLDFLAGS="$LDFLAGS"
#
# checks that we use in most projects
#
AC_PROG_CC
AC_EXEEXT
if test x"${EXEEXT}" = "xno"; then
EXEEXT=""
fi
AC_CHECK_SIZEOF(long)
SZ_LONG=$ac_cv_sizeof_long
AC_SUBST(SZ_LONG)
AC_PROG_RANLIB
AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h)
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(pwd.h)
AC_CHECK_HEADERS(values.h)
AC_CHECK_HEADERS(dlfcn.h)
AC_CHECK_HEADERS(setjmp.h)
AC_CHECK_HEADERS(sys/un.h)
AC_CHECK_HEADERS(sys/shm.h)
AC_CHECK_HEADERS(sys/mman.h)
AC_CHECK_HEADERS(sys/ipc.h)
AC_CHECK_HEADERS(sys/select.h)
AC_CHECK_TYPES([socklen_t], [], [], [#include ])
AC_C_CONST
AC_CHECK_FUNCS(strchr memcpy snprintf atexit setenv getaddrinfo)
AC_CHECK_FUNC(connect)
if test $ac_cv_func_connect = no; then
AC_CHECK_LIB(socket, connect, EXTRA_LIBS="$EXTRA_LIBS -lsocket")
fi
AC_CHECK_FUNC(gethostbyname)
if test $ac_cv_func_gethostbyname = no; then
AC_CHECK_LIB(nsl, gethostbyname, EXTRA_LIBS="$EXTRA_LIBS -lnsl")
fi
# AC_CHECK_LIB(db, snprintf, EXTRA_LIBS="$EXTRA_LIBS -ldb")
#
# checks specific to this project
#
AC_MSG_CHECKING(for threaded xpans)
AC_ARG_ENABLE(threaded-xpans, [ --enable-threaded-xpans build threaded xpans],
[fun_ok=$enableval], [fun_ok=no])
if test "$fun_ok" = "yes"; then
AC_MSG_RESULT($fun_ok)
AC_CHECK_LIB(pthread, pthread_create, have_pthread=yes)
if test x"${have_pthread}" = x"yes"; then
AC_DEFINE(HAVE_LIBPTHREAD)
AC_DEFINE(_REENTRANT)
TLIB="-lpthread"
else
AC_MSG_ERROR([no threads found ... can't use enable-threaded-xpans], 1)
fi
else
AC_MSG_RESULT($fun_ok)
fi
AC_SUBST(TLIB)
AC_MSG_CHECKING(for shared library build)
AC_ARG_ENABLE(shared, [ --enable-shared build shared libraries],
[fun_ok=$enableval], [fun_ok=no])
if test "$fun_ok" != "no"; then
fpic="yes"
DOSHARED=shlib
AC_SUBST(DOSHARED)
if test "$fun_ok" = "link"; then
LLIB="-L. -l$PACKAGE_NAME"
else
LLIB='$(LIB)'
fi
else
DOSHARED=""
LLIB='$(LIB)'
fi
AC_SUBST(LLIB)
AC_MSG_RESULT($fun_ok)
AC_MSG_CHECKING(for request to use posix_spawn)
AC_ARG_ENABLE(posix_spawn, [ --enable-posix_spawn use posix_spawn() if available],
[fun_ok=$enableval], [fun_ok=no])
AC_MSG_RESULT($fun_ok)
if test "$fun_ok" = "yes"; then
AC_CHECK_FUNCS(posix_spawn _NSGetEnviron)
AC_CHECK_HEADERS(crt_externs.h)
fi
AC_PATH_XTRA
if test x"${have_x}" = "xyes"; then
AC_DEFINE(HAVE_XT)
fi
SC_PATH_TCLCONFIG
if test x"${no_tcl}" = x ; then
SC_LOAD_TCLCONFIG
if test -r $TCL_PREFIX/include/tcl.h; then
TCL_CFLAGS="$TCL_INCLUDE_SPEC"
if test x"$DOSHARED" != x -a x"$TCL_SUPPORTS_STUBS" = x1; then
TCL_LIBS="$TCL_STUB_LIB_SPEC"
TCL_CFLAGS="$TCL_CFLAGS -DUSE_TCL_STUBS=1"
AC_MSG_RESULT([Tcl support will utilize stubs library: $TCL_LIBS])
else
TCL_LIBS="$TCL_LIB_SPEC"
AC_MSG_RESULT([Tcl support will utilize library: $TCL_LIBS])
fi
AC_DEFINE(HAVE_TCL)
else
if test x"${with_tclconfig}" != x ; then
TCL_CFLAGS="$TCL_INCLUDE_SPEC"
TCL_LIBS="$TCL_LIB_SPEC"
AC_DEFINE(HAVE_TCL)
AC_MSG_RESULT([warning: tcl.h not found with --with-tcl ... tcl build might fail])
else
AC_MSG_RESULT([$TCL_PREFIX/include/tcl.h not found ... use --with-tcl to build tcl explicitly])
fi
fi
fi
AC_SUBST(TCL_CFLAGS)
AC_SUBST(TCL_LIBS)
AC_MSG_CHECKING(for incorporation of thread support)
AC_ARG_WITH(threads,
[ --with-threads build for use in threaded programs], thr=1, thr=0)
if test x"$thr" = x1 ; then
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -D_REENTRANT"
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(for gtk)
AC_ARG_WITH(gtk,
[ --with-gtk= include directory for gtk e.g. /usr/include/gtk-1.2], havelib=1, havelib=0)
if test x"$havelib" = x1 ; then
AC_MSG_RESULT(yes ($withval))
GTK_CFLAGS="`pkg-config gtk+-2.0 --cflags` -DHAVE_GTK=1"
GTK_LIBS="`pkg-config gtk+-2.0 --libs`"
AC_DEFINE(HAVE_GTK)
else
GTK_CFLAGS=""
GTK_LIBS=""
AC_MSG_RESULT(no)
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
# restore LDFLAGS
LDFLAGS="$LDFLAGS $XLDFLAGS"
AC_MSG_CHECKING([$host_os configuration])
case $host_os in
*cygwin*|*Cygwin* )
AC_DEFINE(HAVE_CYGWIN)
AC_MSG_RESULT([flagging Cygwin])
;;
*mingw32*|*Mingw32*)
CFLAGS="$CFLAGS -mconsole"
EXTRA_LIBS="$EXTRA_LIBS -lwsock32"
AC_DEFINE(HAVE_MINGW32)
AC_MSG_RESULT([flagging MinGW])
;;
*darwin*|*Darwin*)
LDFLAGS="$LDFLAGS $CFLAGS"
if test x"$TCL_PREFIX" = x"/usr/local"; then
TCL_CFLAGS=""
AC_MSG_RESULT([removing -I/usr/local/include])
fi
;;
*osf*|*Osf*)
AC_CHECK_LIB(db, snprintf, EXTRA_LIBS="$EXTRA_LIBS -ldb")
;;
* )
if test x"$fpic" = x"yes" ; then
if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
CFLAGS="$CFLAGS -fPIC"
AC_MSG_RESULT([adding -fPIC to gcc])
else
AC_MSG_RESULT(none)
fi
else
AC_MSG_RESULT(none)
fi
;;
esac
AC_SUBST(EXTRA_LIBS)
AC_CONFIG_FILES(Makefile)
# generate pkg-config meta-data file
AC_CONFIG_FILES(xpa.pc)
AC_OUTPUT
imexam-0.9.1/cextern/xpa/copyright 0000644 0006325 0002007 00000001764 13640457670 020756 0 ustar sosey STSCI\science 0000000 0000000 Unless otherwise indicated, all source is:
Copyright (C) 1999-2013
Smithsonian Astrophysical Observatory, Cambridge, MA, USA
XPA is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Correspondence concerning XPA should be addressed as follows:
Eric Mandel
Smithsonian Astrophysical Observatory
MS 3
60 Garden St.
Cambridge, MA 02138 USA
eric@cfa.harvard.edu
http://hea-www.harvard.edu/saord/xpa/
imexam-0.9.1/cextern/xpa/ctest.c 0000644 0006325 0002007 00000035523 13640457670 020311 0 ustar sosey STSCI\science 0000000 0000000 /*
* Copyright (c) 1999-2003 Smithsonian Astrophysical Observatory
*/
/*
*
* ctest -- client test for xpa
*
*/
#include
extern char *optarg;
extern int optind;
int quiet=0;
int dowait=0;
int n=0;
int don=0;
int save_bytes=-1;
int exitonerror=0;
char *save_buf=NULL;
char *mode="";
char name[SZ_LINE];
#define MAX_FPS 4
#ifdef ANSI_FUNC
int
send_cb (void *client_data, void *call_data, char *paramlist,
char **buf, size_t *len)
#else
int send_cb(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char **buf;
size_t *len;
#endif
{
char *s = (char *)client_data;
XPA xpa = (XPA)call_data;
char tbuf[SZ_LINE];
int sendbuf=0;
/* introduce ourselves */
if( !quiet ){
fprintf(stdout, "SEND_CB #%d: %s:%s (%s)\n",
n++, xpa_class(xpa), xpa_name(xpa), s);
}
/* process special paramlist tokens */
if( paramlist && *paramlist ){
if( !quiet )
fprintf(stdout, "\tparamlist: %s\n", paramlist);
if( !strncmp(paramlist, "buf", 3) ){
sendbuf=1;
}
else if( !strncmp(paramlist, "error", 5) ){
if( !quiet )
fprintf(stdout, "\treturning error: %s\n", ¶mlist[6]);
*len = 0;
*buf = NULL;
XPAError(xpa, ¶mlist[6]);
return(-1);
}
else if( !strcmp(paramlist, "exit") ){
if( !quiet )
fprintf(stdout, "Exiting\n");
exit(0);
}
else if( !strcmp(paramlist, "wait") ){
fprintf(stdout, "Press to continue ...");
fgets(tbuf, SZ_LINE, stdin);
}
}
else if( dowait ){
fprintf(stdout, "Press to continue ...");
fgets(tbuf, SZ_LINE, stdin);
}
/* return information about this xpa */
if( !sendbuf ){
snprintf(tbuf, SZ_LINE,
"nclass: %s\nname: %s\nmethod: %s\nsendian: %s\ncendian: %s\n",
xpa_class(xpa), xpa_name(xpa), xpa_method(xpa),
xpa_sendian(xpa), xpa_cendian(xpa));
if( (xpa->send_mode & XPA_MODE_FILLBUF) ){
send(xpa_datafd(xpa), tbuf, strlen(tbuf), 0);
*len = 0;
*buf = NULL;
if( !quiet)
fprintf(stdout, "\tcallback writes %d bytes to client\n",
(int)strlen(tbuf));
}
/* return the buffer and let xpa transmit it */
else{
*len = strlen(tbuf);
*buf = (char *)xmalloc(*len);
memcpy(*buf, tbuf, *len);
if( !quiet)
fprintf(stdout, "\tcallback returns %d bytes to xpa handler\n",
(int)strlen(tbuf));
}
}
/* return the last buffer we were sent */
else{
if( (xpa->send_mode & XPA_MODE_FILLBUF) ){
send(xpa_datafd(xpa), save_buf, save_bytes, 0);
*len = 0;
*buf = NULL;
if( !quiet)
fprintf(stdout, "\tcallback writes %d bytes to client\n", save_bytes);
}
/* return the buffer and let xpa transmit it */
else{
*len = save_bytes;
*buf = (char *)xmalloc(*len);
memcpy(*buf, save_buf, *len);
if( !quiet)
fprintf(stdout, "\tcallback returns %d bytes to xpa handler\n",
save_bytes);
}
}
fflush(stdout);
fflush(stderr);
return(0);
}
#ifdef ANSI_FUNC
int
receive_cb (void *client_data, void *call_data, char *paramlist,
char *buf, size_t len)
#else
int receive_cb(client_data, call_data, paramlist, buf, len)
void *client_data;
void *call_data;
char *paramlist;
char *buf;
size_t len;
#endif
{
XPA xpa = (XPA)call_data;
char *s = (char *)client_data;
char tbuf[SZ_LINE];
char *errs[1];
int i;
int ip;
int got;
int xwait;
if( !quiet ){
fprintf(stdout, "RECEIVE_CB #%d: %s:%s (%s)\n",
n++, xpa_class(xpa), xpa_name(xpa), s);
}
if( !quiet ){
fprintf(stdout, "\tbuf: %lu bytes\n", (unsigned long)len);
}
/* process param list */
if( paramlist && *paramlist ){
if( !quiet )
fprintf(stdout, "\tparamlist: %s\n", paramlist);
if( !strcmp(paramlist, "free") ){
if( !quiet )
fprintf(stdout, "Freeing xpa struct\n");
XPAFree(xpa);
return(0);
}
else if( !strncmp(paramlist, "error", 5) ){
if( !quiet )
fprintf(stdout, "Processing error: %s\n", ¶mlist[6]);
XPAError(xpa, ¶mlist[6]);
return(-1);
}
else if( !strcmp(paramlist, "exit") ){
if( !quiet )
fprintf(stdout, "Exiting\n");
exit(0);
}
else if( !strcmp(paramlist, "wait") ){
fprintf(stdout, "Press to continue ...");
fgets(tbuf, SZ_LINE, stdin);
}
else if( !strncmp(paramlist, "xpaset", 6) ){
ip = 0;
word(paramlist, tbuf, &ip);
if( word(paramlist, tbuf, &ip) ){
if( !quiet )
fprintf(stdout, "calling XPASet(%s, \"%s\")\n",
tbuf, &(paramlist[ip]));
got = XPASet(NULL, tbuf, &(paramlist[ip]), mode,
paramlist, strlen(paramlist), NULL, errs, 1);
if( got == 0 ){
if( !quiet )
fprintf(stdout, "no XPA access points matched template %s\n",
tbuf);
}
else if( errs[0] != NULL ){
if( !quiet )
fprintf(stdout, "Error on xpaset to %s: %s\n", tbuf, errs[0]);
xfree(errs[0]);
if( exitonerror )
exit(1);
}
else{
if( !quiet )
fprintf(stdout, "XPASet to %s successful\n", tbuf);
}
}
return(0);
}
}
else if( dowait ){
fprintf(stdout, "Press to continue ...");
fgets(tbuf, SZ_LINE, stdin);
}
/* reset save buffer */
if( save_buf != NULL ){
xfree(save_buf);
save_buf = NULL;
}
save_bytes = 0;
xwait = dowait;
if( !(xpa->receive_mode & XPA_MODE_FILLBUF) ){
while( (got=recv(xpa_datafd(xpa), tbuf, SZ_LINE, 0)) >0 ){
if( xwait >0 ){
fprintf(stdout, "got %d bytes ... press to continue ...", got);
fgets(tbuf, SZ_LINE, stdin);
xwait--;
}
i = save_bytes;
save_bytes += got;
if( save_buf == NULL )
save_buf = (char *)xmalloc(save_bytes);
else
save_buf = (char *)xrealloc(save_buf, save_bytes);
memcpy(&save_buf[i], tbuf, got);
}
if( !quiet )
fprintf(stdout, "callback read %d bytes\n", save_bytes);
}
else{
save_bytes = len;
save_buf = (char *)xmalloc(len);
memcpy(save_buf, buf, len);
}
fflush(stdout);
fflush(stderr);
return(0);
}
#ifdef ANSI_FUNC
int
info_cb (void *client_data, void *call_data, char *paramlist)
#else
int info_cb(client_data, call_data, paramlist)
void *client_data;
void *call_data;
char *paramlist;
#endif
{
XPA xpa = (XPA)call_data;
char *s = (char *)client_data;
char xtemplate[SZ_LINE];
char *names[MAX_FPS];
char *bufs[MAX_FPS];
char *errs[MAX_FPS];
size_t lens[MAX_FPS];
int i;
int ip;
int got;
if( !quiet ){
fprintf(stdout, "INFO_CB #%d: %s:%s (%s)\n",
n++, xpa_class(xpa), xpa_name(xpa), s);
}
if( paramlist && *paramlist ){
if( !quiet )
fprintf(stdout, "\tparamlist: %s\n", paramlist);
ip = 0;
word(paramlist, xtemplate, &ip);
if( !strcmp(xtemplate, "xpaget") ){
word(paramlist, xtemplate, &ip);
got = XPAGet(xpa, xtemplate, &(paramlist[ip]), NULL,
bufs, lens, names, errs, MAX_FPS);
if( !quiet )
fprintf(stdout, "XPAGet (%s) returned %d buffer(s)\n", xtemplate, got);
for(i=0; i 0 ){
fprintf(stdout, "contents (%lu bytes):\n", (unsigned long)lens[i]);
write(fileno(stdout), bufs[i], lens[i]);
}
if( !quiet )
fprintf(stdout, "\n");
}
else{
write(fileno(stdout), errs[i], strlen(errs[i]));
if( exitonerror )
exit(1);
}
if( bufs[i] )
xfree(bufs[i]);
if( names[i] )
xfree(names[i]);
if( errs[i] )
xfree(errs[i]);
}
}
}
fflush(stdout);
fflush(stderr);
return(0);
}
#ifdef ANSI_FUNC
int
main (int argc, char **argv)
#else
int
main(argc, argv)
int argc;
char **argv;
#endif
{
char *plist=NULL;
char *paramlist=NULL;
char *xtemplate="*:*";
char *smode=NULL;
char tbuf[SZ_LINE];
char name[SZ_LINE];
char cmd[SZ_LINE];
char fxpa[SZ_LINE];
char *names[MAX_FPS];
char *bufs[MAX_FPS];
char *dbufs[MAX_FPS];
char *errs[MAX_FPS];
char *buf=NULL;
int c;
size_t lens[MAX_FPS];
size_t dlens[MAX_FPS];
int i;
int got=0;
int maxbufs;
int j=0;
int loop=1;
int delay=0;
int get=1;
int set=0;
int info=0;
int access=0;
int pipe=0;
int tiny=0;
int doxpa = 0;
int xpaopen=0;
int wait=0;
XPA xpa=NULL;
XPA xpa1=NULL;
int fds[1];
#if HAVE_MINGW32==0
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
#endif
*cmd = '\0';
/* process switch arguments */
while ((c = getopt(argc, argv, "abd:ef:gil:m:nopqstwx:")) != -1){
switch(c){
case 'a':
get = 0;
set = 0;
info = 0;
access = 1;
break;
case 'b':
get = 1;
set = 1;
info = 0;
access = 0;
break;
case 'd':
delay = atoi(optarg);
break;
case 'e':
exitonerror++;
break;
case 'f':
snprintf(cmd, SZ_LINE, "stest %s &\n", optarg);
snprintf(fxpa, SZ_LINE, "%s1", optarg);
break;
case 'g':
get = 1;
set = 0;
info = 0;
access = 0;
break;
case 'i':
get = 0;
set = 0;
info = 1;
access = 0;
break;
case 'l':
loop = atoi(optarg);
break;
case 'm':
smode = xstrdup(optarg);
break;
case 'n':
don = 1;
break;
case 'o':
xpaopen = 1;
break;
case 'p':
pipe = 1;
fds[0] = fileno(stdout);
break;
case 'q':
quiet = 1;
break;
case 's':
get = 0;
set = 1;
info = 0;
access = 0;
break;
case 't':
tiny = 1;
break;
case 'w':
wait = 1;
break;
case 'x':
doxpa = 1;
strcpy(name, optarg);
break;
}
}
if( optind < argc ){
xtemplate = argv[optind];
optind++;
}
/* make up the paramlist */
plist = XPAArgvParamlist(argc, argv, optind);
if( !don )
paramlist = plist;
else
paramlist = (char *)xcalloc(strlen(plist)+SZ_LINE, sizeof(char));
/* for setting, make up a number of dbufs that we will send */
if( set ){
/* must be less than MAX_FPS */
maxbufs = 2;
dbufs[0] = (char *)xmalloc(SZ_LINE);
strcpy(dbufs[0], "this is a short string");
dlens[0] = strlen(dbufs[0]);
if( tiny )
dlens[1] = 256+1;
else
dlens[1] = 256*1000+1;
dbufs[1] = (char *)xmalloc(dlens[1]);
for(j=0, buf=dbufs[1]; j 1 ){
if( !quiet ){
fprintf(stdout, "CLIENT #%d: %s\n", j, xtemplate);
if( paramlist && *paramlist )
fprintf(stdout, "\tparamlist: %s\n", paramlist);
}
}
/* make up paramlist, if necessary */
if( don )
snprintf(paramlist, SZ_LINE, "%s %d", plist, j);
/* XPAGet, XPAGetFd */
if( get ){
if( pipe ){
got = XPAGetFd(xpa, xtemplate, paramlist, smode,
fds, names, errs, -MAX_FPS);
}
else{
got = XPAGet(xpa, xtemplate, paramlist, smode,
bufs, lens, names, errs, MAX_FPS);
for(i=0; i 0 ){
write(fileno(stdout), bufs[i], lens[i]);
}
if( strcmp(paramlist, "buf") )
fprintf(stdout, "\n");
}
else{
write(fileno(stdout), errs[i], strlen(errs[i]));
if( exitonerror )
exit(1);
}
}
if( bufs[i] )
xfree(bufs[i]);
if( names[i] )
xfree(names[i]);
if( errs[i] )
xfree(errs[i]);
}
}
}
/* XPASet, XPASetFd */
if( set ){
if( pipe ){
if( !quiet )
fprintf(stdout, "\tsending data from stdin\n");
got =XPASetFd(xpa, xtemplate, paramlist, smode,
fileno(stdin), names, errs, MAX_FPS);
}
else{
got = XPASet(xpa, xtemplate, paramlist, smode,
dbufs[j%maxbufs], dlens[j%maxbufs],
names, errs, MAX_FPS);
}
for(i=0; i to continue ...");
fgets(tbuf, SZ_LINE, stdin);
}
/* delay */
if( delay )
XPASleep(delay);
}
/* XPAOpen/XPAClose */
if( xpaopen ){
XPAClose(xpa);
}
/* free up space */
if( set ){
for(j=0; j