gpivtools-0.6.0/0000777000175000017500000000000011073421571010551 500000000000000gpivtools-0.6.0/man/0000777000175000017500000000000011073421571011324 500000000000000gpivtools-0.6.0/man/gpiv_t-avg-img.10000644000175000017500000000237110776425416014155 00000000000000.TH GPIV_T-AVG-IMG 1 "19 Januari 2005" .SH NAME gpiv_t-avg-img \- Calculates time-averaged intensities from a series of images at each pixel. .SH SYNOPSIS \fBgpiv_t-avg-img\fP [\fB-c\fR \fIint\fR] [\fB-fb\fR \fIstring\fR] [\fB-ff\fR \fIint\fR] [\fB-fl\fR \fIint\fR] [\fB-fx\fR] [\fB-help\fR] [\fB-p\fR | \fB--print\fR] [\fB-r\fR \fIint\fR] [\fB-s\fR] [\fB-v\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_t-avg-img\fP calculates time-averaged intensities from a series of images for each pixel. This program uses the \fBGENPAR\fR parameters. .SH Options .TP \fB-c\fR \fINCOLS\fR Number of columns. .TP \fB-fb\fR \fIFILE\fR File base-name (without .number.r extension) instead of stdin and stdout. .TP \fB-ff\fR \fIN\fR Number of first image file. .TP \fB-fl\fR \fIN\fR Number of last image file. .TP \fB-fx\fR Prefix numbering to file base name. .TP \fB-help\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. .TP \fB-r\fR \fINROWS\fR Number of rows. .TP \fB-s\fR Subtract mean from input data. \fB-v\fR | \fB--version\fR Prints version information to standard output, then exits successfully. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_revert.10000644000175000017500000000234010524423726013661 00000000000000.TH GPIV_REVERT 1 "8 November 2006" .SH NAME gpiv_revert \- Simple data manipulation tool for PIV data. .SH SYNOPSIS \fBgpiv_revert\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_revert\fP gpiv_reverts array indexes of output data for getting reversed order. This results into high to low running positions or vice versa. The parameters read from the configuration resources (containing the key \fBPOST\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. The output may be used as parameters of \fBgpiv_revert\fP for future use by re-directing stdout to \fIgpiv_revert.par\fR. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fIfilename\fR Input PIV file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.ma.piv\fR. The parameters will be written or appended to \fIfilename\fB.par\fR. .TP .SH SEE ALSO manipiv, gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_errvec.10000644000175000017500000000727510773133710013651 00000000000000.TH GPIV_ERRVEC 1 "23 May 2005" .SH NAME gpiv_errvec \- Searches erroneous vectors in a PIV data file and substitutes with new values. .SH SYNOPSIS \fBgpiv_errvec\fP [\fB-a\fR] [\fB-b \fR] [\fB-g\fR][\fB-h\fR] [\fB-h\fR | \fB--help\fR] [\fB-i\fR | \fB--image_type\fP \fIS\fR] [\fB-n \fIN\fR] [\fB--no_b \fR] [\fB-p\fR | \fB--print\fR] [\fB-r \fIN\fR] [\fB-s \fIN\fR] [\fB-t \fIF\fR] [\fB-u\fR | \fB--surround\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_errvec\fP searches erroneous outliers in a PIV data stream and substitutes with new values, if possible, i.e. if (the majority) of its surroundings are non-erroneous. Evaluation of erroneous vectors is done by looking up the Signal to Noise Ratio (SNR) value in the PIV data file or by calculating the median residu of the vector with its surroundings. A new displacement is obtained by the mean value of the surrounding values or by the location of the next higher peak in the covariance function. PIV data validation is not needed anymore while this is now done during image interrogation with \fBgpiv_rr\fP. Though using \fBgpiv_errvec\fP will not harm. The configuration parameters (containing the \fBVALID\fR key) may be overruled by the command line options, as explained below. .SH Options .TP \fB-a\fP Automatic threshold; calculates threshold value from residu histogram. .TP \fB-b\fP Calculate statistics of the median residues and print a histogram of \fIN\fR bins. .TP \fB-g\fP Graphical visualization of residu statistics with gnuplot (needs \fIfilename\fR). \fB-b\fR is not required as this option will be set automatically. .TP \fB-h\fR | \fB--help\fP On-line help. .TP \fB-i\fR | \fB--image_type\fP \fIS\fR Image type or format to be used if particle displacements will have to be re-estimated at the next highest correlation peak. \fIS\fR may be png, tif, gif, bmp, pgm, r or gpi. Default: png. .TP \fB-n \fIN\fR Defines number of histogram of bins \fIN\fR for \fB-b\fR or \fB-a\fR .TP \fB--no_b \fIN\fP suppresses printing median residu histogram .TP \fB-p\fR | \fB--print\fP Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fIfilename\fP is used. .TP \fB-r \fIN\fP Erroneous vector determined by SNR of the correlation function (\fIN\fR = 0), median residu (\fIN\fR = 1) or normalized median (\fIN\fR = 2), i.e. the ratio between median residu with current datapoint included and between median residu of surroundigs (with datapoint excluded). .TP \fB-s \fIN\fR Substitution of the erroneous vectors by (\fIN\fR = 0) nothing, the local mean from the surrounding values (\fIN\fR = 1), median (\fIN\fR = 2) or next highest covariance peak (\fIN\fR = 3, needs \fIfilename\fR). .TP \fB-t \fIF\fP Threshold value \fIF\fP of SNR or median residu to determine validity of particle displacement. .TP \fB-u\fR | \fB--surround\fP Odd number representing the surrounding grid points to be used for local mean and median values. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Full name of PIV data file for input. Substitutes stdin and stdout. Output will be written to \fIfilename\fB.erv.piv\fR. The parameters will be written or appended to \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If particle displacements will have to be re-estimated at the next highest correlation peak, \fIfilename\fR is required. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf .SH BUGS The program has been tested for artificial generated DPIV images. So far, no serious bugs have been found. gpivtools-0.6.0/man/gpiv_s-avg.10000644000175000017500000000315710524406461013373 00000000000000.TH GPIV_S-AVG 1 "8 November 2006" .SH NAME gpiv_s-avg \- Spatial statistics of PIV data. .SH SYNOPSIS \fBgpiv_s-avg\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-s\fR] [\fB-no_s\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fP] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_s-avg\fP reports the spatial global mean velocities and variances in x and y-direction of a PIV data stream. Only input data of which the peak number is not equal to -1 are taken into account. The parameters read from the configuration resources (containing the key \fBPOST\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help. .TP \fB-p\fR | \fB--print\fP Prints parameters, command line options and input and eventually filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fB-f\fP is used. .TP \fB-s\fR Subtracts the mean x-and y-particle displacements from the input data. .TP \fB-no_s\fR Suppresses subtracting the mean values from the input data. .TP \fB-v\fR | \fB--version\fP Prints version information on standard output, then exits successfully. .TP [\fB-z \fIdx0 dy0\fR] zero offset of displacement or velocity estimators. .TP \fIfilename\fR Input PIV file. Overrides stdin and stdout. The output will be written to \fIfilename\fB.sa.piv\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .TP .SH SEE ALSO gpivtools .SH NOTES .SH AUTHOR Gerber Van der Graaf .SH BUGS The program has been tested for PIV data. So far, no bugs have been found. gpivtools-0.6.0/man/gpiv_combing.10000644000175000017500000001111311036611555013764 00000000000000.TH GPIV_COMBING 1 "31 October 2006" .SH NAME gpiv_combing \- Combines two single-exposed images into one image file for cross-correlation. .SH SYNOPSIS \fBgpiv_combing\fP [\fB-a\fR | \fB--suf_a\fR \fIS\fR] [\fB-b\fR | \fB--suf_b\fR \fIS\fR] [\fB-d\fR | \fB--dt\fR \fIS\fR] [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-s\fR | \fB--skip\fR \fIS\fR] [\fB-t\fR | \fB--type] [\fB-u\fR | \fB--suf_num\fR \fIN\fR] [\fB-v\fR | \fB--version\fR] [\fB-V\fR | \fB--verbose\fR] [\fB-w\fR | \fB--warning\fR] \fIfile_basename\fR \fP .SH DESCRIPTION \fBgpiv_combing\fP combines two images from a common image format that use lossless compressing schemes into a Portable Network Graphics image with extension \fB.png\fR. The resulting \'double frame\' image is used for cross-correlation with \fBgpiv_rr\fR (or \fBgpiv\fR). Additional information is added to the image header, like the parameter for enabling cross correlation, separation time between the recordings of the two images and the name of this program. This program uses the \fBIMG\fR configuration parameters. As the input images are single-frame and will probably not contain the required X_corr parameter in its header, the IMG.X_corr setting will have to be set to 0 for the correct loading. The default settings may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-a\fR | \fB--suf_a\fR \fIS\fR The filename of the first image is generated from the file_basename, the suffix \fIS\fR (default: _a) and from the image extension type. .TP \fB-b\fR | \fB--suf_b\fR \fIS\fR The filename of the second image is generated from the file_basename, the suffix \fIS\fR (default: _b) and from the image extension type. .TP \fB-d\fR | \fB--dt\fR \fIS\fR The time between subsequent images in milliseconds. The value will be written to the image header. If \fB-s\fR | \fB--skip\fR is used, the separation time will be adapted to the correct value. .TP \fB-p\fR | \fB--print\fR Prints parameters to stdout. .TP \fB-s\fR | \fB--skip \fIS\fR Skip \fIS\fR numbers; the first image with number \fIN\fR (defined by \fB-u\fR | \fB--suf_num \fIN\fR) will be combined with the second image N+S+1 (default: \fIS\fR = 0) .TP \fB-t\fR | \fB--type Type or format of the input image (default png). Supported formats are: raw binary (r), hdf5 (gpi), gif, tif, bmp and pgm. The format of the output image will always be png. .TP \fB-u\fR | \fB--suf_num\fR \fIN\fR If images are numbered instead of having suffixes \fB_a\fR and \fB_b\fR. \fIN\fR represents the first of the two numbered frames which will be combined with frame \fIN\fR + 1. The combined image will be named to file_basename\fIN\fR\fB.png\fR. So, only odd or even numbered images will result to be loaded in \fBgpiv_rr\fR (or \fBgpiv\fR) for cross-correlation. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exit successfully. .TP \fB-V\fR | \fB--verbose\fR Program behaves verbose during operation, like printing filenames, separation time. .TP \fB-w\fR | \fB--warning\fR Checks and warns if one of the two input images already contain an image pair, i.e. the header parameter X-corr is set TRUE. The program will exit if this is the case. Besides this warning, the program will always check if the images are of equal sizes. If an input image does not contain the X-corr parameter in its header, the parameter will be read from the parameter resources. Not using this option allows to keep the settings in the parameter resources in any state. .TP \fIfile_basename\fR The filename without the image extension (like .png, .tif etc) and suffix or number. .TP .SH Examples .TP Suppose two single-exposed images will have to be combined for cross-correlation with names image_a.gif and image_b.gif: so the file_basename will be "image", _a and _b are default suffixes and the image type has to be defined. The program is used following: gpiv_combing -t gif image .TP As PNG is default image format, -t key is not needed. Two images with names turtle_slow.png and turtle_fast.png are combined with: gpiv_combing -a _slow -b _fast turtle .TP For two numbered images img03.png and img04.png only the starting number will have to defined: .br gpiv_combing -u 3 img0 .TP Two numbered images img03.png and img09.png will have to be combined by skipping 5 images in-between. If \fB-d\fR | \fB--dt\fR \fIS\fR is used, the correct separation time between the combined frames is calculated from \fIS\fR: gpiv_combing -u 3 -s 5 img0 .br .TP .SH SEE ALSO gpivtools .SH NOTES The program uses \fBnetpbm\fR. .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_img2gpiv.10000644000175000017500000000666511005336377014114 00000000000000.TH GPIV_IMG2GPIV 1 "19 Januari 2005" .SH NAME gpiv_img2gpiv \- Converts images into raw data (extension .r) format with the belonging ASCII header file (extension .h) or into the hdf format (extension .hdf). .SH SYNOPSIS \fBgpiv_img2gpiv\fP [\fB-x\fR | \fB--cross\fR] [\fB-c\fR | \fB--cols\fR \fIncolumns\fR] [\fB--combine\fR] [\fB-h\fR | \fB--help\fR] [\fB-hdf\fR] [\fB--suf_a\fR \fIEXT\fR] [\fB--suf_b\fR \fIEXT\fR] [\fB--suf_num\fR \fIN\fR] [\fB-i\fR | \fB--inverse\fR] [\fB-n\fR] [\fB-p\fR] [\fB-r\fR | \fB--rows \fInrows\fR] [\fB-t\fR] [\fB-v\fR | \fB--version\fR] file_base_name \fP .SH DESCRIPTION \fBgpiv_img2gpiv\fP converts images from a common image format (gif, tif etc) into a raw data image with extension \fB.r\fR. Additionally, it generates an ASCII header file (extension \fB.h\fR). This header contains information concerning image dimensions, color depth, single or double image (for auto or cross-correlation), time and spatial scales, position of pixel# (0, 0) in the experiment and some additional (non-required) parameters. \fIgpiv_img2gpiv\fP may also convert to hdf formatted images, with extension \fB.hdf\fR, that might be used by gpiv. This program does not use the parameter resources from libgpiv. The default settings may be overruled by the command line options, as explained below. .SH Options .TP .TP \fB-c\fR | \fB--cols\fR \fIncolumns\fR The number of columns of the image (default 1280). .TP \fB--combine\fR If the images have been obtained separately, but will have to be used for cross-correlation, they will be combined to a single image file for interrogating with \fBgpiv_rr\fR (or \fBgpiv\fR). See also \fB--suf_a/b\fR and \fB--suf_num\fR. .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-hdf Converts to (or from) hdf formatted data (extension \fB.hdf\fR). .TP \fB-i\fR | \fB--inverse\fR Inverse conversion; from raw 8-bit data to image format. .TP \fB--suf_a\fR \fIEXT\fR In combination with \fB--combine\fR: the file_base_name of the first frame to be combined is extended with suffix \fIEXT\fR (default: _a). .TP \fB--suf_b\fR \fIEXT\fR In combination with \fB--combine\fR: the file_base_name of the second frame to be combined is extended with suffix \fIEXT\fR (default: _b). .TP \fB--suf_num\fR \fIN\fR In combination with \fB--combine\fR: If images are numbered instead of with \fB--suf_a\fR and \fB--suf_b\fR. \fIN\fR represents the first of the two numbered frames which will be combined with frame \fIN\fR + 1. The combined image will be named to file_base_name\fIN\fR\fB.r\fR. So, only odd or even numbered images will result to be loaded in \fBgpiv_rr\fR (or \fBgpiv\fR) for cross-correlation. .TP \fB-n\fR No execute, only print processes. .TP \fB-p\fR Prints process to stdout. .TP \fB-r\fR | \fB--rows \fInrows\fR The number of rows in the frame of a SINGLE image (default 1024). An image frame containing a PIV pair of images (to be used for cross-correlation) should have the double amount of rows; from row #0 to row #\fInrows\fR - 1 contains the first image and from row #\fInrows\fR to row #2x\fInrows\fR - 1 contains the second image. .TP \fB-t\fR Image type or format (default bmp). .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exit successfully. .TP \fB-x\fR | \fB--cross\fR Double image for cross-correlation (default: single image for auto-correlation). .SH SEE ALSO gpivtools .SH NOTES The program uses \fBconvert\fR. .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_mktestimg.10000644000175000017500000000260510774707314014367 00000000000000.TH GPIV_MKTESTIMG 1 "7 November 2006" .SH NAME gpiv_mktestimg \- Generates a simplified image for image processing. .SH SYNOPSIS \fBgpiv_mktestimg\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-t \fIN\fR | \fB--threshold \fIN\fR] [\fB-w \fIN\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_mktestimg\fP generates an image (pair) in order to be processed by the processing tools. This program is provided for developing and testing image processing tools. The parameters read from the configuration resources (containing the key \fBGPIV_IMGPROC\fR) may be overruled by the command line options, as explained below. .SH Options .TP .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-t \fIN\fR | \fB--threshold \fIN\fR Threshold value .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fB-w \fIN\fR window size (default: 15) .TP \fIfilename\fR Input image filename. Overrides \fIstdin\fR and \fIstdout\fR with the full \fIfilename\fR of the image. Output will be written to \fIfilename\fB.png\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_uhisto.10000644000175000017500000000320610524416724013667 00000000000000.TH GPIV_UHISTO 1 "8 November 2006" .SH NAME gpiv_uhisto \- Tests PIV data by printing/displaying an histogram of the horizontal particle displacements. .SH SYNOPSIS \fBgpiv_uhisto\fP [\fB-g\fR] [\fB-h\fR | \fB--help\fR] [\fB-n \fIN\fR\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBGpiv_uhisto\fP calculates the histogram of the horizontal particle displacement distribution between minimum and maximum values. The parameters read from the configuration resources (containing the key \fBVALID\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-g\fP Graphical visualization of the histogram with gnuplot. .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-n \fIN\fR Override number of bins (default 10, hard coded). .TP \fB-p\fR | \fB--print\fP Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fB-f\fP is used. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input PIV file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.pdf\fR. The parameters will be written or appended to \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .SH SEE ALSO gpivtools .SH NOTES stdin and stdout has still to be implemented. [\fB-f\fR \fIfilename \fR] will be added. .SH AUTHOR Gerber Van der Graaf .SH BUGS The program seems to work fine with real PIV data. So far, no serious bugs have been found. gpivtools-0.6.0/man/gpiv_t-avg.10000644000175000017500000000533011063637301013365 00000000000000.TH GPIV_T-AVG 1 "19 Januari 2005" .SH NAME gpiv_t-avg \- Calculates time-averaged mean and variances of PIV data. .SH SYNOPSIS \fBgpiv_t-avg\fP [\fB-dn\fR | \fB--dir_name \fIdir basename\fR] [\fB-df\fR | \fB--first_dir \fIN\fR] [\fB-dl\fR | \fB--last_dir \fIN\fR] [\fB-fb\fR | \fB--file_basename \fIfile basename\fR] [\fB-ff\fR | \fB--first_file \fIN\fR] [\fB-fl\fR | \fB--last_file \fIN\fR] [\fB-fx\fR | \fB--file_prefix\fR] [\fB-h\fR | \fB--help\fR] [\fB-n\fR | \fB--none\fR] [\fB-p\fR | \fB--print\fR] [\fB-relrms\fR] [\fB-uv\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] \fP .SH DESCRIPTION \fBgpiv_t-avg\fP calculates mean and variances from a \fBseries\fR of piv data resulting into time-averaged values. If no parameters are defined at the command line, standard parameters will be used that are defined in the script. This program does not use the parameter resources from libgpiv. .SH Options .TP \fB-dn\fR | \fB--dir_name\fR \fIdir base-name\fR The \fIdir base-name\fR represents the directory name without its last number. It is supposed that the last number in the directory name is a counter. .TP \fB-df\fR | \fB--first_dir\fR \fN\fR Defines the counter \fIN\fR of the first directory number at which the analyses starts. .TP \fB-dl\fR | \fB--last_dir\fR \fN\fR Last directory number \fIN\fR at which the analyses ends. .TP \fB-fb\fR | \fB--file_base_name\fR \fIfile base-name\fR The \fIfilename\fR has to be given without its \fB.piv\fR extension. The \fIfile base-name\fR represents the file name without its last number, before the extension. If not \fB-fx\fR key is used, it is supposed that the last number in the file name is a counter. The output will be written to \fIdir base-name/file base-name\fB.ta_mean.piv\fR and \fIdirname/filename\fB.ta_sdev.piv\fR at which mean values and variances are written respectively or to \fIdirname/filename\fB.ta_U.piv\fR and to \fIdirname/filename\fB.ta_V.piv\fR if \fB-uv\fP is used. .TP \fB-ff\fR | \fB--first_file\fR \fN\fR Defines the counter \fIN\fRof first file number at which the analyses starts. .TP \fB-fl\fR | \fB--last_file\fR \fN\fR Last file number \fIN\fR at which the analyses ends. .TP \fB-fx\fR | \fB--file_prefix\fR Prefix numbering to file base name. .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-n\fR | \fB--none\fR Suppresses real execution. .TP \fB-p\fR | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. .TP \fB-relrms\fR\fR Prints relative rms, related to the absolute mean value. .TP \fB-uv\fP Writes U and v displacements/velocities to separate outputs. .TP \fB-v\fR | \fB--version\fR Prints version information to standard output, then exits successfully. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_piv2gnuplt.10000644000175000017500000000226410772457450014477 00000000000000.TH GPIV_PIV2GNUPLT 1 "9 November 2006" .SH NAME gpiv_piv2gnuplt \- Converts PIV data gnuplot data. .SH SYNOPSIS \fBgpiv_piv2gnuplt\fP [\fB-al\fR \fIint\fR] [\fB-au\fR \fIint\fR] [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-s\fR \fIfloat\fR] [\fB-v\fR | \fB--version\fR] [\fB-z\fR] \fIfilename\fR \fP .SH DESCRIPTION \fBgpiv_piv2gnuplt\fP converts PIV data to gnuplot vectors for displaying and printing PIV the estimators in a graphical way. This program does not use the parameter resources from libgpiv. The parameters may be defined by the command line options as explained below. .SH Options .TP \fB-al\fR \fIL\fR Draws an annotation vector with lenght L. .TP \fB-al\fR \fIUNIT\fR Define unit of annotation vector (defaul m/s). .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters to stdout. .TP \fB-s\fR \fISCALE\fR Scale factor for graphic output with gnuplot. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fB-z\fR Full zoom (for scaled data). .TP \fIfilename\fR Filename containing the input PIV data. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_aint.10000644000175000017500000000311611005336277013306 00000000000000.TH GPIV_AINT 1 "7 November 2006" .SH NAME gpiv_aint \- Calculates mean image intensity at each interrogation area. .SH SYNOPSIS \fBgpiv_aint\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-s\fR | \fB--second\fR] [\fB-V\fR | \fB--verbose\fR] [\fB-v\fR | \fB--version\fR] \fIfilename\fR .SH DESCRIPTION For each Interrogation Area of an image, \fBgpiv_aint\fP calculates the mean image intensity. Depending on the settings of the interrogation scheme, the Interrogation Area's may be shifted with magnitude of the piv estimators (if they exist) or the image may be deformed before the intensity is calculated. This program uses the \fBIMG\fR, \fBPIV\fR and \fBPOST\fR parameters. The default settings may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters to stdout. .TP \fB-s\fR | \fB--second\fR Calculates the image intensitites for the second image frame in case of double-frame image pairs. .TP \fB-V\fR | \fB--verbose\fR Prints data of interrogation area's and resulting mean. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exit successfully. .TP \fIfilename\fR Full name of the image file. Image format might be: png, raw binary (.r), hdf5 (.hdf), gif, tif, bmp or pgm. The piv estimators are read from \fIfilename\fB.piv\fR The settings are written to \fIfilename\fB.par\fR. output will be stored in \fIfilename\fB.ain\fR. .TP .SH SEE ALSO gpivtools .SH NOTES The program uses \fBnetpbm\fR. .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_clip.10000644000175000017500000000231510774702155013306 00000000000000.TH GPIV_CLIP 1 "7 November 2006" .SH NAME gpiv_clip \- Image clipping program for PIV images. .SH SYNOPSIS \fBgpiv_clip\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-t \fIN\fR | \fB--threshold \fIN\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_clip\fP sets all pixels below a pre-defined value to zero The parameters read from the configuration resources (containing the key \fBGPIV_IMGPROC\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-t \fIN\fR | \fB--threshold \fIN\fR Threshold value to be set to zero .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input image filename. Overrides \fIstdin\fR and \fIstdout\fR with the full \fIfilename\fR of the image. Output will be written to \fIfilename\fB.png\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_hilo.10000644000175000017500000000223310774701044013305 00000000000000.TH GPIV_HILO 1 "7 November 2006" .SH NAME gpiv_hilo \- High-low filtering for PIV images. .SH SYNOPSIS \fBgpiv_hilo\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-w \fIN\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_hilo\fP applies high-low filtering or contrast extention on an image. The parameters read from the configuration resources (containing the key \fBGPIV_IMGPROC\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fB-w \fIN\fR window size (default: 15) .TP \fIfilename\fR Input image filename. Overrides \fIstdin\fR and \fIstdout\fR with the full \fIfilename\fR of the image. Output will be written to \fIfilename\fB.png\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_fft.10000644000175000017500000000212410774702472013136 00000000000000.TH GPIV_FFT 1 "7 November 2006" .SH NAME gpiv_fft \- Fast Fourier Transformation of image . .SH SYNOPSIS \fBgpiv_fft\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_fft\fP converts an image to its Fourier Transform using FFT. The parameters read from the configuration resources (containing the key \fBGPIV_IMGPROC\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input image filename. Overrides \fIstdin\fR and \fIstdout\fR with the full \fIfilename\fR of the image. Output will be written to \fIfilename\fB.png\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_getbit.10000644000175000017500000000255610774705340013643 00000000000000.TH GPIV_GETBIT 1 "7 November 2006" .SH NAME gpiv_getbit \- Image processing program for PIV images. .SH SYNOPSIS \fBgpiv_getbit\fP [\fB-b \fIN\fR] [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_getbit\fP get the N least significant bits and moves them to most the significant bits. This results that a weak image signal (pixels of low value) is amplified while the high signal within the image will be removed. The parameters read from the configuration resources (containing the key \fBGPIV_IMGPROC\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-b \fIN\fP Defines the bit number [0, .., 7]. Signal from 0 to \fIN\fP will be shifted. .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input image filename. Overrides \fIstdin\fR and \fIstdout\fR with the full \fIfilename\fR of the image. Output will be written to \fIfilename\fB.png\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_vorty.10000644000175000017500000000366610774675707013570 00000000000000.TH GPIV_VORTY 1 "8 November 2006" .SH NAME gpiv_vorty \- Calculates the differential quantities vorticity, shear strain and normal strain from PIV data. .SH SYNOPSIS \fBgpiv_vorty\fP [\fB-d \fIN\fR] [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-g\fR | \fB--g\fR] [\fB--no_g \fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_vorty\fP calculates the differential quantities like vorticity, shear strain and normal strain from PIV data. You can choose from several differential schemes: central differentiation, least squares, Richardson extrapolation and circulation method. Circulation method only allows to calculate vorticity, but no strain. The output can be generated as ASCII data containing four columns or as GNUPlot Data format that allows to view/print the data as contour plots. The configuration parameters (containing the \fBPOST\fR key) may be overruled by the command line options, as explained below. .SH Options .TP \fB-d \fIN\fP Differential type to be used: central difference (\fIN\fR=0), least squares (\fIN\fR=1), Richardson interpolation (\fIN\fR=2), circulation method (\fIN\fR=3) .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-p\fR | \fB--print\fP Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fIfilename\fP is used. .TP \fB-g\fR Show contour plot of the output with gnuplot. .TP \fB--no_g\fR Suppresses to show contour plot of the output with gnuplot. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input PIV data file. Overrides stdin and stdout. The output will be written to \fIfilename\fB.vor\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_rot180.10000644000175000017500000000244610524424101013402 00000000000000.TH GPIV_ROT180 1 "8 November 2006" .SH NAME gpiv_rot180 \- Simple data manipulation tool for PIV data. .SH SYNOPSIS \fBgpiv_rot180\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-p\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_rot180\fP rotates the data over 180 degrees. As rotating over 180 degrees is identic to flipping over x as well as over y-direction, \fBflipx\fR and \fBflipy\fR may be used instead of \fBgpiv_rot180\fR. The parameters read from the configuration resources (containing the key \fBPOST\fR) may be overruled by the command line options, as explained below. .SH Options .TP .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. The output may be used as parameters of \fBgpiv_rot180\fP for future use by re-directing stdout to \fIgpiv_rot180.par\fR. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fIfilename\fR Input PIV file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.ma.piv\fR. The parameters will be written or appended to \fIfilename\fB.par\fR. .SH SEE ALSO manipiv, flipx, flipy, gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_suta.10000644000175000017500000000170610772457674013351 00000000000000.TH GPIV_SUTA 1 "19 Januari 2005" .SH NAME gpiv_suta \- subtracts time-avaraged velocities (local mean) from the PIV estimators. .SH SYNOPSIS \fBgpiv_suta\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fB-t\fR] \fIfilename_ta\fR \fIfilename\fR \fP .SH DESCRIPTION \fBgpiv_suta\fP subtracts time-avaraged velocities (local mean) from the PIV estimators. This program does not use the parameter resources from libgpiv. The parameters may be defined by the command line options as explained below. .SH Options \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters to stdout. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fIfilename\fR File name of PIV data set (without .piv). .TP \fIfilename_ta\fR File name of time-averaged (local means) PIV data set (full name). .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpivtools.10000644000175000017500000002010211073414771013347 00000000000000.TH GPIVTOOLS 1 "26 March 2008" .SH NAME gpivtools \- The PIV tool suite. \fP .SH DESCRIPTION \fBgpivtools\fP is a set of command-line driven programs for the so-called Digital Particle Image Velocimetry (DPIV). It contains programs for image recording, processing and analysing (resulting into estimators of particle displacement, i.e. PIV data), PIV data validation programs and post-processing tools for manipulating and calculating (scalar) derivatives of the PIV data. Though the command-line driven tools are mainly intended for non-interactive processing, its outputs may directly be visualized in a graphical way with the aid of gnuplot. The parameters and options to be used for most of the \fBgpivtools\fP are provided by Libgpiv. They are subsequently searched in \fI./gpivrc\fP at local directory, at \fI$HOME/.gpivrc\fR (hidden) or at the system-wide configuration file \fIgpiv.conf\fR, which is mostly found at \fI/etc\fR for UNIX-like operating systems. Each parameter is described by the process key: \fBGENPAR\fR (general parameters), \fBCAM\fR (camera settings), \fBTRIG\fR (trigger settings), \fBIMG\fR (image header), \fBIMGPROC\fR (image processing), \fBPIV\fR (piv interrogation), \fBVALID\fR (piv data validation) or \fBPOST\fR (piv post processing) and the parameter name, separated by a dot (.), followed by its value. Some of the parameters are optional. The parameters may be defined in arbitrary order. Blank lines and comment (starting with a pound sign (#) at the first column) may be included in the parameter files. The parameters may be overruled by the command line options of each tool. Libgpiv provides default parameter values if they are not defined in one of the configuration files or by an option key at the command line. In case stdin and stdout is used, verbose output of the programs is suppressed in order to avoid contamination of the output data. If \fIfilename\fR is used for overruling \fIstdin\fR and \fIstdout\fR, the parameters are written to \fIfilename\fB.par\fR. By renaming this file to \fI./gpivrc\fR or \fI$HOME/.gpivrc\fR, the parameters may directly be re-used for identic processing of other images and PIV data. The parameters defined in \fI$HOME/.gpivrc\fR and in \fI/etc/gpiv.conf\fR are also used by the Graphic User Interface program \fBgpiv\fR. The programs understand different image formats: Portable Network Graphics (\fIfilename\fB.png\fR), HDF5 (\fIfilename\fB.hdf\fR), raw binary data (\fIfilename\fB.r\fR) that is accompanied by an ASCII header file (\fIfilename\fB.h\fR), and LaVision's (tm) uncompressed image format (\fIfilename\fB.img\fR). Other formats that use lossless compression (TIF, GIF, PGM, BMP) are converted to PNG on the fly. For interrogation of double-framed images using cross-correlation, the second image has to be concatenated after the first one, if this has not already been done by the recording camera. This might be performed by \fBgpiv_combing\fR. Image parameters are read from the header or from the configuration resources (containing the \fBIMG\fR key). .SH GPIV-TOOLS COMMANDS Here is the complete list of available \fBgpivtools\fP programs. See their individual man pages for a more extended description. .TP \fBgpiv_aint\fR Calculates mean image intensity at each interrogation area. This program uses the \fBIMG\fR, \fBPIV\fR and \fBPOST\fR parameters. .TP \fBgpiv_combing\fR Combines two images into one image file for cross-correlation. This program uses the \fBIMG\fR parameters. .TP \fBgpiv_errvec\fR Searches the erroneous vectors in a PIV data file and eventually substitutes them with new values. This program uses the \fBPIV\fR and \fBPOST\fR parameters. .TP \fBgpiv_fi-keyline\fR Filters each line that starts with a keyword. This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_hdf2piv\fR Converts hdf5 PIV data (extension .hdf) to ASCII data. This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_imgproc\fR, \fBgpiv_mktestimg\fR, \fBgpiv_smooth\fR, \fBgpiv_hilo\fR, \fBgpiv_clip\fR, \fBgpiv_fft\fR, \fBgpiv_invfft\fR, \fBgpiv_lowpass\fR, \fBgpiv_highpass\fR, \fBgpiv_getbit\fR, \fBgpiv_mktestimg\fR (PIV) image processing programs. These programs use the \fBIMGPROC\fR parameters. .TP \fBgpiv_img2gpiv\fR Depreciated: use \fBgpiv_combing\fR instead. Converts images into raw data (extension \fB.r\fR) format with the belonging ASCII header (extension \fB.h\fR) or into hdf format (with extension \fB.hdf\fR). This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_manipiv\fR, \fBgpiv_fasty\fR, \fBgpiv_flipx\fR, \fBgpiv_flipy\fR, \fBgpiv_revert\fR, \fBgpiv_rot\90\fR, \fBgpiv_rot\180\fR Simple data manipulation tool for PIV data. These programs use the \fBPOST\fR parameters. .TP \fBgpiv_peaklck\fR Tests PIV data on the so-called peak-locking effect by printing/displaying an histogram of the particle displacements at sub-pixel level. This program uses the \fBVALID\fR parameters. .TP \fBgpiv_piv2gnuplt\fR Converts PIV data gnuplot data. Besides this, image interrogation and post-processing programs are able to display their results directly (mostly with the \fB-g\fR option). This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_piv2grid\fR Converts PIV data to grid data for generating contour plots with Plotmtv. This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_piv2hdf\fR Converts ASCII PIV data to hdf5 formatted data (extension \fB.hdf\fR). This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_piv2vec \fR Adds header to PIV data for a vector plot with Plotmtv. This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_process-chain\fR Processes a pipeline of Gpiv-tool command's, forming process a chain from image recording, image processing, image interrogation, data validation, data post-processing. This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_recimg\fR captures images from a IIDC-compliant CCD camera with IEE1394 connection. This program uses the \fBIMG\fR parameters. .TP \fBgpiv_rr\fR Interrogates images in order to obtain displacement estimators of particles for (Digital) Particle Image Velocimetry. This program uses the \fBPIV\fR and \fBVALID\fR parameters. .TP \fBgpiv_sca2gri\fR Converts scalar data from gpiv to grid data for contour plotting with Plotmtv This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_scale\fR Spatial and time scaling program for PIV data. This program uses the \fBIMG\fR and \fBPOST\fR parameters. .TP \fBgpiv_series\fR Script for (parallel) processing a series of numbered files. This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_suta\fR Subtracts time-avaraged velocities (local mean) from the PIV estimators. This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_s-avg\fR Spatial statistics of PIV data. This program uses the \fBPOST\fR parameters. .TP \fBgpiv_t-avg \fR Calculates time-avaraged mean and rms from a series of PIV data. This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_t-avg-img\fR Calculates time-averaged values from a series of images at each pixel. This program uses the \fBGENPAR\fR parameters. .TP \fBgpiv_t-corr\fR Calculates the velocity correlation as function of time (Eulerian correlation) from a series PIV data sets This program does not use the parameter resources from Libgpiv. .TP \fBgpiv_trig\fR Triggers a (double Nd_YAGG) laser on a CCD camera. This program uses the \fBTRIG\fR parameters. .TP \fBgpiv_uhisto\fR Tests PIV data by printing/displaying an histogram of the horizontal particle displacements. This program uses the \fBVALID\fR parameters. .TP \fBgpiv_vhisto\fR Tests PIV data by printing/displaying an histogram of the vertical particle displacements. This program uses the \fBVALID\fR parameters. .TP \fBgpiv_vorstra\fR, \fBgpiv_vorty\fR, \fBgpiv_nstrain\fR, \fBgpiv_sstrain\fR Calculates the differential quantities vorticity, shear strain and normal strain from PIV data. These programs use the \fBPOST\fR parameters. .SH SEE ALSO gpiv, gpiv_control .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_trig.10000644000175000017500000000277110772421376013333 00000000000000.TH GPIV_TRIG 1 "19 Januari 2005" .SH NAME gpiv_trig \- triggers a (double Nd_YAGG) laser with a CCD camera. .SH SYNOPSIS \fBgpiv_trig\fP [\fB-h\fR | \fB--help\fR] [\fB-i\fR | \fB--interactive\fR] [\fB-v\fR | \fB--version\fR] [\fB-V\fR | \fB--verbose\fR] \fP .SH DESCRIPTION \fBgpiv_trig\fP triggers a CCD camera and a (double Nd_YAGG) laser for Particle Image velocimetry (PIV). The code uses a kernel module gpivtrig_rtl from the gpivtrig package that depends on the Real Time Application Interface (RTAI) and RealtimeLinux. Trigger pulses are send to the parallel port of the PC (/dev/lpt0 or /dev/lpt1; see the configure script of the gpivtrig package) at bins #1 (camera), #2 and #3 (first and second laser respectively). The program may be started directly if all modules have been loaded or by the gpiv_control script, also included in the gpivtrig package, which takes care of the loading and unloading of the needed kernel modules. Currently, \fBgpiv_trig\fP is tested with RTAI-3.1 and the linux kernel-2.4.27. This program uses the \fBTRIG\fR parameters. The command line options are explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help. .TP \fB-i\fR | \fB--interactive\fP Prompt for confirmation. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fB-V\fR | \fB--verbose\fP program behaves more verbose during operation showing what is going on .SH SEE ALSO gpivtools(1), gpiv_control(1), gpiv(1) .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_highpass.10000644000175000017500000000225710774704156014175 00000000000000.TH GPIV_LOWPASS 1 "7 November 2006" .SH NAME gpiv_lowpass \- Image low-pass filtering program. .SH SYNOPSIS \fBgpiv_highpass\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-t \fIN\fR | \fB--threshold \fIN\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_highpass\fP High-pass filter for images. The parameters read from the configuration resources (containing the key \fBGPIV_IMGPROC\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-t \fIN\fR | \fB--threshold \fIN\fR Threshold value .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input image filename. Overrides \fIstdin\fR and \fIstdout\fR with the full \fIfilename\fR of the image. Output will be written to \fIfilename\fB.png\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/Makefile.am0000644000175000017500000000160210775076413013304 00000000000000man_MANS = gpivtools.1 \ gpiv_series.1 \ gpiv_combing.1 \ gpiv_errvec.1 \ gpiv_manipiv.1 \ gpiv_fasty.1 \ gpiv_flipx.1 \ gpiv_flipy.1 \ gpiv_fi-keyline.1 \ gpiv_img2gpiv.1 \ gpiv_trig.1 \ gpiv_revert.1 \ gpiv_rot90.1 \ gpiv_rot180.1 \ gpiv_peaklck.1 \ gpiv_uhisto.1 \ gpiv_vhisto.1 \ gpiv_piv2gnuplt.1 \ gpiv_piv2grid.1 \ gpiv_piv2hdf.1 \ gpiv_piv2vec.1 \ gpiv_sca2gri.1 \ gpiv_suta.1 \ gpiv_recimg.1 \ gpiv_rr.1 \ gpiv_s-avg.1 \ gpiv_scale.1 \ gpiv_t-avg.1 \ gpiv_t-avg-img.1 \ gpiv_t-corr.1 \ gpiv_vorstra.1 gpiv_vorty.1 gpiv_sstrain.1 gpiv_nstrain.1 \ gpiv_process-chain.1 \ gpiv_hdf2piv.1 \ gpiv_aint.1 \ gpiv_imgproc.1 gpiv_smooth.1 gpiv_hilo.1 gpiv_clip.1 \ gpiv_fft.1 gpiv_highpass.1 gpiv_getbit.1 gpiv_mktestimg.1 EXTRA_DIST = $(man_MANS) Makefile.in gpivtools-0.6.0/man/Makefile.in0000644000175000017500000002656111073421522013313 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ man_MANS = gpivtools.1 \ gpiv_series.1 \ gpiv_combing.1 \ gpiv_errvec.1 \ gpiv_manipiv.1 \ gpiv_fasty.1 \ gpiv_flipx.1 \ gpiv_flipy.1 \ gpiv_fi-keyline.1 \ gpiv_img2gpiv.1 \ gpiv_trig.1 \ gpiv_revert.1 \ gpiv_rot90.1 \ gpiv_rot180.1 \ gpiv_peaklck.1 \ gpiv_uhisto.1 \ gpiv_vhisto.1 \ gpiv_piv2gnuplt.1 \ gpiv_piv2grid.1 \ gpiv_piv2hdf.1 \ gpiv_piv2vec.1 \ gpiv_sca2gri.1 \ gpiv_suta.1 \ gpiv_recimg.1 \ gpiv_rr.1 \ gpiv_s-avg.1 \ gpiv_scale.1 \ gpiv_t-avg.1 \ gpiv_t-avg-img.1 \ gpiv_t-corr.1 \ gpiv_vorstra.1 gpiv_vorty.1 gpiv_sstrain.1 gpiv_nstrain.1 \ gpiv_process-chain.1 \ gpiv_hdf2piv.1 \ gpiv_aint.1 \ gpiv_imgproc.1 gpiv_smooth.1 gpiv_hilo.1 gpiv_clip.1 \ gpiv_fft.1 gpiv_highpass.1 gpiv_getbit.1 gpiv_mktestimg.1 EXTRA_DIST = $(man_MANS) Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-info-am uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/man/gpiv_series.10000644000175000017500000000607711073414771013657 00000000000000.TH GPIV_SERIES 1 "19 Januari 2005" .SH NAME gpiv_series \- Script for (parallel) processing a series of numbered files. .SH SYNOPSIS \fBgpiv_series\fP [\fB-a\fR | \fB-\-arg_n\fR] [\fB-b\fR | \fB-\-basename \fIFILE\fR] [\fB-e\fR | \fB-\-ext\fR \fIext\fR] [\fB-f\fR | \fB-\-first \fIN\fR] [\fB-l\fR | \fB-\-last \fIN\fR] [\fB-i\fR | \fB-\-incr \fIN\fR] [\fB-x\fR|| \fB-\-prefix\fR] [\fB-h\fR | \fB-\-help\fR] [\fB-n\fR | \fB-\-none\fR] [\fB-p\fR | \fB-\-print\fR] [\fB-\-pad\fR] \fB"\fR\fIprocess\fR \-key1 ...\fB"\fR .SH DESCRIPTION \fBgpiv_series\fP processes a series of numbered files. If no parameters are defined at the command line, standard parameters will be used that are defined in the script. Principally, any program or script may be invoked by \fBgpiv_series\fP. "\fIProcess\fR" is a string which represents the name of the program to be executed, including eventually command line options and arguments. The file to be processed, as constructed from \fB-b\fR c.s., will be appended to the "\fIprocess\fR" string. If the program has to be feeded with \-f "filename", write \-f at the end of the string. When using the parallelised version, mpipython is invoked and the script may be launched with mpirun. The script needs that all input files are accessible on each node by copying all data or by (NFS) mounting the File System containing the input data on each node. This program does not use the parameter resources from libgpiv. .SH Options .TP \fB-a\fR | \fB--arg_n\fR If the process needs the current number in its argument list instead of prepending/appending it to the \fIFILE\fR, the number will be put before (\fB-f\fR) filename in the "\fR\fIprocess\fR" string. .TP \fB-b\fR | \fB-\-basename\fR \fIFILE\fR The \fIFILE\fR has to be given without its extension. \fIFILE\fR represents the file name without its number. It is supposed that the leading or ending number in the filename is the counter that will be applied by \fBgpiv_series\fR when processing. .TP \fB-e\fR | \fB-\-ext\fR \fIEXT\fR add an extension \fIEXT\fR after the filename (without the leading ".") in "\fIprocess\fR". .TP \fB-f\fR | \fB-\-first\fR \fIN\fR Defines the counter \fIN\fR of the number at which the analyses starts. Default: 0. .TP \fB-l\fR | \fB-\-last\fR \fIN\fR The last number \fIN\fR that will be processed. Default: 0. .TP \fB-i\fR | \fB-\-incr\fR \fIN\fR Increment number with \fIN\fR. Default: 1. This might be usefull, for example, if subsequent numbered images are combined for cross-correlation with the \fBgpiv_img2gpiv\fR tool. .TP \fB-x\fR | \fB-\-prefix\fR Use prefix numbering to file basename. .TP \fB-h\fR | \fB-\-help\fR \fP On-line help. .TP \fB-n\fR | \fB-\-none\fR \fP Suppresses real execution, only prints the process to stdout. .TP \fB-p\fR | \fB-\-print\fR \fP Prints the process to be performed on each file to stdout. .TP \fB-\-pad\fR \fIN\fR Padding a number with \fIN\fR zero's when combining with the filename. .TP .SH SEE ALSO gpivtools .SH NOTES .SH AUTHOR Gerber Van der Graaf .SH BUGS The parallelised script has only been tested with the LAM version of mpipython. gpivtools-0.6.0/man/gpiv_imgproc.10000644000175000017500000000456510774712146014031 00000000000000.TH GPIV_IMGPROC 1 "7 November 2006" .SH NAME gpiv_imgproc \- Image processing program for (PIV) images. .SH SYNOPSIS \fBgpiv_imgproc\fP [\fB-b \fIN\fR] [\fB--filter \fIN\fR] [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-o \fIN\fR | \fB--operation \fIN\fR] [\fB-t \fIN\fR | \fB--threshold \fIN\fR] [\fB-w \fIN\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_imgproc\fP processes, filters or converts images in order to improve the interrogation for Particle Image Velocimetry. \fBgpiv_smooth\fR: smoothing filter, \fBgpiv_hilo \fR: high-low filter, \fBgpiv_clip\fR: clipping, \fBgpiv_fft\fR: Fast Fourier Transform, \fBgpiv_invfft\fR: Inverse Fast Fourier Transform, \fBgpiv_highpass\fR: high-pass filtering \fBgpiv_getbit\fR: get bit bumber. \fBgpiv_mktestimg\fR: generates test image-pair for PIV The parameters read from the configuration resources (containing the key \fBGPIV_IMGPROC\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-b \fIN\fP In case of using \fBgpiv_getbit\fR \fIN\fP denotes the bit number [0, .., 7] .TP \fB--filter \fIN\fR Image filter to be applied: make test image (\fIN\fR=0), smoothing (\fIN\fR=1), high-low filtering (\fIN\fR=2), clipping (\fIN\fR=3), fft (\fIN\fR=4), inverse fft (\fIN\fR=5), lowpass filter (\fIN\fR=8), highpass filter (\fIN\fR=9), getbit (\fIN\fR=10). .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-o \fIN\fR | \fB--operation \fIN\fR In case of using \fBgpiv_smooth\fR: set pixel equal to the mean of the window value (\fIN\fR0), subtract mean from from pixel (\fIN\fR1) add (\fIN\fR2), multiply (\fIN\fR3) or divide (\fIN\fR4) .TP \fB-t \fIN\fR | \fB--threshold \fIN\fR In case of using \fBgpiv_clip\fR: threshold value to be set to zero .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fB-w \fIN\fR window size (default: 15) .TP \fIfilename\fR Input image filename. Overrides \fIstdin\fR and \fIstdout\fR with the full \fIfilename\fR of the image. Output will be written to \fIfilename\fB.png\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_manipiv.10000644000175000017500000000537510524333053014021 00000000000000.TH GPIV_MANIPIV 1 "8 November 2006" .SH NAME gpiv_manipiv, gpiv_fasty, gpiv_flipx, gpiv_flipy, gpiv_revert, gpiv_rot90, gpiv_rot180 \- Simple data manipulation tool for PIV data. .SH SYNOPSIS \fBgpiv_manipiv\fP [\fB-h\fR | \fB--help\fP\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fB-fi \fIx0 y0 x1 y1\fR] [\fB-no_fi\fR | \fB--pass\fR \fIx0 y0 x1 y1\fR] [\fB-fy\fR] [\fB-r\fR] [\fB--rev\fR] [\fB-x\fR] [\fB-y\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_manipiv\fP manipulates order and positions of PIV data, mirrors (flips) the data in horizontal (x) or vertical (y) direction, rotates over 90 and 180 degrees. As rotating over 180 degrees is identic to flipping over x as well as over y-direction, the program must be called twice or must be called once by \fBrot180\fR. The parameters read from the configuration resources (containing the key \fBPOST\fR) may be overruled by the command line options, as explained below. In case an alias name of \fBgpiv_manipiv\fR has been used, all non-relevant parameters are disabled. .SH Options .TP \fB-fi \fIx0 y0 x1 y1\fP filters out data from a piv data stream from location (\fIx0\fP,\fIy0\fP) to (\fIx1\fP,\fIy1\fP). Filtering only implies setting the peak number to -1. .TP \fB-no_fi\fR | \fB--pass\fR \fIx0 y0 x1 y1\fP filters out all data, except those from (\fIx0\fP,\fIy0\fP) to (\fIx1\fP,\fIy1\fP). This option is the opposite of \fB-fi\fP. Filtering only implies setting the peak number to -1. .TP \fB-fy\fP Returns fast running y-positions of data that are originally written with fast running x-positions. All other variables (particle displacements, snr, peak#) are at the new positions, too. Identic to \fBfasty\fR. .TP \fB-h\fR | \fB--help\fP On-line help. .TP \fB-p\fR | \fB--print\fP Prints parameters, command line options and input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fB-f\fP is used. .TP \fB-r\fR Rotates the data over 90 degrees. Identic to \fBrot90\fR. .TP \fB--rev\fP Reverts array indexes of output data for getting reversed order. This results into high to low running positions or vice versa. Identic to \fBrevert\fR. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exits successfully. .TP \fB-x\fP Flips the data in x-direction (vertical axis). Identic to \fBflipx\fR. .TP \fB-y\fP Flips the data in y-direction (horizontal axis). Identic to \fBflipy\fR. .TP \fIfilename\fR Input PIV data file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.ma.piv\fR. The parameters will be written or appended to \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_piv2hdf.10000644000175000017500000000300411005336430013700 00000000000000.TH GPIV_PIV2HDF 1 "10 November 2006" .SH NAME gpiv_piv2hdf \- Converts PIV-data HDF5 format. .SH SYNOPSIS \fBgpiv_piv2hdf\fP [\fB-e\fR] [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fB-V\fR | \fB--verbose\fR] \fIfilename\fR \fP .SH DESCRIPTION \fBgpiv_piv2hdf\fP converts ASCII-formattd PIV-data (\fIfilename\fB.piv\fR), derived data, like vorticities (\fIfilename\fB.vor\fR), strain (\fIfilename\fB.sstr\fR, \fIfilename\fB.nstr\fR) and, eventually, raw data images (\fIfilename\fB.r\fR), to a HDF5 formatted file \fIfilename\fB.hdf\fR. The parameters that have been used for the analysis and post processing are included in \fIfilename\fB.hdf\fR. This program does not use the parameter resources from libgpiv. The parameters may be defined by the command line options as explained below. .SH Options .TP \fB-e\fR Exclude PIV data and data from post-processes. .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-i\fR Includes image data. .TP \fB-p\fR | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. The output may be used as parameters of \fBfasty\fP for future use by re-directing stdout to \fIfasty.par\fR. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fB-V\fR | \fB--verbose\fR Program behaves more verbose by printing messages to stdout. .TP \fIfilename\fR Input PIV data filename, including .piv extension. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_piv2vec.10000644000175000017500000000364710772457547013760 00000000000000.TH GPIV_PIV2VEC 1 "8 November 2006" .SH NAME gpiv_piv2vec \- Converting of PIV data. .SH SYNOPSIS \fBgpiv_piv2vec\fP [\fB-al \fIlength\fR] [\fB-au \fIunits\fR] [\fB-flipx\fR] [\fB-flipy\fR] [\fB-g\fR] [\fB-h\fR | fB--help\fR] [\fB-nd\fR] [\fB-k\fR] [\fB-p\fR | \fB--print\fR] [\fB-s \fIscale\fR] [\fB-tl \fIlabel\fR] [\fB-v\fR | fB--version\fR] [\fB-xl \fIlabel\fR] [\fB-yl \fIlabel\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_piv2vec\fP adds an header to piv data for a vector plot with Plotmtv. This program does not use the parameter resources from libgpiv. .SH Options .TP \fB-al \fIlength\fR Plots a vector annotation of \fIlength\fR. .TP \fB-au \fIunits\fR Plots a vector annotation of \fIunits\fR. .TP \fB-flipx\fR Flips the plot in x-direction; x data from high to low. .TP \fB-flipy\fR Flips the plot in y-direction; y data from high to low. .TP \fB-g\fR Displays piv data graphically. \fIfilename\fR has to be defined. .TP \fB-h\fR | fB--help\fR On-line help. .TP \fB-nd\fR Combined with \fB-g\fR; adds option -nodate (only ps output doesn't contain date!). .TP \fB-k\fR Keep plot-file. .TP \fB-p\fR | \fB--print\fR Plots the output on screen with \fBPlotmtv\fR if \fIfilename\fR has been used. .TP \fB-s \fIscale\fR Vector scale (default: 1 px). .TP \fB-tl \fIlabel\fR Defines top label (title) (default: \fIfilename\fR, if used). .TP \fB-v\fR | fB--version\fR Prints version information on standard output, then exits successfully. .TP \fB-xl \fIlabel\fR Defines x-label (default: "x (pixels)"). .TP \fB-yl \fIlabel\fR Defines y-label (default: "y (pixels)"). .TP \fIfilename\fR Uses PIV file instead of stdin and stdout. The output will be written to \fIfilename\fB.vec\fR. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf .SH BUGS The program has been tested for PIV data. Watch out for filenames containing dots, apart from the separation with extension. gpivtools-0.6.0/man/gpiv_hdf2piv.10000644000175000017500000000267511005336334013720 00000000000000.TH GPIV_HDF2PIV 1 "19 Januari 2005" .SH NAME gpiv_hdf2piv \- Converts HDF5 PIV-data to ASCII data. .SH SYNOPSIS \fBgpiv_hdf2piv\fP [\fB-e\fR] [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] \fIfilename\fR \fP .SH DESCRIPTION \fBgpiv_hdf2piv\fP converts a HDF5 formatted file \fIfilename\fB.hdf\fR, containing PIV-data, PIV derived data, like vorticities, strain etc to (ASCII formatted) \fIfilename\fB.piv\fR., \fIfilename\fB.vor\fR, \fIfilename\fB.sstr\fR, \fIfilename\fB.nstr\fR and, eventually, image(s) to (PNG formatted) \fIfilename\fB.png\fR files. The parameters that have been used for the analysis and post processing are written to \fIfilename\fB.par\fR This program does not use the parameter resources from libgpiv. The parameters may be defined by the command line options as explained below. .SH Options .TP \fB-e\fR Exclude PIV data and data from post-processes. Only convert image data. .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. The output may be used as parameters of \fBfasty\fP for future use by re-directing stdout to \fIfasty.par\fR. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fIfilename\fR Full input file name, hdf formatted (including \fB.hdf\fR extension) .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_piv2grid.10000644000175000017500000000161010772460255014102 00000000000000.TH GPIV_PIV2GRID 1 "19 Januari 2005" .SH NAME gpiv_piv2grid \- Converts PIV data to grid data for generating contour plots with plotmtv. .SH SYNOPSIS \fBgpiv_piv2grid\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fB-t\fR] \fIfilename\fR \fP .SH DESCRIPTION \fBgpiv_piv2grid\fP converts PIV data to grid data for generating contour plots with plotmtv. This program does not use the parameter resources from libgpiv. The parameters may be defined by the command line options as explained below. .SH Options \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters to stdout. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP .TP \fB-t\fR Select which data to be stored on grid; dx, dy or snr (default: snr). .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_rr.10000644000175000017500000002772111005336515013001 00000000000000.TH GPIV_RR 1 "3 November 2006" .SH NAME gpiv_rr \- interrogates an image (pair) in order to obtain displacements of particles for (Digital) Particle Image Velocimetry (PIV) .SH SYNOPSIS \fBgpiv_rr\fP [\fB--cf \fIint\fR] [\fB--cl \fIint\fR] [\fB--cp \fIint\fR] [\fB-g\fR] [\fB--gauss\fR] [\fB-h\fR | \fB--help\fR] [\fB--ifit \fI0/1/2/3\fR] [\fB--ischeme \fIint\fR] [\fB--ia_size_i \fIint\fR] [\fB--ia_size_f \fIint\fR] [\fB--ia_shift \fIint\fR] [\fB--linec \fIint\fR \fIint\fR \fIint\fR] [\fB--liner \fIint\fR \fIint\fR \fIint\fR] [\fB-o\fR] [\fB-p\fR | \fB--print\fR] [\fB--peak \fIint\fR] [\fB--p_piv\fR] \ [\fB--point \fIint int\fR] [\fB--rf \fIint\fR] [\fB--rl \fIint\fR] [\fB--rp \fIint\fR] [\fB-s \fIfloat\fR] [\fB--spof\fR] [\fB-v\fR | \fB--version\fR] [\fB--val_r \fIint\fR] [\fB--val_s \fIint\fR] [\fB--val_t \fIfloat\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR .SH DESCRIPTION \fBgpiv_rr\fR inte\fIrr\fRogates an image or image pair that is obtained from a fluid flow by the so-called Digital Particle Image Velocimetry (DPIV) technique. Therefore, image(s) are sub-divided into interrogation areas on a rectangular grid. At each interrogation area the mean (or most probable) particle displacement is estimated. This is done by correlating the belonging interrogation areas of an image-pair by means of the Fast Fourier Transformation (FFT) technique, resulting into a two-dimensional correlation function. The location of the highest function peak, then, represents the mean or most probable displacement of the particle images that have been resident within the interrogation areas. Estimation of the correlation peak at sub-pixel level may be calculated by different interpolation schemes. The program allows cross-correlation of single-exposed images on different frames or auto-correlation of a multi-exposed single-frame image. Interrogation areas of arbitrary sizes may be used in order to obtain an optimum spatial resolution. Adaptive sizes of interrogation areas allow for large dynamic ranges of the particle displacements. Zero offsetting of the interrogation areas by an iterative interrogation process results into higher accuracy/lower biases of the particle image displacements. A central differential interrogation scheme than might be applied. This may result into improved estimators, compared with the 'classical' forward interrogation scheme, especially in case of strong shear strain and vorticity of the flow. Most accurate results, however, are obtained by deforming the images towards each other by using the PIV estimators. As a convergence criterium for these iterative procedures, the cumulative difference (defined by GPIV_CUM_RESIDU_MIN = 0.25) between the PIV estimators from the current and the previous iteration is used. After each interrogation the PIV estimators are validated. Before outliers are substituted as defined by the \fBVALID\fR parameters, it will be tried if the PIV estimator from the second or third highest correlation peak will be valid. \fBgpiv_rr\fR is fed with images of the following formats: Portable Network Graphics (\fIfilename\fB.png\fR), raw binary data (\fIfilename\fB.r\fR) that is accompanied by an ASCII header file (\fIfilename\fB.h\fR), HDF5 (\fIfilename\fB.hdf\fR), \fBtif\fR, \fBgif\fR, \fBpgm\fR, \fBbmp \fRand LaVision's (tm) uncompressed image format (\fIfilename\fB.img\fR). For cross-correlation the second image frame has to be concatenated after the first one into a single image file. This might be performed by \fBgpiv_combing\fR. Image parameters are read from the header or from other parameter resources (containing the key \fBIMG\fR) in case they are absent in the image header. The configuration parameters (containing the \fBEVAL\fR or \fBVALID\fR) key may be overruled by the command line options, as explained below. .SH Options .TP \fB--cf \fIN\fR Specify the first column \fIN\fR in the image to interrogate. If --ad_int has been used, the first column has to be equal or larger than (int_size_2 - int_size_1)/2. .TP \fB--cl \fIN\fR Specify the last column \fIN\fR in the image to interrogate. .TP \fB--cp \fIN\fR Pre-shift of \fIN\fR columns. This can be used if there is a common mean flow in x-direction in the area of observation. Relative small interrogation areas (allowing a high spatial resolution) may be used in that case with conservation of a high probability in finding the correct displacement peaks. .TP \fB-g\fR Graphic visualisation of the output with gnuplot. Can only be used in combination with \fIfilename\fR). .TP \fB--gauss\fR Gauss weighting of interrogation area to reduce high spatial frequency signal generated by the boundaries. .TP \fB-h\fR | \fB--help\fR Print a help message on standard output and exit successfully. .TP \fB--ifit \fI0/1/2/3\fR Three-point interpolation model for peak maximum estimation at sub-pixel level. \fI0\fR: none, \fI1\fR: Gauss, \fI2\fR: Parabolic or \fI3\fR Center of Gravity. .TP \fB--ischeme \fI0/1/2/3/4\fR Interrogation scheme: no correction (0), linear kernel weighting (1); This is applied to the calculation of the correlation function; the weighting of the image data decreases towards the edges of the interrogation region. Kernel weighting compensates this effect. Will be disabled if interrogation area size of image 2 differs from image 1. zero offset (2); Searches (iteratively) the correlation peak by zero offsetting the interrogation area's, until the peak maximum lies between (-1,-1) and (1,1). The images are interrogated by the 'classic' forward differential scheme. During the last iteration step, sub-pixel displacement will be calculated as defined with \fB-ifit\fR. Zero offset with central differential (3); The images are interrogated by the central differential scheme. This is done by displacing the interrogation area of the first image with half the (integer) magnitude of the pre-shift value in negative direction and displacing the interrogation area of the second image in positive direction (of identic magnitude). Image deformation (4); The images of a pair are deformed following the particle displacements obtained from the initial PIV estimators or from the previous iteration step. The first image is deformed in positive direction with half the (float) magnitudes of the estimators and the second image in negative direction. In this way, both deformed images will show the particle positions at the moment in-between the recordings. After the iteration has been converged and -p option has been used, the deformed images are stored (defined by GPIV_DEFORMED_IMG_NAME = gpiv_defimg) in TMPDIR (/tmp for UNIX-like systems), which may be used as a check. .TP \fB--ia_size_i \fIN\fR Initial size of the interrogation area's \fIN\fR. \fIN\fR must be equal or larger than \fBia_size_f\fR. The sizes must be choosen in such a way that the particle displacements remain within 1/4th of the interrogation area's in order to keep the in-plane errors at minimum. Choosing larger sizes of the initial interrogation area's allows high dynamic ranges of the estimators. In that case, the largest particle displacements may contribute adequately to the calculation of the estimators, while the estimators of the smallest flow scales are not smoothed by the large, initial, dimensions of the interrogation area's. The dimensions of the interrogation area's of the first and second image start with \fBia_size_i\fR. For each next image interrogation, the sizes will be halved until they will be equal to the final \fBia_size_f\fR value. The estimator will be used as a local pre-shift (zero offsetting, as defined by \fB--ischeme\fR). In case \fBia_size_f\fR and/or \fBia_size_i\fR is not a power of two, the sizes of the interrogation area's will be reduced with the appropriate factor during the last (iterative) interrogation in order to set them equal to \fBia_size_f\fR. During the last interrogation, the estimator will be between (-1,-1) and (1,1). Then, sub-pixel displacement will be calculated as defined by \fB--ifit\fR. .TP \fB--ia_size_f \fIN\fR Final size of the interrogation area's \fIN\fR, expressed in pixels. May be chosen arbitrarily. .TP \fB--ia_shift \fIN\fR Shift of adjacent interrogation areas \fIN\fR, expressed in pixels. .TP \fB--linec \fICOL RF RL\fR selects a vertical line at column \fICOL\fR to interrogate from the first row \fIRF\fR to the last row \fIRL\fR .TP \fB--liner \fIROW CF CL\fR selects an horizontal line at row \fIROW\fR to interrogate from the first column \fICF\fR to the last column \fICL\fR .TP \fB-p\fR | \fB--print\fR Print parameters, command line options, progress of calculation and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fB-f\fR is used. .TP \fB--peak \fIN\fR Find the \fIN\fR-th maximum of the correlation peak. In case of auto-correlation, the second peak is taken by default, as the first peak denotes the zero-shift of the particle displacements. .TP \fB--p_piv\fR Print the piv results to stdout, even if \fB-f\fR has been specified. .TP \fB--point \fICOL ROW\fR Select a single area in the image to interrogate at location \fICOL ROW\fR. This option might be useful for substitution of erroneous displacement vectors. A new estimation of the particle displacement with \fR--peak\fR, then, may give a correct result. Mind to use \fB--p_piv\fR if \fB-f\fR is used; else the original data file will be overwritten with a single point analyses. .TP \fB--rf \fIN\fR Specify the first row \fIN\fR in the image to interrogate. If \fB-ad_int\fR has been used, the first row has to be equal or larger than (\fBint_size_2\fR - \fBint_size_1\fR)/2. .TP \fB--rl \fIN\fR Specify the last row \fIN\fR in the image to interrogate. .TP \fB--rp \fIN\fR Pre-shift of \fIN\fR rows. This can be used if there is a common mean flow in y-direction. Relative small interrogation areas (allowing a high spatial resolution) may be used in that case with conservation of a high probability in finding the correct displacement peaks. .TP \fB-s \fIS\fR Scale factor for graphical output with gnuplot. This will only affect the length of the vectors that represent the particle image displacement magnitude, but not the PIV data itself. In order to adapt the scaling of the data, see gpiv_scale. .TP \fB--spof\fR Applies symmetric phase only filtering. This option may drasticly improve the SNR with higher and thinner covariance peak. Especially usefull when there is flare or high reflections (from boundaries, for example) in one of the two image frames from a PIV image pair. (Werner, Meas. Sci. Technol., 16, 601-618). .TP \fB-v\fR | \fB--version\fR Print version information on standard output then exit successfully. .TP \fB--val_r \fIN\fR Validation parameter to define residue type: Signal to Noise Ratio (\fIN\fR = 0), median value from surroundings (\fIN\fR = 1) or normalised median (\fIN\fR = 2). .TP \fB--val_s \fIN\fR Validation parameter to substitute an erroneous vector by: nothing (\fIN\fR = 0), local mean from the surroundings (\fIN\fR = 1), the median of the surroundings (\fIN\fR = 2) or the estimation from the next highest correlation peak (\fIN\fR = 3). .TP \fB--val_t \fIF\fR Validation parameter representing the threshold value (float number) of residues to be accepted. .TP \fIfilename\fR Using the full \fIfilename\fR of the input image overrides \fIstdin\fR and \fIstdout\fR. Output will be written to \fIfilename\fB.piv\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH NOTES \fBgpiv_rr\fR has been tested with artificial images and with PIV images from gas and liquid flows. Comparison with PIV data, obtained from different algorithms, and with literature results that similar data reliability and accuracy may be obtained with this program. .SH AUTHOR Gerber Van der Graaf .SH BUGS The program seems to work fine. Though as the PIV technology itself is subject of research, this program is constantly under development. gpivtools-0.6.0/man/gpiv_sca2gri.10000644000175000017500000000150610772457623013717 00000000000000.TH GPIV_SCA2GRI 1 "19 Januari 2005" .SH NAME gpiv_sca2gri \- Converts scalar data from gpiv to grid data for contour plotting with plotmtv. .SH SYNOPSIS \fBgpiv_sca2gri\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fB-t\fR] < \fIinput\fR > \fIoutput\fR \fP .SH DESCRIPTION \fBgpiv_sca2gri\fP converts PIV data to grid data for generating contour plots with plotmtv. This program does not use the parameter resources from libgpiv. The parameters may be defined by the command line options as explained below. .SH Options \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters to stdout. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_vhisto.10000644000175000017500000000320210524416722013662 00000000000000.TH GPIV_VHISTO 1 "8 November 2006" .SH NAME gpiv_vhisto \- Tests PIV data by printing/displaying an histogram of the vertical particle displacements. .SH SYNOPSIS \fBgpiv_vhisto\fP [\fB-g\fR] [\fB-h\fR | \fB--help\fR] [\fB-n \fIN\fR\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBGpiv_vhisto\fP calculates the histogram of the vertical particle displacement distribution between minimum and maximum values. The parameters read from the configuration resources (containing the key \fBVALID\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-g\fP Graphical visualization of the histogram with gnuplot. .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-n \fIN\fR Override number of bins (default 10, hard coded). .TP \fB-p\fR | \fB--print\fP Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fB-f\fP is used. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input PIV file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.pdf\fR. The parameters will be written or appended to \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .SH SEE ALSO gpivtools .SH NOTES stdin and stdout has still to be implemented. [\fB-f\fR \fIfilename \fR] will be added. .SH AUTHOR Gerber Van der Graaf .SH BUGS The program seems to work fine with real PIV data. So far, no serious bugs have been found. gpivtools-0.6.0/man/gpiv_smooth.10000644000175000017500000000273210774701210013662 00000000000000.TH GPIV_SMOOTH 1 "7 November 2006" .SH NAME gpiv_smooth \- Image smoothing program for PIV images. .SH SYNOPSIS \fBgpiv_smooth\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-o \fIN\fR | \fB--operation \fIN\fR] [\fB-w \fIN\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_smooth\fP set each pixel value equal to the mean within a window and eventually subtracts, adds, mulriplies or divides the mean value. The parameters read from the configuration resources (containing the key \fBGPIV_IMGPROC\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-o \fIN\fR | \fB--operation \fIN\fR Set pixel equal to the mean of the window value (\fIN\fR0), subtract mean from from pixel (\fIN\fR1) add (\fIN\fR2), multiply (\fIN\fR3) or divide (\fIN\fR4) .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fB-w \fIN\fR window size (default: 15) .TP \fIfilename\fR Input image filename. Overrides \fIstdin\fR and \fIstdout\fR with the full \fIfilename\fR of the image. Output will be written to \fIfilename\fB.png\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. If \fIstdin\fR and \fIstdout\fR are used, the input is expected to be a PNG formatted image. .TP .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_scale.10000644000175000017500000000466410772421043013447 00000000000000.TH GPIV_SCALE 1 "8 November 2006" .SH NAME gpiv_scale \- Scaling of PIV data. .SH SYNOPSIS \fBgpiv_scale\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-s \fIM\fR |\fB-S \fIM\fR] [\fB-t \fIdT\fR |\fB-T \fIdT\fR] [\fB-v\fR | \fB--version\fR] [\fB-zp \fIx0 y0\fR] [\fB-zv \fIx0 y0\fR] [\fIfilename\fP] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_scale\fP applies the image magnification and the time between successive recordings to the PIV estimators. This results that particle displacements [px] are modified to velocities [m/s] and their positions from [px] to [m]. A physical reference for the positions of the PIV data can be applied by means of the image zero-offset option. If \fIfilename\fR is used, the parameters and options to be used for \fBgpiv_scale\fP are subsequently read from the image header (\fIfilename\fB.h\fR in case of raw binary images) or from the configuration resources (containing the \fBIMG\fR and \fBPOST\fR keys). The parameters may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help. .TP \fB-p\fR | \fB--print\fP Prints parameters, command line options and input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fB-f\fP is used. .TP \fB-s \fIM\fR spatial scaling with magnification factor \fIM\fR [m/px] .TP \fB-S \fIM\fP Inverse spatial scaling with magnification factor \fIM\fR [m/px]; returns scaled data to their original magnitudes. .TP \fB-v\fR | \fB--version\fP Prints version information on standard output, then exits successfully. .TP \fB-t \fIdT\fP Translates particle displacements into velocities by devising them with the time between subsequent recordings \fIdT\fR [s]. .TP \fB-T \fIdT\fP Inverse time scaling. Returns velocities into displacements [px] .TP [\fB-z \fIx0 y0\fR] Relates the positions of the observations of velocities/displacements to a physical location in the experiment by image zero offsetting. \fIx0 y0\fR denote the physical position of pixel (0,0) in the image. .TP \fIfilename\fR Input PIV file. Overrides stdin and stdout. The output will be written to \fIfilename\fB.sc.piv\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .TP .SH SEE ALSO gpivtools .SH NOTES .SH AUTHOR Gerber Van der Graaf .SH BUGS The program has been tested for PIV data. So far, no bugs have been found. gpivtools-0.6.0/man/gpiv_recimg.10000644000175000017500000000261410772420141013615 00000000000000.TH GPIV_RECIMG 1 "19 Januari 2005" .SH NAME gpiv_recimg \- captures images from a IIDC-compliant camera with IEE1394 connection. .SH SYNOPSIS \fBgpiv_recimg\fP [\fB-f \fIfilename\fR] [\fB-h\fR | \fB--help\fR] [\fB-v\fR | \fB--version\fR] [\fB-V\fR | \fB--verbose\fR] [\fB-x\fR | \fB--x_corr\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_recimg\fP records image pairs for Particle Image velocimetry (PIV). The code supports IIDC-compliant cameras that are connected to the computer with IEEE1394. Such an image pair may be analysed by gpiv_rr in the cross-correlation mode for PIV. This program uses the \fBIMG\fR parameters. The command line options are explained below. .SH Options \fB-f \fIfilename\fR Overrides stdin and stdout with \fIfilename\fR. The filename has to be given without its \fB.r\fR extension. Output will be written to \fIfilename\fB.r\fR. .TP \fB-h\fR | \fB--help\fP On-line help. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fB-V\fR | \fB--verbose\fP program behaves more verbose during operation showing what is going on .TP \fB-x\fR | \fB--x_corr\fR Records two succesive image frames for cross-correlation and stores as a single image. In this case, \fBgpiv_combing\fR is not needed. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf .SH BUGS The program is still in a very prelimary state. gpivtools-0.6.0/man/gpiv_rot90.10000644000175000017500000000216610524424255013333 00000000000000.TH GPIV_ROT90 1 "8 November 2006" .SH NAME gpiv_rot90 \- Simple data manipulation tool for PIV data. .SH SYNOPSIS \fBgpiv_rot90\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_rot90\fP rotates the data over 90 degrees. The parameters read from the configuration resources (containing the key \fBPOST\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. The output may be used as parameters of \fBgpiv_rot90\fP for future use by re-directing stdout to \fIgpiv_rot90.par\fR. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fIfilename\fR Input PIV file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.ar.piv\fR. The parameters will be written or appended to \fIfilename\fB.par\fR. .TP .SH SEE ALSO manipiv, gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_process-chain.10000644000175000017500000000536311005336470015112 00000000000000.TH GPIV_PROCESS-CHAIN 1 "19 Januari 2005" .SH NAME gpiv_process-chain \- Processes a pipe of Gpiv-tool command's. .SH SYNOPSIS \fBgpiv_process-chain\fP [\fB-af \fIstring\fR] [\fB-h\fR | \fB-help\fR] [\fB-n\fR | \fB-none] [\fB-c\fR | \fB-clean] [\fB-fik\fR] [\fB-p\fR | \fB-print] [\fB-pf \fI-string] [\fB-proc_*\fR] [\fB-t \fIformat\fR] [\fB-v\fR | \fI-version\fR] \fIfilename\fR \fP .SH DESCRIPTION \fBGpiv_process-chain\fP processes a pipe of gpiv commands. Image evaluation/interrogation with \fBgpiv_rr\fR is always included, image recording may be prepended before interrogation, validation and post-processes may be appended to the chain. The \fIfilename\fR represents the name of the image to be evaluated. The file naming conventions are idententic to the output of the individual Gpivtools programs: in case the output are (validated/scaled) PIV data, the data will be directed to \fIfilename\fR.\fBpiv\fR, with \fB-proc_vorty\fR the output will be called \fIfilename\fR.\fBvor\fR, with \fB-proc_nstrain\fR the output will be called \fIfilename\fR.\fBnstr\fR and, finally, with with \fB-proc_sstrain\fR the output will be called \fIfilename\fR.\fBsstr\fR. This program does not use the parameter resources from libgpiv. .SH Options \fB-af \fIstring\fR Append \fIstring\fR to file-base name. .TP \fB-h\fR | \fB--help\fP On-line help. .TP \fB-n\fR | \fB--none \fP Suppresses real execution. .TP -\fBc\fR | \fB-clean Cleans up: removes raw image data and header. .TP -\fBfik\fR Use fi-keyline for filtering gpiv parms from README. .TP \fB-p\fR | \fB--print \fP Prints parameters, command line options and input and output filenames to stdout. .TP -\fBpf \fIstring\fR Prepend \fIstring\fR to file-base name. .TP -\fBproc_*\fR Defines processes to be included in the chain. \fB*\fR is substituted by: imgrec, valid, scale, manipiv, flipx, flipy, revert, rot90, rot180 and vorty or nstrain or sstrain. Vorty, nstrain and sstrain may not be used in combination with \fB-t \fIgpi\fR. .TP \fB-t \fIformat\fR Image type or format: hdf (\fB.hdf\fR), dav (\fB.IMG\fR) or a type as defined by ImageMagic's convert. Default is raw binary image (\fB.r\fR). .TP \fB-v\fR | \fB--version\fP Prints version information to standard output, then exits successfully. .TP \fIfilename\fR Input image filename. Format may be: \fB.r\fR, \fB.hdf\fR (hdf), \fB.IMG\fR (davis), \fB.png\fR, \fB.gif\fR, \fB.tif\fR or\fB.bmp\fR. .SH EXAMPLES invoking: 'gpiv_process-chain -proc_valid -proc_scale testfile.png' will actually perform: gpiv_rr < image.png | gpiv_errvec > testfile.piv invoking: 'gpiv_process-chain -proc_imgrec -proc_valid -proc_scale testfile.png' will do: gpiv_recimg | gpiv_rr | gpiv_errvec | gpiv_scale > testfile.piv .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_t-corr.10000644000175000017500000000244710213307646013565 00000000000000.TH GPIV_T-CORR 1 "19 Januari 2005" .SH NAME gpiv_t-corr \- calculates the Eulerian correlation from a series of PIV data sets .SH SYNOPSIS \fBgpiv_t-corr\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fB-f\fR | \fB--file_first\fR \fIN\fR] [\fB-l\fR | \fB--file_last\fR \fIN\fR] [\fB-x\fR | \fB--point_x\fR \fIF\fR] [\fB-y\fR | \fB--point_y\fR \fIF\fR] \fIfile_basename\fR \fP .SH DESCRIPTION \fBgpiv_t-corr\fP calculates the Eulerian correlation from a series of PIV data sets. The parameters may be defined by the command line options as explained below. .SH Options \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters to stdout. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fB-f\fR | \fB--file_first\fR \fIN\fR First file number of the series (default: 0). .TP \fB-l\fR | \fB--file_last\fR \fIN\fR Last file number of the series (default: 0). .TP \fB-x\fR | \fB--point_x\fR \fIF\fR X-position of data set to be analysed (default: 0.0). .TP \fB-y\fR | \fB--point_y\fR \fIF\fR Y-position of data set to be analysed (default: 0.0). .TP \fIfile_basename\fR File _basename of a numbered series of PIV data sets. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_fasty.10000644000175000017500000000246110524333103013471 00000000000000.TH GPIV_FASTY 1 "8 November 2006" .SH NAME gpiv_fasty \- Simple data manipulation tool for PIV data. .SH SYNOPSIS \fBgpiv_fasty\fP [\fB-h\fR | \fB--help\fP\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_fasty\fP returns fast running y-positions of data that are originally written with fast running x-positions. All other variables (particle displacements, snr, peak#) are at the new positions as well. The parameters read from the configuration resources (containing the key \fBPOST\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fR | \fB--help\fP On-line help. .TP \fB-p\fR | \fB--print\fP Prints parameters, command line options and input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fB-f\fP is used. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exits successfully. .TP \fIfilename\fR Input Piv data file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.ma.piv\fR. The parameters will be written or appended to \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .TP .SH SEE ALSO manipiv, gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_vorstra.10000644000175000017500000000533210774677014014066 00000000000000.TH GPIV_VORSTRA 1 "8 November 2006" .SH NAME gpiv_vorstra \- Calculates the differential quantities vorticity, shear strain and normal strain from PIV data. .SH SYNOPSIS \fBgpiv_vorstra\fP [\fB-d \fIN\fR] [\fB-h\fR | \fB--help\fR] [\fB-n\fR | \fB-o\fR | \fB-s\fR] [\fB--no_g \fR] [\fB-p\fR | \fB--print\fR] [\fB-g\fR | \fB--g\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_vorstra\fP calculates the differential quantities like vorticity, shear strain and normal strain from PIV data. You can choose from several differential schemes: central differentiation, least squares, Richardson extrapolation and circulation method. Circulation method only allows to calculate vorticity, but no strain. The output can be generated as ASCII data containing four columns or as GNUPlot Data format that allows to view/print the data as contour plots. The configuration parameters (containing the \fBPOST\fR key) may be overruled by the command line options, as explained below. .SH Options .TP \fB-d \fIN\fP Differential type to be used: central difference (\fIN\fR=0), least squares (\fIN\fR=1), Richardson interpolation (\fIN\fR=2), circulation method (\fIN\fR=3) .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-n\fR Calculate normal strain of the PIV data. As an alternative the program may be called by its nickname \fIgpiv_nstrain\fR. In combination with \fIfilename\fR the output will be written to \fIfilename\fB.nstr\fR. .TP \fB-o\fP Calculate vorticity of the PIV data. As an alternative the program may be called by its nickname \fIgpiv_vorty\fR. In combination with \fIfilename\fR the output will be written to \fIfilename\fB.vor\fR. .TP \fB-p\fR | \fB--print\fP Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fIfilename\fP is used. .TP \fB-s\fR Calculate shear strain of the PIV data. As an alternative the program may be called by its nickname \fIsstrain\fR. In combination with \fIfilename\fR the output will be written to \fIfilename\fB.sstr\fR. .TP \fB-g\fR Show contour plot of the output with gnuplot. .TP \fB--no_g\fR Suppresses to show contour plot of the output with gnuplot. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input PIV data file. Overrides stdin and stdout. The output will be written to \fIfilename\fB.vor\fR with \fB-o\fP, \fIfilename\fB.nstr\fR with \fB-n\fR or \fIfilename\fB.sstr\fR with \fB-s\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_peaklck.10000644000175000017500000000410710773133774013776 00000000000000.TH GPIV_PEAKLCK 1 "8 November 2006" .SH NAME gpiv_peaklck \- Tests PIV data on the so-called peak-locking effect by printing/displaying an histogram of the particle displacements at sub-pixel level. .SH SYNOPSIS \fBgpiv_peaklck\fP [\fB-g\fR] [\fB-h\fR | \fB--help\fR] [\fB-n \fIN\fR\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION Peak-locking effects in Particle Image Velocimetry (PIV) result into estimations of the particle displacements that are mainly at an integer number of pixels, instead of at sub-pixel displacements. This effect may due to stretching of the (round) pixel images, due to a too low resolution of the pixel-image or may be due to signal interferences of the data from camera to frame grabber. \fBGpiv_Peaklck\fP calculates the particle displacement distribution at sub-pixel level in between 0.0 an 1.0 (0 included, 1 excluded). If peak locking occurs, a non-uniform distribution of the estimated particle displacements at sub-pixel level will be found. The configuration parameters (containing the \fBVALID\fR key) may be overruled by the command line options, as explained below. .SH Options .TP \fB-g\fP Graphical visualization of the histogram with gnuplot. .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-n \fIN\fR Override number of bins (default 10, hard coded). .TP \fB-p\fR | \fB--print\fP Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fB-f\fP is used. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input PIV data file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.plk\fR. The parameters will be written or appended to \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf .SH BUGS The program seems to work fine with real PIV data. So far, no serious bugs have been found. gpivtools-0.6.0/man/gpiv_sstrain.10000644000175000017500000000337010774676507014057 00000000000000.TH GPIV_SSTRAIN 1 "8 November 2006" .SH NAME gpiv_sstrain \- Calculates the shear strain from PIV data. .SH SYNOPSIS \fBgpiv_sstrain\fP [\fB-d \fIN\fR] [\fB-h\fR | \fB--help\fR] [\fB--no_g \fR] [\fB-p\fR | \fB--print\fR] [\fB-g\fR | \fB--g\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_sstrain\fP calculates the shear strain from PIV data. You can choose from several differential schemes: central differentiation, least squares and Richardson extrapolation. The output can be generated as ASCII data containing four columns or as GNUPlot Data format that allows to view/print the data as contour plots. The configuration parameters (containing the \fBPOST\fR key) may be overruled by the command line options, as explained below. .SH Options .TP \fB-d \fIN\fP Differential type to be used: central difference (\fIN\fR=0), least squares (\fIN\fR=1), Richardson interpolation (\fIN\fR=2), circulation method (\fIN\fR=3) .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-p\fR | \fB--print\fP Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fIfilename\fP is used. .TP \fB-g\fR Show contour plot of the output with gnuplot. .TP \fB--no_g\fR Suppresses to show contour plot of the output with gnuplot. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input PIV data file. Overrides stdin and stdout. The output will be written to \fIfilename\fB.sstr\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_flipx.10000644000175000017500000000220710524333324013470 00000000000000.TH GPIV_FLIPX 1 "8 November 2006" .SH NAME gpiv_flipx \- Simple data manipulation tool for PIV data. .SH SYNOPSIS \fBgpiv_flipx\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_flipx\fP flips the data in x-direction (vertical axis). The parameters read from the configuration resources (containing the key \fBPOST\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fP | \fB--help\fR On-line help. .TP \fB-p\fP | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. The output may be used as parameters of \fBgpiv_flipx\fP for future use by re-directing stdout to \fIgpiv_flipx.par\fR. .TP \fB-v\fP | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fIfilename\fR Input PIV data file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.ma.piv\fR. The parameters will be written or appended to \fIfilename\fB.par\fR. .TP .SH SEE ALSO manipiv, gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_flipy.10000644000175000017500000000221110524333550013465 00000000000000.TH GPIV_FLIPY 1 "8 November 2006" .SH NAME gpiv_flipy \- Simple data manipulation tool for PIV data. .SH SYNOPSIS \fBgpiv_flipx\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_flipy\fP flips the data in y-direction (horizontal axis). The parameters read from the configuration resources (containing the key \fBPOST\fR) may be overruled by the command line options, as explained below. .SH Options .TP \fB-h\fP | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters, command line options and input and output filenames to stdout. The output may be used as parameters of \fBgpiv_flipy\fP for future use by re-directing stdout to \fIgpiv_flipy.par\fR. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP \fIfilename\fR Input PIV data file. Overrides stdin and stdout. Output will be written to \fIfilename\fB.ma.piv\fR. The parameters will be written or appended to \fIfilename\fB.par\fR. .TP .SH SEE ALSO manipiv, gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_nstrain.10000644000175000017500000000336710774676755014065 00000000000000.TH GPIV_NSTRAIN 1 "8 November 2006" .SH NAME gpiv_nstrain \- Calculates normal strain from PIV data. .SH SYNOPSIS \fBgpiv_nstrain\fP [\fB-d \fIN\fR] [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-g\fR | \fB--g\fR] [\fB--no_g \fR] [\fB-v\fR | \fB--version\fR] [\fIfilename\fR] < \fIstdin\fR > \fIstdout\fR \fP .SH DESCRIPTION \fBgpiv_nstrain\fP calculates the normal strain from PIV data. You can choose from several differential schemes: central differentiation, least squares, and Richardson extrapolation. The output can be generated as ASCII data containing four columns or as GNUPlot Data format that allows to view/print the data as contour plots. The configuration parameters (containing the \fBPOST\fR key) may be overruled by the command line options, as explained below. .SH Options .TP \fB-d \fIN\fP Differential type to be used: central difference (\fIN\fR=0), least squares (\fIN\fR=1), Richardson interpolation (\fIN\fR=2), circulation method (\fIN\fR=3) .TP \fB-h\fR | \fB--help\fP On-line help .TP \fB-p\fR | \fB--print\fP Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of \fIfilename\fB.par\fR, in case \fIfilename\fP is used. .TP \fB-g\fR Show contour plot of the output with gnuplot. .TP \fB--no_g\fR Suppresses to show contour plot of the output with gnuplot. .TP \fB-v\fR | \fB--version\fP Print version information on standard output, then exit successfully. .TP \fIfilename\fR Input PIV data file. Overrides stdin and stdout. The output will be written to \fIfilename\fB.nstr\fR. Parameters are stored in \fIfilename\fB.par\fR and may be used for future use by including them in \fI./gpivrc\fR. .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/man/gpiv_fi-keyline.10000644000175000017500000000204210772457350014412 00000000000000.TH GPIV_FI-KEYLINE 1 "19 Januari 2005" .SH NAME gpiv_fi-keyline \- Filters each line that starts with a keyword. .SH SYNOPSIS \fBgpiv_fi-keyline\fP [\fB-h\fR | \fB--help\fR] [\fB-p\fR | \fB--print\fR] [\fB-v\fR | \fB--version\fR] [\fB-if\fR | \fB--input_file\fR \fIstring\fR] [\fB-of\fR | \fB--output_file\fR \fIstring\fR] \fIkeyword\fR \fP .SH DESCRIPTION \fBgpiv_fi-keyline\fP filters each line that starts with a keyword. This program does not use the parameter resources from libgpiv. The parameters may be defined by the command line options as explained below. .SH Options \fB-h\fR | \fB--help\fR On-line help. .TP \fB-p\fR | \fB--print\fR Prints parameters to stdout. .TP \fB-v\fR | \fB--version\fR Print version information on standard output, then exits successfully. .TP [\fB-if\fR | \fB--input_file\fR \fIstring\fR] Input file. .TP [\fB-of\fR | \fB--output_file\fR \fIstring\fR] Output file. .TP \fB-t\fR Select which data to be stored on grid; dx, dy or snr (default: snr). .SH SEE ALSO gpivtools .SH AUTHOR Gerber Van der Graaf gpivtools-0.6.0/src/0000777000175000017500000000000011073421570011337 500000000000000gpivtools-0.6.0/src/dac/0000777000175000017500000000000011073421571012067 500000000000000gpivtools-0.6.0/src/dac/README0000644000175000017500000000020310150321635012651 00000000000000 pcolaco from pcolaco-0.1 distro grab_image from libdc1394/examples/grab_gray_image missing CONTROL script and pcolaco_rta module gpivtools-0.6.0/src/dac/getopt.c0000644000175000017500000007300410150321636013451 00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (print_errors) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (print_errors) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gpivtools-0.6.0/src/dac/getopt.h0000644000175000017500000001334510150321636013460 00000000000000/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if defined __STDC__ && __STDC__ const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if defined __STDC__ && __STDC__ # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ gpivtools-0.6.0/src/dac/Makefile.am0000644000175000017500000000114710673474627014061 00000000000000ENABLE_CAM = @ENABLE_CAM@ ENABLE_TRIG = @ENABLE_TRIG@ RTA_TOPDIR = @RTA_TOPDIR@ K_TOPDIR = @K_TOPDIR@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ bin_PROGRAMS = gpiv_recimg \ gpiv_trig ## xmalloc.c \ gpiv_trig_SOURCES = trig.c \ system.h \ getopt.c \ getopt1.c \ getopt.h ## xmalloc.c \ gpiv_recimg_SOURCES = rec_image.c \ rec_image.h \ system.h \ getopt.c \ getopt1.c \ getopt.h ## gpiv_recimg_LDADD = -ldc1394_control -lraw1394 EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ gpivtools-0.6.0/src/dac/Makefile.in0000644000175000017500000003454611073421522014060 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = gpiv_recimg$(EXEEXT) gpiv_trig$(EXEEXT) subdir = src/dac DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gpiv_recimg_OBJECTS = rec_image.$(OBJEXT) getopt.$(OBJEXT) \ getopt1.$(OBJEXT) gpiv_recimg_OBJECTS = $(am_gpiv_recimg_OBJECTS) gpiv_recimg_LDADD = $(LDADD) gpiv_recimg_DEPENDENCIES = am_gpiv_trig_OBJECTS = trig.$(OBJEXT) getopt.$(OBJEXT) \ getopt1.$(OBJEXT) gpiv_trig_OBJECTS = $(am_gpiv_trig_OBJECTS) gpiv_trig_LDADD = $(LDADD) gpiv_trig_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gpiv_recimg_SOURCES) $(gpiv_trig_SOURCES) DIST_SOURCES = $(gpiv_recimg_SOURCES) $(gpiv_trig_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ gpiv_trig_SOURCES = trig.c \ system.h \ getopt.c \ getopt1.c \ getopt.h gpiv_recimg_SOURCES = rec_image.c \ rec_image.h \ system.h \ getopt.c \ getopt1.c \ getopt.h EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dac/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dac/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gpiv_recimg$(EXEEXT): $(gpiv_recimg_OBJECTS) $(gpiv_recimg_DEPENDENCIES) @rm -f gpiv_recimg$(EXEEXT) $(LINK) $(gpiv_recimg_LDFLAGS) $(gpiv_recimg_OBJECTS) $(gpiv_recimg_LDADD) $(LIBS) gpiv_trig$(EXEEXT): $(gpiv_trig_OBJECTS) $(gpiv_trig_DEPENDENCIES) @rm -f gpiv_trig$(EXEEXT) $(LINK) $(gpiv_trig_LDFLAGS) $(gpiv_trig_OBJECTS) $(gpiv_trig_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rec_image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trig.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/src/dac/getopt1.c0000644000175000017500000001070610150321636013532 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gpivtools-0.6.0/src/dac/rec_image.c0000644000175000017500000004553010721576557014107 00000000000000 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */ /************************************************************************** ** Title: grab one gray image using libdc1394 ** $RCSfile: rec_image.c,v $ ** $Revision: 1.7 $$Name: $ ** $Date: 2007-11-23 16:18:55 $ ** Copyright: LGPL $Author: gerber $ ** Description: ** ** Get one gray image using libdc1394 and store it as portable gray map ** (pgm). Based on 'samplegrab' from Chris Urmson ** **------------------------------------------------------------------------- ** ** $Log: rec_image.c,v $ ** Revision 1.7 2007-11-23 16:18:55 gerber ** release 0.5.0: Kafka ** ** Revision 1.6 2007-01-29 14:26:54 gerber ** Added image formats png, gif, tif, pgm, bpm. Added gpiv_aint ** ** Revision 1.5 2006-09-18 07:36:16 gerber ** split up of trigger and camera (image recording) ** ** Revision 1.4 2006/01/31 14:18:03 gerber ** version 0.3.2 ** ** Revision 1.3 2005/02/26 16:29:19 gerber ** parameter flags (parameter_logic) defined as gboolean, added scale_type to struct __GpivPostPar for inverse scaling ** ** Revision 1.2 2005/01/19 15:45:58 gerber ** all executables start with gpiv_ ** ** Revision 1.1 2005/01/19 10:36:03 gerber ** Initiation of Data Acquisition; triggering of lasers and camera, recording images ** ** Revision 1.2 2001/09/14 08:10:41 ronneber ** - some cosmetic changes ** ** Revision 1.1 2001/07/24 13:50:59 ronneber ** - simple test programs to demonstrate the use of libdc1394 (based ** on 'samplegrab' of Chris Urmson ** ** **************************************************************************/ #include #ifdef ENABLE_CAM #include #include #endif /* ENABLE_CAM */ #include #include #include #include "system.h" #ifdef ENABLE_CAM #include "rec_image.h" #endif /* ENABLE_CAM */ #include /* unsigned int sleep(unsigned int seconds); */ #define EXIT_FAILURE 1 #define RCSID "$Id: rec_image.c,v 1.7 2007-11-23 16:18:55 gerber Exp $" #ifdef ENABLE_CAM char *xmalloc (); char *xrealloc (); char *xstrdup (); char *program_name; /* Option flags and variables */ #define USAGE "\ Usage: gpiv_rec_image [-h | --help] -v | --version] -V | --verbose] [-x | --x_corr] \n\ [filename] > stdout \n\ \n\ keys: \n\ -h | --help this on-line help \n\ -v | --version: version number \n\ -V | --verbose: program prints more information \n\ -x | --x_corr record two succesive images for cross-correlation \n\ filename: image filename. Overrides stdout. \n\ Output will be a .png formatted image \n\ " #define HELP "\ gpiv_recimg captures images from a IIDC-compliant camera with IEE1394 connection \n\ " /* * Global parameters and variables */ gboolean use_stdin_stdout = FALSE; gboolean verbose = FALSE; /* --verbose */ gboolean print_par = FALSE; static void command_args (int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivImagePar *image_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c = '\0'; gint argc_next; while (--argc > 0 && (*++argv)[0] == '-') { /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ argc_next = 0; while (argc_next == 0 && (c = *++argv[0])) switch (c) { case 'v': printf("%s\n", RCSID); exit(0); break; case 'h': printf("%s\n", RCSID); printf("%s\n",HELP); printf("%s\n",USAGE); exit(0); break; case 'V': verbose = TRUE; break; case 'x': image_par->x_corr = TRUE; image_par->x_corr__set = TRUE; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", RCSID); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-verbose", *argv) == 0) { verbose = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else if (strcmp("-x_corr", *argv) == 0) { image_par->x_corr = TRUE; image_par->x_corr__set = TRUE; } else { gpiv_error ("%s: unknown option: %s", RCSID, *argv); } argc_next = 1; break; default: gpiv_error ("%s: unknown option: %s", RCSID, *argv); break; } } /* * Check if filename or stdin /stdout is used */ if (argc == 1) { use_stdin_stdout = FALSE; strcpy(fname, argv[argc - 1]); } else if (argc == 0) { use_stdin_stdout = TRUE; print_par = FALSE; } else { gpiv_error("\n%s: unknown argument: %s: %s", RCSID, *argv, USAGE); } } int main(int argc, char *argv[] ) /*----------------------------------------------------------------------------- */ { FILE* imagefile; dc1394_cameracapture capture; quadlet_t value; GpivCamVar *cam_var = NULL; gchar *err_msg = NULL; gchar fname[GPIV_MAX_CHARS]; unsigned char **lframe1 = NULL, **lframe2 = NULL; guint16 **img1 = NULL, **img2 = NULL; GpivImagePar gpiv_image_par; gint i, j; /* * from coriander: */ /* chain_t **image_pipes; */ /* Format7Info *format7_info; */ /* UIInfo *uiinfos; */ /* SelfIdPacket_t *selfids; */ program_name = "gpiv_recimg"; gpiv_img_parameters_set (&gpiv_image_par, FALSE); gpiv_image_par.x_corr = FALSE; command_args (argc, argv, fname, &gpiv_image_par); if (verbose) printf ("starting %s\n", program_name); if ((cam_var = gpiv_cam_get_camvar (verbose)) == NULL) { g_error("from: rec_image->main\n from: gpiv_cam_get_camvar\n %s", err_msg); } /* * coriander: IsoStartThread->on_button_receive */ cam_var->misc_info[0].format = FORMAT_VGA_NONCOMPRESSED; cam_var->misc_info[0].mode = MODE_640x480_MONO; cam_var->misc_info[0].framerate = FRAMERATE_7_5; if (dc1394_setup_capture (cam_var->camera[0].handle, cam_var->camera[0].id, cam_var->misc_info[0].iso_channel, cam_var->misc_info[0].format, cam_var->misc_info[0].mode, /* maxspeed */ SPEED_400, cam_var->misc_info[0].framerate, &capture) != DC1394_SUCCESS) { /* info->receive_method=RECEIVE_METHOD_RAW1394; */ dc1394_release_camera (cam_var->handle, &capture); raw1394_destroy_handle (cam_var->handle); g_error ("unable to setup camera-\n" "check line %d of %s to make sure\n" "that the video mode, framerate and format are\n" "supported by your camera\n", __LINE__,__FILE__); } else { if (verbose) g_message("dc1394_setup_capture: succes"); } /* int */ /* dc1394_set_exposure(raw1394handle_t handle, nodeid_t node, */ /* unsigned int exposure); */ dc1394_auto_on_off(cam_var->camera[0].handle, cam_var->camera[0].id, FEATURE_EXPOSURE, 1); /* 0=off, nonzero=on */ /* * set trigger mode * BUGFIX: disabled temporarly */ if( dc1394_set_trigger_mode(cam_var->handle, /* capture.node */ cam_var->camera[0].id, TRIGGER_MODE_0) != DC1394_SUCCESS) { if (verbose) g_message("unable to set camera trigger mode\n"); } else { if (verbose) g_message("dc1394_set_trigger_mode: succes"); } /* * report camera's feature set */ if (verbose) dc1394_print_feature_set (&cam_var->feature_set[0]); /* * test on single feature */ if (verbose && dc1394_query_basic_functionality (cam_var->handle, capture.node, &value) != DC1394_SUCCESS) { g_warning("dc1394_query_basic_functionality: failed\n"); } else { if ((value>>(8*sizeof(quadlet_t)-19-1)) != 0) { if (verbose) g_message("single shot supperted"); } else { if (verbose) g_message("single shot _NOT_ supperted"); } } /* * have the camera start sending us data * on_iso_start_clicked */ if (dc1394_start_iso_transmission (cam_var->handle, capture.node) != DC1394_SUCCESS) { dc1394_release_camera(cam_var->handle, &capture); raw1394_destroy_handle(cam_var->handle); g_error("unable to start camera iso transmission"); } else { if (verbose) g_message("dc1394_start_iso_transmission: succes"); } sleep(1); /* * capture one or two frames * on_service_iso_toggled->IsoStartThread */ if (dc1394_single_capture (cam_var->handle, &capture) != DC1394_SUCCESS) { dc1394_release_camera(cam_var->handle, &capture); raw1394_destroy_handle(cam_var->handle); g_error("unable to capture a frame"); } else { if (verbose) g_message("dc1394_single_capture: succes"); } lframe1 = gpiv_ucmatrix (capture.frame_height, capture.frame_width); memcpy( lframe1[0], (const char *) capture.capture_buffer, sizeof(char) * capture.frame_width * capture.frame_height); if (gpiv_image_par.x_corr) { if (dc1394_single_capture (cam_var->handle, &capture) != DC1394_SUCCESS) { dc1394_release_camera(cam_var->handle, &capture); raw1394_destroy_handle(cam_var->handle); g_error("unable to capture a frame"); } else { if (verbose) g_message("dc1394_single_capture: succes"); } } lframe2 = gpiv_ucmatrix (capture.frame_height, capture.frame_width); memcpy( lframe2[0], (const char *) capture.capture_buffer, sizeof(char) * capture.frame_width * capture.frame_height); /* * Stop data transmission */ if (dc1394_stop_iso_transmission(cam_var->handle, capture.node) != DC1394_SUCCESS) { g_warning("couldn't stop the camera?\n"); } else { if (verbose) g_message("dc1394_stop_iso_transmissio: succes"); } /* * save image as 'Image.pgm' */ if (use_stdin_stdout) { imagefile = stdout; } else { if((imagefile = fopen(fname, "wb")) == NULL) { dc1394_release_camera(cam_var->handle, &capture); raw1394_destroy_handle(cam_var->handle); g_error( "Can't create %s", fname); } } if (verbose) g_message("width = %d height = %d", capture.frame_width, capture.frame_height); /* * Printing to png image file */ gpiv_image_par.nrows = capture.frame_height; gpiv_image_par.nrows__set = TRUE; gpiv_image_par.ncolumns = capture.frame_width; gpiv_image_par.ncolumns__set = TRUE; /* BUGFIX: dc1394_query_format7_data_depth does not work */ /* dc1394_query_format7_data_depth(cam_var->handle, capture.node, */ /* cam_var->misc_info[0].mode, */ /* &gpiv_image_par.depth); */ /* if (verbose) g_message ("%s:: depth from query = %d", program_name, gpiv_image_par.depth); */ gpiv_image_par.depth = 8; gpiv_image_par.depth__set = TRUE; g_snprintf (gpiv_image_par.software, GPIV_MAX_CHARS, "%s", program_name); gpiv_image_par.software__set = TRUE; g_snprintf (gpiv_image_par.source, GPIV_MAX_CHARS, "Vendor: %s Model: %s", cam_var->camera[0].vendor, cam_var->camera[0].model); gpiv_image_par.source__set = TRUE; if (verbose) gpiv_img_print_header (gpiv_image_par); img1 = gpiv_alloc_img(gpiv_image_par); if (gpiv_image_par.x_corr) { img2 = gpiv_alloc_img(gpiv_image_par); } else { img2 = img1; } /* * copying capture_buffer to a 2-dimensional array of unsigned char * in order to get it in 2-dimensional array img1 of guint16, as used in the * gpiv programs and libraries. */ for (i = 0; i < gpiv_image_par.nrows; i++) { for (j = 0; j < gpiv_image_par.ncolumns; j++) { img1[i][j] = (guint16) lframe1[i][j]; } } gpiv_free_ucmatrix(lframe1); if (gpiv_image_par.x_corr) { for (i = 0; i < gpiv_image_par.nrows; i++) { for (j = 0; j < gpiv_image_par.ncolumns; j++) { img2[i][j] = (guint16) lframe2[i][j]; } } gpiv_free_ucmatrix(lframe2); } if ((err_msg = gpiv_write_png_image (imagefile, &img1, &img2, &gpiv_image_par, TRUE)) != NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } if (use_stdin_stdout == FALSE) fclose (imagefile); /* * Close camera */ dc1394_release_camera(cam_var->handle, &capture); free(cam_var->camera); free(cam_var->feature_set); free(cam_var->misc_info); /* free(image_pipes); */ /* free(format7_info); */ /* free(uiinfos); */ /* free(selfids); */ raw1394_destroy_handle(cam_var->handle); return 0; } void GetFormat7Capabilities(raw1394handle_t handle, nodeid_t node, Format7Info *info ) /*----------------------------------------------------------------------------- */ { int i, f, err; quadlet_t value; err = dc1394_query_supported_modes(handle, node, FORMAT_SCALABLE_IMAGE_SIZE, &value); if (!err) { g_error("Could not query Format7 supported modes"); } else { for (i = 0, f = MODE_FORMAT7_MIN; f < MODE_FORMAT7_MAX; f++, i++) { info->mode[i].present = (value & (0x1<<(31-i)) ); /* * Check for mode presence before query */ if (info->mode[i].present) { err=1; err *= dc1394_query_format7_max_image_size (handle,node,f, &info->mode[i].max_size_x, &info->mode[i].max_size_y); err *= dc1394_query_format7_unit_size (handle,node,f,&info->mode[i].step_x, &info->mode[i].step_y); err *= dc1394_query_format7_image_position (handle,node,f,&info->mode[i].pos_x, &info->mode[i].pos_y); err *= dc1394_query_format7_image_size (handle,node,f,&info->mode[i].size_x, &info->mode[i].size_y); err *= dc1394_query_format7_pixel_number (handle,node,f,&info->mode[i].pixnum); err *= dc1394_query_format7_byte_per_packet (handle,node,f,&info->mode[i].bpp); err *= dc1394_query_format7_packet_para (handle,node,f,&info->mode[i].min_bpp, &info->mode[i].max_bpp); err *= dc1394_query_format7_total_bytes (handle, node, f, &info->mode[i].total_bytes); /* dc1394_query_format7_total_bytes(raw1394handle_t handle, nodeid_t node, unsigned int mode, unsigned long long int *total_bytes); */ /* * TODO: get color coding id */ err *= dc1394_query_format7_color_coding (handle,node,f, &info->mode[i]. color_coding); if (!err) g_error("Got a problem querying format7 capabilitie"); } } } info->edit_mode = MODE_FORMAT7_MIN; } #else /* ENABLE_CAM */ int main(int argc, char *argv[] ) /*----------------------------------------------------------------------------- */ { g_error("%s: this is dead code as ENABLE_CAM is not set", argv[0]); return -1; } #endif /* ENABLE_CAM */ gpivtools-0.6.0/src/dac/rec_image.h0000644000175000017500000000422010173502324014061 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */ /*---------------------------------------------------------------------- gpiv - Graphic program for Particle Image Velocimetry, based on gtk/gnome libraries. Copyright (C) 2002 Gerber van der Graaf This file is part of gpiv. Gpiv 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, 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. ----------------------------------------------------------------------*/ /* * camera functions for data acquisition * $Log: rec_image.h,v $ * Revision 1.1 2005/01/19 16:03:32 gerber * added rec_image.h * */ #ifndef DAC_CAM_H #define DAC_CAM_H /* * From coriander: definitions.h */ typedef struct _Format7ModeInfo { dc1394bool_t present; unsigned int size_x; unsigned int size_y; unsigned int max_size_x; unsigned int max_size_y; unsigned int pos_x; unsigned int pos_y; unsigned int step_x; unsigned int step_y; unsigned int color_coding_id; quadlet_t color_coding; unsigned int pixnum; unsigned int bpp; // bpp is byte_per_packet unsigned int min_bpp; unsigned int max_bpp; unsigned int total_bytes; } Format7ModeInfo; typedef struct _Format7Info { Format7ModeInfo mode[NUM_MODE_FORMAT7]; int edit_mode; } Format7Info; typedef struct _UIInfo { int want_to_display; int test_pattern; int all_auto; int all_man; int all_lock; } UIInfo; /* * From coriander: tools.h */ void GetFormat7Capabilities(raw1394handle_t handle, nodeid_t node, Format7Info *info); #endif /* DAC_CAM_H */ gpivtools-0.6.0/src/dac/system.h0000644000175000017500000002453210150321637013503 00000000000000/* system-dependent definitions for latri Written for GNU fileutils. Adapted for autoproject by James R. Van Zandt. Copyright (C) 89, 91, 92, 93, 94, 1996 Free Software Foundation, Inc. This program 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, 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. */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ /* Include sys/types.h before this file. */ #include #ifdef STAT_MACROS_BROKEN #undef S_ISBLK #undef S_ISCHR #undef S_ISDIR #undef S_ISFIFO #undef S_ISLNK #undef S_ISMPB #undef S_ISMPC #undef S_ISNWK #undef S_ISREG #undef S_ISSOCK #endif /* STAT_MACROS_BROKEN. */ #ifndef S_IFMT #define S_IFMT 0170000 #endif #if !defined(S_ISBLK) && defined(S_IFBLK) #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif #if !defined(S_ISCHR) && defined(S_IFCHR) #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #endif #if !defined(S_ISDIR) && defined(S_IFDIR) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif #if !defined(S_ISREG) && defined(S_IFREG) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #if !defined(S_ISFIFO) && defined(S_IFIFO) #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) #endif #if !defined(S_ISLNK) && defined(S_IFLNK) #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #if !defined(S_ISSOCK) && defined(S_IFSOCK) #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) #endif #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */ #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) #endif #if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */ #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) #endif #ifndef S_IEXEC #define S_IEXEC S_IXUSR #endif #ifndef S_IXUSR #define S_IXUSR S_IEXEC #endif #ifndef S_IXGRP #define S_IXGRP (S_IEXEC >> 3) #endif #ifndef S_IXOTH #define S_IXOTH (S_IEXEC >> 6) #endif #ifndef S_IXUGO #define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif #if !defined(HAVE_MKFIFO) #define mkfifo(path, mode) (mknod ((path), (mode) | S_IFIFO, 0)) #endif #ifdef HAVE_SYS_PARAM_H #include #endif /* should be included before any preprocessor test of _POSIX_VERSION. */ #ifdef HAVE_UNISTD_H #include #endif #ifndef STDIN_FILENO #define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO #define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO #define STDERR_FILENO 2 #endif /* FIXME: Don't use _POSIX_VERSION. */ #ifndef _POSIX_VERSION off_t lseek (); #endif #ifdef TM_IN_SYS_TIME #include #else #include #endif /* Since major is a function on SVR4, we can't use `ifndef major'. */ #ifdef MAJOR_IN_MKDEV #include #define HAVE_MAJOR #endif #ifdef MAJOR_IN_SYSMACROS #include #define HAVE_MAJOR #endif #ifdef major /* Might be defined in sys/types.h. */ #define HAVE_MAJOR #endif #ifndef HAVE_MAJOR #define major(dev) (((dev) >> 8) & 0xff) #define minor(dev) ((dev) & 0xff) #define makedev(maj, min) (((maj) << 8) | (min)) #endif #undef HAVE_MAJOR #ifdef HAVE_UTIME_H #include #endif /* Some systems (even some that do have ) don't declare this structure anywhere. */ #ifndef HAVE_STRUCT_UTIMBUF struct utimbuf { long actime; long modtime; }; #endif /* Don't use bcopy! Use memmove if source and destination may overlap, memcpy otherwise. */ #ifdef HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #else # include char *memchr (); #endif #include #ifndef errno extern int errno; #endif #ifdef STDC_HEADERS #define getopt system_getopt #include #undef getopt #else /* not STDC_HEADERS */ char *getenv (); #endif /* STDC_HEADERS */ /* The following test is to work around the gross typo in systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE is defined to 0, not 1. */ #if !EXIT_FAILURE # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif #ifdef HAVE_FCNTL_H #include #else #include #endif #ifndef SEEK_SET #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #endif #ifndef F_OK #define F_OK 0 #define X_OK 1 #define W_OK 2 #define R_OK 4 #endif #ifdef HAVE_DIRENT_H # include # define NLENGTH(direct) (strlen((direct)->d_name)) #else /* not HAVE_DIRENT_H */ # define dirent direct # define NLENGTH(direct) ((direct)->d_namlen) # ifdef HAVE_SYS_NDIR_H # include # endif /* HAVE_SYS_NDIR_H */ # ifdef HAVE_SYS_DIR_H # include # endif /* HAVE_SYS_DIR_H */ # ifdef HAVE_NDIR_H # include # endif /* HAVE_NDIR_H */ #endif /* HAVE_DIRENT_H */ #ifdef CLOSEDIR_VOID /* Fake a return value. */ #define CLOSEDIR(d) (closedir (d), 0) #else #define CLOSEDIR(d) closedir (d) #endif /* Get or fake the disk device blocksize. Usually defined by sys/param.h (if at all). */ #ifndef DEV_BSIZE #ifdef BSIZE #define DEV_BSIZE BSIZE #else /* !BSIZE */ #define DEV_BSIZE 4096 #endif /* !BSIZE */ #endif /* !DEV_BSIZE */ /* Extract or fake data from a `struct stat'. ST_BLKSIZE: Optimal I/O blocksize for the file, in bytes. ST_NBLOCKS: Number of 512-byte blocks in the file (including indirect blocks). */ #ifndef HAVE_ST_BLOCKS # define ST_BLKSIZE(statbuf) DEV_BSIZE # if defined(_POSIX_SOURCE) || !defined(BSIZE) /* fileblocks.c uses BSIZE. */ # define ST_NBLOCKS(statbuf) (((statbuf).st_size + 512 - 1) / 512) # else /* !_POSIX_SOURCE && BSIZE */ # define ST_NBLOCKS(statbuf) (st_blocks ((statbuf).st_size)) # endif /* !_POSIX_SOURCE && BSIZE */ #else /* HAVE_ST_BLOCKS */ /* Some systems, like Sequents, return st_blksize of 0 on pipes. */ # define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \ ? (statbuf).st_blksize : DEV_BSIZE) # if defined(hpux) || defined(__hpux__) || defined(__hpux) /* HP-UX counts st_blocks in 1024-byte units. This loses when mixing HP-UX and BSD filesystems with NFS. */ # define ST_NBLOCKS(statbuf) ((statbuf).st_blocks * 2) # else /* !hpux */ # if defined(_AIX) && defined(_I386) /* AIX PS/2 counts st_blocks in 4K units. */ # define ST_NBLOCKS(statbuf) ((statbuf).st_blocks * 8) # else /* not AIX PS/2 */ # if defined(_CRAY) # define ST_NBLOCKS(statbuf) ((statbuf).st_blocks * ST_BLKSIZE(statbuf)/512) # else /* not AIX PS/2 nor CRAY */ # define ST_NBLOCKS(statbuf) ((statbuf).st_blocks) # endif /* not _CRAY */ # endif /* not AIX PS/2 */ # endif /* !hpux */ #endif /* HAVE_ST_BLOCKS */ /* Convert B 512-byte blocks to kilobytes if K is nonzero, otherwise return it unchanged. */ #define convert_blocks(b, k) ((k) ? ((b) + 1) / 2 : (b)) #ifndef RETSIGTYPE #define RETSIGTYPE void #endif #ifdef __GNUC__ # undef alloca # define alloca __builtin_alloca #else # ifdef HAVE_ALLOCA_H # include # else # ifndef _AIX /* AIX alloca decl has to be the first thing in the file, bletch! */ char *alloca (); # endif # endif #endif #include /* Jim Meyering writes: "... Some ctype macros are valid only for character codes that isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when using /bin/cc or gcc but without giving an ansi option). So, all ctype uses should be through macros like ISPRINT... If STDC_HEADERS is defined, then autoconf has verified that the ctype macros don't need to be guarded with references to isascii. ... Defining isascii to 1 should let any compiler worth its salt eliminate the && through constant folding." Bruno Haible adds: "... Furthermore, isupper(c) etc. have an undefined result if c is outside the range -1 <= c <= 255. One is tempted to write isupper(c) with c being of type `char', but this is wrong if c is an 8-bit character >= 128 which gets sign-extended to a negative value. The macro ISUPPER protects against this as well." */ #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) #define IN_CTYPE_DOMAIN(c) 1 #else #define IN_CTYPE_DOMAIN(c) isascii(c) #endif #ifdef isblank #define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c)) #else #define ISBLANK(c) ((c) == ' ' || (c) == '\t') #endif #ifdef isgraph #define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c)) #else #define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint (c) && !isspace (c)) #endif #define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) #define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) #define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c)) #define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) #define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct (c)) #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) /* ISDIGIT differs from ISDIGIT_LOCALE, as follows: - Its arg may be any int or unsigned int; it need not be an unsigned char. - It's guaranteed to evaluate its argument exactly once. - It's typically faster. Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that only '0' through '9' are digits. Prefer ISDIGIT to ISDIGIT_LOCALE unless it's important to use the locale's definition of `digit' even when the host does not conform to Posix. */ #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) #ifndef __P #if defined (__GNUC__) || (defined (__STDC__) && __STDC__) #define __P(args) args #else #define __P(args) () #endif /* GCC. */ #endif /* Not __P. */ /* Take care of NLS matters. */ #if HAVE_LOCALE_H # include #endif #if !HAVE_SETLOCALE # define setlocale(Category, Locale) /* empty */ #endif #if ENABLE_NLS # include # define _(Text) gettext (Text) #else # undef bindtextdomain # define bindtextdomain(Domain, Directory) /* empty */ # undef textdomain # define textdomain(Domain) /* empty */ # define _(Text) Text #endif #define STREQ(a,b) (strcmp((a), (b)) == 0) gpivtools-0.6.0/src/dac/trig.c0000644000175000017500000002277210722572253013132 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*----------------------------------------------------------------------------- gpiv_trig - triggers a (double Nd_YAGG) laser on a (CCD) camera Copyright (C) 2005 Gerber van der Graaf Julio Soria This program 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, 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. -----------------------------------------------------------------------------*/ #include #include #include #include "system.h" #ifdef ENABLE_TRIG #include #endif #include #include #include #ifdef ENABLE_TRIG #define EXIT_FAILURE 1 /* char *xmalloc (); */ /* char *xrealloc (); */ /* char *xstrdup (); */ static void usage (int status); /* * The name the program was run with, stripped of any leading path. */ char *program_name; /* getopt_long return codes */ enum {DUMMY_CODE=129 }; /* Option flags and variables */ gboolean interactive; /* --interactive */ gboolean verbose; /* -- verbose output during running process */ static struct option const long_options[] = { {"interactive", no_argument, 0, 'i'}, {"verbose", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, {NULL, 0, NULL, 0} }; static int command_args (int argc, char **argv); static int interactive_func(void); static int initialise (GpivTrigPar *trig_par /* GpivTrigTime *ttime */ ); /* * Set all the option flags according to the switches specified. * Return the index of the first non-option argument. */ static int command_args (int argc, char *argv[] ) /*----------------------------------------------------------------------------- */ { int c; while ((c = getopt_long (argc, argv, "i" /* interactive */ "V" /* verbose */ "h" /* help */ "v", /* version */ long_options, (int *) 0)) != EOF) { switch (c) { case 'i': /* --interactive */ interactive = TRUE; break; case 'V': /* --verbose */ verbose = TRUE; break; case 'v': printf ("gpiv_trig %s\n", VERSION); exit (0); case 'h': usage (0); default: usage (EXIT_FAILURE); } } return 0; } static void usage (int status ) /*----------------------------------------------------------------------------- */ { printf (_("%s - \ triggers a (double Nd_YAGG) laser on a CCD camera\n"), program_name); printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name); printf (_("\ Options:\n\ -i, --interactive prompt for confirmation\n\ -V, --verbose print more information\n\ -h, --help display this help and exit\n\ -v, --version output version information and exit\n\ ")); exit (status); } static int initialise (GpivTrigPar *trig_par /* GpivTrigTime *ttime */ ) /*----------------------------------------------------------------------------- */ { int ok = 0; float dtime, acq_time, increment; int mode, cycles; /* * private user input variables * hardwire some of the timings .... */ if (verbose) printf("\nEntering initialise\n"); trig_par->ttime.laser_trig_pw = (RTIME)(0.02*1000*1000); /* laser trigger pulse width 0.02ms */ trig_par->ttime.time2laser = (RTIME)(0.19*1000*1000); /* time from laser trigger->Hi until laser pulse: 0.19ms */ printf("\n\tmode:\n"); printf("\t\t1 - indefinite periodic\n"); printf("\t\t2 - duration\n"); printf("\t\t3 - interrupt one shot\n"); printf("\t\t4 - interrupt periodic\n"); printf("\t\t5 - incremented dt\n"); printf("\t\t6 - double exposure\n"); printf("\t\t9 - exit\n"); printf("\t(1/2/3/4/5/6/9) > "); scanf("%d", &mode); trig_par->ttime.mode = mode; if (trig_par->ttime.mode == 9) { return 1; } /* * ask for other timings .... */ printf("\n\tAcquisition parameters: \n"); printf("\ttime between 2 laser exposures in ms > "); scanf("%f", &dtime); trig_par->ttime.dt = (RTIME)1000 * 1000 * dtime; /* gpiv_trig_test_parameter(GpivTrigPar * trig_par */ /* ); */ if ((trig_par->ttime.mode == GPIV_TIMER_MODE__PERIODIC) || (trig_par->ttime.mode == GPIV_TIMER_MODE__DURATION) || (trig_par->ttime.mode == GPIV_TIMER_MODE__TRIGGER_IRQ) || (trig_par->ttime.mode == GPIV_TIMER_MODE__DOUBLE)) { printf("\tdouble frame acquisition period in ms (typ. 250 ms) > "); scanf("%f", &acq_time); trig_par->ttime.cam_acq_period = (RTIME)1000 * 1000 * acq_time; } else { trig_par->ttime.cam_acq_period = (trig_par->ttime.dt) * 2; } if ((trig_par->ttime.mode == GPIV_TIMER_MODE__DURATION) || (trig_par->ttime.mode == GPIV_TIMER_MODE__ONE_SHOT_IRQ) || (trig_par->ttime.mode == GPIV_TIMER_MODE__TRIGGER_IRQ) || (trig_par->ttime.mode == GPIV_TIMER_MODE__INCREMENT)) { printf("\tnumber of cycles > "); scanf("%d", &cycles); trig_par->ttime.cycles = cycles; } else { trig_par->ttime.cycles = 1; } if (trig_par->ttime.mode == GPIV_TIMER_MODE__INCREMENT) { printf("\tincrement in ms > "); scanf("%f", &increment); trig_par->ttime.increment = (RTIME)1000 * 1000 * increment; } else { trig_par->ttime.increment = 1; } ok = 1; if (verbose) printf("\nLeaving initialise\n"); return ok; } static int interactive_func (void ) /*----------------------------------------------------------------------------- */ { GpivTrigPar trig_per; /* GpivTrigTime ttime = trig_per.ttime; */ int init, start, stop, error; /* file pointer int */ int on = 1, off = 0, param_ok; if (verbose) printf("\nEntering interactive_func\n"); if (!gpiv_trig_openrtfs(&init, &start, &stop, &error)) { printf("\n\nFAIL IN FIFO OPEN, BYE ..... \n\n"); } printf("\n\n\tProgram to control camera with external triggering & laser\n"); while (1) { if(!initialise(&trig_per /* timing */)) { printf("\n\nPROBLEM INITIALISING PROGRAM, BYE ..... \n\n"); exit(0); } if (trig_per.ttime.mode == 9) { printf("\n\tEx(c)iting program\n\n"); break; } printf("\n\tWriting details to RT module\n\n"); /* * write the timing details to /dev/rtf/1 */ if((write(init, &trig_per.ttime, sizeof(GpivTrigTime))) < 0) { printf("\n\nfail in setting Camera and Laser timing ...\n\n"); exit(0); } if((read(error, ¶m_ok, sizeof(int))) < 0) { printf("\n\nfail in receipt of confirmation ...\n\n"); exit(0); } if (param_ok != 1) { printf("\n\tInvalid parameters entered \n"); } else { printf("\n\tParameters :\n"); printf("\t\tcam_acq_period: %lld\n", trig_per.ttime.cam_acq_period); printf("\t\tlaser_trig_pw: %lld\n", trig_per.ttime.laser_trig_pw); printf("\t\ttime2laser: %lld\n", trig_per.ttime.time2laser); printf("\t\tdt: %lld\n", trig_per.ttime.dt); printf("\t\tmode: %d\n", trig_per.ttime.mode); printf("\t\tcycles: %d\n", trig_per.ttime.cycles); printf("\t\tincrement: %d\n", (int) trig_per.ttime.increment); printf("\n\n\tStart on >"); getchar(); getchar(); if((write(start, &on, sizeof(int))) < 0) { printf("\n\nfail in starting camera and laser timing ...\n\n"); exit(0); } printf("\n\tStop on >"); getchar(); if((write(stop, &off, sizeof(int))) < 0) { printf("\nfail in stopping camera and laser timing ...\n\n"); exit(0); } } } if (verbose) printf("\nLeaving interactive_func\n"); return 0; } int main (int argc, char *argv[] ) /*----------------------------------------------------------------------------- * Main program to send trigger pulses */ { int i, return_val = 0; program_name = argv[0]; i = command_args (argc, argv); if (interactive) { return_val = interactive_func(); } exit (return_val); } #else /* ENABLE_TRIG */ int main(int argc, char *argv[] ) /*----------------------------------------------------------------------------- */ { g_error("%s: this is dead code as ENABLE_TRIG has not been set during building the program", argv[0]); return -1; } #endif /* ENABLE_TRIG */ gpivtools-0.6.0/src/misc/0000777000175000017500000000000011073421570012272 500000000000000gpivtools-0.6.0/src/misc/combing.c0000644000175000017500000003636211073414772014010 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*----------------------------------------------------------------------------- combing - combines two images for cross-correlation Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. -----------------------------------------------------------------------------*/ #include #include #include #include #include /* get_login() */ #include #define GPIV_EXT_PNG_IMAGE ".png" #define GPIV_URL "gpiv.sourceforge.net" /* #define VERSION "0.1" */ #define DEFAULT_INNAME "../test/pngtest.png" #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: gpiv_combing [-h | --help] [-p | --print] [-v | --version] \n\ [-a | --suf_a] [-b | --suf_b] [-d | --dt] [-u | --suf_num] [s | --suf_skip] \n\ [-t | type] [-w | --warning] file_basename \n\ \n\ keys: \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -v | --version: version number \n\ -V | --verbose: program behaves verbose during operation \n\ -a | --suf_a S: use a suffix of the first image (default: _a) \n\ -b | --suf_b S: use a suffix of the second image (default: _b) \n\ -d | --dt S: separation time delta t between subsequent \n\ recordings [in milliseconds] \n\ -u | --suf_num N: use numbered images, instead of suf_a/suf_b, of which \n\ the first one with number N and the second N+1. \n\ The converted image will be named to file_base_name + N \n\ -s | --skip S: skip S numbers; the first image with number N will \n\ combine with the second image N+S+1 (default: S = 0) \n\ -t | type: input image type (tif, gif, bmp, pgm, r, gpi). Default: png. \n \ Output image will be in png format. \n\ -w | --warning: Warns if an input image already contains two frames. \n\ file_basename: filename without extension or suffix \n\ " #define HELP "\ gpiv_combing - combines two images for cross-correlation" #define RCSID "$Id: combing.c,v 1.5 2008-09-25 13:08:34 gerber Exp $" /* static const char *fname = "/home/gerber/src/GBTOOLS/gbtools-0.1.0/test/png/img1"; */ /* static const gchar *program_name = "gpiv_combing"; */ static gboolean verbose = FALSE; static gboolean print_par = FALSE; static gint num = 0; static gint skip = 0; static gchar *suf_a = "_a"; static gchar *suf_b = "_b"; static gchar *itype = "png"; static gboolean warning = FALSE; static gboolean num__set = FALSE; static gboolean skip__set = FALSE; static gboolean suf_a__set = FALSE; static gboolean suf_b__set = FALSE; static gboolean itype__set = FALSE; static gboolean warning__set = FALSE; static void command_args (int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivImagePar *image_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c = '\0'; gint argc_next; while (--argc > 0 && (*++argv)[0] == '-') { /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ argc_next = 0; while (argc_next == 0 && (c = *++argv[0])) switch (c) { case 'v': printf("%s\n", RCSID); exit(0); break; case 'V': verbose = TRUE; break; case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); exit(0); break; case 'p': print_par = TRUE; break; case 'a': suf_a = g_strdup(*++argv); argc_next = 1; --argc; suf_a__set = TRUE; break; case 'b': suf_b = g_strdup(*++argv); argc_next = 1; --argc; suf_b__set = TRUE; break; /* * Time scaling parameter */ case 'd': image_par->t_scale = atof(*++argv); image_par->t_scale__set = TRUE; argc_next = 1; --argc; break; case 's': skip = atoi(*++argv); argc_next = 1; --argc; skip__set = TRUE; break; case 'u': num = atoi(*++argv); argc_next = 1; --argc; num__set = TRUE; break; case 't': itype = g_strdup(*++argv); argc_next = 1; --argc; itype__set = TRUE; break; case 'w': warning = TRUE; warning__set = TRUE; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else if (strcmp("-verbose", *argv) == 0) { verbose = TRUE; } else if (strcmp("-dt", *argv) == 0) { image_par->t_scale = atof(*++argv); image_par->t_scale__set = TRUE; argc_next = 1; --argc; } else if (strcmp("-suf_a", *argv) == 0) { suf_a = g_strdup(*++argv); argc_next = 1; --argc; suf_a__set = TRUE; } else if (strcmp("-suf_b", *argv) == 0) { suf_b = g_strdup(*++argv); argc_next = 1; --argc; suf_b__set = TRUE; } else if (strcmp("-skip", *argv) == 0) { skip = atoi(*++argv); argc_next = 1; --argc; skip__set = TRUE; } else if (strcmp("-num", *argv) == 0) { num = atoi(*++argv); argc_next = 1; --argc; num__set = TRUE; } else if (strcmp("-type", *argv) == 0) { itype = g_strdup(*++argv); argc_next = 1; --argc; itype__set = TRUE; } else if (strcmp("-warning", *argv) == 0) { warning = TRUE; warning__set = TRUE; } else { gpiv_error ("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error (USAGE); break; } } if (argc == 1) { strcpy(fname, argv[argc - 1]); } else { gpiv_error ("\n%s", USAGE); } if (num__set && (suf_a__set || suf_b__set)) { gpiv_error ("\nA suffix has been defined as well as numbered filenames."); } if (skip__set == TRUE && image_par->t_scale__set == TRUE) { image_par->t_scale *= (skip + 1); } if (verbose) { if (suf_a__set) g_message("comand_args: suf_a = %s", suf_a); if (suf_b__set) g_message("comand_args: suf_b = %s", suf_b); if (num__set) g_message("comand_args: num = %d", num); if (skip__set) g_message("comand_args: skip = %d", skip); if (image_par->t_scale__set) g_message("comand_args: t_scale = %f", image_par->t_scale); g_message("comand_args: fname = %s", fname); } } static int make_fname (char *fname, char *fname_in1, char *fname_in2, char *fname_out ) /*----------------------------------------------------------------------------- * generates filenames */ { gchar *dirname = g_strdup (g_path_get_dirname(fname)); gchar *fname_base = g_strdup (g_path_get_basename(fname)); strtok (fname_base, "."); /* * Input image #1, #2 filename */ if (fname != NULL ) { if (num__set) { if (fname_in1 != NULL ) { g_snprintf(fname_in1, GPIV_MAX_CHARS, "%s%d.%s", fname_base, num, itype); if (verbose) printf("\n#input image #1 is: %s", fname_in1); } if (fname_in2 != NULL ) { g_snprintf(fname_in2, GPIV_MAX_CHARS, "%s%d.%s", fname_base, num + 1 + skip, itype); if (verbose) printf("\n#input image #2 is: %s", fname_in2); } } else { if (fname_in1 != NULL ) { g_snprintf(fname_in1, GPIV_MAX_CHARS, "%s%s.%s", fname_base, suf_a, itype); if (verbose) printf("\n#input image #1 is: %s", fname_in1); } if (fname_in2 != NULL ) { g_snprintf(fname_in2, GPIV_MAX_CHARS, "%s%s.%s", fname_base, suf_b, itype); if (verbose) printf("\n#input image #2 is: %s", fname_in2); } } /* * Output image filename */ if (fname_out != NULL ) { /* BUGFIX: removed "comb_" in output filename */ if (num__set) { g_snprintf(fname_out, GPIV_MAX_CHARS, "%s%s%s%d%s", dirname, G_DIR_SEPARATOR_S, fname_base, num, GPIV_EXT_PNG_IMAGE); if (verbose) printf("\n#output image file is: %s", fname_out); } else { g_snprintf(fname_out, GPIV_MAX_CHARS, "%s%s%s%s", dirname, G_DIR_SEPARATOR_S, fname_base, GPIV_EXT_PNG_IMAGE); if (verbose) printf("\n#output image file is: %s", fname_out); } } if (verbose) printf("\n"); } return 0; } int main (int argc, char *argv[]) /*-----------------------------------------------------------------------------*/ { gchar *err_msg = NULL; FILE *fp; gchar fname_base[GPIV_MAX_CHARS], fname_in_a[GPIV_MAX_CHARS], fname_in_b[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS]; GpivImage *image_a = NULL; /* Image containing first frame */ GpivImage *image_b = NULL; /* Image containing second frame */ GpivImage *image_c = g_new0 (GpivImage, 1); /* Combination of image_a and image_b */ GpivImagePar *image_par = g_new0 (GpivImagePar, 1); GpivImagePar *image_par_c = NULL; gint return_val = 0; /* * Construct file names from output PNG files for writing or * read / write to stdin and stdout */ command_args (argc, argv, fname_base, image_par); if ((return_val = make_fname (fname_base, fname_in_a, fname_in_b, fname_out)) != 0) { gpiv_error ("%s: Failure make_fname", argv[0]); } /* * reads input images and checks if they are of equal dimensions */ if ((image_a = gpiv_fread_image (fname_in_a)) == NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } if ((image_b = gpiv_fread_image (fname_in_b)) == NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } if (warning && image_a->header->x_corr == TRUE) { gpiv_error ("%s: the first input image contains two frames", argv[0]); } if (warning && image_b->header->x_corr == TRUE) { gpiv_error ("%s: the second input image contains two frames", argv[0]); } if (image_a->header->nrows != image_b->header->nrows) { gpiv_error ("%s: input images differ in nrows; %d <=> %d", argv[0], image_a->header->nrows, image_b->header->nrows); } if (image_a->header->ncolumns != image_b->header->ncolumns) { gpiv_error ("%s: input images differ in ncolumns; %d <=> %d", argv[0], image_a->header->ncolumns, image_b->header->ncolumns); } if (image_a->header->depth != image_b->header->depth) { gpiv_error ("%s: input images differ in depth; %d <=> %d", argv[0], image_b->header->depth); } /* * Header info from image_par and image_a->header will be used for the new image * Adding some extra info to image_c header */ image_par_c = gpiv_img_cp_parameters (image_a->header); image_par_c->t_scale = image_par->t_scale; image_par_c->t_scale__set = TRUE; image_par_c->x_corr = TRUE; image_par_c->x_corr__set = TRUE; if (image_par_c->software__set == FALSE) { g_snprintf (image_par_c->software, GPIV_MAX_CHARS, "%s", argv[0]); image_par_c->software__set = TRUE; } if (image_par_c->author__set == FALSE) { g_snprintf (image_par_c->author, GPIV_MAX_CHARS,"%s", g_get_real_name()); image_par_c->author__set = TRUE; } if (image_par_c->creation_date__set == FALSE) { char time_string[GPIV_MAX_CHARS]; struct tm time_struct; time_t itime; time (&itime); time_struct = *gmtime (&itime); strftime (time_string, GPIV_MAX_CHARS, "%a %b %d %Y %T", &time_struct); if (verbose) g_message ("Setting new time = %s", time_string); snprintf (image_par_c->creation_date, GPIV_MAX_CHARS, "%s", time_string); image_par_c->creation_date__set = TRUE; } /* * Reading the rest of (optional) image parameters. */ gpiv_scan_parameter (GPIV_IMGPAR_KEY, PARFILE, image_par_c, print_par); gpiv_scan_resourcefiles (GPIV_IMGPAR_KEY, image_par_c, print_par); /* * Creating image_c from image_a, image_b and image_par_c */ image_c->header = image_par_c; image_c->frame1 = image_a->frame1; image_c->frame2 = image_b->frame1; if (print_par) gpiv_img_print_header (stdout, image_c->header); /* * Writing image */ if ((fp = fopen(fname_out, "wb")) == NULL) { return (1); } if ((err_msg = gpiv_write_png_image (fp, image_c, FALSE)) != NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } fclose (fp); if (image_a != NULL) gpiv_free_img(image_a); if (image_b != NULL) gpiv_free_img(image_b); if (suf_a__set) g_free (suf_a); if (suf_b__set) g_free (suf_b); if (itype__set) g_free (itype); exit (0); } gpivtools-0.6.0/src/misc/img2gpiv.pl0000644000175000017500000002372011005337172014272 00000000000000#!/usr/bin/perl -w # img2gpiv - Converts an image frame "image_name", containing a PIV image # pair, into a raw data frame "image_name.r" in order to # analyse with gpiv's 'rr' program. Additional header info is # saved in "image_name.h". # Copyright (C) 2002 Gerber van der Graaf # This program 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, 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. #------------------------------------------------------------------ $VERSION = q$Id: img2gpiv.pl,v 1.12 2008-04-28 12:09:30 gerber Exp $; $HELP = "Converts images into raw data (extension .r) format with belonging ASCII header or hdf (extension .hdf) format. \n"; $USAGE = "gpiv_img2gpiv [-a|--auto] [-c|--cols ncolumns] [--combine] [-d|--depth] [-h|--help] [-hdf] [-i|--inverse] [--suf_a] [--suf_b] [--suf_num N] [-n] [--noclean] [-p] [-r|--rows nrows] [-t] [-v|--version] file_base_name keys: -x|cross: double image for cross-correlation (default: single image for auto-correlation) -c|cols ncolumns: the number of columns in the frame (default 1280) --combine combinates two separate image frames to a single one for cross-correlation. Also look at --suf_a/b and --suf_num -d|depth depth: color depth (default 8) -h|help: on-line help -hdf: converts to (or from) hdf format (extension .hdf) -i: inverse conversion; from raw 8-bit data to image format --suf_a with --combine: suffix of first image (default: _a) --suf_b with --combine: suffix of second image (default: _b) --suf_num N with --combine: subsequent numbered images of which the first one with number N and the second N+1. The converted image will be named to file_base_name + N -n: no execute, only print processes -noclean: do not remove existing image -r|rows rows: the number of rows in the frame of a SINGLE image (default 1024) -p: prints process to stdout -t: image type or format (default bmp) -v|version: version"; #----------------- Default parameters ---------- $opt_x = 0; $ncols = 1280; $opt_combine = 0; ##$opt_d = 0; ##$opt_f = 0; $opt_h = 0; $opt_hdf = 0; $opt_i = 0; $opt_n = 0; $opt_noclean = 0; $nrows = 1024; $opt_p = 0; ##$opt_t = ".bmp"; $opt_v = 0; $suf_set = 0; $suf_num = -9999; $suf_num_next = -9999; #------------------ Command line arguments handling ---------- use Getopt::Long; ##$result = GetOptions("h|help", "i|inverse", "n|none", "p|print", 'hdf', "noclean", "t|type=s" => \$format, "v|version", 'c|cols=i' => \$ncols, "combine", 'suf_a=s' => \$suf_a, 'suf_b=s' => \$suf_b, 'suf_num=i' => \$suf_num, 'd|depth=i' => \$depth, 'r|rows=i' => \$nrows, "x|cross" ); if ($opt_h) { print ("$HELP\n"); print ("$USAGE\n"); exit; } if ($opt_v) { print ("$VERSION\n"); exit; } $file_base_name = shift (@ARGV); if ($#ARGV != -1) { printf ("\nUsage: $USAGE\n"); exit; } #------------------ Default variables ---------- if (!$nrows) { $nrows = 1024; } if (!$ncols) { $ncols = 1280; } if (!$depth) { $depth = 8; } if (!$format) { $format = "bmp"; } if (!$suf_a) { $suf_a = "_a"; } else { $suf_set = 1; } if (!$suf_b) { $suf_b = "_b"; } else { $suf_set = 1; } if ($suf_num != -9999) { $suf_num_next = $suf_num + 1; if ($opt_p || $opt_n) { print ("suf_num=$suf_num suf_num_next=$suf_num_next\n"); } } if ($suf_set == 1 && $suf_num != -9999) { print ("error: a suffix is defined as well as a numbered filenames is used."); exit; } if ($opt_p || $opt_n) { print ("c=$ncols r=$nrows i=$opt_i t=$format f=$file_base_name\n"); } if (!$opt_i) { if ($suf_num == -9999) { $file_name_header = $file_base_name.".h"; } else { $file_name_header = $file_base_name.$suf_num.".h"; } if ($opt_combine) {$opt_x = 1;} #------------------ Convert the entire frame to raw data if ($opt_combine) { if ($opt_noclean) { if ($suf_num == -9999) { @args=("convert $file_base_name$suf_a.$format -depth $depth gray:$file_base_name$suf_a.r && \ convert $file_base_name$suf_b.$format -depth $depth gray:$file_base_name$suf_b.r"); } else { @args=("convert $file_base_name$suf_num.$format -depth $depth gray:$file_base_name$suf_num.r && \ convert $file_base_name$suf_num_next.$format -depth $depth gray:$file_base_name$suf_num_next.r"); } } else { if ($suf_num == -9999) { @args=("convert $file_base_name$suf_a.$format -depth $depth gray:$file_base_name$suf_a.r && rm $file_base_name$suf_a.$format && \ convert $file_base_name$suf_b.$format -depth $depth gray:$file_base_name$suf_b.r && rm $file_base_name$suf_b.$format"); } else { @args=("convert $file_base_name$suf_num.$format -depth $depth gray:$file_base_name$suf_num.r && rm $file_base_name$suf_num.$format && \ convert $file_base_name$suf_num_next.$format -depth $depth gray:$file_base_name$suf_num_next.r && rm $file_base_name$suf_num_next.$format"); } } } else { if ($opt_noclean) { @args=("convert $file_base_name.$format -depth $depth gray:$file_base_name.r"); } else { @args=("convert $file_base_name.$format -depth $depth gray:$file_base_name.r && rm $file_base_name.$format"); } } if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} if ($opt_combine) { if ($suf_num == -9999) { @args=("cat $file_base_name$suf_b.r >> $file_base_name$suf_a.r && mv $file_base_name$suf_a.r $file_base_name.r && rm $file_base_name$suf_b.r"); if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} } else { @args=("cat $file_base_name$suf_num_next.r >> $file_base_name$suf_num.r && rm $file_base_name$suf_num_next.r"); if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} } } #------------------ Add header info if (!$opt_n) { open (OUTH,">$file_name_header") || die 'can\'t open $file_name_header'; printf(OUTH "Ncolumns: $ncols\n"); printf(OUTH "Nrows: %d\n", $nrows); printf(OUTH "X_corr: %d\n", $opt_x); printf(OUTH "Nbits: %d\n", $depth); close (OUTH) || die 'can\'t close $file_name_header'; } else { printf("Ncolumns: $ncols\n"); printf("Nrows: %d\n", $nrows); printf("X_corr: %d\n", $opt_x); printf("Nbits: %d\n", $depth); } if ($opt_hdf) { if ($opt_p || $opt_n) { @args=("gpiv_piv2hdf -i -p -e $file_base_name"); } else { @args=("gpiv_piv2hdf -i -e $file_base_name"); } if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} @args=("rm $file_base_name.r $file_base_name.h"); if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} } } else { # $opt_i; inverse conversion if ($opt_hdf) { if ($opt_p || $opt_n) { @args=("hdf2piv -p -e $file_base_name"); } else { @args=("hdf2piv -e $file_base_name"); } if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} if ($opt_x) { if ($opt_noclean) { $CMD = sprintf("convert -size %dx%d -depth $depth gray:$file_base_name.r $file_base_name.$format", $ncols, $nrows * 2); } else { $CMD = sprintf("convert -size %dx%d -depth $depth gray:$file_base_name.r $file_base_name.$format && rm $file_base_name.r $file_base_name.hdf", $ncols, $nrows * 2); } } else { if ($opt_noclean) { $CMD = sprintf("convert -size %dx%d -depth $depth gray:$file_base_name.r $file_base_name.$format", $ncols, $nrows); } else { $CMD = sprintf("convert -size %dx%d -depth $depth gray:$file_base_name.r $file_base_name.$format && rm $file_base_name.r $file_base_name.hdf", $ncols, $nrows); } } } else { if ($opt_x) { if ($opt_noclean) { $CMD = sprintf("convert -size %dx%d -depth $depth gray:$file_base_name.r $file_base_name.$format", $ncols, $nrows * 2); } else { $CMD = sprintf("convert -size %dx%d -depth $depth gray:$file_base_name.r $file_base_name.$format && rm $file_base_name.r", $ncols, $nrows * 2); } } else { if ($opt_noclean) { $CMD = sprintf("convert -size %dx%d -depth $depth gray:$file_base_name.r $file_base_name.$format", $ncols, $nrows); } else { $CMD = sprintf("convert -size %dx%d -depth $depth gray:$file_base_name.r $file_base_name.$format && rm $file_base_name.r", $ncols, $nrows); } } } @args=($CMD); if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} } # # ----------------- That's all folks. # gpivtools-0.6.0/src/misc/sca2gri.pl0000644000175000017500000000763510402304764014110 00000000000000#!/usr/bin/perl -w # sca2grid - Converts scalar data from gpiv to grid data for contour # plotting purposes with gnuplot, plotmtv, .. # # Copyright (C) 2002 Gerber van der Graaf # This program 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, 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. #------------------------------------------------------------------ $VERSION = q$Id: sca2gri.pl,v 1.5 2006/03/04 12:37:08 gerber Exp $; $PRG = "sca2gri"; $HELP = "Converts scalar data from gpiv to grid data for contour plotting purposes with gnuplot and plotmtv"; $USAGE = "Usage: gpiv_sca2gri [-f|filename fn] [-h] [-p] [-v] < input > output keys: -f fn: complete filename -h: on-line help -p: prints process parameters/variables to stdout -v: prints version and exits sucessfully "; #----------------- Command arguments handling ---------- $opt_h = 0; $opt_v = 0; #use lib "/home/gerber/lib"; #use FileBaseExt; #use Getopt::Std; #getopts('f:hpv'); use Getopt::Long; GetOptions('h|help', 'p|print', 'v|version', 'f|filename=s' => \$full_filename ); #$full_filename = $opt_f; #if ($opt_f) { # $filename_logic = 1; #} if ($opt_h) { print ("$HELP\n"); print ("$USAGE\n"); exit; } if ($opt_v) { print ("$VERSION\n"); exit; } if ($#ARGV != -1) { print ("Usage: $USAGE\n"); exit; } #--------------- initializing variables and functions $x_old = 0; sub FileExt { #--------------- extracts file extension from a full filename my ($file_base_name, $file_extension); @file_fields = split(/\./,$_[0]); $file_extension = pop @file_fields; $file_base_name = join(".", @file_fields); return $file_extension; } sub FileBase { #--------------- extracts file basename from a full filename my ($file_base_name, $file_extension); @file_fields = split(/\./,$_[0]); pop @file_fields; $file_base_name = join(".", @file_fields); return $file_base_name; } #---------------------------------------------------- Intializing variables $file_base_name = FileBase($full_filename); $file_extension = FileExt($full_filename); if ($opt_p) { printf("$PRG: file_base_name=%s\n", $file_base_name); printf("$PRG: file_extension=%s\n", $file_extension); } $file_name_sca = $full_filename; $file_name_gri = $file_base_name.".gri.".$file_extension; $infile = $file_name_sca; $outfile = $file_name_gri; if ($opt_p == 1) { printf ("Scalar data file: %s\n", $file_name_sca); printf ("Grid data file: %s\n", $file_name_gri); } #exit; open (STDIN,"$infile") || die 'can\'t open $infile'; open (STDOUT,">$outfile") || die 'can\'t open $outfile'; #----------------------------------------- Starts reading the lines with data while () { chomp; if ($_ ne "" && (!/^(\#|;)/)) { #skip blank lines or ; sign at first col s/,/./g; #substitutes eventually komma's by dot s/^ *//; #removes eventually leading spaces @words = split(/\s+/,$_); #splitting line $_ up in words #same as @words = split $x_pos = $words[0]; # $y_pos[$k] = $words[1]; # $dx[$k] = $words[2]; # $dy[$k] = $words[3]; # $snr[$k] = $words[4]; # $peak_nr[$k] = $words[5]; if ($x_pos != $x_old) { $x_old = $x_pos; printf(STDOUT "\n"); } printf(STDOUT "\n%s",$_); } } close (STDIN) || die 'can\'t close $infile'; close (STDOUT) || die 'can\'t close $outfile'; gpivtools-0.6.0/src/misc/series_mpi.py0000644000175000017500000001466411066710163014733 00000000000000#!/usr/bin/env mpipython # gpiv_series - Processes a set of numbered input data # Copyright (C) 2008 Gerber van der Graaf # This program 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, 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. #-------------------------------------------------------------------- # # This version is MPI enabled for parallel processing # import os, re from Scientific import MPI communicator = MPI.world.duplicate() # #----------- Command line arguments parser # from optparse import OptionParser usage = "%prog [options] \"process\"" parser = OptionParser(usage) parser.add_option("-a", "--arg_n", action="store_true", dest="arg_n", default=False, help="if the process needs the current number in its \ argument list instead of prepending/appending it to the \ filebase name, the number will be put before (-f) \ \"filename\" in the \"process\" string.") parser.add_option("-b", "--basename", type='string', dest="basename", help="File basename for reading", metavar="FILE") parser.add_option("-e", "--ext", type='string', dest="ext", metavar="EXT", help="add an extension after the file basename + number (without leading \".\")") parser.add_option("-f", "--first", type='int', dest="first_nr", default=0, help="first numbered file (default: 0)", metavar="N") parser.add_option("-l", "--last", type='int', dest="last_nr", default=0, help="last numbered file(default: 0)", metavar="N") parser.add_option("-i", "--incr", type='int', dest="incr_nr", default=1, help="increment file number (default: 1)", metavar="N") parser.add_option("-p", "--print", action="store_true", dest="pri", default=False, help="prints process parameters/variables to stdout") parser.add_option("--pad", type='int', dest="pad0", default=0, help="padding number with zero's (default: 0)", metavar="N") parser.add_option("-n", "--none", action="store_true", dest="none", default=False, help="suppresses real execution") parser.add_option("-x", "--prefix", action="store_true", dest="prefix", default=False, help="prefix numbering to file basename") (options, args) = parser.parse_args() if len(args) != 1: parser.error("incorrect number of arguments") else: process = args[0] # #----------- Function definitions # def pri_date(msg = "Time stamp at start of series processing:"): """Prints time stamp. Keyword arguments: msg -- message to be printed before time stamp """ if options.pri == True: print msg os.system('date') elif options.none: print msg os.system('date') def count_digits(nr): """Counts number of digits from a number Keyword arguments: nr -- number to be questioned """ count=0 while nr/10 !=0: nr=nr/10 count=count+1 return count def pad0(nr): """Created a string for zero padding Keyword arguments: nr -- number of zeros to be padded """ pd0="" for i in range(0, nr): pd0 = str(pd0)+"0" return pd0 def compose_name_nr(nr): """Creates proper name from basename and number. Keyword arguments: nr -- number of filename to be processed """ if options.pad0 > 0: ndig=count_digits(nr) null_str=pad0(options.pad0 - ndig) nr_str=null_str+str(nr) else: nr_str=str(nr) if options.prefix: if options.arg_n: name=str(options.basename) else: name=nr_str+str(options.basename) else: if options.arg_n: name=str(options.basename) else: name=str(options.basename)+nr_str if str(options.ext) != "None": name=str(name)+str(".")+str(options.ext) return(name) def compose_cmd(name, nr): """Creates proper command. Keyword arguments: name -- complete filename """ command=str(process) if options.arg_n: # Eventually, substitutes "-f" with: "nr -f" command_tmp=re.sub("-f", str(nr)+" -f", command) if command_tmp != command: command = str(command_tmp)+" "+str(name) else: command = str(command_tmp)+" "+str(nr)+" "+str(name) else: command=str(command)+" "+str(name) return command def proc_series_par(): """Processes a series on identic numbered files in parallel environment using mpipython. """ # # Total number of data and number of data per node # Nt = (options.last_nr+1 - options.first_nr) / options.incr_nr Nn = Nt / communicator.size # # Bail out if number of nodes is larger than number of data # if communicator.size > Nt: print 'nprocs (',communicator.size,\ ') larger then number of data (',Nt,")" exit() for i in range(options.first_nr, options.last_nr+1, options.incr_nr): for j in range(0, communicator.size, 1): if communicator.rank == j: if i >= options.first_nr + j*Nn*options.incr_nr: if i < options.first_nr + (j+1)*Nn*options.incr_nr: name_nr = compose_name_nr(i) command = compose_cmd(name_nr, i) if options.pri == True: print "rank=",communicator.rank,command elif options.none == True: print "rank=",communicator.rank,command if options.none == False: os.system(command) # # The fraction of data left, if Nn is not an integer, # is processed at the highest node # if j == communicator.size - 1: if i >= options.first_nr + (j+1)*Nn*options.incr_nr: name_nr = compose_name_nr(i) command = compose_cmd(name_nr, i) if options.pri == True: print "rank=",communicator.rank,command elif options.none == True: print "rank=",communicator.rank,command if options.none == False: os.system(command) # #----------- Calling functions # #if communicator.rank == 0: # if options.pri == True: pri_date() # elif options.none == True: pri_date() proc_series_par() #communicator.rank == 0: # if options.pri == True: pri_date(msg = "Time stamp at end of series processing:") # elif options.none == True: pri_date(msg = "Time stamp at end of series processing:") # #----------- That's all folks # gpivtools-0.6.0/src/misc/Makefile.am0000644000175000017500000000330511073414772014251 00000000000000ENABLE_CAM = @ENABLE_CAM@ ENABLE_TRIG = @ENABLE_TRIG@ ENABLE_MPI = @ENABLE_MPI@ RTA_TOPDIR = @RTA_TOPDIR@ K_TOPDIR = @K_TOPDIR@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ bin_PROGRAMS = gpiv_piv2hdf gpiv_hdf2piv gpiv_piv2gnuplt \ gpiv_piv2grid gpiv_t-corr \ gpiv_suta gpiv_combing gpiv_piv2hdf_SOURCES = piv2hdf.c gpiv_hdf2piv_SOURCES = hdf2piv.c gpiv_piv2gnuplt_SOURCES = piv2gnuplt.c gpiv_piv2grid_SOURCES = piv2grid.c gpiv_t_corr_SOURCES = t-corr.c gpiv_suta_SOURCES = suta.c gpiv_combing_SOURCES = combing.c bin_SCRIPTS = gpiv_series \ gpiv_img2gpiv \ gpiv_piv2vec \ gpiv_process-chain \ gpiv_sca2gri \ gpiv_t-avg \ gpiv_fi-keyline if BUILD_MPI gpiv_series: series_mpi.py cp series_mpi.py gpiv_series chmod +x gpiv_series else gpiv_series: series_ser.py cp series_ser.py gpiv_series chmod +x gpiv_series endif gpiv_img2gpiv: img2gpiv.pl cp img2gpiv.pl gpiv_img2gpiv chmod +x gpiv_img2gpiv gpiv_piv2vec: piv2vec.pl cp piv2vec.pl gpiv_piv2vec chmod +x gpiv_piv2vec gpiv_process-chain: process-chain.pl cp process-chain.pl gpiv_process-chain chmod +x gpiv_process-chain gpiv_sca2gri: sca2gri.pl cp sca2gri.pl gpiv_sca2gri chmod +x gpiv_sca2gri gpiv_t-avg: t-avg.pl cp t-avg.pl gpiv_t-avg chmod +x gpiv_t-avg gpiv_fi-keyline: fi-keyline.pl cp fi-keyline.pl gpiv_fi-keyline chmod +x gpiv_fi-keyline clean: -test -z "$(bin_PROGRAMS) $(bin_SCRIPTS)" || rm -f $(bin_PROGRAMS) $(bin_SCRIPTS) rm -f *.o EXTRA_DIST = Makefile.in \ series_ser.py series_mpi.py \ img2gpiv.pl \ piv2vec.pl \ process-chain.pl \ sca2gri.pl \ t-avg.pl \ fi-keyline.pl INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ gpivtools-0.6.0/src/misc/Makefile.in0000644000175000017500000004514011073421523014255 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = gpiv_piv2hdf$(EXEEXT) gpiv_hdf2piv$(EXEEXT) \ gpiv_piv2gnuplt$(EXEEXT) gpiv_piv2grid$(EXEEXT) \ gpiv_t-corr$(EXEEXT) gpiv_suta$(EXEEXT) gpiv_combing$(EXEEXT) subdir = src/misc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gpiv_combing_OBJECTS = combing.$(OBJEXT) gpiv_combing_OBJECTS = $(am_gpiv_combing_OBJECTS) gpiv_combing_LDADD = $(LDADD) gpiv_combing_DEPENDENCIES = am_gpiv_hdf2piv_OBJECTS = hdf2piv.$(OBJEXT) gpiv_hdf2piv_OBJECTS = $(am_gpiv_hdf2piv_OBJECTS) gpiv_hdf2piv_LDADD = $(LDADD) gpiv_hdf2piv_DEPENDENCIES = am_gpiv_piv2gnuplt_OBJECTS = piv2gnuplt.$(OBJEXT) gpiv_piv2gnuplt_OBJECTS = $(am_gpiv_piv2gnuplt_OBJECTS) gpiv_piv2gnuplt_LDADD = $(LDADD) gpiv_piv2gnuplt_DEPENDENCIES = am_gpiv_piv2grid_OBJECTS = piv2grid.$(OBJEXT) gpiv_piv2grid_OBJECTS = $(am_gpiv_piv2grid_OBJECTS) gpiv_piv2grid_LDADD = $(LDADD) gpiv_piv2grid_DEPENDENCIES = am_gpiv_piv2hdf_OBJECTS = piv2hdf.$(OBJEXT) gpiv_piv2hdf_OBJECTS = $(am_gpiv_piv2hdf_OBJECTS) gpiv_piv2hdf_LDADD = $(LDADD) gpiv_piv2hdf_DEPENDENCIES = am_gpiv_suta_OBJECTS = suta.$(OBJEXT) gpiv_suta_OBJECTS = $(am_gpiv_suta_OBJECTS) gpiv_suta_LDADD = $(LDADD) gpiv_suta_DEPENDENCIES = am_gpiv_t_corr_OBJECTS = t-corr.$(OBJEXT) gpiv_t_corr_OBJECTS = $(am_gpiv_t_corr_OBJECTS) gpiv_t_corr_LDADD = $(LDADD) gpiv_t_corr_DEPENDENCIES = binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gpiv_combing_SOURCES) $(gpiv_hdf2piv_SOURCES) \ $(gpiv_piv2gnuplt_SOURCES) $(gpiv_piv2grid_SOURCES) \ $(gpiv_piv2hdf_SOURCES) $(gpiv_suta_SOURCES) \ $(gpiv_t_corr_SOURCES) DIST_SOURCES = $(gpiv_combing_SOURCES) $(gpiv_hdf2piv_SOURCES) \ $(gpiv_piv2gnuplt_SOURCES) $(gpiv_piv2grid_SOURCES) \ $(gpiv_piv2hdf_SOURCES) $(gpiv_suta_SOURCES) \ $(gpiv_t_corr_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ gpiv_piv2hdf_SOURCES = piv2hdf.c gpiv_hdf2piv_SOURCES = hdf2piv.c gpiv_piv2gnuplt_SOURCES = piv2gnuplt.c gpiv_piv2grid_SOURCES = piv2grid.c gpiv_t_corr_SOURCES = t-corr.c gpiv_suta_SOURCES = suta.c gpiv_combing_SOURCES = combing.c bin_SCRIPTS = gpiv_series \ gpiv_img2gpiv \ gpiv_piv2vec \ gpiv_process-chain \ gpiv_sca2gri \ gpiv_t-avg \ gpiv_fi-keyline EXTRA_DIST = Makefile.in \ series_ser.py series_mpi.py \ img2gpiv.pl \ piv2vec.pl \ process-chain.pl \ sca2gri.pl \ t-avg.pl \ fi-keyline.pl INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/misc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/misc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gpiv_combing$(EXEEXT): $(gpiv_combing_OBJECTS) $(gpiv_combing_DEPENDENCIES) @rm -f gpiv_combing$(EXEEXT) $(LINK) $(gpiv_combing_LDFLAGS) $(gpiv_combing_OBJECTS) $(gpiv_combing_LDADD) $(LIBS) gpiv_hdf2piv$(EXEEXT): $(gpiv_hdf2piv_OBJECTS) $(gpiv_hdf2piv_DEPENDENCIES) @rm -f gpiv_hdf2piv$(EXEEXT) $(LINK) $(gpiv_hdf2piv_LDFLAGS) $(gpiv_hdf2piv_OBJECTS) $(gpiv_hdf2piv_LDADD) $(LIBS) gpiv_piv2gnuplt$(EXEEXT): $(gpiv_piv2gnuplt_OBJECTS) $(gpiv_piv2gnuplt_DEPENDENCIES) @rm -f gpiv_piv2gnuplt$(EXEEXT) $(LINK) $(gpiv_piv2gnuplt_LDFLAGS) $(gpiv_piv2gnuplt_OBJECTS) $(gpiv_piv2gnuplt_LDADD) $(LIBS) gpiv_piv2grid$(EXEEXT): $(gpiv_piv2grid_OBJECTS) $(gpiv_piv2grid_DEPENDENCIES) @rm -f gpiv_piv2grid$(EXEEXT) $(LINK) $(gpiv_piv2grid_LDFLAGS) $(gpiv_piv2grid_OBJECTS) $(gpiv_piv2grid_LDADD) $(LIBS) gpiv_piv2hdf$(EXEEXT): $(gpiv_piv2hdf_OBJECTS) $(gpiv_piv2hdf_DEPENDENCIES) @rm -f gpiv_piv2hdf$(EXEEXT) $(LINK) $(gpiv_piv2hdf_LDFLAGS) $(gpiv_piv2hdf_OBJECTS) $(gpiv_piv2hdf_LDADD) $(LIBS) gpiv_suta$(EXEEXT): $(gpiv_suta_OBJECTS) $(gpiv_suta_DEPENDENCIES) @rm -f gpiv_suta$(EXEEXT) $(LINK) $(gpiv_suta_LDFLAGS) $(gpiv_suta_OBJECTS) $(gpiv_suta_LDADD) $(LIBS) gpiv_t-corr$(EXEEXT): $(gpiv_t_corr_OBJECTS) $(gpiv_t_corr_DEPENDENCIES) @rm -f gpiv_t-corr$(EXEEXT) $(LINK) $(gpiv_t_corr_LDFLAGS) $(gpiv_t_corr_OBJECTS) $(gpiv_t_corr_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/combing.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdf2piv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/piv2gnuplt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/piv2grid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/piv2hdf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/suta.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-corr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-binSCRIPTS uninstall-info-am @BUILD_MPI_TRUE@gpiv_series: series_mpi.py @BUILD_MPI_TRUE@ cp series_mpi.py gpiv_series @BUILD_MPI_TRUE@ chmod +x gpiv_series @BUILD_MPI_FALSE@gpiv_series: series_ser.py @BUILD_MPI_FALSE@ cp series_ser.py gpiv_series @BUILD_MPI_FALSE@ chmod +x gpiv_series gpiv_img2gpiv: img2gpiv.pl cp img2gpiv.pl gpiv_img2gpiv chmod +x gpiv_img2gpiv gpiv_piv2vec: piv2vec.pl cp piv2vec.pl gpiv_piv2vec chmod +x gpiv_piv2vec gpiv_process-chain: process-chain.pl cp process-chain.pl gpiv_process-chain chmod +x gpiv_process-chain gpiv_sca2gri: sca2gri.pl cp sca2gri.pl gpiv_sca2gri chmod +x gpiv_sca2gri gpiv_t-avg: t-avg.pl cp t-avg.pl gpiv_t-avg chmod +x gpiv_t-avg gpiv_fi-keyline: fi-keyline.pl cp fi-keyline.pl gpiv_fi-keyline chmod +x gpiv_fi-keyline clean: -test -z "$(bin_PROGRAMS) $(bin_SCRIPTS)" || rm -f $(bin_PROGRAMS) $(bin_SCRIPTS) rm -f *.o # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/src/misc/fi-keyline.pl0000644000175000017500000000567010402304764014607 00000000000000#!/usr/bin/perl -w # # fi-keyline - Substracts parameters from an arbitrary file and writes them # to gpivrc. Initially used for substarcting parameters from a # README doc, containing description of experiments. # # Copyright (C) 2002 Gerber van der Graaf # This program 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, 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. #------------------------------------------------------------------ $VERSION = q$Id: fi-keyline.pl,v 1.4 2006/03/04 12:37:08 gerber Exp $; $HELP = "Filters each line that starts with a keyword"; $USAGE = "gpiv_fi-keyline [-h|-help] [-p|-print] [-v|-version] [-if|input_file] [-of|output_file] keyword keys: -h: on-line help -p: prints process parameters/variables to stdout -v: prints version -if: input file -of: output file "; #[-n|-none] #-n: suppresses real execution #-p: prints process parameters/variables to stdout #----------------- Command line arguments handling ---------- $opt_h = 0; # $opt_n = 0; $opt_p = 0; $opt_v = 0; use Getopt::Long; GetOptions('h|help', # 'n|none', 'p|print', 'v|version', 'if|input_file=s' => \$infile, 'of|output_file=s' => \$outfile, ); if ($opt_h) { print ("$HELP\n"); print ("$USAGE\n"); exit; } if ($opt_v) { print ("$VERSION\n"); exit; } if ($#ARGV != 0) { printf ("\nUsage: $USAGE\n"); exit; } $keyword = shift (@ARGV); #------------------------------------- if ($infile) { if ($opt_p) {printf("input file = $infile\n");} open (STDIN, "$infile") || die 'can\'t open $infile'; } if ($outfile) { if ($opt_p) {printf("output file = $outfile\n");} open (STDOUT, ">$outfile") || die 'can\'t open $outfile'; } while () { chomp; if ($_ ne "" && (!/^(\#|;)/)) { #skip blank lines, # or ; signs at first col s/^ *//; #removes eventually leading space @words = split(/ /, $_); #splitting line $_ up in words #same as @words = split if ($words[0] =~ $keyword) { shift @words; if ($outfile) { printf(STDOUT "@words\n"); } else { printf("@words\n"); } } } } if ($infile) {close (STDIN) || die 'can\'t close $infile';} if ($outfile) {close (STDOUT) || die 'can\'t close $infile';} # # Thats all folks # gpivtools-0.6.0/src/misc/series_ser.py0000755000175000017500000001227611066706522014743 00000000000000#!/usr/bin/env python # gpiv_series - Processes a set of numbered input data # Copyright (C) 2008 Gerber van der Graaf # This program 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, 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. #-------------------------------------------------------------------- # # This version is for serial processing # import os, re # #----------- Command line arguments parser # from optparse import OptionParser usage = "%prog [options] \"process\"" parser = OptionParser(usage) parser.add_option("-a", "--arg_n", action="store_true", dest="arg_n", default=False, help="if the process needs the current number in its \ argument list instead of prepending/appending it to the \ filebase name, the number will be put before (-f) \ \"filename\" in the \"process\" string.") parser.add_option("-b", "--basename", type='string', dest="basename", help="File basename for reading", metavar="FILE") parser.add_option("-e", "--ext", type='string', dest="ext", metavar="EXT", help="add an extension after the file basename + number (without leading \".\")") parser.add_option("-f", "--first", type='int', dest="first_nr", default=0, help="first numbered file (default: 0)", metavar="N") parser.add_option("-l", "--last", type='int', dest="last_nr", default=0, help="last numbered file(default: 0)", metavar="N") parser.add_option("-i", "--incr", type='int', dest="incr_nr", default=1, help="increment file number (default: 1)", metavar="N") parser.add_option("-p", "--print", action="store_true", dest="pri", default=False, help="prints process parameters/variables to stdout") parser.add_option("--pad", type='int', dest="pad0", default=0, help="padding number with zero's (default: 0)", metavar="N") parser.add_option("-n", "--none", action="store_true", dest="none", default=False, help="suppresses real execution") parser.add_option("-x", "--prefix", action="store_true", dest="prefix", default=False, help="prefix numbering to file basename") (options, args) = parser.parse_args() if len(args) != 1: parser.error("incorrect number of arguments") else: process = args[0] # #----------- Function definitions # def pri_date(msg = "Time stamp at start of series processing:"): """Prints time stamp. Keyword arguments: msg -- message to be printed before time stamp """ if options.pri == True: print msg os.system('date') elif options.none: print msg os.system('date') def count_digits(nr): """Counts number of digits from a number Keyword arguments: nr -- number to be questioned """ count=0 while nr/10 !=0: nr=nr/10 count=count+1 return count def pad0(nr): """Created a string for zero padding Keyword arguments: nr -- number of zeros to be padded """ pd0="" for i in range(0, nr): pd0 = str(pd0)+"0" return pd0 def compose_name_nr(nr): """Creates proper name from basename and number. Keyword arguments: nr -- number of filename to be processed """ if options.pad0 > 0: ndig=count_digits(nr) null_str=pad0(options.pad0 - ndig) nr_str=null_str+str(nr) else: nr_str=str(nr) if options.prefix: if options.arg_n: name=str(options.basename) else: name=nr_str+str(options.basename) else: if options.arg_n: name=str(options.basename) else: name=str(options.basename)+nr_str if str(options.ext) != "None": name=str(name)+str(".")+str(options.ext) return(name) def compose_cmd(name, nr): """Creates proper command. Keyword arguments: name -- complete filename """ command=str(process) if options.arg_n: # Eventually, substitutes "-f" with: "nr -f" command_tmp=re.sub("-f", str(nr)+" -f", command) if command_tmp != command: command = str(command_tmp)+" "+str(name) else: command = str(command_tmp)+" "+str(nr)+" "+str(name) else: command=str(command)+" "+str(name) return command def proc_series_ser(): """Processes a series on identic numbered files. """ for i in range(options.first_nr, options.last_nr+1, options.incr_nr): name_nr = compose_name_nr(i) command = compose_cmd(name_nr, i) if options.pri == True: print command elif options.none == True: print command if options.none == False: os.system(command) # #----------- Calling functions # if options.pri == True: pri_date() elif options.none == True: pri_date() proc_series_ser() if options.pri == True: pri_date(msg = "Time stamp at end of series processing:") elif options.none == True: pri_date(msg = "Time stamp at end of series processing:") # #----------- That's all folks # gpivtools-0.6.0/src/misc/piv2hdf.c0000644000175000017500000003010311073414772013717 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- piv2h5 - converts PIV data to hdf5 format data Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ------------------------------------------------------------------------*/ #include #include #include #include /* #define PARFILE "scale.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: piv2hdf [-e] [-h | --help] [-i] [-p | --print] [-v | --version] \n\ [-V | --verbose] filename \n\ \n\ keys: \n\ -e: exclude data \n\ -h | --help: this on-line help \n\ -i: includes image data \n\ -p | --print: print parameters to stdout \n\ -v | --version: version number \n\ -V | --verbose: program behaves more verbose \n\ filename: input PIV datafile, including .piv extension \n\ " #define HELP "\ piv2hdf - converts ASCII PIV-data and derived scalars to hdf5 formatted data" #define RCSID "$Id: piv2hdf.c,v 1.12 2008-09-25 13:08:34 gerber Exp $" gboolean print_par = FALSE, verbose = FALSE, exclude_data = FALSE, include_image = FALSE; void command_args(gint argc, gchar *argv[], gchar fname[GPIV_MAX_CHARS] ) /*----------------------------------------------------------------------------- * Command line argument handling */ { gchar c = '\0'; gint argc_next; while (--argc > 0 && (*++argv)[0] == '-') { /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ argc_next = 0; while (argc_next == 0 && (c = *++argv[0])) switch (c) { case 'v': printf("%s\n", RCSID); exit(0); break; case 'V': verbose = TRUE; break; case 'e': exclude_data = TRUE; break; case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); exit(0); break; case 'i': include_image = TRUE; break; case 'p': print_par = TRUE; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else if (strcmp("-verbose", *argv) == 0) { verbose = TRUE; } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error(USAGE); break; } } if(argc != 1) { gpiv_error("%s: %s", argv[0], USAGE); } strcpy(fname, argv[0]); } gchar * make_fname(gchar *fname_in, gchar *fname_img, gchar *fname_vor, gchar *fname_nstrain, gchar *fname_sstrain, gchar *fname_out, gchar *fname_parameter ) /*----------------------------------------------------------------------------- * generates filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup(fname_in); strtok(fname_base, "."); /* * filenames for output PIV data */ if (include_image) { gpiv_io_make_fname(fname_base, GPIV_EXT_PNG_IMAGE, fname_img); if (verbose) printf("# Image data file: %s\n", fname_img); } if (exclude_data == FALSE) { gpiv_io_make_fname(fname_base, GPIV_EXT_VOR, fname_vor); if (verbose) printf("# Input data file: %s\n", fname_vor); gpiv_io_make_fname(fname_base, GPIV_EXT_NSTR, fname_nstrain); if (verbose) printf("# Input data file: %s\n", fname_nstrain); gpiv_io_make_fname(fname_base, GPIV_EXT_SSTR, fname_sstrain); if (verbose) printf("# Input data file: %s\n", fname_sstrain); } gpiv_io_make_fname(fname_base, GPIV_EXT_GPIV, fname_out); if (verbose) printf("# Output file: %s\n",fname_out); gpiv_io_make_fname(fname_base, GPIV_EXT_PAR, fname_parameter); g_free (fname_base); return (err_msg); } int main(int argc, char *argv[] ) /*----------------------------------------------------------------------------- * main routine to converts ASCII PIV-data to hdf5 formatted data */ { gchar *err_msg = NULL; FILE *fp = NULL; gchar fname_piv[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_vor[GPIV_MAX_CHARS], fname_nstrain[GPIV_MAX_CHARS], fname_sstrain[GPIV_MAX_CHARS], fname_img[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS]; /* time_t itime; */ /* gchar c_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS]; */ /* gint nc_lines=0, var_scale=0; */ GpivPivPar *piv_par = g_new0 (GpivPivPar, 1); GpivValidPar *valid_par = g_new0 (GpivValidPar, 1); GpivPostPar *post_par = g_new0 (GpivPostPar, 1); GpivImage *image = NULL; GpivPivData *piv_data = NULL; GpivScalarData *sc_data = NULL; gboolean stored__post_par = FALSE; /* * Initializing parameters */ gpiv_piv_parameters_set(piv_par, FALSE); gpiv_valid_parameters_set(valid_par, FALSE); gpiv_post_parameters_set(post_par, FALSE); command_args(argc, argv, fname_piv); if ((err_msg = make_fname(fname_piv, fname_img, fname_vor, fname_nstrain, fname_sstrain, fname_out, fname_parameter)) != NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } /* * Reads piv program parameters from fname_parameter */ gpiv_scan_parameter (GPIV_PIVPAR_KEY, fname_parameter, piv_par, print_par); gpiv_scan_parameter (GPIV_VALIDPAR_KEY, fname_parameter, valid_par, print_par); gpiv_scan_parameter (GPIV_POSTPAR_KEY, fname_parameter, post_par, print_par); #undef USE_RESOURCES #ifdef USE_RESOURCES if ((err_msg = gpiv_scan_resourcefiles (GPIV_PIVPAR_KEY, piv_par, print_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if ((err_msg = gpiv_scan_resourcefiles (GPIV_VALIDPAR_KEY, valid_par, print_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if ((err_msg = gpiv_scan_resourcefiles (GPIV_POSTPAR_KEY, post_par, print_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); #endif /* USE_RESOURCES */ /* * writing to output int hdf5 */ if ((err_msg = gpiv_fcreate_hdf5 (fname_out)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } /* * Image */ if (include_image) { if ((fp = fopen(fname_img, "r")) != NULL) { if ((image = gpiv_read_png_image (fp)) == NULL) { fclose(fp); gpiv_error ("%s: faling gpiv_read_png_image", argv[0]); } fclose(fp); fp = NULL; if ((err_msg = gpiv_fwrite_hdf5_image (fname_out, image, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } } if (exclude_data == FALSE) { /* * Piv data, PIV and validation parameters */ if ((fp = fopen (fname_piv, "r")) != NULL) { if ((piv_data = gpiv_read_pivdata (fp)) == NULL) { fclose(fp); gpiv_error ("%s: faling gpiv_read_pivdata", argv[0]); } fclose(fp); fp = NULL; if ((err_msg = gpiv_fwrite_hdf5_pivdata (fname_out, piv_data, "PIV", TRUE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if (piv_par != NULL) { if ((err_msg = gpiv_piv_fwrite_hdf5_parameters (fname_out, piv_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } if (valid_par != NULL) { if ((err_msg = gpiv_valid_fwrite_hdf5_parameters (fname_out, valid_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } } /* * Scalar data: vorticity */ if ((fp = fopen (fname_vor, "r")) != NULL) { if ((sc_data = gpiv_read_scdata (fp)) == NULL) { fclose(fp); gpiv_error ("%s: faling gpiv_read_scdata", argv[0]); } fclose(fp); fp = NULL; if ((err_msg = gpiv_fwrite_hdf5_scdata (fname_out, sc_data, "VORTICITY", TRUE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if (post_par != NULL && stored__post_par == FALSE) { stored__post_par = TRUE; if ((err_msg = gpiv_post_fwrite_hdf5_parameters (fname_out, post_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } } /* * Scalar data: sstrain */ if ((fp = fopen (fname_sstrain, "r")) != NULL) { if ((sc_data = gpiv_read_scdata (fp)) == NULL) { fclose(fp); gpiv_error ("%s: faling gpiv_read_scdata", argv[0]); } fclose(fp); fp = NULL; if ((err_msg = gpiv_fwrite_hdf5_scdata(fname_out, sc_data, "SHEAR_STRAIN", TRUE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if (post_par != NULL && stored__post_par == FALSE) { stored__post_par = TRUE; if ((err_msg = gpiv_post_fwrite_hdf5_parameters (fname_out, post_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } } /* * Scalar data: normal strain */ if((fp=fopen(fname_nstrain, "r")) != NULL) { if ((sc_data = gpiv_read_scdata (fp)) == NULL) { fclose(fp); gpiv_error ("%s: faling gpiv_read_scdata", argv[0]); } fclose(fp); fp = NULL; if ((err_msg = gpiv_fwrite_hdf5_scdata(fname_out, sc_data, "NORMAL_STRAIN", TRUE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if (post_par != NULL && stored__post_par == FALSE) { stored__post_par = TRUE; if ((err_msg = gpiv_post_fwrite_hdf5_parameters (fname_out, post_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } } } exit(0); } gpivtools-0.6.0/src/misc/piv2grid.c0000644000175000017500000001533511073414772014115 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- piv2h5 - converts PIV data to hdf5 format data Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ------------------------------------------------------------------------*/ #include #include #include /* #define PARFILE "scale.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: piv2grid [-h | --help] [-p | --print] [-v | --version] [-t type] \n\ filename \n\ \n\ keys: \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -v | --version: version number \n\ -t: select which data to be stored on grid; dx, dy or snr \n\ (default: snr)\n\ " #define HELP "\ piv2grid - converts PIV data to grid data for generating contour plots \n\ plotmtv \n\ " #define RCSID "$Id: piv2grid.c,v 1.9 2008-09-25 13:08:34 gerber Exp $" enum DataType { DT_DX = 0, DT_DY = 1, DT_SNR = 2 }; gboolean print_par = FALSE; void command_args(int argc, char *argv[], char fname[GPIV_MAX_CHARS], enum DataType *datatype ) /*----------------------------------------------------------------------------- * Command line argument handling */ { char c = '\0'; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ argc_next = 0; while (argc_next == 0 && (c = *++argv[0])) { switch (c) { case 'v': printf("%s\n", RCSID); exit(0); break; case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); exit(0); break; case 'p': print_par = TRUE; break; case 't': if (strcmp("dx", *argv) == 0) { *datatype = DT_DX; } else if (strcmp("dy", *argv) == 0) { *datatype = DT_DY; } else if (strcmp("snr", *argv) == 0) { *datatype = DT_SNR; } else { gpiv_error("piv2grid: wrong specification of data type"); } break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: fprintf (stderr,USAGE); exit(1); break; } } } if(argc != 1) { gpiv_error("%s: %s", argv[0], USAGE); } strcpy(fname, argv[0]); } void make_fname(char *fname, char *fname_piv, char *fname_out ) /*----------------------------------------------------------------------------- * generate filenames */ { gpiv_io_make_fname(fname, GPIV_EXT_PIV, fname_piv); if (print_par) printf("# Input data file: %s\n",fname_piv); gpiv_io_make_fname(fname, ".grid", fname_out); if (print_par) printf("# Output file: %s\n",fname_out); } int main(int argc, char *argv[] ) /* ---------------------------------------------------------------------------- * main routine to convert PIV data to grid data for generating contour plots */ { FILE *fp; gchar *err_msg = NULL; gchar fname[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_piv[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS]; guint i, j; GpivPivData *piv_data = NULL; GpivScalarData *sc_data = NULL; enum DataType datatype = DT_SNR; command_args (argc, argv, fname, &datatype); make_fname (fname, fname_piv, fname_out); gpiv_io_make_fname (fname, GPIV_EXT_PAR, fname_parameter); if (print_par) printf ("datatype = %d\n", datatype); /* * Reading PIV data */ if ((fp = fopen (fname_piv, "r")) == NULL) { gpiv_error ("%s: failing opening %s", argv[0], fname_piv); } if ((piv_data = gpiv_read_pivdata(fp)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } /* * copying PIV data to SCALAR data */ if ((sc_data = gpiv_alloc_scdata (piv_data->nx, piv_data->ny)) == NULL) { gpiv_error ("%s: failing gpiv_alloc_scdata", argv[0]); } for (i = 0; i < sc_data->ny; i++) { for (j = 0; j < sc_data->nx; j++) { sc_data->point_x[i][j] = piv_data->point_x[i][j]; sc_data->point_y[i][j] = piv_data->point_y[i][j]; if (piv_data->peak_no[i][j] != -1) { if (datatype == DT_DX) sc_data->scalar[i][j] = piv_data->dx[i][j]; if (datatype == DT_DY) sc_data->scalar[i][j] = piv_data->dy[i][j]; if (datatype == DT_SNR) sc_data->scalar[i][j] = piv_data->snr[i][j]; } else { sc_data->scalar[i][j] = -1.0; } sc_data->flag[i][j] = piv_data->peak_no[i][j]; } } /* * Saving SCALAR data */ if ((fp = fopen (fname_out, "w")) == NULL) { gpiv_error ("%s: failing opening %s", argv[0], fname_out); } if ((err_msg = gpiv_write_sc_mtvgriddata (fp, sc_data, TRUE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); gpiv_free_pivdata (piv_data); exit (0); } gpivtools-0.6.0/src/misc/hdf2piv.c0000644000175000017500000002527011073414772013730 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*----------------------------------------------------------------------------- hdf2piv - converts hdf5 PIV data ASCII data Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. -----------------------------------------------------------------------------*/ #include #include #include #include /* #define PARFILE "scale.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: hdf2piv [-e] [-h | --help] [-p | --print] [-v | --version] \n\ [-V | --verbose] filename \n\ \n\ keys: \n\ -e: exclude data \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -v | --version: version number \n\ -V | --verbose: version number \n\ filename: input file, hdf formatted (including .hdf extension) \n\ " #define HELP "\ hdf2piv - converts hdf5 PIV-data to ASCII data" #define RCSID "$Id: hdf2piv.c,v 1.13 2008-09-25 13:08:34 gerber Exp $" gboolean print_par = FALSE, verbose = FALSE, exclude_data = FALSE; void command_args(gint argc, gchar *argv[], gchar fname[GPIV_MAX_CHARS] ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { gchar c = '\0'; gint argc_next; while (--argc > 0 && (*++argv)[0] == '-') { /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ argc_next = 0; while (argc_next == 0 && (c = *++argv[0])) switch (c) { case 'v': printf("%s\n", RCSID); exit(0); break; case 'V': verbose = TRUE; break; case 'e': exclude_data = TRUE; break; case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); exit(0); break; case 'p': print_par = TRUE; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else if (strcmp("-verbose", *argv) == 0) { verbose = TRUE; } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error(USAGE); break; } } if (argc == 1) { strcpy (fname, argv[argc - 1]); } else { gpiv_error ("%s: %s", argv[0], USAGE); } } gchar * make_fname(gchar *fname_in, gchar *fname_out_img, gchar *fname_out_piv, gchar *fname_out_vor, gchar *fname_out_nstrain, gchar *fname_out_sstrain, gchar *fname_out_par ) /* ---------------------------------------------------------------------------- * define filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup (fname_in); strtok (fname_base, "."); /* * filenames for output PIV data */ gpiv_io_make_fname (fname_base, GPIV_EXT_RAW_IMAGE, fname_out_img); if (verbose) printf("# Output data file: %s\n", fname_out_img); if (exclude_data == FALSE) { gpiv_io_make_fname(fname_base, GPIV_EXT_PIV, fname_out_piv); if (verbose) printf("# Output data file: %s\n",fname_out_piv); gpiv_io_make_fname(fname_base, GPIV_EXT_VOR, fname_out_vor); if (verbose) printf("# Input data file: %s\n",fname_out_vor); gpiv_io_make_fname(fname_base, GPIV_EXT_NSTR, fname_out_nstrain); if (verbose) printf("# Input data file: %s\n", fname_out_nstrain); gpiv_io_make_fname(fname_base, GPIV_EXT_SSTR, fname_out_sstrain); if (verbose) printf("# Input data file: %s\n", fname_out_sstrain); gpiv_io_make_fname(fname_base, GPIV_EXT_PAR, fname_out_par); if (verbose) printf("# Input parameter file: %s\n", fname_out_par); } g_free (fname_base); return (err_msg); } int main(int argc, char *argv[] ) /* ---------------------------------------------------------------------------- */ { FILE *fp_out = NULL; gchar *err_msg = NULL; gchar fname_in[GPIV_MAX_CHARS], fname_out_img[GPIV_MAX_CHARS], fname_out_piv[GPIV_MAX_CHARS], fname_out_vor[GPIV_MAX_CHARS], fname_out_nstrain[GPIV_MAX_CHARS], fname_out_sstrain[GPIV_MAX_CHARS], fname_out_par[GPIV_MAX_CHARS]; GpivImage *image = NULL; GpivPivData *piv_data = NULL; GpivScalarData *sc_data; GpivPivPar *piv_par = NULL; GpivValidPar *valid_par = NULL; GpivPostPar *post_par = NULL; /* * Initializing parameters */ command_args (argc, argv, fname_in); if ((err_msg = make_fname (fname_in, fname_out_img, fname_out_piv, fname_out_vor, fname_out_nstrain, fname_out_sstrain, fname_out_par)) != NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } /* * reading input from hdf5 * * image data */ if ((image = gpiv_fread_hdf5_image (fname_in)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } if ((fp_out = fopen (fname_out_img, "wb")) == NULL) { gpiv_error("%s error: failure opening %s for output", argv[0], fname_out_img); } gpiv_write_png_image (fp_out, image, TRUE); fclose(fp_out); /* * piv data */ if (exclude_data == FALSE) { if ((piv_data = gpiv_fread_hdf5_pivdata (fname_in, "PIV" )) == NULL) { gpiv_error ("%s: failing gpiv_fread_hdf5_pivdata", argv[0]); } if ((fp_out = fopen (fname_out_piv, "w")) == NULL) { gpiv_error("%s error: failure opening %s for output", argv[0], fname_out_piv); } if ((err_msg = gpiv_write_pivdata (fp_out, piv_data, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } fclose(fp_out); /* * scalar data: vorticity */ if ((sc_data = gpiv_fread_hdf5_scdata (fname_in, "VORTICITY" )) == NULL) { gpiv_error ("%s: failing gpiv_fread_hdf5_scdata", argv[0]); } if ((fp_out = fopen (fname_out_vor, "w")) == NULL) { gpiv_error("%s error: failure opening %s for output", argv[0], fname_out_vor); } if ((err_msg = gpiv_write_scdata (fp_out, sc_data, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } fclose(fp_out); /* * scalar data: normal strain */ if ((sc_data = gpiv_fread_hdf5_scdata (fname_in, "NORMAL STRAIN" )) == NULL) { gpiv_error ("%s: failing gpiv_fread_hdf5_scdata", argv[0]); } if ((fp_out = fopen (fname_out_nstrain, "w")) == NULL) { gpiv_error("%s error: failure opening %s for output", argv[0], fname_out_vor); } if ((err_msg = gpiv_write_scdata (fp_out, sc_data, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } fclose(fp_out); /* * scalar data: shear strain */ if ((sc_data = gpiv_fread_hdf5_scdata (fname_in, "SHEAR STRAIN" )) == NULL) { gpiv_error ("%s: failing gpiv_fread_hdf5_scdata", argv[0]); } if ((fp_out = fopen (fname_out_sstrain, "w")) == NULL) { gpiv_error("%s error: failure opening %s for output", argv[0], fname_out_vor); } if ((err_msg = gpiv_write_scdata (fp_out, sc_data, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } fclose(fp_out); /* * parameters */ if ((piv_par = gpiv_piv_fread_hdf5_parameters (fname_in)) == NULL) { gpiv_error ("%s: failing gpiv_piv_fread_hdf5_parameters", argv[0]); } if ((valid_par = gpiv_valid_fread_hdf5_parameters (fname_in)) == NULL) { gpiv_error ("%s: failing gpiv_valid_fread_hdf5_parameters", argv[0]); } if ((post_par = gpiv_post_fread_hdf5_parameters(fname_in)) == NULL) { gpiv_error ("%s: failing gpiv_post_fread_hdf5_parameters", argv[0]); } if ((fp_out = fopen (fname_out_par, "w")) == NULL) { gpiv_error("%s error: failure opening %s for output", argv[0], fname_out_par); } gpiv_img_print_parameters (fp_out, image->header); gpiv_piv_print_parameters (fp_out, piv_par); gpiv_valid_print_parameters (fp_out, valid_par); gpiv_post_print_parameters (fp_out, post_par); fclose (fp_out); if (print_par) { gpiv_img_print_parameters (NULL, image->header); gpiv_piv_print_parameters (NULL, piv_par); gpiv_valid_print_parameters (NULL, valid_par); gpiv_post_print_parameters (NULL, post_par); } } exit (0); } gpivtools-0.6.0/src/misc/suta.c0000644000175000017500000001531211073414772013336 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*----------------------------------------------------------------------------- suta - subtracts time-avaraged velocities (local mean velocities) from the PIV estimators Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. -----------------------------------------------------------------------------*/ #include #include #include #include #include /* #define PARFILE "scale.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define MAX_PIVSETS 1000 /* Maximum number of PIV data sets */ #define MIN_SAMPLES 20 /* Minimum number of samples used for estimation */ #define USAGE "\ Usage: suta [-h | --help] [-p | --print] [-v | --version] \n\ filename_ta filename \n\ \n\ keys: \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -v | --version: version number \n\ filename File name of PIV data set (without .piv) \n\ filename_ta File name of time-averaged (local means) PIV data set \n\ (full name) \n\ " #define HELP "\ suta - subtracts time-avaraged velocities (local mean) from the PIV estimators" #define RCSID "$Id: suta.c,v 1.6 2008-09-25 13:08:34 gerber Exp $" gboolean print_par = FALSE; void command_args(int argc, char *argv[], char fname_in[GPIV_MAX_CHARS], char fname_mean[GPIV_MAX_CHARS] ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c = '\0'; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ argc_next = 0; while (argc_next == 0 && (c = *++argv[0])) switch (c) { case 'v': printf("%s\n", RCSID); exit(0); break; case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); exit(0); break; case 'p': print_par = TRUE; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error(USAGE); break; } } if(argc != 2) { gpiv_error("%s: %s", argv[0], USAGE); } strcpy(fname_mean, argv[0]); strcpy(fname_in, argv[1]); } void make_fname(char *fname, char *fname_in, char *fname_out ) /* ---------------------------------------------------------------------------- * define input and output filenames */ { gpiv_io_make_fname(fname, GPIV_EXT_PIV, fname_in); if (print_par) printf("# Input data file: %s\n",fname_in); /* * Extension of filename with time-averaged reduced piv data */ #define EXT_SUB_TAVG_PIV ".suta.piv" gpiv_io_make_fname(fname, EXT_SUB_TAVG_PIV, fname_out); if (print_par) printf("# Output data file: %s\n",fname_out); } int main(int argc, char *argv[] ) /* ---------------------------------------------------------------------------- */ { FILE *fp = NULL; gchar *err_msg = NULL; gchar fname[GPIV_MAX_CHARS], fname_in[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_mean[GPIV_MAX_CHARS]; guint i, j; GpivPivData *in_data = NULL, *mean_data = NULL, *out_data = NULL; command_args(argc, argv, fname, fname_mean); make_fname(fname, fname_in, fname_out); if (print_par) { g_message("fname_mean = %s", fname_mean); } if ((fp = fopen (fname_in, "r")) == NULL) { gpiv_error ("%s: failing opening %s", argv[0], fname_in); } if ((in_data = gpiv_read_pivdata (fp)) == NULL) { gpiv_error ("%s: failing gpiv_read_pivdata", argv[0], err_msg); } fclose (fp); if ((fp = fopen (fname_mean, "r")) == NULL) { gpiv_error ("%s: failing opening %s", argv[0], fname_mean); } if ((mean_data = gpiv_read_pivdata (fp)) == NULL) { gpiv_error ("%s: gpiv_read_pivdata", argv[0], err_msg); } fclose (fp); out_data = gpiv_alloc_pivdata (in_data->nx, in_data->ny); for (i = 0; i < in_data->ny; i++) { for (j = 0; j < in_data->nx; j++) { out_data->point_x[i][j] = in_data->point_x[i][j]; out_data->point_y[i][j] = in_data->point_y[i][j]; out_data->peak_no[i][j] = in_data->peak_no[i][j]; if (mean_data->peak_no[i][j] > 0) { out_data->snr[i][j] = in_data->snr[i][j]; out_data->dx[i][j] = in_data->dx[i][j] - mean_data->dx[i][j]; out_data->dy[i][j] = in_data->dy[i][j] - mean_data->dy[i][j]; } else { out_data->snr[i][j] = GPIV_SNR_DISABLE; out_data->dx[i][j] = 0.0; out_data->dy[i][j] = 0.0; } } } if ((fp = fopen (fname_out, "w")) == NULL) { gpiv_error ("%s: failing opening %s", argv[0], fname_out); } if ((err_msg = gpiv_write_pivdata(fp, out_data, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } fclose (fp); gpiv_free_pivdata (in_data); gpiv_free_pivdata (mean_data); exit (0); } gpivtools-0.6.0/src/misc/piv2vec.pl0000644000175000017500000002562010557402056014132 00000000000000#!/usr/bin/perl -w # piv2vec - Inserts a third and fifth column of a PIV data stream in order # to prepare a data file for plotmtv vector representation. # # Copyright (C) 2002 Gerber van der Graaf # This program 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, 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. #------------------------------------------------------------------ $VERSION = q$Id: piv2vec.pl,v 1.8 2007-01-29 14:26:54 gerber Exp $; $HELP = "Adds header to piv data for a vector plot with Plotmtv"; $USAGE = "gpiv_piv2vec [-al length][-au \"units\"[-flipx][-flipy][-g][-h] [-p][-s scale][-tl label][-v][-xl label][-yl label] ][filename] < input > output keys: -al: plots a vector annotation of 'length' -au: plots a vector annotation of 'units' -flipx: flips the plot in x-direction; x data from high to low -flipy: flips the plot in y-direction; y data from high to low -g: launches plotmtv -h: on-line help -nd: combined with -g; adds option -nodate (only ps output doesn't contain date!) -k: keep plot-file -s: vector scale (default: 1 px) -tl: defines top label (title) (with -f default: \"file_name\") -v: prints version -xl: defines x-label (default: \"x (pixels)\") -yl: defines y-label (default: \"y (pixels)\") filename: input PIV data file. Substitutes stdin and stdout "; #----------------- Command line arguments handling ---------- #$opt_fn = 0; # $opt_an = 0; $opt_g = 0; $opt_h = 0; $opt_k = 0; $opt_v = 0; # $opt_s = 0; $filename_logic = 0; # $flipx = 0; # $flipy = 0; $opt_nd = 0; use Getopt::Long; #$result = GetOptions("g|graphic", "h|help", "k|keep", "v|version", "s|scale=f" => \$vscale, 'tl|toplabel=s' => \$top_label, 'xl|xlabel=s' => \$x_label, 'yl|ylabel=s' => \$y_label, 'nd|no_date', 'al|annotation_length=f' => \$length_an, 'au|annotation_unit=s' => \$unit_an, "flipx", "flipy", ); if ($opt_h) { print ("$HELP\n"); print ("$USAGE\n"); exit; } if ($opt_v) { print ("$VERSION\n"); exit; } if ($#ARGV == 0) { $filename_logic = 1; $filename = shift (@ARGV); } elsif ($#ARGV == -1) { printf ("\nUsage: $USAGE\n"); exit; } if ($opt_g && !$filename_logic) { print ("graphic output needs filename"); exit; } sub FileBase { #--------------- extracts file basename from a full filename my ($file_base_name, $file_extension); @file_fields = split(/\./,$_[0]); pop @file_fields; $file_base_name = join(".", @file_fields); return $file_base_name; } $file_basename = FileBase($filename); #------------------------------- default parameters if (!$unit_an) {$unit_an = "px"} if (!$vscale) {$vscale = 1.0} if ($file_basename && !$top_label) {$top_label = $file_basename} if (!$x_label) {$x_label = "x (pixels)"} if (!$y_label) {$x_label = "y (pixels)"} #--------------- Initializing variables $line = 0; $x_max = -10000; $x_min = 10000; $y_max = 0; $y_max = -1000; $y_min = 1000; #-------------------- Defines location and value of third component $insert_3_loc = 0.0; $insert_3_val = 0.0; if ($filename_logic == 0) { } elsif ($filename_logic == 1) { } #--------------- Inserts data with third component (necesary for Plotmtv) if ($filename_logic == 0) { #------------------------------- Inserts header print("\$ DATA=VECTOR\n"); print("\% vscale=$vscale\n"); print("\% equalscale\n"); if ($top_label) { print("\% toplabel = \"$top_label\"\n"); } else { print("\% toplabel = \" \"\n"); } if ($x_label) {print("\% xlabel = \"$x_label\"\n");} if ($y_label) {print("\% ylabel = \"$y_label\"\n");} if ($opt_flipx) {print("\% xflip\n");} if ($opt_flipy) {print("\% yflip\n");} while () { chomp; if ($_ ne "" && (!/^(\#|;)/)) { #skip blank lines, # or ; signs at first col s/,/./g; #substitutes eventually komma's by dot #(for example at LaVision's code) s/^ *//; #removes eventually leading space @words = split(/\s+/,$_); #splitting line $_ up in words #same as @words = split $px[$line]=$words[0]; $py[$line]=$words[1]; $dx[$line]=$words[2]; $dy[$line]=$words[3]; #------------------------------- Testing if they are numbers if ($#words == 5 ) { if (($px[$line] =~ /\d/) && ($py[$line] =~ /\d/) && ($dx[$line] =~ /\d/) && ($dy[$line] =~ /\d/) && ($snr[$line] =~ /\d/)) { $snr[$line]=$words[4]; } } elsif ($#words == 6 ) { if (($px[$line] =~ /\d/) && ($py[$line] =~ /\d/) && ($dx[$line] =~ /\d/) && ($dy[$line] =~ /\d/) && ($snr[$line] =~ /\d/) && ($peak[$line] =~ /\d/) ) { $snr[$line]=$words[4]; $peak[$line]=$words[5]; } } else { if (($px[$line] =~ /\d/) && ($py[$line] =~ /\d/) && ($dx[$line] =~ /\d/) && ($dy[$line] =~ /\d/)) { } } #----------------------- If vector annotation; calculate min and max values if ($length_an) { if ($px[$line] > $x_max) {$x_max = $px[$line];} if ($px[$line] < $x_min) {$x_min = $px[$line];} if ($py[$line] > $y_max) {$y_max = $py[$line];} if ($py[$line] < $y_min) {$y_min = $py[$line];} } $line++; } } $nlines = $line; #----------------------- If vector annotation; print to stdout if ($length_an) { $x1_an = $x_min+($x_max-$x_min)/2.; $x2_an = $x1_an + $length_an*$vscale; if ($opt_flipy){ $y1_an = $y_min-$y_max*0.1; $y2_an = $y_min-$y_max*0.1; } else { $y1_an = $y_max+$y_max*0.1; $y2_an = $y_max+$y_max*0.1; } printf("\n@ arrow x1=%f y1=%f z1=0.0 x2=%f y2=%f z2=0.0 \\ linetype=1 linecolor=0 clip=false linelabel=\"%6.2f %s\"\n\n", $x1_an, $y1_an, $x2_an, $y2_an, $length_an, $unit_an); } #----------------------- Print data for ($line=0; $line < $nlines; $line++) { if ($#words == 5 ) { print("$px[$line] $py[$line] $insert_3_loc $dx[$line] $dy[$line] $insert_3_val $snr[$line]\n"); } elsif ($#words == 6 ) { print("$px[$line] $py[$line] $insert_3_loc $dx[$line] $dy[$line] $insert_3_val $snr[$line] $peak[$line]\n"); } else { print("$px[$line] $py[$line] $insert_3_loc $dx[$line] $dy[$line] $insert_3_val\n"); } } } elsif ($filename_logic == 1) { #------------------------------- filename handling $file_name_piv=$file_basename.".piv"; $file_name_vec=$file_basename.".vec"; $infile=$file_name_piv; $outfile=$file_name_vec; # print "\ninfile=$infile outfile=$outfile"; open (IN,"$infile") || die 'PIV2VEC error: can\'t open $infile'; open (OUT,">$outfile") || die 'PIV2VEC error: can\'t open $outfile'; #------------------------------- Inserts header print(OUT "\$ DATA=VECTOR\n"); print(OUT "\% vscale=$vscale\n"); print(OUT "\% equalscale\n"); if ($top_label) { print(OUT "\% toplabel = \"$top_label\"\n"); } else { print(OUT "\% toplabel = \" \"\n"); } if ($x_label) {print(OUT "\% xlabel = \"$x_label\"\n");} if ($y_label) {print(OUT "\% ylabel = \"$y_label\"\n");} if ($opt_flipx) {print(OUT "\% xflip\n");} if ($opt_flipy) {print(OUT "\% yflip\n");} while () { chomp; if ($_ ne "" && (!/^(\#|;)/)) { #skip blank lines, # or ; signs at first col s/,/./g; #substitutes eventually komma's by dot #(for example at LaVision's code) s/^ *//; #removes eventually leading space @words = split(/\s+/,$_); #splitting line $_ up in words #same as @words = split $px[$line] = $words[0]; $py[$line] = $words[1]; $dx[$line] = $words[2]; $dy[$line] = $words[3]; $snr[$line] = $words[4]; $peak[$line] = $words[5]; ###printf("\n** AA:: peak = $peak[$line] ** \n"); #------------------------------- Testing if they are numbers if ($#words == 5 ) { if (($px[$line] =~ /\d/) && ($py[$line] =~ /\d/) && ($dx[$line] =~ /\d/) && ($dy[$line] =~ /\d/) && ($snr[$line] =~ /\d/)) { # $snr[$line]=$words[4]; } } elsif ($#words == 6 ) { if (($px[$line] =~ /\d/) && ($py[$line] =~ /\d/) && ($dx[$line] =~ /\d/) && ($dy[$line] =~ /\d/) && ($snr[$line] =~ /\d/) && ($peak[$line] =~ /\d/) ) { # $snr[$line]=$words[4]; # $peak[$line]=$words[5]; } } else { if (($px[$line] =~ /\d/) && ($py[$line] =~ /\d/) && ($dx[$line] =~ /\d/) && ($dy[$line] =~ /\d/)) { } } #----------------------- If vector annotation; calculate min and max values #----------------------- of location for placing annotation if ($length_an) { if ($px[$line] > $x_max) {$x_max = $px[$line];} if ($px[$line] < $x_min) {$x_min = $px[$line];} if ($py[$line] > $y_max) {$y_max = $py[$line];} if ($py[$line] < $y_min) {$y_min = $py[$line];} } $line++; } } $nlines = $line; #----------------------- If vector annotation; print to file if ($length_an) { $x1_an = $x_min+($x_max-$x_min)/2.; $x2_an = $x1_an + $length_an*$vscale; if ($opt_flipy){ $y1_an = $y_min-$y_max*0.1; $y2_an = $y_min-$y_max*0.1; } else { $y1_an = $y_max+$y_max*0.1; $y2_an = $y_max+$y_max*0.1; } print("\nx1_an=$x1_an x2_an=$x2_an"); printf(OUT "\n@ arrow x1=%f y1=%f z1=0.0 x2=%f y2=%f z2=0.0 \\ linetype=1 linecolor=0 clip=false linelabel=\"%6.2f %s\"\n\n", $x1_an, $y1_an, $x2_an, $y2_an, $length_an, $unit_an); } #----------------------- Print data for ($line=0; $line < $nlines; $line++) { if ($#words == 5 ) { ###printf("\n** BB:: NO words == $#words snr = $snr[$line] peak = $peak[$line]**\n"); if ($peak[$line] != -1) { # $peak[$line] != 0 && print(OUT "$px[$line] $py[$line] $insert_3_loc $dx[$line] $dy[$line] $insert_3_val $snr[$line]\n"); } } elsif ($#words == 6 ) { print(OUT "$px[$line] $py[$line] $insert_3_loc $dx[$line] $dy[$line] $insert_3_val $snr[$line] $peak[$line]\n"); } else { print(OUT "$px[$line] $py[$line] $insert_3_loc $dx[$line] $dy[$line] $insert_3_val\n"); } } close (IN) || die 'PIV2VEC error: can\'t close $infile'; close (OUT) || die 'PIV2VEC error: can\'t close $outfile'; } #------------------------------- Launches Plotmtv and cleans if ($opt_g) { if ($opt_nd) { @args=("plotmtv", "-nodate", $file_name_vec); } else { @args=("plotmtv", $file_name_vec); } system (@args) == 0 || die "PIV2VEC error: system @args failed: $?"; if (!$opt_k) { @args=("rm", $file_name_vec); system (@args) == 0 || die "PIV2VEC error: system @args failed: $?"; } } print ("\n"); gpivtools-0.6.0/src/misc/piv2gnuplt.c0000644000175000017500000001734111073414772014500 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- piv2gnuplt - converts PIV data gnuplot data Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ------------------------------------------------------------------------*/ #include #include #include /* #define PARFILE "scale.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: piv2gnuplt [-al L] [-au UNIT] [-h | --help] [-p | --print] [-s SCALE] \n\ [-v] filename \n\ \n\ keys: \n\ -al L: draws an annotation vector with lenght L \n\ -au UNIT: define unit of annotation vector (defaul m/s) \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -s SCALE: scale factor for graphic output with gnuplot \n\ -v | --version: version number \n\ -z full zoom (for scaled data) \n\ filename: inpit PIV data file. \n\ " #define HELP "\ piv2gnuplt - converts PIV data gnuplot data" #define RCSID "$Id: piv2gnuplt.c,v 1.12 2008-09-25 13:08:34 gerber Exp $" #define GNUPLOT_DISPLAY_SIZE 500 #define GNUPLOT_DISPLAY_COLOR "LightBlue" gboolean print_par = FALSE, zoom = FALSE; gboolean scale__set = FALSE, annot__set = FALSE; float scale = 1.0, annot_length = 1.0; char annot_unit[GPIV_MAX_CHARS] = "m/s"; /* TODO: Annotation; length, unit Full Zoom */ void command_args(int argc, char *argv[], char fname[GPIV_MAX_CHARS] ) /*----------------------------------------------------------------------------- * Command line argument handling */ { char c = '\0'; int argc_next = 0; while (--argc > 0 && (*++argv)[0] == '-') { argc_next = 0; /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) switch (c) { case 'a': if (strcmp(*argv, "al") != 0) { annot_length = atof(*++argv); } else if (strcmp(*argv, "au") != 0) { strcpy(annot_unit, *++argv); /* annot__set = TRUE; */ argc_next = 1; --argc; } else { gpiv_error("%s: %s", argv[0], USAGE); } annot__set = TRUE; break; case 'v': printf("%s\n", RCSID); exit(0); break; case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); exit(0); break; case 'p': print_par = TRUE; break; case 's': scale = atof(*++argv); scale__set = TRUE; --argc; argc_next = 1; break; case 'z': zoom = TRUE; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: fprintf (stderr,USAGE); exit(1); break; } } if(argc != 1) { gpiv_error("%s: %s", argv[0], USAGE); } strcpy(fname, argv[0]); } static gchar * make_fname (char *fname_in, char *fname_header ) /*----------------------------------------------------------------------------- * function to generate filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup(fname_in); strtok(fname_base, "."); /* * filenames for output */ gpiv_io_make_fname(fname_base, GPIV_EXT_HEADER, fname_header); if (print_par) printf("# Header data file: %s\n", fname_header); g_free (fname_base); return (err_msg); } int main(int argc, char *argv[] ) /*----------------------------------------------------------------------------- * main program to convert PIV data gnuplot data */ { FILE *fp; gchar *err_msg = NULL; gchar fname_in[GPIV_MAX_CHARS], fname_header[GPIV_MAX_CHARS]; /* gchar c_line[GPIV_MAX_LINES_C][GPIV_MAX_CHARS]; */ /* gint nc_lines = 0, var_scale = 0; */ GpivPivData *piv_data = NULL; GpivImagePar *image_par = g_new0 (GpivImagePar, 1);; GpivPivPar *piv_par = g_new0 (GpivPivPar, 1); /* *Initializing parameters * General */ gpiv_img_parameters_set (image_par, FALSE); gpiv_piv_parameters_set (piv_par, FALSE); command_args (argc, argv, fname_in); make_fname (fname_in, fname_header); /* * Reads image header data from file.h and/or resource files * if not overridden by the commandline options */ gpiv_scan_parameter ("", fname_header, image_par, print_par); gpiv_scan_parameter ("", PARFILE, image_par, print_par); if ((err_msg = gpiv_scan_resourcefiles(GPIV_IMGPAR_KEY, image_par, print_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); /* * Reads piv parameters from PARFILE and/or resource files * if not overridden by the commandline options */ gpiv_scan_parameter (GPIV_PIVPAR_KEY, PARFILE, piv_par, print_par); if ((err_msg = gpiv_scan_resourcefiles (GPIV_PIVPAR_KEY, piv_par, print_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); /* * Check if all parameters have been read */ /* gpiv_img_check_header_read(GPIV_IMAGE_PAR_KEY); */ if ((err_msg = gpiv_piv_check_parameters_read (piv_par, NULL)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); /* * As piv_data.nx and piv_data.ny are not known, the input data file will * first be read */ if ((fp = fopen (fname_in, "r")) == NULL) { gpiv_error ("%s: failing opening %s", argv[0], fname_in); } if ((piv_data = gpiv_read_pivdata (fp)) == NULL) { gpiv_error ("%s: failing gpiv_fread_pivdata", argv[0]); } fclose (fp); /* * plotting with gnuplot */ gpiv_piv_gnuplot (strtok (g_strdup (fname_in), "."), scale, GNUPLOT_DISPLAY_COLOR, GNUPLOT_DISPLAY_SIZE, image_par, piv_par, piv_data); /* * Freeing allocated memory of matrices */ gpiv_free_pivdata (piv_data); exit (0); } gpivtools-0.6.0/src/misc/t-avg.pl0000644000175000017500000002347410402304764013573 00000000000000#!/usr/bin/perl -w # t-avg - Calculates statistics of a **series** of piv data. # # Copyright (C) 2002 Gerber van der Graaf # This program 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, 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. #------------------------------------------------------------------ $VERSION = q$Id: t-avg.pl,v 1.6 2006/03/04 12:37:08 gerber Exp $; $HELP = "Calculates time-avaraged mean and rms from a **series** of piv data"; $USAGE = "gpiv_t-avg [-h|-help] [-n|-none] [-p|-print] [-relrms] [-uv] [-v|-version] [-dn|dir_name] [-fd|-first_dir N] [-ld|-last_dir N] [-dx|dir_prefix] [-fb|-file_basename] [-fext|-file_extension] [-ff|-first_file N] [-fl|-last_file N] [-fx|file_prefix] keys: -h: on-line help -n: suppresses real execution -p: prints process parameters/variables to stdout -relrms: prints relative rms, related to the absolute mean value -uv: writes u and v values to separate outputs -v: prints version -dn: directory name to be processed -df: starting at first directory number N -dl: ending at last directory number N -dx: prefix numbering to directory base name -fb: file base name to be processed -fext: add an extension after the file basename + number (without leading \".\") -ff: starting at first file number N -fl: ending at last file number N -fx: prefix numbering to file base name "; #----------------- Command arguments handling ---------- $opt_h = 0; $opt_n = 0; $opt_p = 0; $opt_uv = 0; $opt_relrms = 0; $opt_v = 0; $opt_dx = 0; $opt_fx = 0; use Getopt::Long; GetOptions('h|help', 'n|none', 'p|print', 'v|version', 'relrms', 'uv', 'dx|dir_prefix', 'fx|file_prefix', 'fb|file_basename=s' => \$file_base_name, 'fext|file_extension=s' => \$file_ext, 'ff|first_file=i' => \$file_first_nr, 'fl|last_file=i' => \$file_last_nr, 'dn|dir_name=s' => \$dir_base_name, 'df|dir_first=i' => \$dir_first_nr, 'dl|dir_last=i' => \$dir_last_nr); if ($opt_h) { print ("$HELP\n"); print ("$USAGE\n"); exit; } if ($opt_v) { print ("$VERSION\n"); exit; } if ($#ARGV != -1) { print ("Usage: $USAGE\n"); exit; } #---------------------------------------------------- Initializing variables $first = 1; $k = 0; if (!$file_base_name) {$file_base_name = "";} if (!$file_first_nr) {$file_first_nr = 0;} # First data set to be scanned if (!$file_last_nr) {$file_last_nr = 2; } # Last data set to be scanned if (!$dir_base_name) { $dir_base_name_defined = 0; $dir_base_name = "./"; } else { $dir_base_name_defined = 1; } if (!$dir_first_nr) {$dir_first_nr = 0;} if (!$dir_last_nr) {$dir_last_nr = 0;} if ($opt_uv) { if ($file_ext) { $outfile_A = $dir_base_name.$file_base_name.".ta_U".".$file_ext".".piv"; $outfile_B = $dir_base_name.$file_base_name.".ta_V".".$file_ext".".piv"; } else { $outfile_A = $dir_base_name.$file_base_name.".ta_U.piv"; $outfile_B = $dir_base_name.$file_base_name.".ta_V.piv"; } } else { if ($file_ext) { $outfile_A = $dir_base_name.$file_base_name.".ta_mean".".$file_ext".".piv"; $outfile_B = $dir_base_name.$file_base_name.".ta_sdev".".$file_ext".".piv"; } else { $outfile_A = $dir_base_name.$file_base_name.".ta_mean.piv"; $outfile_B = $dir_base_name.$file_base_name.".ta_sdev.piv"; } } if ($opt_n || ($file_base_name && $opt_p)) { print ("\nfile_base_name=$file_base_name file_first_nr=$file_first_nr file_last_nr=$file_last_nr\n"); } if ($opt_n || ($dir_base_name && $opt_p)) { print ("\ndir_base_name=$dir_base_name dir_nr_first=$dir_first_nr dir_nr_last=$dir_last_nr\n"); } #--------------------------------------------- Print filenames if ($opt_p || $opt_n) { printf ("Output: %s\n", $file_name); if ($opt_uv) { printf ("Data U-file: %s\n", $outfile_A); printf ("Data V-file: %s\n", $outfile_B); } else { printf ("Data mean file: %s\n", $outfile_A); printf ("Data svar file: %s\n", $outfile_B); } } #---------------------------------------- loops for directory and data sets: for ($dir_nr = $dir_first_nr; $dir_nr <= $dir_last_nr; $dir_nr++) { if ($dir_base_name_defined) { if (!$opt_dx) { $target_dir = $dir_base_name.$dir_nr."/"; } else { $target_dir = $dir_nr.$dir_base_name."/"; } } else { $target_dir = $dir_base_name; } if ($opt_p || $opt_n) { printf ("\ntarget_dir[%d] = %s\n", $dir_nr, $target_dir); } for ($file_nr = $file_first_nr; $file_nr <= $file_last_nr; $file_nr++) { if (!$opt_fx) { #print ("append\n"); $file_name=$target_dir.$file_base_name.$file_nr; if ($file_ext) {$file_name=$file_name.".$file_ext"}; } else { #print ("prefix\n"); $file_name=$target_dir.$file_nr.$file_base_name; if ($file_ext) {$file_name=$file_name.".$file_ext"}; } $file_name_piv = $file_name.".piv"; $infile = $file_name_piv; #--------------------------------------------- Print input filename if ($opt_p || $opt_n) { printf ("Data piv file: %s\n", $file_name_piv); } if (!$opt_n) { open (IN,"$infile") || die 'can\'t open $infile'; #----------------------------------------- Starts reading the lines with data while () { chomp; #---------------------------------- skip blank lines or ; sign at first col if ($_ ne "" && (!/^(\#|;)/)) { #------------------------------------ substitutes eventually komma's by dot #------------------------------ for example at LaVision's PIV program DaVis s/,/./g; #---------------------------------------- removes eventually leading spaces s/^ *//; #------------------- splitting line $_ up in words; #same as @words = split @words = split(/\s+/,$_); #------------ As the total number of data is unknown in forward, the variables # are set to zero when the first data set is scanned. Provided all data sets # will have the same number (and positions!!) if ($first) { $total_dx[$k] = 0; $total_dy[$k] = 0; $total_dx_2[$k] = 0; $total_dy_2[$k] = 0; $count[$k] = 0; } $x_pos[$k] = $words[0]; $y_pos[$k] = $words[1]; $dx[$k] = $words[2]; $dy[$k] = $words[3]; $snr[$k] = $words[4]; $peak_nr[$k] = $words[5]; # to avoid warning message $snr is used twice $snr[$k] = 0.0; #------------------------------------------------ Take sum and sum of squares if ($peak_nr[$k] != -1) { $total_dx[$k] += $dx[$k]; $total_dy[$k] += $dy[$k]; $total_dx_2[$k] += $dx[$k]**2; $total_dy_2[$k] += $dy[$k]**2; $count[$k]++; } $k++; } } if ($first) { $ndata = $k; if ($opt_p ) { printf ("\ndata = %d\n", $ndata); } $first = 0; } $k = 0; close (IN) || die 'can\'t close $infile'; } } } #-------------------------------------- Calculating mean and rms or variances if (!$opt_n) { for ($k=0; $k < $ndata; $k++) { if ($count[$k] > 1) { $mean_x[$k]= $total_dx[$k]/$count[$k]; $svar_x[$k]= sqrt(($total_dx_2[$k]/($count[$k]-1) - $total_dx[$k]**2 / ($count[$k]*($count[$k]-1)))); $mean_y[$k]= $total_dy[$k]/$count[$k]; $svar_y[$k]= sqrt(($total_dy_2[$k]/($count[$k]-1) - $total_dy[$k]**2 / ($count[$k]*($count[$k]-1)))); } else { $mean_x[$k] = $k; $svar_x[$k] = 0.; $mean_y[$k] = $k; $svar_y[$k] = 0.; $count[$k] = -1; } $mean_xy[$k] = sqrt(($mean_x[$k]**2 + $mean_y[$k]**2)); $svar_xy[$k] = sqrt(($svar_x[$k]**2 + $svar_y[$k]**2)); } #----------------------------------------------------------- Writing results open (OUT_A,">$outfile_A") || die 'can\'t open $outfile_A'; open (OUT_B,">$outfile_B") || die 'can\'t open $outfile_B'; if ($opt_uv) { printf(OUT_A "#$VERSION"); printf(OUT_A "\n# x y x_mean x_sdev count"); printf(OUT_B "#$VERSION"); printf(OUT_B "\n# x y y_mean y_sdev count"); for ($k=0; $k < $ndata; $k++) { printf(OUT_A "\n%-f %-f %-f %-f %-f %-2d", $x_pos[$k], $y_pos[$k], $mean_x[$k], $svar_x[$k], $count[$k]); printf(OUT_B "\n%-f %-f %-f %-f %-f %-2d", $x_pos[$k], $y_pos[$k], $mean_y[$k], $svar_y[$k], $count[$k]); } } elsif ($opt_relrms) { printf(OUT_A "#$VERSION"); printf(OUT_A "\n# x y x_mean y_mean sdev/mean count"); printf(OUT_B "#$VERSION"); printf(OUT_B "\n# x y x_sdev y_sdev sdev sdev/mean count"); for ($k=0; $k < $ndata; $k++) { printf(OUT_A "\n%f %f %f %f %f %d", $x_pos[$k], $y_pos[$k], $mean_x[$k], $mean_y[$k], # $mean_xy[$k], $svar_xy[$k] / $mean_xy[$k], $count[$k]); printf(OUT_B "\n%f %f %f %f %f %f %d", $x_pos[$k], $y_pos[$k], $svar_x[$k], $svar_y[$k], $svar_xy[$k], $svar_xy[$k] / $mean_xy[$k], $count[$k]); } } else { printf(OUT_A "#$VERSION"); printf(OUT_A "\n# x y x_mean y_mean sdev count"); printf(OUT_B "#$VERSION"); printf(OUT_B "\n# x y x_sdev y_sdev sdev count"); for ($k=0; $k < $ndata; $k++) { printf(OUT_A "\n%-f %-f %-f %-f %-f %-2d", $x_pos[$k], $y_pos[$k], $mean_x[$k], $mean_y[$k], $svar_xy[$k], $count[$k]); printf(OUT_B "\n%-f %-f %-f %-f %-f %-2d", $x_pos[$k], $y_pos[$k], $svar_x[$k], $svar_y[$k], $svar_xy[$k], $count[$k]); } } close (OUT_A) || die 'can\'t close $outfile'; close (OUT_B) || die 'can\'t close $outfile'; } # # Thats all folks. # gpivtools-0.6.0/src/misc/process-chain.pl0000644000175000017500000002060010557402056015303 00000000000000#!/usr/bin/perl -w # process-chain - A complete process chain on a single image in tif/bmp # format using gpiv tools resulting into estimated PIV velocities # or its derivatives. # # Copyright (C) 2002 Gerber van der Graaf # This program 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, 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. #-------------------------------------------------------------------- $VERSION = q$Id: process-chain.pl,v 1.7 2007-01-29 14:26:54 gerber Exp $; $HELP = "Processes a pipe of Gpiv-tool commands"; $USAGE = "gpiv_process-chain [-h|-help] [-n|-none] [-af] [-c|-clean] [-fik] [-p|-print] [proc_*] [-v|-version] filename keys: -af string: append string to file_basename -c: removes raw image data and header -fik: use fi-keyline for filtering gpiv parms from README -h: this on-line help -n: suppresses real execution -p: prints process commands to stdout -pf string prepend string to file-base name -proc_* defines processes to be included in the chain (recimg, valid, scale, manipiv, flipx, flipy, revert, rot90, rot180 and vorty or nstrain or sstrain). Proc_vorty, proc_nstrain and proc_sstrain not in combination with .gpi input file. -v: prints version filename input image filename. Format may be: .r, .gpi (hdf), .IMG (davis), png, gif, tif or bmp "; #----------------- Command line arguments handling ---------- ##$opt_a = 0; ## $opt_c = 0; $opt_fik = 0; $opt_h = 0; $opt_n = 0; $opt_p = 0; $opt_v = 0; $opt_proc_recimg = 0; $opt_proc_valid = 0; $opt_proc_scale = 0; $opt_proc_manipiv = 0; $opt_proc_flipx = 0; $opt_proc_flipy = 0; $opt_proc_revert = 0; $opt_proc_rot90 = 0; $opt_proc_rot180 = 0; $opt_proc_vorty = 0; $opt_proc_nstrain = 0; $opt_proc_sstrain = 0; #$post_spatial_scale = 0.0; # [mm/px] #$post_time_scale = .0; # [s] #$post_zero_offx = 0.0; # [mm] #$post_zero_offy = 0.0; # [mm] use Getopt::Long; ##$result = GetOptions('h|help', 'n|none', 'p|print', 'v|version', 'c|clean', 'af=s' => \$append_fname, 't=s' => \$img_format, 'pf=s' => \$prepend_fname, 'fik', 'proc_recimg', 'proc_valid', 'proc_scale', 'proc_manipiv', 'proc_flipx', 'proc_flipy', 'proc_revert', 'proc_rot90', 'proc_rot180', 'proc_vorty', 'proc_nstrain', 'proc_sstrain' ); if ($opt_h) { print ("$HELP\n"); print ("$USAGE\n"); exit; } if ($opt_v) { print ("$VERSION\n"); exit; } #printf ("argc = $#ARGV\n"); if ($#ARGV == 0) { # ------------- splitting $filename up $use_stdin_stdout = 0; $filename = shift (@ARGV); } elsif ($#ARGV == -1) { #BUGFIX: TODO: $use_stdin_stdout = 1; # if ($opt_p || $opt_n) {print ("using STDIN/STDOUT\n");} printf ("\nUsage: $USAGE\n"); exit; } else { printf ("\nUsage: $USAGE\n"); exit; } # exit; sub FileExt { #--------------- extracts file extension from a full filename my ($file_base_name, $file_extension); @file_fields = split(/\./,$_[0]); $file_extension = pop @file_fields; $file_base_name = join(".", @file_fields); return $file_extension; } sub FileBase { #--------------- extracts file basename from a full filename my ($file_base_name, $file_extension); @file_fields = split(/\./,$_[0]); pop @file_fields; $file_base_name = join(".", @file_fields); return $file_base_name; } #---------------------------------------------------- Intializing variables $file_basename = FileBase($filename); $img_format = FileExt($filename); if ($opt_p || $opt_n) { print("file_basename = $file_basename img_format = $img_format\n"); } if ($opt_proc_vorty && $opt_proc_nstrain || $opt_proc_vorty && $opt_proc_sstrain || $opt_proc_sstrain && $opt_proc_nstrain) { print ("Only one of the processes proc_vorty, proc_sstrain or proc_nstrain may be enabled\n"); exit; } if (($img_format && $img_format =~ "gpi") && $opt_proc_vorty || ($img_format && $img_format =~ "gpi") && $opt_proc_sstrain || ($img_format && $img_format =~ "gpi") && $opt_proc_nstrain) { print ("proc_vorty, proc_sstrain or proc_nstrain may no be enabled in combination with -t hdf\n"); exit; } # ----------------- Default pars and Initial variables if ($use_stdin_stdout == 0) { if ($append_fname) { $out_basefile = $file_basename.$append_fname; } if ($prepend_fname) { @words = split(/\//, $file_basename); #splitting line $_ up in words #printf("nwords = $#words\n"); for ($i=0; $i <= $#words; $i = $i+1) { #printf("words[$i] = $words[$i]\n"); } $words[$#words] = $prepend_fname.$words[$#words]; #printf("words[$#words] = $words[$#words]\n"); $out_basefile = join("/", @words); #$prepend_fname.$file_basename; #printf("out_basefile = $out_basefile\n"); } if ($append_fname || $prepend_fname) { $parfile = $out_basefile.".par"; if ($opt_proc_vorty) { $out_file = $out_basefile.".vor"; } elsif ($opt_proc_nstrain) { $out_file = $out_basefile.".nstr"; } elsif ($opt_proc_sstrain) { $out_file = $out_basefile.".sstr"; } else { $out_file = $out_basefile.".piv"; } } else { $parfile = $file_basename.".par"; if ($opt_proc_vorty) { $out_file = $file_basename.".vor"; } elsif ($opt_proc_nstrain) { $out_file = $file_basename.".nstr"; } elsif ($opt_proc_sstrain) { $out_file = $file_basename.".sstr"; } else { $out_file = $file_basename.".piv"; } } # ----------------- gpivtools image conversion program names $fi_keyline = "gpiv_fi-keyline"; # ----------------- Filter parameters from README if ($opt_fik) { @words = split(/\//, $file_basename); #splitting line $_ up in words $keyword = $words[$#words - 1]; $keyword = $keyword.">>"; @args=("$fi_keyline -if README -of gpivrc \"$keyword\""); if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} } } # ----------------- Creating chain and execute # $out_file $CMD = ""; if ($opt_proc_recimg) { $CMD = "gpiv_recimg "; $CMD = $CMD."| gpiv_rr "; } else { if ($use_stdin_stdout == 1) { $CMD = "gpiv_rr < "; #STDIN } else { $CMD = "gpiv_rr < $filename "; } } if ($opt_proc_valid) {$CMD = $CMD."| gpiv_errvec ";} if ($opt_proc_scale) {$CMD = $CMD."| gpiv_scale ";} if ($opt_proc_manipiv) {$CMD = $CMD."| gpiv_manipiv ";} if ($opt_proc_flipx) {$CMD = $CMD."| gpivflipx ";} if ($opt_proc_flipy) {$CMD = $CMD."| gpiv_flipy ";} if ($opt_proc_revert) {$CMD = $CMD."| gpiv_revert ";} if ($opt_proc_rot90) {$CMD = $CMD."| gpiv_rot90 ";} if ($opt_proc_rot180) {$CMD = $CMD."| gpiv_rot180 ";} if ($opt_proc_vorty) {$CMD = $CMD."| gpiv_vorty ";} if ($opt_proc_nstrain) {$CMD = $CMD."| gpiv_nstrain ";} if ($opt_proc_sstrain) {$CMD = $CMD."| gpiv_sstrain ";} if ($use_stdin_stdout == 1) { $CMD = $CMD." > "; #STDOUT } else { $CMD = $CMD." > $out_file"; } #@args=("$eval < $file_basename.png | $valid | $post1 | $post2 > $out_file"); @args=($CMD); if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} # ----------------- Save the pararameters # @args=("cp gpivrc $parfile"); # if ($opt_p || $opt_n) {printf ("@args \n");} # if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} if ($img_format && $img_format =~ "gpi") { @args=("piv2hdf -i $file_basename.piv"); if ($opt_p || $opt_n) {printf ("@args \n");} if (!$opt_n) {system (@args) == 0 || die "system @args failed: $?";} } #------------------------------------------------------------------------------ # # that's all folks! # gpivtools-0.6.0/src/misc/t-corr.c0000644000175000017500000003237411073414772013577 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*----------------------------------------------------------------------------- t-corr - calculates the velocity correlation as function of time (Eulerian correlation) from a series PIV data sets Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. -----------------------------------------------------------------------------*/ #include #include #include #include #include /* #define PARFILE "scale.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define MAX_PIVSETS 1000 /* Maximum number of PIV data sets */ #define MIN_SAMPLES 20 /* Minimum number of samples used for estimation */ #define USAGE "\ Usage: t-corr [-h | --help] [-p | --print] [-v | --version] \n\ [-f | --file_first N] [-l | --file_last N] [-x | --point_x F] \n\ [-y | --point_y F] file_basename\n\ \n\ keys: \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -v | --version: version number \n\ -f | --file_first N First file number of the series (default: 0) \n\ -l | --file_last N Last file number of the series (default: 0) \n\ -x | --point_x F x-position of data set to be analysed (default: 0.0) \n\ -y | --point_y F y-position of data set to be analysed (default: 0.0) \n\ file_basename File basename of a numbered series of PIV data sets \n\ " #define HELP "\ t-corr - calculates the Eulerian correlation from a series of PIV data sets" #define RCSID "$Id: t-corr.c,v 1.6 2008-09-25 13:08:34 gerber Exp $" gboolean print_par = FALSE; typedef struct _TimeCorrPar TimeCorrPar; struct _TimeCorrPar { gint first_file; gint last_file; gboolean first_file__set; gboolean last_file__set; gfloat point_x; gfloat point_y; gboolean point_x__set; gboolean point_y__set; }; void command_args(int argc, char *argv[], char fname[GPIV_MAX_CHARS], TimeCorrPar *time_corr_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c = '\0'; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ argc_next = 0; while (argc_next == 0 && (c = *++argv[0])) switch (c) { case 'v': printf("%s\n", RCSID); exit(0); break; case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); exit(0); break; case 'p': print_par = TRUE; break; /* * First file number N of the series (default: 0) */ case 'f': time_corr_par->first_file = atoi(*++argv); time_corr_par->first_file__set = TRUE; argc_next = 1; --argc; break; /* * Last file number N of the series (default: 0) */ case 'l': time_corr_par->last_file = atoi(*++argv); time_corr_par->last_file__set = TRUE; argc_next = 1; --argc; break; /* * X-position (default: 0.0) */ case 'x': time_corr_par->point_x = atof(*++argv); time_corr_par->point_x__set = TRUE; argc_next = 1; --argc; break; /* * Y-position (default: 0.0) */ case 'y': time_corr_par->point_y = atof(*++argv); time_corr_par->point_y__set = TRUE; argc_next = 1; --argc; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else if (strcmp("-file_first", *argv) == 0) { time_corr_par->first_file = atoi(*++argv); time_corr_par->first_file__set = TRUE; argc_next = 1; --argc; } else if (strcmp("-file_last", *argv) == 0) { time_corr_par->last_file = atoi(*++argv); time_corr_par->last_file__set = TRUE; argc_next = 1; --argc; } else if (strcmp("-point_x", *argv) == 0) { time_corr_par->point_x = atof(*++argv); time_corr_par->point_x__set = TRUE; argc_next = 1; --argc; } else if (strcmp("-point_y", *argv) == 0) { time_corr_par->point_y = atof(*++argv); time_corr_par->point_y__set = TRUE; argc_next = 1; --argc; } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error(USAGE); break; } } if(argc != 1) { gpiv_error("%s: %s", argv[0], USAGE); } strcpy(fname, argv[0]); } void make_fname_out(char *fname, char *fname_out ) /* ---------------------------------------------------------------------------- * define filenames */ { gpiv_io_make_fname(fname, ".tco", fname_out); if (print_par) printf("# Output data file: %s\n",fname_out); } void make_fname_in(char *fname, int number, char *fname_in ) /* ---------------------------------------------------------------------------- * define numbered input filenames */ { #define GPIV_EXT_SCALED_PIV ".sc.piv" /* Extension of scaled piv file name (ASCII format) */ snprintf(fname_in, GPIV_MAX_CHARS, "%s%d%s", fname, number, GPIV_EXT_SCALED_PIV); if (print_par) printf("# Input file: %s\n",fname_in); } static void time_corr_par__set (TimeCorrPar *time_corr_par, gboolean flag ) /* ---------------------------------------------------------------------------- */ { time_corr_par->first_file__set = flag; time_corr_par->last_file__set = flag; time_corr_par->point_x__set = flag; time_corr_par->point_y__set = flag; } int main(int argc, char *argv[] ) /* ---------------------------------------------------------------------------- */ { FILE *fp = NULL; gchar *err_msg = NULL; gchar fname[GPIV_MAX_CHARS], fname_in[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS]; guint i, j, k, l, ndata_sets = 0; gfloat *dx = NULL, *dy = NULL; gint *flag = NULL; gfloat mean_dx = 0.0, mean_dy = 0.0, sdev_dx = 0.0, sdev_dy = 0.0; gint count = 0; gfloat dx_sum = 0.0, dy_sum = 0.0, dx_sum_q = 0.0, dy_sum_q = 0.0; gfloat *corr_dx, *corr_dy; gfloat *dx_sum_cov, *dy_sum_cov; gint *count_cov; GpivPivData *in_data = NULL; TimeCorrPar *time_corr_par = g_new0 (TimeCorrPar, 1);; /* * Default parameter values */ time_corr_par__set (time_corr_par, FALSE); command_args (argc, argv, fname, time_corr_par); make_fname_out (fname, fname_out); if (!time_corr_par->first_file__set) time_corr_par->first_file = 0; if (!time_corr_par->last_file__set) time_corr_par->last_file = 0; /* * Check parameters */ if (time_corr_par->last_file < time_corr_par->first_file || (time_corr_par->last_file - time_corr_par->first_file) > MAX_PIVSETS) { gpiv_error("%s: last_file smaller than first_file or total number of data sets exceeds MAX_PIVSETS=%d", argv[0], MAX_PIVSETS); } if (print_par) { g_message ("first_file = %d", time_corr_par->first_file); g_message ("last_file = %d", time_corr_par->last_file); g_message ("point_x = %f", time_corr_par->point_x); g_message ("point_y = %f", time_corr_par->point_y); } ndata_sets = time_corr_par->last_file - time_corr_par->first_file + 1; gpiv_warning("first_file=%d last_file=%d ndata_sets=%d", time_corr_par->first_file, time_corr_par->last_file, ndata_sets); flag = gpiv_ivector (ndata_sets); dx = gpiv_vector (ndata_sets); dy = gpiv_vector (ndata_sets); /* * Obtaining the data at the sepecified point from all sets */ for (i = 0; i < ndata_sets; i++) { make_fname_in (fname, i + time_corr_par->first_file, fname_in); if (i == 0) { if ((fp = fopen (fname_in, "r")) == NULL) { gpiv_error ("%s: failing opening %s", argv[0], fname_in); } if ((in_data = gpiv_read_pivdata (fp)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } fclose (fp); /* * Filtering specified point */ for (k = 0; k < in_data->ny; k++) { for (l = 0; l < in_data->nx; l++) { if (in_data->point_x[k][l] == time_corr_par->point_x && in_data->point_y[k][l] == time_corr_par->point_y ) { flag[i] = in_data->peak_no[k][l]; dx[i] = in_data->dx[k][l]; dy[i] = in_data->dy[k][l]; } } } } gpiv_free_pivdata (in_data); } /* t_avg() * Calculate mean and variances */ for (i = 0; i < ndata_sets; i++) { if (flag[i] != -1) { count++; dx_sum = dx_sum + dx[i]; dy_sum = dy_sum + dy[i]; dx_sum_q = dx_sum_q + dx[i] * dx[i]; dy_sum_q = dy_sum_q + dy[i] * dy[i]; } } if (count != 0) { mean_dx = dx_sum / count; sdev_dx = sqrt(dx_sum_q / (count - 1) - dx_sum * dx_sum / (count * (count -1))); mean_dy = dy_sum / count; sdev_dy = sqrt(dy_sum_q / (count - 1) - dy_sum * dy_sum / (count * (count -1))); gpiv_warning("t-corr: mean_dx=%f sdev_dx=%f", mean_dx, sdev_dx); gpiv_warning("t-corr: mean_dy=%f sdev_dy=%f", mean_dy, sdev_dy); } else { gpiv_warning("t-corr: count equal to zero"); } /* t_corr() * Calculate correlation */ if (count != 0) { count_cov = gpiv_ivector(ndata_sets); dx_sum_cov = gpiv_vector(ndata_sets); dy_sum_cov = gpiv_vector(ndata_sets); corr_dx = gpiv_vector(ndata_sets); corr_dy = gpiv_vector(ndata_sets); for (i = 0; i < ndata_sets; i++) { for (j = 0; j <= i; j++) { if (flag[i] != -1 && flag[j] != -1) { /* g_message("i=%d j=%d cor[%d] =>dx[%d]=%f * dx[%d]=%f", */ /* i, j, */ /* i - j, */ /* i, dx[i] - mean_dx, */ /* j, dx[j] - mean_dx */ /* ); */ count_cov[i-j]++; dx_sum_cov[i-j] = dx_sum_cov[i-j] + (dx[i] - mean_dx) * (dx[j] - mean_dx); dy_sum_cov[i-j] = dy_sum_cov[i-j] + (dy[i] - mean_dy) * (dy[j] - mean_dy); } } } /* * corr_dx[0] = (2 * sdev_dx * sdev_dx) * corr_dy[0] = (2 * sdev_dy * sdev_dy) */ printf("# i corr_dx\n"); for (i = 0; i < ndata_sets - MIN_SAMPLES; i++) { corr_dx[i] = dx_sum_cov[i] / dx_sum_cov[0] /* * (float) count_cov[i] / (float) ndata_sets */ ; printf("%d %f\n", i, corr_dx[i]); } printf("\n\n# i corr_dy\n"); for (i = 0; i < ndata_sets - MIN_SAMPLES; i++) { corr_dy[i] = dy_sum_cov[i] / dy_sum_cov[0] /* * (float) count_cov[i] / (float) ndata_sets */ ; printf("%d %f\n", i, corr_dy[i]); } gpiv_free_ivector (count_cov); gpiv_free_vector (dx_sum_cov); gpiv_free_vector (dy_sum_cov); gpiv_free_vector (corr_dx); gpiv_free_vector (corr_dy); } gpiv_free_vector (dy); gpiv_free_vector (dx); gpiv_free_ivector (flag); exit (0); } gpivtools-0.6.0/src/post/0000777000175000017500000000000011073421570012324 500000000000000gpivtools-0.6.0/src/post/scale.c0000644000175000017500000002724411073414772013512 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- scale - applies spatial and time scale to PIV data Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ------------------------------------------------------------------------*/ #include #include #include #include /* #define PARFILE "scale.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: scale [ -h | --help] [-p | --print] [-s M | -S M] \n\ [-t dt | -T dt] [-v | --version] [-z px0 py0] [filename] \n\ < stdin > stdout \n\ \n\ keys: \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -s M: spatial scaling with magnifation factor M [mm/px] \n\ -S M: inverse spatial scaling \n\ -t dt: time scaling with dt time between subsequent \n\ recordings [s] \n\ -T dt: inverse time scaling \n\ -v | --version: version number \n\ -z px0 py0: zero offset of image position \n\ filename: input PIV file. Substitutes stdin and stdout \n\ " #ifdef DEBUG #define USAGE_DEBUG "\ Developers version also contains: \n\ [-p_main] \n\ keys: \n\ -p_'function' N; prints data to be generated in the function; the \n\ higher N, the more detailed the output. \n\ For N = 10, err_vec will exit at the end of the function" #endif #define HELP "\ scale applies spatial and time scaling to PIV data" #define RCSID "$Id: scale.c,v 2.14 2008-09-25 13:08:35 gerber Exp $" /* * Global variables */ gboolean use_stdin_stdout = FALSE; gboolean verbose = FALSE; #ifdef DEBUG /* * Variables for development version */ int print_main=0; #endif static void command_args(int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivImagePar *image_par, GpivPostPar *post_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next=0; /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) { switch (c) { case 'v': /* * Use Revision Control System (RCS) for version */ printf("%s\n", RCSID); exit(0); break; case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); #ifdef DEBUG printf ("\n%s\n",USAGE_DEBUG); #endif exit(0); break; /* * Spatial scaling */ case 's': image_par->s_scale = atof(*++argv); image_par->s_scale__set = TRUE; post_par->scale_type = GPIV_SCALE; argc_next = 1; --argc; break; /* * Inverse spatial scaling */ case 'S': image_par->s_scale = atof(*++argv); image_par->s_scale__set = TRUE; post_par->scale_type = GPIV_SCALE_INV; argc_next = 1; --argc; break; /* * Time scaling */ case 't': image_par->t_scale = atof(*++argv); image_par->t_scale__set = TRUE; post_par->scale_type = GPIV_SCALE; argc_next = 1; --argc; break; /* * Inverse time scaling */ case 'T': image_par->t_scale = atof(*++argv); image_par->t_scale__set = TRUE; post_par->scale_type = GPIV_SCALE_INV; argc_next = 1; --argc; break; /* * Zero-offset x0 y0 */ case 'z': image_par->z_off_x = atof(*++argv); image_par->z_off_y = atof(*++argv); image_par->z_off_x__set = TRUE; image_par->z_off_y__set = TRUE; argc_next = 1; --argc; --argc; break; case 'p': #ifdef DEBUG if ((strcmp(*argv,"p_main" ) !=0)) { #endif verbose = TRUE; #ifdef DEBUG } else if (strcmp("p_main",*argv) == 0) { print_main = atoi(*++argv); --argc; argc_next = 1; } #endif /* DEBUG */ break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { verbose = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: fprintf (stderr,USAGE); #ifdef DEBUG printf ("\n%s",USAGE_DEBUG); #endif exit(1); break; } } } /* * Check if filename or stdin /stdout is used */ if (argc == 1) { use_stdin_stdout = FALSE; strcpy (fname, argv[argc - 1]); } else if (argc == 0) { use_stdin_stdout = TRUE; verbose = FALSE; } else { #ifdef DEBUG printf ("\n%s", USAGE_DEBUG); #endif gpiv_error("%s: %s", argv[0], USAGE); } } static gchar * make_fname(char *fname_in, char *fname_header, char *fname_parameter, char *fname_out ) /* --------------------------------------------------------------------------- * function to generate filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup(fname_in); strtok(fname_base, "."); /* * filenames for output PIV data */ gpiv_io_make_fname (fname_base, GPIV_EXT_HEADER, fname_header); if (verbose) printf ("# Image header file: %s\n", fname_header); gpiv_io_make_fname (fname_base, GPIV_EXT_PAR, fname_parameter); if (verbose) printf ("# Parameter file: %s\n", fname_parameter); gpiv_io_make_fname (fname_base, GPIV_EXT_SC, fname_out); if (verbose) printf ("# Output file: %s\n", fname_out); g_free (fname_base); return (err_msg); } int main (int argc, char *argv[] ) /* ---------------------------------------------------------------------------- * Start of the main program */ { char * err_msg = NULL; FILE *fp_par_dat, *fp; char fname_in[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_header[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS]; gboolean var_scale = 0; GpivPivData *piv_data = NULL; GpivImagePar *image_par = g_new (GpivImagePar, 1); GpivPostPar *post_par = g_new (GpivPostPar, 1); gpiv_img_parameters_set(image_par, FALSE); gpiv_post_parameters_set(post_par, FALSE); command_args(argc, argv, fname_in, image_par, post_par); if (verbose) { printf("# %s\n# Command line options:\n", RCSID); gpiv_img_print_parameters (NULL, image_par); gpiv_post_print_parameters (NULL, post_par); } gpiv_scan_parameter(GPIV_POSTPAR_KEY, PARFILE, post_par, verbose); if ((err_msg = gpiv_scan_resourcefiles(GPIV_POSTPAR_KEY, post_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if (use_stdin_stdout == FALSE) { /* * Generating proper filenames */ if ((err_msg = make_fname (fname_in, fname_header, fname_parameter, fname_out)) != NULL) { gpiv_error("%s: Failure calling make_fname", argv[0]); } /* * Prints command line parameters to par-file */ if ((fp_par_dat = fopen (fname_parameter, "a")) == NULL) { gpiv_error("\n%s: failure opening %s for input", argv[0], fname_parameter); } fprintf(fp_par_dat, "\n\n# %s\n# Command line options:\n", argv[0]); gpiv_img_print_parameters(fp_par_dat, image_par); /* * Reading parametes from image header and PARFILE (and writing to data * par-file) */ gpiv_scan_parameter ("", fname_header, image_par, verbose); gpiv_scan_parameter (GPIV_IMGPAR_KEY, PARFILE, image_par, verbose); if ((err_msg = gpiv_scan_resourcefiles(GPIV_IMGPAR_KEY, image_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); gpiv_img_print_parameters (fp_par_dat, image_par); gpiv_post_print_parameters (fp_par_dat, post_par); fclose(fp_par_dat); } else { gpiv_scan_parameter (GPIV_IMGPAR_KEY, PARFILE, image_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_IMGPAR_KEY, image_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } /* * Reading input data */ if (use_stdin_stdout == TRUE) { fp = stdin; } else { if ((fp = fopen (fname_in, "rb")) == NULL) { gpiv_error ("%s: failure opening %s for reading", argv[0], fname_in); } } if ((piv_data = gpiv_read_pivdata (fp)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } if (use_stdin_stdout == FALSE) fclose (fp); /* * Here the function calls of the post-processing; scaling of PIV data */ if (verbose == TRUE) printf("\n"); if (post_par->scale_type == GPIV_SCALE) { if ((err_msg = gpiv_post_scale (piv_data, image_par)) != NULL) { gpiv_error("%s: Failure calling gpiv_post_scale", argv[0]); } var_scale = TRUE; } else if (post_par->scale_type == GPIV_SCALE_INV) { if ((err_msg = gpiv_post_inverse_scale (piv_data, image_par)) != NULL) { gpiv_error("%s: Failure calling gpiv_post_inverse_scale", argv[0]); } var_scale = TRUE; } else { gpiv_error("scale: used unexisting image_par.s_scale__set"); } /* * Adding comment to the data * And writing data to output */ g_free (piv_data->comment); piv_data->comment = g_strdup_printf ("# Software: %s\n", RCSID); piv_data->comment = gpiv_add_datetime_to_comment (piv_data->comment); if (use_stdin_stdout == TRUE) { fp = stdout; } else { if ((fp = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: Failure opening %s for output", argv[0], fname_out); } } if ((err_msg = gpiv_write_pivdata (fp, piv_data, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } if (use_stdin_stdout == FALSE) fclose (fp); if (verbose == TRUE) printf("\n"); exit (0); } gpivtools-0.6.0/src/post/aint.c0000644000175000017500000005641511073414772013360 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- aint - Calculates mean image intensity at each interrogation area Copyright (C) 2006 Gerber van der Graaf This program 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, 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. ------------------------------------------------------------------------*/ #include #include #include #include #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: gpiv_aint [ -h | --help] [-p | --print] [-s | --second]\n\ [-V | --verbose] [-v | --version] filename \n\ \n\ keys: \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -s | --second: obtain averages from second image frame \n\ -V | --verbose: prints data of interrogation area's and resulting mean \n\ -v | --version: version number \n\ filename: image file name \n\ " #define HELP "\ gpiv_aint calculates mean image intensity at each interrogation area" #define RCSID "$Id: aint.c,v 2.5 2008-09-25 13:08:34 gerber Exp $" /* * Extension of filename means: "Interrogation Area Intensity" */ #define AINT_EXT ".ain" /* * Global variables */ gboolean second_image = FALSE; gboolean print_par = FALSE, verbose = FALSE; #ifdef DEBUG /* * Variables for development version */ int print_main=0; #endif static gboolean assign_img2intarr (gint ipoint_x, gint ipoint_y, guint16 **img_1, guint16 **img_2, gint int_size_f, gint int_size_i, gfloat **int_area_1, gfloat **int_area_2, gint pre_shift_row, gint pre_shift_col, gint nrows, gint ncolumns, gint int_size_0 ); static gboolean assign_img2intarr_central (gint ipoint_x, gint ipoint_y, guint16 **img_1, guint16 **img_2, gint int_size_f, gint int_size_i, gfloat **int_area_1, gfloat **int_area_2, gint pre_shift_row, gint pre_shift_col, gint nrows, gint ncolumns, gint int_size_0 ); static gfloat int_mean (gfloat **int_area, gint int_size ); static void command_args (int argc, char *argv[], char fname[GPIV_MAX_CHARS] ); static char * make_fname (char *fname, char *fname_par, char *fname_piv, char *fname_out ); static GpivScalarData * post_ia_intensity (GpivImage *image, GpivPivData *piv_data, GpivPivPar *piv_par ); static GpivScalarData * post_ia_intensity (GpivImage *image, GpivPivData *piv_data, GpivPivPar *piv_par ) /* ---------------------------------------------------------------------------- * Calculates mean image intensity for each I.A. */ { GpivScalarData *sc_data = NULL; gint i = 0, j = 0; gfloat **int_area_1; gfloat **int_area_2; GpivImage *loc_image = NULL; gboolean flag_accept = FALSE; gint pre_shift_col_act = 0, pre_shift_row_act = 0; assert (image->frame1[0] != NULL); assert (image->frame2[0] != NULL); assert (piv_data->point_x != NULL); assert (piv_data->point_y != NULL); assert (piv_data->dx != NULL); assert (piv_data->dy != NULL); assert (piv_data->snr != NULL); assert (piv_data->peak_no != NULL); int_area_1 = gpiv_matrix (piv_par->int_size_f, piv_par->int_size_f); int_area_2 = gpiv_matrix (piv_par->int_size_f, piv_par->int_size_f); sc_data = gpiv_alloc_scdata (piv_data->nx, piv_data->ny); /* * Deform entire image */ if (piv_par->int_scheme == GPIV_IMG_DEFORM) { loc_image = gpiv_cp_img (image); gpiv_imgproc_deform (loc_image, piv_data); } else { loc_image->frame1 = image->frame1; loc_image->frame2 = image->frame2; } /* * For each I.A. obtain image data * Source: gpiv_piv_interr_reg */ if (piv_par->int_scheme == GPIV_ZERO_OFF_CENTRAL || piv_par->int_scheme == GPIV_ZERO_OFF_FORWARD ) { #ifdef DEBUG g_message("post_ia_intensity:: assign_img2intarr_central"); #endif /* DEBUG */ flag_accept = FALSE; pre_shift_col_act = piv_data->dx[i][j] + piv_par->pre_shift_col; pre_shift_row_act = piv_data->dy[i][j] + piv_par->pre_shift_row; for (i = 0; i < piv_data->ny; i++) { for (j = 0; j < piv_data->nx; j++) { flag_accept = assign_img2intarr_central ((int) piv_data->point_x[i][j], (int) piv_data->point_y[i][j], loc_image->frame1, loc_image->frame2, piv_par->int_size_f, piv_par->int_size_f, int_area_1, int_area_2, pre_shift_row_act, pre_shift_col_act, image->header->nrows, image->header->ncolumns, piv_par->int_size_f); /* * Calculate average value and apply to out_data */ sc_data->point_x[i][j] = piv_data->point_x[i][j]; sc_data->point_y[i][j] = piv_data->point_y[i][j]; if (flag_accept) { sc_data->flag[i][j] = 1; if (second_image) { sc_data->scalar[i][j] = int_mean(int_area_2, piv_par->int_size_f); } else { sc_data->scalar[i][j] = int_mean(int_area_1, piv_par->int_size_f); if (verbose) printf("x=%d y=%d mean = %f \n\n", (int)sc_data->point_x[i][j], (int)sc_data->point_x[i][j], sc_data->scalar[i][j]); } } else { sc_data->flag[i][j] = 0; sc_data->scalar[i][j] = 0.0; } } } } else { #ifdef DEBUG g_message("post_ia_intensity:: assign_img2intarr"); #endif /* DEBUG */ flag_accept = FALSE; pre_shift_col_act = piv_par->pre_shift_col; pre_shift_row_act = piv_par->pre_shift_row; for (i = 0; i < piv_data->ny; i++) { for (j = 0; j < piv_data->nx; j++) { flag_accept = assign_img2intarr((int) piv_data->point_x[i][j], (int) piv_data->point_y[i][j], loc_image->frame1, loc_image->frame2, piv_par->int_size_f, piv_par->int_size_f, int_area_1, int_area_2, pre_shift_row_act, pre_shift_col_act, image->header->nrows, image->header->ncolumns, piv_par->int_size_f); /* * Calculate average value and apply to out_data */ sc_data->point_x[i][j] = piv_data->point_x[i][j]; sc_data->point_y[i][j] = piv_data->point_y[i][j]; if (flag_accept) { sc_data->flag[i][j] = 1; if (second_image) { sc_data->scalar[i][j] = int_mean(int_area_2, piv_par->int_size_f); } else { sc_data->scalar[i][j] = int_mean(int_area_1, piv_par->int_size_f); if (verbose) printf("x=%d y=%d mean = %f \n\n", (int)sc_data->point_x[i][j], (int)sc_data->point_x[i][j], sc_data->scalar[i][j]); } } else { sc_data->flag[i][j] = 0; sc_data->scalar[i][j] = 0.0; } } } } /* * Free allocated memory */ gpiv_free_matrix(int_area_1); gpiv_free_matrix(int_area_2); if (piv_par->int_scheme == GPIV_IMG_DEFORM) { gpiv_free_img (loc_image); } return sc_data; } static gboolean assign_img2intarr(gint ipoint_x, gint ipoint_y, guint16 **img_1, guint16 **img_2, gint int_size_f, gint int_size_i, gfloat **int_area_1, gfloat **int_area_2, gint pre_shift_row, gint pre_shift_col, gint nrows, gint ncolumns, gint int_size_0 ) /*----------------------------------------------------------------------------- * Assigns image data to the interrogation area arrays straightforward */ { gint m, n; gint arg_int1_r = ipoint_y - int_size_f / 2 + 1; gint arg_int1_c = ipoint_x - int_size_f / 2 + 1; gint arg_int2_r = ipoint_y - int_size_i / 2 + 1; gint arg_int2_c = ipoint_x - int_size_i / 2 + 1; gboolean flag_valid; #ifdef DEBUG g_message("assign_img2intarr:: 0 arg_int1_r = %d arg_int1_c = %d", arg_int1_r, arg_int1_c); g_message("assign_img2intarr:: 0 arg_int2_r = %d arg_int2_c = %d", arg_int2_r, arg_int2_c); #endif /* DEBUG */ /* * Check if Interrogation Areas are within the image boundaries. * Principally arg_int1_r,c don't have to be tested as * int_size_i >= int_size_f, but has been kept to maintain generallity with the * other assign_img2intarr* functions */ if ((arg_int1_r) >= 0 && (arg_int1_r + int_size_f - 1) < nrows && (arg_int1_c) >= 0 && (arg_int1_c + int_size_f - 1) < ncolumns && (arg_int2_r) >= 0 && (arg_int2_r + int_size_i - 1) < nrows && (arg_int2_c) >= 0 && (arg_int2_c + int_size_i - 1) < ncolumns) { flag_valid = TRUE; } else { flag_valid = FALSE; } #ifdef DEBUG g_message("assign_img2intarr:: 1 flag_valid=%d", flag_valid); #endif /* DEBUG */ if (flag_valid == TRUE) { /* * reset int_area_1, int_area_2 values */ memset(int_area_1[0], 0.0, (sizeof(gfloat)) * int_size_0 * int_size_0); memset(int_area_2[0], 0.0, (sizeof(gfloat)) * int_size_0 * int_size_0); if (verbose) printf("assign_img2intarr: x = %d y = %d", ipoint_x, ipoint_y); for (m = 0; m < int_size_f; m++) { if (verbose) printf("\n"); for (n = 0; n < int_size_f; n++) { int_area_1[m][n] = (float) img_1[m + arg_int1_r][n + arg_int1_c]; if (verbose) printf("%d ", (int) int_area_1[m][n]); } } if (verbose) printf("\n\n"); for (m = 0; m < int_size_i; m++) { for (n = 0; n < int_size_i; n++) { int_area_2[m][n] = (float) img_2[m + arg_int2_r][n + arg_int2_c]; } } } #ifdef DEBUG g_message("assign_img2intarr:: END"); #endif /* DEBUG */ return flag_valid; } static gboolean assign_img2intarr_central(gint ipoint_x, gint ipoint_y, guint16 **img_1, guint16 **img_2, gint int_size_f, gint int_size_i, gfloat **int_area_1, gfloat **int_area_2, gint pre_shift_row, gint pre_shift_col, gint nrows, gint ncolumns, gint int_size_0 ) /*----------------------------------------------------------------------------- * Assigns image data to the interrogation area arrays for central differential * scheme */ { gint m, n; gint idum = gpiv_max((int_size_i - int_size_f) / 2, 0); gint arg_int1_r = ipoint_y - int_size_f / 2 + 1 - pre_shift_row / 2 - pre_shift_row % 2; gint arg_int1_c = ipoint_x - int_size_f / 2 + 1 - pre_shift_col / 2 - pre_shift_col % 2; gint arg_int2_r = ipoint_y - int_size_i / 2 + 1 + pre_shift_row / 2; gint arg_int2_c = ipoint_x - int_size_i / 2 + 1 + pre_shift_col / 2; gboolean flag_valid; #ifdef DEBUG g_message("assign_img2intarr_central:: 0 arg_int1_r = %d arg_int1_c = %d", arg_int1_r, arg_int1_c); g_message("assign_img2intarr_central:: 0 arg_int2_r = %d arg_int2_c = %d", arg_int2_r, arg_int2_c); #endif /* DEBUG */ /* * Check if Interrogation Areas are within the image boundaries. */ if ((arg_int1_r) >= 0 && (arg_int1_r + int_size_f - 1) < nrows && (arg_int1_c) >= 0 && (arg_int1_c + int_size_f - 1) < ncolumns && (arg_int2_r) >= 0 && (arg_int2_r + int_size_i - 1) < nrows && (arg_int2_c) >= 0 && (arg_int2_c + int_size_i - 1) < ncolumns) { flag_valid = TRUE; } else { flag_valid = FALSE; } #ifdef DEBUG g_message("assign_img2intarr_central:: 1 flag_valid=%d", flag_valid); #endif /* DEBUG */ if (flag_valid == TRUE) { /* * reset int_area_1, int_area_2 values */ memset(int_area_1[0], 0.0, (sizeof(gfloat)) * int_size_0 * int_size_0); memset(int_area_2[0], 0.0, (sizeof(gfloat)) * int_size_0 * int_size_0); if (verbose) printf("assign_img2intarr_central: x = %d y = %d", ipoint_x, ipoint_y); for (m = 0; m < int_size_f; m++) { if (verbose) printf("\n"); for (n = 0; n < int_size_f; n++) { int_area_1[m + idum][n + idum] = (float) img_1[m + arg_int1_r][n + arg_int1_c]; if (verbose) printf(" %d ", (int) int_area_1[m][n]); } } if (verbose) printf("\n\n"); for (m = 0; m < int_size_i; m++) { for (n = 0; n < int_size_i; n++) { int_area_2[m][n] = (float) img_2[m + arg_int2_r][n + arg_int2_c]; } } } #ifdef DEBUG g_message("assign_img2intarr_central:: END"); #endif /* DEBUG */ return flag_valid; } static gfloat int_mean(gfloat **int_area, gint int_size ) /* ---------------------------------------------------------------------------- * calculates mean value from interrogation area */ { int m = 0, n = 0; gfloat int_area_sum = 0; gfloat mean = 0.0; for (m = 0; m < int_size; m++) { for (n = 0; n < int_size; n++) { int_area_sum += int_area[m][n]; } } mean = int_area_sum / (int_size * int_size); return mean; } static void command_args (int argc, char *argv[], char fname[GPIV_MAX_CHARS] ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next=0; /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) { switch (c) { case 'v': /* * Use Revision Control System (RCS) for version */ printf ("%s\n", RCSID); exit (0); break; case 'h': printf ("%s\n", argv[0]); printf ("%s\n", HELP); printf ("%s\n", USAGE); exit (0); break; case 'p': print_par = TRUE; break; case 's': second_image = TRUE; break; case 'V': verbose = TRUE; break; /* * long option keys */ case '-': if (strcmp ("-help", *argv) == 0) { printf ("\n%s", argv[0]); printf ("\n%s", HELP); printf ("\n%s", USAGE); exit (0); } else if (strcmp ("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp ("-second", *argv) == 0) { second_image = TRUE; } else if (strcmp ("-verbose", *argv) == 0) { verbose = TRUE; } else if (strcmp ("-version", *argv) == 0) { printf ("%s\n", RCSID); exit (0); } else { gpiv_error ("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: fprintf (stderr, USAGE); exit (1); break; } } } if (argc == 1) { strcpy (fname, *argv); } else { gpiv_error ("%s: %s", argv[0], USAGE); } } static gchar * make_fname (char *fname, char *fname_par, char *fname_piv, char *fname_out ) /* --------------------------------------------------------------------------- * function to generate filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname == NULL ) { err_msg = "make_fname: \"fname == NULL\""; return (err_msg); } fname_base = g_strdup (fname); strtok (fname_base, "."); gpiv_io_make_fname (fname_base, GPIV_EXT_PAR, fname_par); if (print_par) printf("# Parameter file: %s\n",fname_par); gpiv_io_make_fname (fname_base, GPIV_EXT_PIV, fname_piv); if (print_par) printf("# PIV data file: %s\n",fname_piv); gpiv_io_make_fname (fname_base, AINT_EXT, fname_out); if (print_par) printf("# Output file: %s\n",fname_out); g_free (fname_base); return (err_msg); } int main (int argc, char *argv[] ) /* ---------------------------------------------------------------------------- * Start of the main program */ { gchar * err_msg = NULL; FILE *fp, *fp_par; gchar fname[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_par[GPIV_MAX_CHARS], fname_piv[GPIV_MAX_CHARS]; GpivPivPar *piv_par = g_new0 (GpivPivPar, 1); GpivPostPar *post_par = g_new0 (GpivPostPar, 1); GpivImage *image = NULL; GpivPivData *piv_in_data = NULL; GpivScalarData *sc_out_data = NULL; gpiv_piv_parameters_set (piv_par, FALSE); gpiv_post_parameters_set (post_par, FALSE); command_args (argc, argv, fname); /* * Generating proper filenames */ if ((err_msg = make_fname (fname, fname_par, fname_piv, fname_out)) != NULL) { gpiv_error ("%s: Failure calling make_fname", argv[0]); } /* * Prints command line parameters to par-file */ if ((fp_par = fopen (fname_par, "a")) == NULL) { gpiv_error ("\n%s: failure opening %s for input", argv[0], fname_par); } fprintf (fp_par, "\n\n# %s\n# Command line options:\n", RCSID); /* * Reading parametes from PARFILE and (system) resources (and writing to data * par-file) */ gpiv_scan_parameter (GPIV_PIVPAR_KEY, PARFILE, piv_par, print_par); if ((err_msg = gpiv_scan_resourcefiles (GPIV_PIVPAR_KEY, piv_par, print_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); gpiv_piv_print_parameters (fp_par, piv_par); gpiv_scan_parameter (GPIV_POSTPAR_KEY, PARFILE, post_par, print_par); if ((err_msg = gpiv_scan_resourcefiles (GPIV_POSTPAR_KEY, post_par, print_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); gpiv_post_print_parameters (fp_par, post_par); if ((err_msg = gpiv_post_check_parameters_read (post_par, NULL)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); /* * Read input image */ if ((image = gpiv_fread_image (fname)) == NULL) { gpiv_error ("%s: gpiv_fread_image_ni", argv[0]); } /* * Read PIV data for input */ if ((fp = fopen (fname_piv, "rb")) == NULL) { guint nx, ny; fprintf (fp_par, "# WARNING: no PIV data found; particle displacements set to 0"); if (print_par) gpiv_warning ("Particle displacements set to 0"); if ((err_msg = gpiv_piv_count_pivdata_fromimage (image->header, piv_par, &nx, &ny)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if ((piv_in_data = gpiv_piv_gridgen (nx, ny, image->header, piv_par)) == NULL) gpiv_error ("%: %s", argv[0], err_msg); if ((err_msg = gpiv_0_pivdata (piv_in_data)) != NULL) gpiv_error (": %s", argv[0], err_msg); } else { if ((piv_in_data = gpiv_read_pivdata (fp)) == NULL) gpiv_error ("%s: %s", argv[0], err_msg); fclose(fp); } fclose(fp_par); /* * Here the function calls of the post-processing; intensity of * Interrogation Area's */ if (print_par == TRUE) printf ("\n"); if ((sc_out_data = post_ia_intensity (image, piv_in_data, piv_par)) == NULL) gpiv_error ("%s: Failure %s", argv[0], err_msg); /* * And writing to output */ if ((fp = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: failing opening %s", argv[0], fname_out); } if ((err_msg = gpiv_write_scdata (fp, sc_out_data, TRUE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); fclose (fp); /* * Freeing allocated memory */ gpiv_free_pivdata (piv_in_data); gpiv_free_img (image); if (print_par == TRUE) printf ("\n"); exit (0); } gpivtools-0.6.0/src/post/s-avg.c0000644000175000017500000002754111073414772013440 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- Descripion: s-avg - reports spatial global mean velocity and rms error of a PIV data stream. Eventually subtracts mean value from piv the data. Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ------------------------------------------------------------------------*/ #include #include #include #include #include /* #define PARFILE "savg.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: scale [-h | --help] [-p | --print] [-s|-no_s] \n\ [-v | --version] [-z dx dy] [filename] < stdin > stdout \n\ \n\ keys: \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -s: subtracts nothing (0), mean of dx and dy (2) from \n\ displacements or velocity estimators \n\ -no_s: suppresses subtracting mean from input data \n\ -v | --version: prints version \n\ -z dx dy: zero offset of velocities/displacements \n\ filename: input PIV file. Substitutes stdin and stdout \n\ " #ifdef DEBUG #define USAGE_DEBUG "\ Developers version also contains: \n\ [-p_main] \n\ keys: \n\ -p_'function' N; prints data to be generated in the function; the \n\ higher N, the more detailed the output. \n\ For N = 10, err_vec will exit at the end of the function" #endif #define HELP "\ s-avg reports spatial global mean velocity and rms error of a PIV data stream" #define RCSID "$Id: s-avg.c,v 2.14 2008-09-25 13:08:35 gerber Exp $" /* * Global variables */ gboolean use_stdin_stdout = FALSE; gboolean verbose = FALSE; #ifdef DEBUG /* * Variables for development version */ int print_main=0; #endif static void command_args(int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivPostPar * piv_post_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next=0; /* * argc_next is set to 1 if the next cmd line argument has to be * searched for; in case that the command line argument concerns more * than one char or cmd line argument needs a parameter */ while (argc_next==0 && (c = *++argv[0])) { switch (c) { case 'v': /* * Use Revision Control System (RCS) for version */ printf("%s\n", RCSID); exit(0); case 'h': printf("%s\n", argv[0]); printf("%s\n",HELP); printf("%s\n",USAGE); #ifdef DEBUG printf ("\n%s\n",USAGE_DEBUG); #endif exit(0); /* * Spatial scaling */ case 's': piv_post_par->subtract = atoi(*++argv); piv_post_par->subtract__set = TRUE; argc_next = 1; break; case 'p': #ifdef DEBUG if ((strcmp(*argv,"p_main" ) !=0)) { #endif verbose = TRUE; #ifdef DEBUG } else if (strcmp("p_main",*argv) == 0) { print_main=atoi(*++argv); --argc; argc_next=1; } #endif /* DEBUG */ break; case 'z': piv_post_par->z_off_dx = atof(*++argv); piv_post_par->z_off_dy = atof(*++argv); fprintf(stderr, "\n000:: z_off_dx=%f", piv_post_par->z_off_dx); fprintf(stderr, " z_off_dy=%f\n", piv_post_par->z_off_dy); piv_post_par->z_off_dx__set = TRUE; piv_post_par->z_off_dy__set = TRUE; argc_next = 1; --argc; --argc; argc_next = 1; break; /* * negotion of settings */ case 'n': if (strcmp("no_s", *argv) == 0) { /* --- do not subtract mean -*/ piv_post_par->subtract = 0; piv_post_par->subtract__set = TRUE; } break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { verbose = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: fprintf (stderr,USAGE); #ifdef DEBUG printf ("\n%s",USAGE_DEBUG); #endif exit(1); break; } } } /* * Check if filename or stdin /stdout is used */ if (argc == 1) { use_stdin_stdout = FALSE; strcpy(fname, argv[argc - 1]); } else if (argc == 0) { use_stdin_stdout = TRUE; verbose = FALSE; } else { #ifdef DEBUG printf ("\n%s", USAGE_DEBUG); #endif gpiv_error("%s: %s", argv[0], USAGE); } } static gchar * make_fname (char *fname_in, char *fname_parameter, char *fname_out ) /* ---------------------------------------------------------------------------- * function to generate filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup (fname_in); strtok (fname_base, "."); /* * filenames for output PIV data */ gpiv_io_make_fname (fname_base, GPIV_EXT_PAR, fname_parameter); if (verbose) printf ("# Data parameter file: %s\n", fname_parameter); gpiv_io_make_fname (fname_base, GPIV_EXT_SA, fname_out); if (verbose) printf ("# Output file: %s\n", fname_out); return (err_msg); } int main (int argc, char *argv[] ) /*----------------------------------------------------------------------------- */ { gchar *err_msg = NULL; FILE *fp_par_dat, *fp; gchar fname_in[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS]; GpivPivData *piv_data = NULL; GpivPostPar *piv_post_par = g_new (GpivPostPar, 1); gpiv_post_parameters_set (piv_post_par, FALSE); command_args (argc, argv, fname_in, piv_post_par); if (verbose) { printf ("# %s\n# Command line options:\n", RCSID); gpiv_post_print_parameters (NULL, piv_post_par); } /* * Reading parametes from PARFILE and resources * Check parameters on correct values and adjust belonging variables */ gpiv_scan_parameter (GPIV_POSTPAR_KEY, PARFILE, piv_post_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_POSTPAR_KEY, piv_post_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); gpiv_post_check_parameters_read (piv_post_par, NULL); if (use_stdin_stdout == FALSE) { if ((err_msg = make_fname (fname_in, fname_parameter, fname_out)) != NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } /* * Prints parameters to par-file */ if ((fp_par_dat = fopen (fname_parameter, "a")) == NULL) { gpiv_error ("%s: failure opening %s for input\n", argv[0], fname_parameter); } fprintf (fp_par_dat, "# %s\n# Post parameters:\n", argv[0]); gpiv_post_print_parameters (fp_par_dat, piv_post_par); fclose (fp_par_dat); } /* * Reading input file of piv data */ #ifdef DEBUG if (print_main >= 1) fprintf (stderr,"\ncalling (f)gpiv_read_pivdata\n"); #endif if (use_stdin_stdout == TRUE) { fp = stdin; } else { if ((fp = fopen (fname_in, "rb")) == NULL) { gpiv_error ("%s: failure opening %s for reading", argv[0], fname_in); } } if ((piv_data = gpiv_read_pivdata (fp)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } if (use_stdin_stdout == FALSE) fclose (fp); /* * Here the function call of the program body */ if (verbose == TRUE) printf ("\n"); #ifdef DEBUG g_message ("\ncalling gpiv_post_savg\n"); #endif if ((err_msg = gpiv_post_savg (piv_data, piv_post_par)) != NULL) { gpiv_error ("%s: ", argv[0], err_msg); } /* * Adding comment to the data * And writing data to output */ g_free (piv_data->comment); piv_data->comment = g_strdup_printf ("# Software: %s\n", RCSID); piv_data->comment = gpiv_add_datetime_to_comment (piv_data->comment); if (piv_post_par->subtract == TRUE) { if (use_stdin_stdout == TRUE) { fp = stdout; } else { if ((fp = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: failure opening %s for writing", argv[0], fname_out); } } if ((err_msg = gpiv_write_pivdata (fp, piv_data, FALSE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } if (use_stdin_stdout == FALSE) fclose (fp); } else { if (use_stdin_stdout == TRUE) { printf ("# Software: %s\n", RCSID); printf ("# %s\n", gpiv_add_datetime_to_comment (NULL)); printf ("# ndata = %d\n", piv_data->count); printf ("# mean_dx = %f sdev_dx = %f min_dx = %f max_dx = %f\n", piv_data->mean_dx, piv_data->sdev_dx, piv_data->min_dx, piv_data->max_dx); printf ("# mean_dy = %f sdev_dy = %f min_dy = %f max_dy = %f\n", piv_data->mean_dy, piv_data->sdev_dy, piv_data->min_dy, piv_data->max_dy); } else { if ((fp = fopen (fname_out,"wb")) == NULL) { gpiv_error ("\n%s: Failure opening %s for output\n", argv[0], fname_out); } fprintf (fp, "# Software: %s\n", RCSID); fprintf (fp, "# %s\n", gpiv_add_datetime_to_comment (NULL)); fprintf (fp, "# ndata = %d\n", piv_data->count); fprintf (fp, "# mean_dx = %f sdev_dx = %f min_dx = %f max_dx = %f\n", piv_data->mean_dx, piv_data->sdev_dx, piv_data->min_dx, piv_data->max_dx); fprintf (fp, "# mean_dy = %f sdev_dy = %f min_dy = %f max_dy = %f\n", piv_data->mean_dy, piv_data->sdev_dy, piv_data->min_dy, piv_data->max_dy); } } /* * Freeing allocated memory of matrices */ gpiv_free_pivdata (piv_data); if (verbose == TRUE) printf ("\n"); exit (0); } gpivtools-0.6.0/src/post/Makefile.am0000644000175000017500000000174310524052306014276 00000000000000ENABLE_CAM = @ENABLE_CAM@ ENABLE_TRIG = @ENABLE_TRIG@ RTA_TOPDIR = @RTA_TOPDIR@ K_TOPDIR = @K_TOPDIR@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ bin_PROGRAMS = gpiv_vorstra gpiv_vorty gpiv_sstrain gpiv_nstrain \ gpiv_manipiv gpiv_fasty gpiv_flipx gpiv_flipy \ gpiv_revert gpiv_rot90 gpiv_rot180 gpiv_scale gpiv_s-avg\ gpiv_aint ##EXTRA_DIST = flipx flipy revert rot90 rot180 gpiv_vorstra_SOURCES = vorstra.c gpiv_vorty_SOURCES = vorstra.c gpiv_nstrain_SOURCES = vorstra.c gpiv_sstrain_SOURCES = vorstra.c gpiv_manipiv_SOURCES = manipiv.c gpiv_fasty_SOURCES = manipiv.c gpiv_flipx_SOURCES = manipiv.c gpiv_flipy_SOURCES = manipiv.c gpiv_revert_SOURCES = manipiv.c gpiv_rot90_SOURCES = manipiv.c gpiv_rot180_SOURCES = manipiv.c gpiv_scale_SOURCES = scale.c gpiv_s_avg_SOURCES = s-avg.c gpiv_aint_SOURCES = aint.c EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ gpivtools-0.6.0/src/post/Makefile.in0000644000175000017500000004642611073421523014317 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = gpiv_vorstra$(EXEEXT) gpiv_vorty$(EXEEXT) \ gpiv_sstrain$(EXEEXT) gpiv_nstrain$(EXEEXT) \ gpiv_manipiv$(EXEEXT) gpiv_fasty$(EXEEXT) gpiv_flipx$(EXEEXT) \ gpiv_flipy$(EXEEXT) gpiv_revert$(EXEEXT) gpiv_rot90$(EXEEXT) \ gpiv_rot180$(EXEEXT) gpiv_scale$(EXEEXT) gpiv_s-avg$(EXEEXT) \ gpiv_aint$(EXEEXT) subdir = src/post DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gpiv_aint_OBJECTS = aint.$(OBJEXT) gpiv_aint_OBJECTS = $(am_gpiv_aint_OBJECTS) gpiv_aint_LDADD = $(LDADD) gpiv_aint_DEPENDENCIES = am_gpiv_fasty_OBJECTS = manipiv.$(OBJEXT) gpiv_fasty_OBJECTS = $(am_gpiv_fasty_OBJECTS) gpiv_fasty_LDADD = $(LDADD) gpiv_fasty_DEPENDENCIES = am_gpiv_flipx_OBJECTS = manipiv.$(OBJEXT) gpiv_flipx_OBJECTS = $(am_gpiv_flipx_OBJECTS) gpiv_flipx_LDADD = $(LDADD) gpiv_flipx_DEPENDENCIES = am_gpiv_flipy_OBJECTS = manipiv.$(OBJEXT) gpiv_flipy_OBJECTS = $(am_gpiv_flipy_OBJECTS) gpiv_flipy_LDADD = $(LDADD) gpiv_flipy_DEPENDENCIES = am_gpiv_manipiv_OBJECTS = manipiv.$(OBJEXT) gpiv_manipiv_OBJECTS = $(am_gpiv_manipiv_OBJECTS) gpiv_manipiv_LDADD = $(LDADD) gpiv_manipiv_DEPENDENCIES = am_gpiv_nstrain_OBJECTS = vorstra.$(OBJEXT) gpiv_nstrain_OBJECTS = $(am_gpiv_nstrain_OBJECTS) gpiv_nstrain_LDADD = $(LDADD) gpiv_nstrain_DEPENDENCIES = am_gpiv_revert_OBJECTS = manipiv.$(OBJEXT) gpiv_revert_OBJECTS = $(am_gpiv_revert_OBJECTS) gpiv_revert_LDADD = $(LDADD) gpiv_revert_DEPENDENCIES = am_gpiv_rot180_OBJECTS = manipiv.$(OBJEXT) gpiv_rot180_OBJECTS = $(am_gpiv_rot180_OBJECTS) gpiv_rot180_LDADD = $(LDADD) gpiv_rot180_DEPENDENCIES = am_gpiv_rot90_OBJECTS = manipiv.$(OBJEXT) gpiv_rot90_OBJECTS = $(am_gpiv_rot90_OBJECTS) gpiv_rot90_LDADD = $(LDADD) gpiv_rot90_DEPENDENCIES = am_gpiv_s_avg_OBJECTS = s-avg.$(OBJEXT) gpiv_s_avg_OBJECTS = $(am_gpiv_s_avg_OBJECTS) gpiv_s_avg_LDADD = $(LDADD) gpiv_s_avg_DEPENDENCIES = am_gpiv_scale_OBJECTS = scale.$(OBJEXT) gpiv_scale_OBJECTS = $(am_gpiv_scale_OBJECTS) gpiv_scale_LDADD = $(LDADD) gpiv_scale_DEPENDENCIES = am_gpiv_sstrain_OBJECTS = vorstra.$(OBJEXT) gpiv_sstrain_OBJECTS = $(am_gpiv_sstrain_OBJECTS) gpiv_sstrain_LDADD = $(LDADD) gpiv_sstrain_DEPENDENCIES = am_gpiv_vorstra_OBJECTS = vorstra.$(OBJEXT) gpiv_vorstra_OBJECTS = $(am_gpiv_vorstra_OBJECTS) gpiv_vorstra_LDADD = $(LDADD) gpiv_vorstra_DEPENDENCIES = am_gpiv_vorty_OBJECTS = vorstra.$(OBJEXT) gpiv_vorty_OBJECTS = $(am_gpiv_vorty_OBJECTS) gpiv_vorty_LDADD = $(LDADD) gpiv_vorty_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gpiv_aint_SOURCES) $(gpiv_fasty_SOURCES) \ $(gpiv_flipx_SOURCES) $(gpiv_flipy_SOURCES) \ $(gpiv_manipiv_SOURCES) $(gpiv_nstrain_SOURCES) \ $(gpiv_revert_SOURCES) $(gpiv_rot180_SOURCES) \ $(gpiv_rot90_SOURCES) $(gpiv_s_avg_SOURCES) \ $(gpiv_scale_SOURCES) $(gpiv_sstrain_SOURCES) \ $(gpiv_vorstra_SOURCES) $(gpiv_vorty_SOURCES) DIST_SOURCES = $(gpiv_aint_SOURCES) $(gpiv_fasty_SOURCES) \ $(gpiv_flipx_SOURCES) $(gpiv_flipy_SOURCES) \ $(gpiv_manipiv_SOURCES) $(gpiv_nstrain_SOURCES) \ $(gpiv_revert_SOURCES) $(gpiv_rot180_SOURCES) \ $(gpiv_rot90_SOURCES) $(gpiv_s_avg_SOURCES) \ $(gpiv_scale_SOURCES) $(gpiv_sstrain_SOURCES) \ $(gpiv_vorstra_SOURCES) $(gpiv_vorty_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ gpiv_vorstra_SOURCES = vorstra.c gpiv_vorty_SOURCES = vorstra.c gpiv_nstrain_SOURCES = vorstra.c gpiv_sstrain_SOURCES = vorstra.c gpiv_manipiv_SOURCES = manipiv.c gpiv_fasty_SOURCES = manipiv.c gpiv_flipx_SOURCES = manipiv.c gpiv_flipy_SOURCES = manipiv.c gpiv_revert_SOURCES = manipiv.c gpiv_rot90_SOURCES = manipiv.c gpiv_rot180_SOURCES = manipiv.c gpiv_scale_SOURCES = scale.c gpiv_s_avg_SOURCES = s-avg.c gpiv_aint_SOURCES = aint.c EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/post/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/post/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gpiv_aint$(EXEEXT): $(gpiv_aint_OBJECTS) $(gpiv_aint_DEPENDENCIES) @rm -f gpiv_aint$(EXEEXT) $(LINK) $(gpiv_aint_LDFLAGS) $(gpiv_aint_OBJECTS) $(gpiv_aint_LDADD) $(LIBS) gpiv_fasty$(EXEEXT): $(gpiv_fasty_OBJECTS) $(gpiv_fasty_DEPENDENCIES) @rm -f gpiv_fasty$(EXEEXT) $(LINK) $(gpiv_fasty_LDFLAGS) $(gpiv_fasty_OBJECTS) $(gpiv_fasty_LDADD) $(LIBS) gpiv_flipx$(EXEEXT): $(gpiv_flipx_OBJECTS) $(gpiv_flipx_DEPENDENCIES) @rm -f gpiv_flipx$(EXEEXT) $(LINK) $(gpiv_flipx_LDFLAGS) $(gpiv_flipx_OBJECTS) $(gpiv_flipx_LDADD) $(LIBS) gpiv_flipy$(EXEEXT): $(gpiv_flipy_OBJECTS) $(gpiv_flipy_DEPENDENCIES) @rm -f gpiv_flipy$(EXEEXT) $(LINK) $(gpiv_flipy_LDFLAGS) $(gpiv_flipy_OBJECTS) $(gpiv_flipy_LDADD) $(LIBS) gpiv_manipiv$(EXEEXT): $(gpiv_manipiv_OBJECTS) $(gpiv_manipiv_DEPENDENCIES) @rm -f gpiv_manipiv$(EXEEXT) $(LINK) $(gpiv_manipiv_LDFLAGS) $(gpiv_manipiv_OBJECTS) $(gpiv_manipiv_LDADD) $(LIBS) gpiv_nstrain$(EXEEXT): $(gpiv_nstrain_OBJECTS) $(gpiv_nstrain_DEPENDENCIES) @rm -f gpiv_nstrain$(EXEEXT) $(LINK) $(gpiv_nstrain_LDFLAGS) $(gpiv_nstrain_OBJECTS) $(gpiv_nstrain_LDADD) $(LIBS) gpiv_revert$(EXEEXT): $(gpiv_revert_OBJECTS) $(gpiv_revert_DEPENDENCIES) @rm -f gpiv_revert$(EXEEXT) $(LINK) $(gpiv_revert_LDFLAGS) $(gpiv_revert_OBJECTS) $(gpiv_revert_LDADD) $(LIBS) gpiv_rot180$(EXEEXT): $(gpiv_rot180_OBJECTS) $(gpiv_rot180_DEPENDENCIES) @rm -f gpiv_rot180$(EXEEXT) $(LINK) $(gpiv_rot180_LDFLAGS) $(gpiv_rot180_OBJECTS) $(gpiv_rot180_LDADD) $(LIBS) gpiv_rot90$(EXEEXT): $(gpiv_rot90_OBJECTS) $(gpiv_rot90_DEPENDENCIES) @rm -f gpiv_rot90$(EXEEXT) $(LINK) $(gpiv_rot90_LDFLAGS) $(gpiv_rot90_OBJECTS) $(gpiv_rot90_LDADD) $(LIBS) gpiv_s-avg$(EXEEXT): $(gpiv_s_avg_OBJECTS) $(gpiv_s_avg_DEPENDENCIES) @rm -f gpiv_s-avg$(EXEEXT) $(LINK) $(gpiv_s_avg_LDFLAGS) $(gpiv_s_avg_OBJECTS) $(gpiv_s_avg_LDADD) $(LIBS) gpiv_scale$(EXEEXT): $(gpiv_scale_OBJECTS) $(gpiv_scale_DEPENDENCIES) @rm -f gpiv_scale$(EXEEXT) $(LINK) $(gpiv_scale_LDFLAGS) $(gpiv_scale_OBJECTS) $(gpiv_scale_LDADD) $(LIBS) gpiv_sstrain$(EXEEXT): $(gpiv_sstrain_OBJECTS) $(gpiv_sstrain_DEPENDENCIES) @rm -f gpiv_sstrain$(EXEEXT) $(LINK) $(gpiv_sstrain_LDFLAGS) $(gpiv_sstrain_OBJECTS) $(gpiv_sstrain_LDADD) $(LIBS) gpiv_vorstra$(EXEEXT): $(gpiv_vorstra_OBJECTS) $(gpiv_vorstra_DEPENDENCIES) @rm -f gpiv_vorstra$(EXEEXT) $(LINK) $(gpiv_vorstra_LDFLAGS) $(gpiv_vorstra_OBJECTS) $(gpiv_vorstra_LDADD) $(LIBS) gpiv_vorty$(EXEEXT): $(gpiv_vorty_OBJECTS) $(gpiv_vorty_DEPENDENCIES) @rm -f gpiv_vorty$(EXEEXT) $(LINK) $(gpiv_vorty_LDFLAGS) $(gpiv_vorty_OBJECTS) $(gpiv_vorty_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manipiv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s-avg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vorstra.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/src/post/manipiv.c0000644000175000017500000003471311073414772014065 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- manipiv - manipulates (flipping / rotating, etc) PIV data Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ----------------------------------------------------------------------- Flipx; flips data left - right Flipy; flips data up - down ------------------------------------------------------------------------*/ #include #include #include #include /* #define PARFILE "manipiv.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: manipiv | fasty | flipx | flipy | revert | rot90 | rot180 \n\ [-fi x0 y0 x1 y1] [-no_fi | --pass x0 y0 x1 y1] \n\ [-fy] [-h | --help] [-i] [-p | --print] [-r] [--rev] \n\ [-v | --version] [-x] [-y] [filename] < stdin > stdout \n\ \n\ keys: \n\ -fi x0 y0 x1 y1: filters out all data from (x0,y0) to (x1,y1) \n\ -no_fi | --pass x0 y0 x1 y1: passes through the data from (x0,y0) to (x1,y1) \n\ -fy: fast y; returns fast running y-positions of data with \n\ fast running x\n\ -h | --help: this on-line help \n\ -i: interchanges indexes of output data for increasing \n\ order \n\ -p | --print: prints parameters to stdout \n\ -r: rotates over 90 degrees \n\ --rev: reverts array indexes of output data for getting \n\ reversed order \n\ -v | --version: version number \n\ -x: flips data in x-direction (vertical axis) \n\ -y: flips data in y-direction (horizontal axis) \n\ filename: Input PIV data file. Substitutes stdin and stdout\n\ " #ifdef DEBUG #define USAGE_DEBUG "\ Developers version also contains: \n\ [-p_main][-p_median_residu][-p_subst_residu] \n\ [-p_check_residu][-p_residu_statistic] \n\ keys: \n\ -p_'function' N: prints data to be generated in the function; the \n\ higher N, the more detailed the output. \n\ For N = 10, err_vec will exit at the end of the function" #endif #define HELP "\ manipulates order and positions of PIV data, flips in horizontal \n\ or vertical direction and rotates over 90 or 180 degrees" #define RCSID "$Id: manipiv.c,v 2.13 2008-09-25 13:08:34 gerber Exp $" /* * Global variables */ gboolean use_stdin_stdout = FALSE; gboolean verbose = FALSE; #ifdef DEBUG /* * Variables for development version */ int print_main = 0, print_flip = 0, print_fasty = 0, print_fread_pivdata = 0; #endif void command_args(int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivPostPar *piv_post_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next = 0; /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) { switch (c) { case 'v': /* * Use Revision Control System (RCS) for version */ printf("\n%s\n", RCSID); exit(0); break; case 'h': printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); #ifdef DEBUG printf("\n%s\n", USAGE_DEBUG); #endif exit(0); break; case 'r': piv_post_par->operator_manipiv = GPIV_ROT90; piv_post_par->operator_manipiv__set = 1; break; case 'x': piv_post_par->operator_manipiv = GPIV_FLIP_X; piv_post_par->operator_manipiv__set = 1; break; case 'y': piv_post_par->operator_manipiv = GPIV_FLIP_Y; piv_post_par->operator_manipiv__set = 1; break; case 'f': if (strcmp("fy", *argv) != 0 && strcmp("fi", *argv) != 0) { } else if (strcmp("fi", *argv) == 0) { /* * filters block of data from data stream */ piv_post_par->operator_manipiv = GPIV_FILTER_BLOCK; piv_post_par->operator_manipiv__set = 1; piv_post_par->block->x_1 = atoi(*++argv); --argc; piv_post_par->block->y_1 = atoi(*++argv); --argc; piv_post_par->block->x_2 = atoi(*++argv); --argc; piv_post_par->block->y_2 = atoi(*++argv); piv_post_par->block__set = TRUE; --argc; argc_next = 1; } else if (strcmp("fy", *argv) == 0) { piv_post_par->operator_manipiv = GPIV_FAST_Y; piv_post_par->operator_manipiv__set = 1; } break; case 'p': #ifdef DEBUG if ( (strcmp(*argv, "p_main") != 0) && (strcmp(*argv, "p_flip") != 0) && (strcmp(*argv, "p_fasty") != 0) ) { #endif /* DEBUG */ verbose = TRUE; #ifdef DEBUG } else if (strcmp("p_main", *argv) == 0) { print_main = atoi(*++argv); --argc; argc_next = 1; } else if (strcmp("p_flip", *argv) == 0) { print_flip = atoi(*++argv); --argc; argc_next = 1; } else if (strcmp("p_fasty", *argv) == 0) { print_fasty = atoi(*++argv); --argc; argc_next = 1; } else if (strcmp("p_fread_pivdata", *argv) == 0) { print_fread_pivdata = atoi(*++argv); --argc; argc_next = 1; } #endif /* DEBUG */ break; /* * negotion of settings */ case 'n': if (strcmp(*argv, "no_fi") == 0) { piv_post_par->operator_manipiv = GPIV_PASS_BLOCK; piv_post_par->operator_manipiv__set = 1; piv_post_par->block->x_1 = atoi(*++argv); --argc; piv_post_par->block->y_1 = atoi(*++argv); --argc; piv_post_par->block->x_2 = atoi(*++argv); --argc; piv_post_par->block->y_2 = atoi(*++argv); piv_post_par->block__set = TRUE; --argc; argc_next = 1; } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { verbose = TRUE; } else if (strcmp("-rev", *argv) == 0) { /* * reverts indexes of output data for increasing order */ piv_post_par->operator_manipiv = GPIV_REVERT; piv_post_par->operator_manipiv__set = 1; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else if (strcmp("-pass", *argv) == 0) { piv_post_par->operator_manipiv = GPIV_PASS_BLOCK; piv_post_par->operator_manipiv__set = 1; piv_post_par->block->x_1 = atoi(*++argv); --argc; piv_post_par->block->y_1 = atoi(*++argv); --argc; piv_post_par->block->x_2 = atoi(*++argv); --argc; piv_post_par->block->y_2 = atoi(*++argv); piv_post_par->block__set = TRUE; --argc; argc_next = 1; } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error("%s: unknown option: %s", argv[0], *argv); break; } } } /* * Check if filename or stdin / stdout is used */ if (argc == 1) { use_stdin_stdout = FALSE; strcpy(fname, argv[argc - 1]); } else if (argc == 0) { use_stdin_stdout = TRUE; verbose = FALSE; } else { gpiv_error("%s: unknown argument: %s", argv[0], *argv); } } static gchar * make_fname(char *fname_in, char *fname_parameter, char *fname_out ) /*----------------------------------------------------------------------------- * generate filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup(fname_in); strtok(fname_base, "."); /* * filenames for output */ gpiv_io_make_fname(fname_base, GPIV_EXT_PAR, fname_parameter); if (verbose) printf("# Data parameter file: %s\n", fname_parameter); gpiv_io_make_fname(fname_base, GPIV_EXT_MANI, fname_out); if (verbose) printf("# Output file: %s\n", fname_out); return (err_msg); } int main(int argc, char *argv[] ) /*----------------------------------------------------------------------------- */ { gchar *err_msg = NULL, *c = NULL; FILE *fp, *fp_par_dat; gchar fname_out[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS], fname_in_piv[GPIV_MAX_CHARS]; GpivPostPar *piv_post_par = g_new (GpivPostPar, 1); GpivRoi *block = g_new (GpivRoi, 1); GpivPivData *piv_data = NULL; piv_post_par->block = block; gpiv_post_parameters_set (piv_post_par, FALSE); /* * Define GpivOperation type from program name, which is a symbolic link to * gpiv_manipiv */ if ((c = strstr (argv[0], "manipiv")) != NULL) { piv_post_par->operator_manipiv = GPIV_FLIP_X; piv_post_par->operator_manipiv__set = FALSE; } else if ((c = strstr (argv[0], "flipx")) != NULL) { piv_post_par->operator_manipiv = GPIV_FLIP_X; piv_post_par->operator_manipiv__set = TRUE; } else if ((c = strstr (argv[0], "flipy")) != NULL) { piv_post_par->operator_manipiv = GPIV_FLIP_Y; piv_post_par->operator_manipiv__set = TRUE; } else if ((c = strstr (argv[0], "rot180")) != NULL) { piv_post_par->operator_manipiv = GPIV_ROT180; piv_post_par->operator_manipiv__set = TRUE; } else if ((c = strstr (argv[0], "rot90")) != NULL) { piv_post_par->operator_manipiv = GPIV_ROT90; piv_post_par->operator_manipiv__set = TRUE; } else if ((c = strstr (argv[0], "revert")) != NULL) { piv_post_par->operator_manipiv = GPIV_REVERT; piv_post_par->operator_manipiv__set = TRUE; } else if ((c = strstr (argv[0], "fasty")) != NULL) { piv_post_par->operator_manipiv = GPIV_FAST_Y; piv_post_par->operator_manipiv__set = TRUE; } else { gpiv_error("manipiv: unvalid program name or symlink"); } command_args(argc, argv, fname_in_piv, piv_post_par); if (verbose) { printf("# %s\n# Command line options:\n", RCSID); gpiv_post_print_parameters (NULL, piv_post_par); } if (use_stdin_stdout == FALSE) { if ((err_msg = make_fname (fname_in_piv, fname_parameter, fname_out)) != NULL) gpiv_error("%s: Failure calling make_fname", argv[0]); /* * Prints command line parameters to par-file */ if ((fp_par_dat = fopen(fname_parameter, "a")) == NULL) { gpiv_error("%s: failure opening %s for input", argv[0], fname_parameter); } fprintf(fp_par_dat, "\n\n# %s\n# Command line options:\n", argv[0]); gpiv_post_print_parameters (fp_par_dat, piv_post_par); /* * Reading parametes from PARFILE (and writing to data par-file) */ gpiv_scan_parameter (GPIV_POSTPAR_KEY, PARFILE, piv_post_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_POSTPAR_KEY, piv_post_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); gpiv_post_print_parameters (fp_par_dat, piv_post_par); fclose(fp_par_dat); } else { gpiv_scan_parameter (GPIV_POSTPAR_KEY, PARFILE, piv_post_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_POSTPAR_KEY, piv_post_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } gpiv_post_check_parameters_read (piv_post_par, NULL); /* * Reading PIV data set. * Input PIV data might be in reverse order */ if (use_stdin_stdout == TRUE) { fp = stdin; } else { if ((fp = fopen (fname_in_piv, "r")) == NULL) { gpiv_error ("%s: Failure opening %s for input", argv[0], fname_in_piv); } } if (piv_post_par->operator_manipiv == GPIV_FAST_Y) { if ((piv_data = gpiv_read_pivdata_fastx (fp)) == NULL) { err_msg = "GPIV_POST_MANIPIV: Failure calling read_pivdata_fast_x"; gpiv_error ("%s: %s", argv[0], err_msg); } } else { if ((piv_data = gpiv_read_pivdata (fp)) == NULL) { err_msg = "GPIV_POST_MANIPIV: Failure calling gpiv_read_pivdata"; gpiv_error ("%s: %s", argv[0], err_msg); } } if (use_stdin_stdout == FALSE) fclose (fp); /* * Here the library function call of the post-processing. */ if ((err_msg = gpiv_post_manipiv (piv_data, piv_post_par)) != NULL) { gpiv_error ("%s: ", argv[0], err_msg); } /* * Adding comment to the data * And writing to output */ g_free (piv_data->comment); piv_data->comment = g_strdup_printf ("# Software: %s\n", RCSID); piv_data->comment = gpiv_add_datetime_to_comment (piv_data->comment); if (use_stdin_stdout == TRUE) { fp = stdout; } else { if ((fp = fopen (fname_out, "w")) == NULL) { gpiv_error ("%s: Failure opening %s for output", argv[0], fname_out); } } if ((err_msg = gpiv_write_pivdata (fp, piv_data, TRUE)) != NULL) { fclose (fp); gpiv_error ("%s: %s", argv[0], err_msg); } if (use_stdin_stdout == FALSE) fclose (fp); /* * Freeing allocated memory of matrices, if needed */ if (verbose == TRUE) printf("\n"); exit (0); } gpivtools-0.6.0/src/post/vorstra.c0000644000175000017500000003250511073414772014117 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- vorstra - calculates differential quantities (like vorticity and strain) from PIV data Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ---------------------------------------------------------------------------- Some formulea: vorty_z = dV/dx - dU/dy sh_strain = dU/dy + dV/dx n_strain = dU/dx + dV/dy -----------------------------------------------------------------------------*/ #include #include #include #include #include /* #define PARFILE "vorstra.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define GNUPLOT_DISPLAY_COLOR "DarkBlue" #define GNUPLOT_DISPLAY_SIZE 250 #define USAGE "\ Usage: vorstra | vorty | nstrain | sstrain \n\ [-d int] [-g] [--no_g] [-h | --help] [-o] [-s] [-n] \n\ [-p | --print] [-v | --version] [filename] < stdin > stdout \n\ \n\ keys: \n\ -d N: differential type; central (0), least squares \n\ (1), richardson (2), circulation method (3) \n\ -g: graphical visualization with gnuplot (needs -f) \n\ --no_g: suppresses graphical visualization \n\ -h | --help: this on-line help \n\ -n: normal strain analyses \n\ -o: vorticity analyses \n\ -p | --print: print parameters to stdout \n\ -s: shear strain analyses \n\ -v | --version; version number\n\ filename: input PIV data file,. Substitutes stdin and stdout \n\ " #ifdef DEBUG #define USAGE_DEBUG "\ Developers version also contains: \n\ [-p_main][-p_differential] \n\ \n\ keys: \n\ -p_'function' N: prints data to be generated in the function; the \n\ higher N, the more detailed the output. \n\ For N = 10, err_vec will exit at the end of the function" #endif #define HELP "\ vorstra calculates the differential quantities vorticity, shear strain and \n\ normal strain from PIV data." #define RCSID "$Id: vorstra.c,v 2.16 2008-10-09 14:45:01 gerber Exp $" gboolean use_stdin_stdout = FALSE; gboolean verbose = FALSE; int gnuplot = 0; gboolean gnuplot__set = FALSE; #ifdef DEBUG /* * Parameters for development version */ int print_main = 0, print_differential = 0; #endif static void command_args(int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivPostPar * piv_post_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next = 0; /* * argc_next is set to 1 if the next cmd line argument has to be * searched for; in case that the command line argument concerns more * than one char or cmd line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) { switch (c) { /* * Use Revision Control System (RCS) for version */ case 'v': printf("\n%s\n", RCSID); exit(0); /* * differential operator type */ case 'd': piv_post_par->diff_type__set = TRUE; piv_post_par->diff_type = atoi(*++argv); argc_next = 1; --argc; break; /* * graphic output with gnuplot */ case 'g': gnuplot = 1; gnuplot__set = TRUE; break; case 'h': printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s\n", USAGE); exit(0); /* * normal strain analysis */ case 'n': piv_post_par->operator_vorstra__set = TRUE; piv_post_par->operator_vorstra = GPIV_N_STRAIN; break; /* * vorticity analysis */ case 'o': piv_post_par->operator_vorstra__set = TRUE; piv_post_par->operator_vorstra = GPIV_VORTICITY; break; case 'p': #ifdef DEBUG if (strcmp(*argv, "p_main") != 0) { #endif verbose = TRUE; #ifdef DEBUG } else if (strcmp("p_main", *argv) == 0) { print_main = atoi(*++argv); --argc; argc_next = 1; } #endif break; /* * shear strain analysis */ case 's': piv_post_par->operator_vorstra__set = TRUE; piv_post_par->operator_vorstra = GPIV_S_STRAIN; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { verbose = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); /* * do not plot with gnuplot */ } else if (strcmp("-no_g", *argv) == 0) { gnuplot = 0; gnuplot__set = TRUE; argc_next = 1; } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error("\n%s error : unknown option: %s\n", argv[0], *argv); break; } } } /* * Check if filename or stdin /stdout is used */ if (argc == 1) { use_stdin_stdout = FALSE; strcpy(fname, argv[argc - 1]); } else if (argc == 0) { use_stdin_stdout = TRUE; verbose = FALSE; } else { gpiv_error("\n%s error: unknown argument: %s\n", argv[0], *argv); } } static gchar * make_fname(char *fname_in, char *fname_parameter, char *fname_out, GpivPostPar *piv_post_par ) /* ---------------------------------------------------------------------------- * generate filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup(fname_in); strtok(fname_base, "."); /* * filenames for output */ gpiv_io_make_fname(fname_base, GPIV_EXT_PAR, fname_parameter); if (verbose) printf("# Parameter file: %s\n", fname_parameter); if (piv_post_par->operator_vorstra == GPIV_VORTICITY) { gpiv_io_make_fname (fname_base, GPIV_EXT_VOR, fname_out); } else if (piv_post_par->operator_vorstra == GPIV_S_STRAIN) { gpiv_io_make_fname (fname_base, GPIV_EXT_SSTR, fname_out); } else if (piv_post_par->operator_vorstra == GPIV_N_STRAIN) { gpiv_io_make_fname (fname_base, GPIV_EXT_NSTR, fname_out); } else { gpiv_error("%s: non valid operation", RCSID); } if (verbose) printf("# output data file: %s\n", fname_out); g_free (fname_base); return (err_msg); } int main(int argc, char *argv[] ) /*----------------------------------------------------------------------------- */ { char *err_msg = NULL, *c = NULL; FILE *fp_par_dat, *fp; gchar fname_in[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS]; GpivPostPar *piv_post_par = g_new (GpivPostPar, 1);; GpivPivData *in_data = NULL; GpivScalarData *out_data = NULL; verbose = FALSE; use_stdin_stdout = FALSE; piv_post_par->operator_vorstra__set = FALSE; piv_post_par->diff_type__set = FALSE; /* * Define GpivOperation type from program name, which is a symbolic link to * gpiv_vorstra */ if ((c = strstr(argv[0], "vorstra")) != NULL) { } else if ((c = strstr(argv[0], "vorty")) != NULL) { piv_post_par->operator_vorstra = GPIV_VORTICITY; piv_post_par->operator_vorstra__set = TRUE; } else if ((c = strstr(argv[0], "nstrain")) != NULL) { piv_post_par->operator_vorstra = GPIV_N_STRAIN; piv_post_par->operator_vorstra__set = TRUE; } else if ((c = strstr(argv[0], "sstrain")) != NULL) { piv_post_par->operator_vorstra = GPIV_S_STRAIN; piv_post_par->operator_vorstra__set = TRUE; } else { gpiv_error("vorstra: unvalid program name or symlink"); } command_args (argc, argv, fname_in, piv_post_par); if (verbose) { printf("# %s\n# Command line options:\n", RCSID); gpiv_post_print_parameters (NULL, piv_post_par); } if (use_stdin_stdout == FALSE) { make_fname(fname_in, fname_parameter, fname_out, piv_post_par); /* * Prints command line parameters to par-file */ if ((fp_par_dat = fopen(fname_parameter, "a")) == NULL) gpiv_error("\n%s: failure opening %s for input", argv[0], fname_parameter); fprintf(fp_par_dat, "# %s\n# Command line options:\n", argv[0]); gpiv_post_print_parameters (fp_par_dat, piv_post_par); /* * Reading parametes from PARFILE (and writing to data par-file) */ gpiv_scan_parameter (GPIV_POSTPAR_KEY, PARFILE, piv_post_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_POSTPAR_KEY, piv_post_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); gpiv_post_print_parameters (fp_par_dat, piv_post_par); fclose (fp_par_dat); } else { gpiv_scan_parameter (GPIV_POSTPAR_KEY, PARFILE, piv_post_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_POSTPAR_KEY, piv_post_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } gpiv_post_check_parameters_read (piv_post_par, NULL); /* * Check parameters on correct values and adjust belonging variables */ if (piv_post_par->diff_type__set) { if (piv_post_par->diff_type != 0 && piv_post_par->diff_type != 1 && piv_post_par->diff_type != 2 && piv_post_par->diff_type != 3) gpiv_error("%s error: no value differential differentiator type", argv[0]); } if (use_stdin_stdout == TRUE && gnuplot == 1) { gpiv_error ("%s: filename has to be used in combination with 'gnuplot'\n", argv[0]); } if ((piv_post_par->operator_vorstra == GPIV_S_STRAIN || piv_post_par->operator_vorstra == GPIV_N_STRAIN) && piv_post_par->diff_type == GPIV_CIRCULATION) { gpiv_error ("\n%s error: strain can not be calculated by circulation method", argv[0]); } /* * Reading input PIV data */ if (use_stdin_stdout == TRUE) { fp = stdin; } else { if ((fp = fopen (fname_in, "rb")) == NULL) { gpiv_error ("%s: Failure opening %s for input", argv[0], fname_in); } } if ((in_data = gpiv_read_pivdata (fp)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } if (use_stdin_stdout == FALSE) fclose (fp); /* * here the function calls of post-processing; calculating vorticity, strain */ if ((out_data = gpiv_post_vorstra (in_data, piv_post_par)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } /* * Adding comment to the data * And writing to output */ g_free (out_data->comment); out_data->comment = g_strdup_printf ("# Software: %s\n", RCSID); out_data->comment = gpiv_add_datetime_to_comment (out_data->comment); if (piv_post_par->operator_vorstra == GPIV_VORTICITY) { out_data->comment = g_strconcat (out_data->comment, "\n# Data type: vorticity [1/s]\n", NULL); } else if (piv_post_par->operator_vorstra == GPIV_N_STRAIN) { out_data->comment = g_strconcat (out_data->comment, "\n# Data type: normal strain [1/s]\n", NULL); } else if (piv_post_par->operator_vorstra == GPIV_S_STRAIN) { out_data->comment = g_strconcat (out_data->comment, "\n# Data type: shear strain [1/s]\n", NULL); } if (use_stdin_stdout == TRUE) { fp = stdout; } else { if ((fp = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: Failure opening %s for output", argv[0], fname_out); } } if (gnuplot == 1) { if ((err_msg = gpiv_write_sc_griddata (fp, out_data, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } else { if ((err_msg = gpiv_write_scdata (fp, out_data, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } if (use_stdin_stdout == FALSE) fclose (fp); /* * Freeing allocated memory of matrices */ gpiv_free_pivdata(in_data); /* * Graphical output with gnuplot */ if (gnuplot) { gchar title[GPIV_MAX_CHARS]; snprintf (title, GPIV_MAX_CHARS, "vorticity of %s", fname_in); gpiv_scalar_gnuplot (fname_out, title, GNUPLOT_DISPLAY_COLOR, GNUPLOT_DISPLAY_SIZE); } exit (0); } gpivtools-0.6.0/src/image/0000777000175000017500000000000011073421570012421 500000000000000gpivtools-0.6.0/src/image/Makefile.am0000644000175000017500000000133010774711463014400 00000000000000ENABLE_CAM = @ENABLE_CAM@ ENABLE_TRIG = @ENABLE_TRIG@ RTA_TOPDIR = @RTA_TOPDIR@ K_TOPDIR = @K_TOPDIR@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ bin_PROGRAMS = gpiv_t-avg-img \ gpiv_imgproc gpiv_mktestimg gpiv_smooth gpiv_hilo \ gpiv_clip gpiv_fft gpiv_highpass gpiv_getbit gpiv_t_avg_img_SOURCES = t-avg-img.c gpiv_imgproc_SOURCES = imgproc.c gpiv_mktestimg_SOURCES = imgproc.c gpiv_smooth_SOURCES = imgproc.c gpiv_hilo_SOURCES = imgproc.c gpiv_clip_SOURCES = imgproc.c gpiv_fft_SOURCES = imgproc.c gpiv_highpass_SOURCES = imgproc.c gpiv_getbit_SOURCES = imgproc.c EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ gpivtools-0.6.0/src/image/Makefile.in0000644000175000017500000004211011073421522014375 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = gpiv_t-avg-img$(EXEEXT) gpiv_imgproc$(EXEEXT) \ gpiv_mktestimg$(EXEEXT) gpiv_smooth$(EXEEXT) \ gpiv_hilo$(EXEEXT) gpiv_clip$(EXEEXT) gpiv_fft$(EXEEXT) \ gpiv_highpass$(EXEEXT) gpiv_getbit$(EXEEXT) subdir = src/image DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gpiv_clip_OBJECTS = imgproc.$(OBJEXT) gpiv_clip_OBJECTS = $(am_gpiv_clip_OBJECTS) gpiv_clip_LDADD = $(LDADD) gpiv_clip_DEPENDENCIES = am_gpiv_fft_OBJECTS = imgproc.$(OBJEXT) gpiv_fft_OBJECTS = $(am_gpiv_fft_OBJECTS) gpiv_fft_LDADD = $(LDADD) gpiv_fft_DEPENDENCIES = am_gpiv_getbit_OBJECTS = imgproc.$(OBJEXT) gpiv_getbit_OBJECTS = $(am_gpiv_getbit_OBJECTS) gpiv_getbit_LDADD = $(LDADD) gpiv_getbit_DEPENDENCIES = am_gpiv_highpass_OBJECTS = imgproc.$(OBJEXT) gpiv_highpass_OBJECTS = $(am_gpiv_highpass_OBJECTS) gpiv_highpass_LDADD = $(LDADD) gpiv_highpass_DEPENDENCIES = am_gpiv_hilo_OBJECTS = imgproc.$(OBJEXT) gpiv_hilo_OBJECTS = $(am_gpiv_hilo_OBJECTS) gpiv_hilo_LDADD = $(LDADD) gpiv_hilo_DEPENDENCIES = am_gpiv_imgproc_OBJECTS = imgproc.$(OBJEXT) gpiv_imgproc_OBJECTS = $(am_gpiv_imgproc_OBJECTS) gpiv_imgproc_LDADD = $(LDADD) gpiv_imgproc_DEPENDENCIES = am_gpiv_mktestimg_OBJECTS = imgproc.$(OBJEXT) gpiv_mktestimg_OBJECTS = $(am_gpiv_mktestimg_OBJECTS) gpiv_mktestimg_LDADD = $(LDADD) gpiv_mktestimg_DEPENDENCIES = am_gpiv_smooth_OBJECTS = imgproc.$(OBJEXT) gpiv_smooth_OBJECTS = $(am_gpiv_smooth_OBJECTS) gpiv_smooth_LDADD = $(LDADD) gpiv_smooth_DEPENDENCIES = am_gpiv_t_avg_img_OBJECTS = t-avg-img.$(OBJEXT) gpiv_t_avg_img_OBJECTS = $(am_gpiv_t_avg_img_OBJECTS) gpiv_t_avg_img_LDADD = $(LDADD) gpiv_t_avg_img_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gpiv_clip_SOURCES) $(gpiv_fft_SOURCES) \ $(gpiv_getbit_SOURCES) $(gpiv_highpass_SOURCES) \ $(gpiv_hilo_SOURCES) $(gpiv_imgproc_SOURCES) \ $(gpiv_mktestimg_SOURCES) $(gpiv_smooth_SOURCES) \ $(gpiv_t_avg_img_SOURCES) DIST_SOURCES = $(gpiv_clip_SOURCES) $(gpiv_fft_SOURCES) \ $(gpiv_getbit_SOURCES) $(gpiv_highpass_SOURCES) \ $(gpiv_hilo_SOURCES) $(gpiv_imgproc_SOURCES) \ $(gpiv_mktestimg_SOURCES) $(gpiv_smooth_SOURCES) \ $(gpiv_t_avg_img_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ gpiv_t_avg_img_SOURCES = t-avg-img.c gpiv_imgproc_SOURCES = imgproc.c gpiv_mktestimg_SOURCES = imgproc.c gpiv_smooth_SOURCES = imgproc.c gpiv_hilo_SOURCES = imgproc.c gpiv_clip_SOURCES = imgproc.c gpiv_fft_SOURCES = imgproc.c gpiv_highpass_SOURCES = imgproc.c gpiv_getbit_SOURCES = imgproc.c EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/image/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/image/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gpiv_clip$(EXEEXT): $(gpiv_clip_OBJECTS) $(gpiv_clip_DEPENDENCIES) @rm -f gpiv_clip$(EXEEXT) $(LINK) $(gpiv_clip_LDFLAGS) $(gpiv_clip_OBJECTS) $(gpiv_clip_LDADD) $(LIBS) gpiv_fft$(EXEEXT): $(gpiv_fft_OBJECTS) $(gpiv_fft_DEPENDENCIES) @rm -f gpiv_fft$(EXEEXT) $(LINK) $(gpiv_fft_LDFLAGS) $(gpiv_fft_OBJECTS) $(gpiv_fft_LDADD) $(LIBS) gpiv_getbit$(EXEEXT): $(gpiv_getbit_OBJECTS) $(gpiv_getbit_DEPENDENCIES) @rm -f gpiv_getbit$(EXEEXT) $(LINK) $(gpiv_getbit_LDFLAGS) $(gpiv_getbit_OBJECTS) $(gpiv_getbit_LDADD) $(LIBS) gpiv_highpass$(EXEEXT): $(gpiv_highpass_OBJECTS) $(gpiv_highpass_DEPENDENCIES) @rm -f gpiv_highpass$(EXEEXT) $(LINK) $(gpiv_highpass_LDFLAGS) $(gpiv_highpass_OBJECTS) $(gpiv_highpass_LDADD) $(LIBS) gpiv_hilo$(EXEEXT): $(gpiv_hilo_OBJECTS) $(gpiv_hilo_DEPENDENCIES) @rm -f gpiv_hilo$(EXEEXT) $(LINK) $(gpiv_hilo_LDFLAGS) $(gpiv_hilo_OBJECTS) $(gpiv_hilo_LDADD) $(LIBS) gpiv_imgproc$(EXEEXT): $(gpiv_imgproc_OBJECTS) $(gpiv_imgproc_DEPENDENCIES) @rm -f gpiv_imgproc$(EXEEXT) $(LINK) $(gpiv_imgproc_LDFLAGS) $(gpiv_imgproc_OBJECTS) $(gpiv_imgproc_LDADD) $(LIBS) gpiv_mktestimg$(EXEEXT): $(gpiv_mktestimg_OBJECTS) $(gpiv_mktestimg_DEPENDENCIES) @rm -f gpiv_mktestimg$(EXEEXT) $(LINK) $(gpiv_mktestimg_LDFLAGS) $(gpiv_mktestimg_OBJECTS) $(gpiv_mktestimg_LDADD) $(LIBS) gpiv_smooth$(EXEEXT): $(gpiv_smooth_OBJECTS) $(gpiv_smooth_DEPENDENCIES) @rm -f gpiv_smooth$(EXEEXT) $(LINK) $(gpiv_smooth_LDFLAGS) $(gpiv_smooth_OBJECTS) $(gpiv_smooth_LDADD) $(LIBS) gpiv_t-avg-img$(EXEEXT): $(gpiv_t_avg_img_OBJECTS) $(gpiv_t_avg_img_DEPENDENCIES) @rm -f gpiv_t-avg-img$(EXEEXT) $(LINK) $(gpiv_t_avg_img_LDFLAGS) $(gpiv_t_avg_img_OBJECTS) $(gpiv_t_avg_img_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imgproc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-avg-img.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/src/image/t-avg-img.c0000644000175000017500000004111411073414772014300 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- t-avg-img: calculates time-averaged values from a series if images Copyright (C) 2002, 2003, 2004 Gerber van der Graaf T-avg-img 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, 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. TODO: BUGS: RCS version control $Log: t-avg-img.c,v $ Revision 2.11 2008-10-09 14:45:01 gerber paralellized with OMP and MPI Revision 2.10 2008-09-25 13:08:34 gerber Changed RCID to argv[0] in (error) messages Revision 2.9 2008-04-28 12:09:30 gerber hdf-formatted files are now with .hdf extension (previously: .gpi) Revision 2.8 2007-11-23 16:18:55 gerber release 0.5.0: Kafka Revision 2.7 2007-01-29 14:26:54 gerber Added image formats png, gif, tif, pgm, bpm. Added gpiv_aint Revision 2.6 2006/01/31 14:18:03 gerber version 0.3.2 Revision 2.5 2005/06/15 09:32:20 gerber check on memory leacks: change of internal structure; gpiv_alloc_pivdata and gpiv_free_pivdata in main optimizing by printing progress only if percentage has been changed Revision 2.4 2005/02/26 16:29:19 gerber parameter flags (parameter_logic) defined as gboolean, added scale_type to struct __GpivPostPar for inverse scaling Revision 2.3 2004/10/15 10:11:41 gerber GPIV_ and Gpiv prefix to defines and structure names of libgpiv Revision 2.2 2004/06/14 14:39:26 gerber addied image filtering and processing program Revision 2.1 2003/03/11 21:41:03 gerber GePeLled Revision 2.0 2002/12/03 12:44:40 gerber update version number Revision 1.1 2002/12/02 23:36:46 gerber init ------------------------------------------------------------------------*/ #include #include #include #include #define PARFILE "t-avg-img.par" /* Parameter file name */ #define USAGE "\ Usage: imgt-avg [-dx] [-fb file] [-ff int] [fl int] [-h] [-p] \n\ [-s] [-v] < stdin > stdout \n\ \n\ keys: \n\ \n\ -fb file: file base-name (without .number.r extension) instead of stdin \n\ and stdout \n\ -ff N: number of first image file \n\ -fl N: number of last image file \n\ -fx: prefix numbering to file base name \n\ -p: print parameters to stdout \n\ -s: subtract mean from input data \n\ -v: version number \n\ " /* * For the moment: only from a single directory */ /* [-db dir] [-df int] [-dl int] \n\ */ /* db dir directory base- name (without ending number) \n\ */ /* df N number of first direcory \n\ */ /* dl N number of first direcory \n\ */ /* dx prefix numbering to directory base name \n\ */ #define HELP "\ Calculates time-averaged intensities from a series of images for each pixel. \n\ Images should be numbered at the start or at the end of its name" #define RCSID "$Id: t-avg-img.c,v 2.11 2008-10-09 14:45:01 gerber Exp $" /*---------- Global variables ---------------------------------------------*/ gboolean fname__set = FALSE; gboolean verbose = FALSE; /* * Function prototypes */ void command_args (int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivGenPar *gen_par, GpivImageProcPar *image_proc_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next = 0; /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) { switch (c) { case 'v': /* * Use Revision Control System (RCS) for version */ printf("\n%s\n", RCSID); exit(0); break; case 'h': printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); break; /* * direcory name and numbers */ case 'd': if (strcmp("db", *argv) == 0) { strcpy(fname, *++argv); fname__set = TRUE; argc_next = 1; --argc; } else if (strcmp("df", *argv) == 0) { gen_par->first_dir = atoi(*++argv); gen_par->first_dir__set = TRUE; --argc; argc_next = 1; } else if (strcmp("dl", *argv) == 0) { gen_par->last_dir = atoi(*++argv); gen_par->last_dir__set = TRUE; --argc; argc_next = 1; } else if (strcmp("dx", *argv) == 0) { gen_par->dir_prefix = TRUE; } break; /* * file name and numbers */ case 'f': if (strcmp("fb", *argv) == 0) { strcpy(fname, *++argv); fname__set = TRUE; argc_next = 1; --argc; } else if (strcmp("ff", *argv) == 0) { gen_par->first_file = atoi(*++argv); gen_par->first_file__set = TRUE; --argc; argc_next = 1; } else if (strcmp("fl", *argv) == 0) { gen_par->last_file = atoi(*++argv); gen_par->last_file__set = TRUE; --argc; argc_next = 1; } else if (strcmp("fx", *argv) == 0) { gen_par->file_prefix = TRUE; } break; case 'p': verbose = TRUE; break; /* * subtract mean from input data */ case 's': image_proc_par->smooth_operator = GPIV_IMGOP_SUBTRACT; break; default: gpiv_error("%s: unknown option: %s", argv[0], *argv); break; } } } if (argc != 0) { gpiv_error("%s: unknown argument: %s", argv[0], *argv); } } void make_fname_out (gchar *fname_base, gchar *fname_header, gchar *fname_parameter, gchar *fname_out ) /*----------------------------------------------------------------------------- * generates filenames for output */ { char f_dum[GPIV_MAX_CHARS]; if (fname__set == FALSE) gpiv_error("%s: Filename has to be set", RCSID); gpiv_io_make_fname(fname_base, GPIV_EXT_HEADER, fname_header); if (verbose) printf("# Data parameter file: %s\n", fname_header); gpiv_io_make_fname(fname_base, GPIV_EXT_PAR, fname_parameter); if (verbose) printf("# Data parameter file: %s\n", fname_parameter); gpiv_io_make_fname(fname_base, GPIV_EXT_TA, f_dum); gpiv_io_make_fname(f_dum, GPIV_EXT_RAW_IMAGE, fname_out); if (verbose) printf("# Output file: %s\n", fname_out); } void make_fname_in (GpivGenPar *gen_par, gchar *fname_base, int f_number, gchar *fname_in ) /*----------------------------------------------------------------------------- * generates filenames for input */ { char f_dum[GPIV_MAX_CHARS]; if (fname__set == FALSE) gpiv_error("%s: Filename has to be set", RCSID); if (gen_par->file_prefix) { snprintf(f_dum, GPIV_MAX_CHARS, "%d%s", f_number, fname_base); gpiv_io_make_fname(f_dum, GPIV_EXT_RAW_IMAGE, fname_in); } else { snprintf(f_dum, GPIV_MAX_CHARS, "%s%d", fname_base, f_number); gpiv_io_make_fname(f_dum, GPIV_EXT_RAW_IMAGE, fname_in); } if (verbose) printf("# Input file: %s\n", fname_in); fprintf(stderr, "MAKE_FNAME_IN:: leaving\n"); } GpivImage * imgproc_mean (GpivGenPar *gen_par, GpivImageProcPar *image_proc_par, gchar *fname_base ) /*----------------------------------------------------------------------------- */ { /* FILE *fp = NULL; */ guint /* i, */ j, k, l; guint first_file = gen_par->first_file; guint last_file = gen_par->last_file; gchar fname_in[GPIV_MAX_CHARS]; GpivImage *image_sum = NULL, *image_mean = NULL, *image_in = NULL; if (verbose) printf ("# Calculating mean from input data\n"); /* * For the moment: only from single directory and only mean value */ /* for (i = first_dir; i <= last_dir; i++) { */ for (j = first_file; j <= last_file; j++) { if (fname__set == TRUE) { make_fname_in (gen_par, fname_base, j, fname_in); if ((image_in = gpiv_fread_image (fname_in)) == NULL) { gpiv_error ("local_image_mean: failing gpiv_fread_image %s", fname_in); } } else { if ((image_in = gpiv_read_png_image (stdin)) == NULL) { gpiv_error ("local_image_mean: failing gpiv_read_png_image %s", fname_in); } } /* * Allocate image_sum when image dimensions are known * Check image dimensions for all subsequent images */ if (j == first_file) { if ((image_sum = gpiv_alloc_img (image_in->header)) == NULL) { gpiv_error ("local_image_mean: failing gpiv_alloc_img for image_sum"); } } else { if (image_in->header->ncolumns != image_sum->header->ncolumns || image_in->header->nrows != image_sum->header->nrows || image_in->header->depth != image_sum->header->depth || image_in->header->x_corr != image_sum->header->x_corr ) { gpiv_error ("local_image_mean: in-and output images are of different dimensions"); } } for (k = 0; k < image_in->header->nrows; k++) { for (l = 0; l < image_in->header->ncolumns; l++) { image_sum->frame1[k][l] += image_in->frame1[k][l]; if (image_sum->header->x_corr == TRUE) { image_sum->frame2[k][l] += image_in->frame2[k][l]; } } } } if ((image_mean = gpiv_alloc_img (image_sum->header)) == NULL) { gpiv_error ("local_image_mean: failing gpiv_alloc_img for image_mean"); } for (k = 0; k < image_in->header->nrows; k++) { for (l = 0; l < image_in->header->ncolumns; l++) { gfloat mean = 0.0; mean = (gfloat) image_sum->frame1[k][l] / (gfloat) (last_file - first_file + 1); image_mean->frame1[k][l] = (guint16) mean; if (image_sum->header->x_corr == TRUE) { mean = 0.0; mean = (gfloat) image_sum->frame2[k][l] / (gfloat) (last_file - first_file + 1); image_mean->frame2[k][l] = (guint16) mean; } } } gpiv_free_img (image_in); gpiv_free_img (image_sum); return image_mean; } static gchar * imgproc_subtract (GpivGenPar *gen_par, gchar *fname_base, GpivImage *image_subtr ) /*----------------------------------------------------------------------------- */ { gchar *err_msg = NULL; FILE *fp = NULL; gchar f_dum1[GPIV_MAX_CHARS] = ""; gchar f_dum2[GPIV_MAX_CHARS] = ""; gchar fname_out[GPIV_MAX_CHARS] = ""; guint j, k, l; /* guint16 **img_in1 = NULL, **img_in2 = NULL; */ guint first_file = gen_par->first_file; guint last_file = gen_par->last_file; guint nrows = image_subtr->header->nrows; guint ncolumns = image_subtr->header->ncolumns; gchar fname_in[GPIV_MAX_CHARS]; GpivImage *image_in = NULL; if (verbose) printf ("# Subtracting mean from input data\n"); for (j = first_file; j <= last_file; j++) { if (fname__set == TRUE) { make_fname_in (gen_par, fname_base, j, fname_in); if ((image_in = gpiv_fread_image (fname_in)) == NULL) { err_msg = "img_subtract: failing gpiv_fread_image"; return (err_msg); } } else { if ((image_in = gpiv_read_png_image (stdin)) == NULL) { err_msg = "img_subtract: failing gpiv_read_png_image"; return (err_msg); } } for (k = 0; k < nrows; k++) { for (l = 0; l < ncolumns; l++) { image_in->frame1[k][l] -= image_subtr->frame1[k][l]; if (image_in->header->x_corr == TRUE) { image_in->frame2[k][l] -= image_subtr->frame2[k][l]; } } } if (fname__set == TRUE) { snprintf (f_dum1, GPIV_MAX_CHARS, "%s%d", fname_base, j); gpiv_io_make_fname (f_dum1, GPIV_EXT_TA, f_dum2); gpiv_io_make_fname (f_dum2, GPIV_EXT_PNG_IMAGE, fname_out); if ((fp = fopen (fname_out, "wb")) == NULL) { err_msg = "img_subtract: unable to open file"; return (err_msg); } gpiv_write_png_image (fp, image_in, TRUE); fclose (fp); if (verbose) printf ("# Output file: %s\n", fname_out); snprintf (f_dum1, GPIV_MAX_CHARS, " ");; snprintf (f_dum2, GPIV_MAX_CHARS, " ");; snprintf (fname_out, GPIV_MAX_CHARS, " ");; } else { gpiv_write_png_image (stdout, image_in, TRUE); } } return (err_msg); } int main (int argc, char *argv[] ) /* ---------------------------------------------------------------------------- * main routine to calculates time-averaged image intensity */ { FILE *fp = NULL, *fp_par_dat = NULL; gchar fname_base[GPIV_MAX_CHARS], fname_header[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS]; GpivImage *image_mean = NULL; GpivGenPar *gen_par = g_new0 (GpivGenPar, 1); GpivImageProcPar *image_proc_par = g_new0 (GpivImageProcPar, 1); /* * Image processing parameter initialization */ gpiv_genpar_parameters_set (gen_par, FALSE); gpiv_imgproc_parameters_set (image_proc_par, FALSE); command_args (argc, argv, fname_base, gen_par, image_proc_par); if (verbose) { printf ("# %s\n# Command line options:\n", RCSID); gpiv_genpar_print_parameters (stdout, gen_par); gpiv_imgproc_print_parameters (stdout, image_proc_par); } if (fname__set == TRUE) { /* * Generating proper filenames */ make_fname_out (fname_base, fname_header, fname_parameter, fname_out); if (verbose) printf ("\n# Parameters written to: %s", fname_parameter); /* * Prints command line parameters to par-file */ if ((fp_par_dat = fopen (fname_parameter, "a")) == NULL) { gpiv_error ("%s: failure opening %s for input", argv[0], fname_parameter); } fprintf (fp_par_dat, "\n\n# %s\n# Command line options:\n", argv[0]); gpiv_genpar_print_parameters (fp_par_dat, gen_par); gpiv_imgproc_print_parameters (fp_par_dat, image_proc_par); /* * Reading parametes from PARFILE (and writing to data par-file) */ gpiv_scan_parameter (GPIV_GENPAR_KEY, PARFILE, gen_par, verbose); gpiv_scan_resourcefiles (GPIV_GENPAR_KEY, gen_par, verbose); gpiv_genpar_print_parameters (fp_par_dat, gen_par); gpiv_scan_parameter (GPIV_IMGPROCPAR_KEY, PARFILE, image_proc_par, verbose); gpiv_scan_resourcefiles (GPIV_IMGPROCPAR_KEY, image_proc_par, verbose); gpiv_imgproc_print_parameters (fp_par_dat, image_proc_par); fclose (fp_par_dat); } else { /* * use stdin, stdout */ gpiv_scan_parameter (GPIV_GENPAR_KEY, PARFILE, gen_par, verbose); gpiv_scan_resourcefiles (GPIV_GENPAR_KEY, image_proc_par, verbose); gpiv_scan_parameter (GPIV_IMGPROCPAR_KEY, PARFILE, image_proc_par, verbose); gpiv_scan_resourcefiles (GPIV_IMGPROCPAR_KEY, image_proc_par, verbose); } /* * Check parameters on correct values and adjust belonging variables */ /* * Here the function calls of imgproc_mean and imgproc_subtract */ if ((image_mean = imgproc_mean (gen_par, image_proc_par, fname_base)) == NULL) { gpiv_error ("%s: failing img_mean", argv[0]); } if (image_proc_par->smooth_operator == GPIV_IMGOP_SUBTRACT) imgproc_subtract (gen_par, fname_base, image_mean); /* * And writing to output */ if (fname__set == TRUE) { if ((fp = fopen (fname_out, "wb")) == NULL) { return (1); } gpiv_write_png_image (fp, image_mean, TRUE); fclose (fp); } else { gpiv_write_png_image (stdout, image_mean, TRUE); } return 0; } gpivtools-0.6.0/src/image/imgproc.c0000644000175000017500000004107511073414772014156 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*--------------------------------------------------------------------------- imgproc: processes image Copyright (C) 2003, 2004 Gerber van der Graaf imgproc 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, 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. RCS version control $Log: imgproc.c,v $ Revision 2.10 2008-09-25 13:08:34 gerber Changed RCID to argv[0] in (error) messages Revision 2.9 2008-04-28 12:09:30 gerber hdf-formatted files are now with .hdf extension (previously: .gpi) Revision 2.8 2007-11-23 16:18:55 gerber release 0.5.0: Kafka Revision 2.7 2007-03-06 11:36:45 gerber removed -c -r options: obsolete Revision 2.6 2007-01-29 14:26:54 gerber Added image formats png, gif, tif, pgm, bpm. Added gpiv_aint Revision 2.5 2006/01/31 14:18:03 gerber version 0.3.2 Revision 2.4 2005/06/15 09:32:20 gerber check on memory leacks: change of internal structure; gpiv_alloc_pivdata and gpiv_free_pivdata in main optimizing by printing progress only if percentage has been changed Revision 2.3 2005/02/26 16:29:19 gerber parameter flags (parameter_logic) defined as gboolean, added scale_type to struct __GpivPostPar for inverse scaling Revision 2.2 2004/10/15 10:11:41 gerber GPIV_ and Gpiv prefix to defines and structure names of libgpiv Revision 2.1 2004/06/14 14:39:26 gerber addied image filtering and processing program ------------------------------------------------------------------------*/ #include #include #include #include #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: imgproc | mktestimg | smooth | hilo | clip | fft | lowpass | highpass | getbit \n\ [-b int] [-h | --help] [-o | --operation] [-p | --print] [-w int] \n\ [-f | --filter] [-t | --threshold int] \n\ [-v] [filename] < stdin > stdout \n\ \n\ keys: \n\ \n\ -b bit: for getbit: bit number [0, .., 7] \n\ -f | --filter: only for imgproc: image filter to be performed: \n\ make test image (0), smoothing (1), high-low filtering (2), \n\ clipping (3), fft (4), inverse fft (5), lowpass filter (8), \n\ highpass filter (9), getbit (10) \n\ -h | --help: this on-line help \n\ -p | --print: print parameters to stdout \n\ -o | --operation: for smoothing: set pixel equal to the mean of the \n\ window value (0), subtract mean from from pixel (1) \n\ add (2), multiply (3) or divide (4)\n\ -t | --threshold: only for clip: threshold value to be set to zero \n\ -w size: window size (default: 15) \n\ -v | --version: version number \n\ filename: full image filename. Overrides stdin and stdout. \n\ If stdin and stdout are used, input is expected to be .png \n\ " #define HELP "\ Image processing program for PIV images." #define RCSID "$Id: imgproc.c,v 2.10 2008-09-25 13:08:34 gerber Exp $" /* * Global variables */ gboolean use_stdin_stdout = FALSE; /* gboolean print_par = FALSE; */ gboolean verbose = FALSE; static void command_args (int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivImageProcPar *image_proc_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next = 0; /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) { switch (c) { case 'v': /* * Use Revision Control System (RCS) for version */ printf("\n%s\n", RCSID); exit(0); break; case 'h': printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); break; /* * bitnumber for getbit */ case 'b': image_proc_par->bit = atoi(*++argv); image_proc_par->bit__set = TRUE; argc_next = 1; --argc; break; /* * file name */ case 'f': image_proc_par->filter = atoi(*++argv); image_proc_par->filter__set = TRUE; --argc; argc_next = 1; break; /* * whar to do with the mean value of a window: operation */ case 'o': image_proc_par->smooth_operator = atoi(*++argv); image_proc_par->smooth_operator__set = TRUE; --argc; argc_next = 1; break; /* * print pararameters */ case 'p': verbose = TRUE; break; /* * threshold */ case 't': image_proc_par->threshold = atoi(*++argv); image_proc_par->threshold__set = TRUE; --argc; argc_next = 1; break; /* * window size */ case 'w': image_proc_par->window = atoi(*++argv); image_proc_par->window__set = TRUE; --argc; argc_next = 1; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { verbose = TRUE; } else if (strcmp("-filter", *argv) == 0) { image_proc_par->filter = atoi(*++argv); image_proc_par->filter__set = TRUE; --argc; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else if (strcmp("-operation", *argv) == 0) { image_proc_par->smooth_operator = atoi(*++argv); image_proc_par->smooth_operator__set = TRUE; --argc; } else if (strcmp("-threshold", *argv) == 0) { image_proc_par->threshold = atoi(*++argv); image_proc_par->threshold__set = TRUE; --argc; argc_next = 1; } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error("%s: unknown option: %s", argv[0], *argv); break; } } } if (argc == 1) { strcpy(fname, argv[argc - 1]); use_stdin_stdout = FALSE; } else if (argc == 0) { use_stdin_stdout = TRUE; verbose = FALSE; } else { gpiv_error("%s: unknown argument: %s", argv[0], *argv); } } static gchar * make_fname (char *fname, char *fname_parameter, char *fname_out ) /*----------------------------------------------------------------------------- * generates filenames for output */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } fname_base = g_strdup(fname); strtok(fname_base, "."); gpiv_io_make_fname(fname_base, GPIV_EXT_PAR, fname_parameter); if (verbose) printf("# Parameter file: %s\n", fname_parameter); gpiv_io_make_fname(fname_base, GPIV_EXT_PNG_IMAGE_PROC, fname_out); if (verbose) printf("# Output image file: %s\n", fname_out); g_free (fname_base); return (err_msg); } /* * Image processing functions */ /* static void */ /* imgproc_invfft(GpivImagePar image_par, */ /* GpivImageProcPar image_proc_par, */ /* guint16 **img_in, */ /* guint16 **img_out); */ int main (int argc, char *argv[] ) /* ---------------------------------------------------------------------------- * main routine to process images for PIV */ { FILE *fp = NULL, *fp_par = NULL; gchar *err_msg = NULL; gchar fname_in[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS]; GpivImage *image = NULL; GpivImageProcPar *image_proc_par = g_new0 (GpivImageProcPar, 1); GpivImageProcPar *image_proc_par_default = g_new0 (GpivImageProcPar, 1); char *c = NULL; /* * Image process parameter initialization */ gpiv_imgproc_parameters_set (image_proc_par, FALSE); gpiv_imgproc_default_parameters (image_proc_par_default, TRUE); /* * Image processing parameter initialization * Define operation type from program name, which is a symbolic link to imgproc */ if ((c = strstr(argv[0], "imgproc")) != NULL) { image_proc_par->filter = 0; image_proc_par->filter__set = FALSE; } else if ((c = strstr(argv[0], "mktestimg")) != NULL) { image_proc_par->filter = GPIV_IMGFI_MKTESTIMG; image_proc_par->filter__set = TRUE; } else if ((c = strstr(argv[0], "smooth")) != NULL) { image_proc_par->filter = GPIV_IMGFI_SMOOTH; image_proc_par->filter__set = TRUE; } else if ((c = strstr(argv[0], "hilo")) != NULL) { image_proc_par->filter = GPIV_IMGFI_HILO; image_proc_par->filter__set = TRUE; } else if ((c = strstr(argv[0], "clip")) != NULL) { image_proc_par->filter = GPIV_IMGFI_CLIP; image_proc_par->filter__set = TRUE; } else if ((c = strstr(argv[0], "fft")) != NULL) { image_proc_par->filter = GPIV_IMGFI_FFT; image_proc_par->filter__set = TRUE; /* } else if ((c = strstr(argv[0], "invfft")) != NULL) { */ /* image_proc_par->filter = GPIV_IMGFI_INVFFT; */ /* image_proc_par->filter__set = TRUE; */ } else if ((c = strstr(argv[0], "lowpass")) != NULL) { image_proc_par->filter = GPIV_IMGFI_LOWPASS; image_proc_par->filter__set = TRUE; } else if ((c = strstr(argv[0], "highpass")) != NULL) { image_proc_par->filter = GPIV_IMGFI_HIGHPASS; image_proc_par->filter__set = TRUE; } else if ((c = strstr(argv[0], "getbit")) != NULL) { image_proc_par->filter = GPIV_IMGFI_GETBIT; image_proc_par->filter__set = TRUE; } else { gpiv_error("imgproc: unvalid program name or symlink"); } /* * Reads command line arguments. * Reads image header and image processing parametes from resource files * if not overridden by the commandline options */ command_args (argc, argv, fname_in, image_proc_par); gpiv_scan_parameter (GPIV_IMGPROCPAR_KEY, PARFILE, image_proc_par, verbose); gpiv_scan_resourcefiles (GPIV_IMGPROCPAR_KEY, image_proc_par, verbose); if (use_stdin_stdout == FALSE) { /* * Generating filenames */ make_fname(fname_in, fname_parameter, fname_out); if (verbose) printf("\n# Parameters written to: %s", fname_parameter); } /* * Check if all image process parameters have been read */ g_message ("main:: 0a"); if ((err_msg = gpiv_imgproc_check_parameters_read (image_proc_par, image_proc_par_default)) != NULL) gpiv_warning ("%s: %s", argv[0], err_msg); g_message ("main:: 0b"); if (use_stdin_stdout == FALSE) { if ((fp_par = fopen (fname_parameter, "a")) == NULL) { gpiv_error ("%s: failure opening %s for input", argv[0], fname_parameter); } gpiv_imgproc_print_parameters (fp_par, image_proc_par); fclose (fp_par); } if (verbose) gpiv_imgproc_print_parameters (stdout, image_proc_par); /* * reads images */ g_message ("main:: 2"); if (image_proc_par->filter != GPIV_IMGFI_MKTESTIMG) { if (use_stdin_stdout) { if ((image = gpiv_read_image (stdin)) == NULL) { gpiv_error ("%s: gpiv_fread_image_ni", argv[0]); } } else { if ((image = gpiv_fread_image (fname_in)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } } g_message ("main:: 3"); /* * Here the function calls for the image processing */ if (image_proc_par->filter == GPIV_IMGFI_MKTESTIMG) { GpivImagePar *image_par = g_new0 (GpivImagePar, 1); GpivImagePar *image_par_default = g_new0 (GpivImagePar, 1); gpiv_img_parameters_set (image_par, FALSE); gpiv_img_default_parameters (image_par_default, TRUE); gpiv_scan_parameter (GPIV_IMGPAR_KEY, PARFILE, image_par, verbose); gpiv_scan_resourcefiles (GPIV_IMGPAR_KEY, image_par, verbose); if (gpiv_img_check_header_required_read (image_par) != NULL) { gpiv_img_ovwrt_parameters (image_par_default, image_par); } if (verbose) gpiv_img_print_header (stdout, image_par); if ((image = gpiv_imgproc_mktestimg (image_par, image_proc_par)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } else if (image_proc_par->filter == GPIV_IMGFI_HILO) { if ((err_msg = gpiv_imgproc_highlow (image, image_proc_par)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } else if (image_proc_par->filter == GPIV_IMGFI_SMOOTH) { if ((err_msg = gpiv_imgproc_smooth (image, image_proc_par)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } else if (image_proc_par->filter == GPIV_IMGFI_CLIP) { if ((err_msg = gpiv_imgproc_clip (image, image_proc_par)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } else if (image_proc_par->filter == GPIV_IMGFI_FFT) { if ((err_msg = gpiv_imgproc_fft (image, image_proc_par)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } /* } else if (image_proc_par->filter == GPIV_FI_INVFFT) { */ /* gpiv_imgproc_invfft (image_par, image_proc_par, img1_in, img1_out)) */ /* if (image_par->x_corr) { */ /* gpiv_imgproc_invfft(image_par, image_proc_par, img2_in, img2_out)) */ /* BUGFIX: Libgpiv TODO */ /* #ifndef USE_FFTW3 */ /* } else if (image_proc_par->filter == GPIV_IMGFI_CORR) { if ((err_msg = gpiv_imgproc_correlate (image_par, image_proc_par, img1_in, img2_in, &img1_out)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } else if (image_proc_par->filter == GPIV_IMGFI_CONV) { if ((err_msg = gpiv_imgproc_convolve (image_par, image_proc_par, img1_in, img2_in, &img1_out)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } else if (image_proc_par->filter == GPIV_IMGFI_LOWPASS) { if ((err_msg = gpiv_imgproc_lowpass (image_par, image_proc_par, img1_in)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); img1_out = img1_in; if (image_par->x_corr) { if ((err_msg = gpiv_imgproc_lowpass(image_par, image_proc_par, img2_in)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); img2_out = img2_in; } */ /* #endif USE_FFTW3 */ } else if (image_proc_par->filter == GPIV_IMGFI_HIGHPASS) { if ((err_msg = gpiv_imgproc_highpass (image, image_proc_par)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } else if (image_proc_par->filter == GPIV_IMGFI_GETBIT) { if ((err_msg = gpiv_imgproc_getbit (image, image_proc_par)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } else { gpiv_error("img_proc: non-existing filter %d", image_proc_par->filter); } /* * And writing to output */ if (use_stdin_stdout == TRUE) { fp = stdout; if ((err_msg = gpiv_write_png_image (fp, image, TRUE)) != NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } } else { if ((fp = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: unable to open %s", argv[0], fname_out); } if ((err_msg = gpiv_write_png_image (fp, image, TRUE)) != NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } fclose(fp); } return 0; } gpivtools-0.6.0/src/Makefile.am0000644000175000017500000000020010456755233013311 00000000000000SUBDIRS = \ image \ evaluate \ validate \ post \ misc \ dac EXTRA_DIST = Makefile.in gpivtools-0.6.0/src/Makefile.in0000644000175000017500000003425511073421522013326 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = \ image \ evaluate \ validate \ post \ misc \ dac EXTRA_DIST = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-recursive ctags ctags-recursive \ distclean distclean-generic distclean-recursive distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/src/evaluate/0000777000175000017500000000000011073421570013145 500000000000000gpivtools-0.6.0/src/evaluate/rr.c0000644000175000017500000007046511073414772013672 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /*------------------------------------------------------------------------------ rr - rr calculates the mean particle displacement for (Digital) Particle Image Velocimetry (DPIV) by means of FFT. Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. --------------------------------------------------------------------------- */ #include #include #include #undef USE_MTRACE #ifdef USE_MTRACE #include #endif #define PARFILE "gpivrc" /* Parameter file name */ /* static float sqrarg; */ /* #define SQR(a) ((sqrarg=(a)) == 0.0 ? 0.0 : sqrarg*sqrarg) */ /* #define SWAP(a,b) tempr=(a);(a)=(b);(b)=tempr */ #define USAGE "\ Usage: gpiv_rr [--c_dif] [--no_cdif] [--cf int] [--cl int] [--cp int] \n\ [-g] [--gauss][-h | --help] [--ia_size_i int] [--ia_size_f int] \n\ [--ia_shift int] [--ischeme int] [--ifit 0/1/2/3] [--linec int int int] \n\ [--liner int int int] [-p | --print] [--peak 1/2/3] [--p_piv] \n\ [--point int int] [--rf int] [--rl int] [--rp int] [--spof] \n\ [-s float] [-v | --version] [--val_r int] [--val_s] [--val_t float] \n\ [filename] < stdin > stdout \n\ \n\ keys: \n\ --cf COL: first column COL of area to interrogate \n\ --cl COL: last column COL of area to interrogate \n\ --cp COLUMNS: pre-shift in x-direction (COLUMNS) \n\ -g: graphical visualization with gnuplot (needs -f) \n\ --gauss: Gauss weighting of interrogation area \n\ -h | --help: this on-line help \n\ --ia_size_i SIZE: size of initial interrogation area (>= isi1) \n\ --ia_size_f SIZE: size of final interrogation area \n\ --ia_shift SHIFT: shift of adjacent interrogation area \n\ --ischeme 0/1/2/3/4: interrogation scheme: no correction (0), linear \n\ weighting (1), zero offset (2), zero offset with central \n\ differential (3), image deformation (4) \n\ --ifit 0/1/2/3: sub-pixel interpolation type: none (0), Gauss (1), \n\ Parabolic (2) or Centre of Gravity (3). \n\ --linec C RF RL: selects a vertical line at column R to interrogate \n\ from row RF to row RL \n\ --liner R CF CL: selects an horizontal line at row R to interrogate \n\ from column CF to column CL \n\ -p | --print: print parameters and other info to stdout \n\ --peak #: find maximum of #-th covariance peak \n\ --p_piv: prints piv results to stdout, even if -f has been used \n\ --point X Y: select one single point in the image to interrogate \n\ --rf ROW: first ROW of area to interrogate \n\ --rl ROW: last ROW of area to interrogate \n\ --rp ROWS: pre-shift in y-direction (ROWS) \n\ --spof: symmetric phase only filtering \n\ -s S: scale factor for graphic output with gnuplot \n\ -v | --version: version number \n\ --val_r N: validation; residu type calculated from: snr (0), median \n\ (1) or normalized median (2) \n\ --val_s N: validation; substitution of erroneous vector by: nothing \n\ (0), local mean from the surroundings (1), \n\ the median of the surroundings (2), next highest \n\ correlation peak (3) (needs -f) \n\ --val_t F: validation; threshhold of residus to be accepted \n\ filename: full image filename. Overrides stdin and stdout. \n\ If stdin and stdout are used, input is expected \n\ to be a .png formatted image \n\ " #ifdef DEBUG #define USAGE_DEBUG "\ Developers version also contains: \n\ rr: [-p_main int] \n\ \n\ keys: \n\ -p_'function' int: prints data to be generated in the function; the \n\ higher the number, the more detailed the output. \n\ For int = 10, rr will exit at the end of the function \n\ " #endif #define HELP "\ rr interrogates an image (pair) in order to obtain displacements of \n\ particles for (Digital) Particle Image Velocimetry (PIV). \n\ " #define RCSID "$Id: rr.c,v 3.26 2008-09-25 13:18:48 gerber Exp $" /* * Global parameters and variables */ gboolean use_stdin_stdout = FALSE; gboolean verbose = FALSE; #define GNUPLOT_DISPLAY_SIZE 500 #define GNUPLOT_DISPLAY_COLOR "LightBlue" int gnuplot = 0; float gnuplot_scale = 1.0; gboolean gnuplot__set = FALSE, gnuplot_scale__set = FALSE; static void command_args (int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivPivPar *piv_par, GpivValidPar *valid_par ) /*----------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; /* * Processing of command line arguments */ while (--argc > 0 && (*++argv)[0] == '-') { argc_next = 0; /* argc_next is set to 1 if the next cmd * line argument has to be searched for; * in case that the command line argument * concerns more than one char or cmd * line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) switch (c) { /* * graphic output with gnuplot */ case 'g': gnuplot = 1; gnuplot__set = TRUE; /* argc_next = 1; */ break; case 'h': printf ("%s\n", argv[0]); printf ("%s\n", HELP); printf ("%s", USAGE); #ifdef DEBUG printf ("\n%s", USAGE_DEBUG); #endif exit (0); /* * print paramaters to stdout */ case 'p': verbose = TRUE; break; /* * scaling for graphic output with gnuplot */ case 's': gnuplot_scale = atof (*++argv); gnuplot_scale__set = TRUE; --argc; argc_next = 1; break; /* * Print version and exits * Use Revision Control System (RCS) for version */ case 'v': printf ("%s\n", RCSID); exit (0); /* * long option keys */ case '-': if (strcmp ("-help", *argv) == 0) { printf ("\n%s", argv[0]); printf ("\n%s", HELP); printf ("\n%s", USAGE); exit (0); } else if (strcmp ("-print", *argv) == 0) { verbose = TRUE; } else if (strcmp ("-version", *argv) == 0) { printf ("%s\n", RCSID); exit (0); /* * Rr.Col_start */ } else if (strcmp ("-cf", *argv) == 0) { piv_par->col_start = atoi (*++argv); piv_par->col_start__set = TRUE; piv_par->int_geo = GPIV_AOI; piv_par->int_geo__set = TRUE; --argc; argc_next = 1; /* * overrides Rr.Col_end */ } else if (strcmp ("-cl", *argv) == 0) { piv_par->col_end = atoi (*++argv); piv_par->col_end__set = TRUE; piv_par->int_geo = GPIV_AOI; piv_par->int_geo__set = TRUE; --argc; argc_next = 1; /* * pre-shift c (col) */ } else if (strcmp ("-cp", *argv) == 0) { piv_par->pre_shift_col = atoi (*++argv); piv_par->pre_shift_col__set = TRUE; --argc; argc_next = 1; /* * interrogation area weighting with gauss function */ } else if (strcmp ("-gauss", *argv) == 0) { piv_par->gauss_weight_ia = TRUE; piv_par->gauss_weight_ia__set = TRUE; /* * overrides Rr.int_size_f */ } else if (strcmp ("-ia_size_f", *argv) == 0) { piv_par->int_size_f = atoi (*++argv); piv_par->int_size_f__set = TRUE; --argc; argc_next = 1; /* * overrides Rr.int_size_i */ } else if (strcmp ("-ia_size_i", *argv) == 0) { piv_par->int_size_i = atoi (*++argv); piv_par->int_size_i__set = TRUE; --argc; argc_next = 1; /* * overrides Rr.int_shift */ } else if (strcmp ("-ia_shift", *argv) == 0) { piv_par->int_shift = atoi (*++argv); piv_par->int_shift__set = TRUE; --argc; argc_next = 1; /* * overrides Rr.Int_scheme */ } else if (strcmp ("-ischeme", *argv) == 0) { piv_par->int_scheme = atoi (*++argv); if (piv_par->int_scheme != 0 && piv_par->int_scheme != 1 && piv_par->int_scheme != 2 && piv_par->int_scheme != 3 && piv_par->int_scheme != 4) { gpiv_error ("%s: invalid value of Int_scheme (1, 2, 3 or 4)", argv[0]); } piv_par->int_scheme__set = TRUE; --argc; argc_next = 1; /* * overrides Rr.Ifit */ } else if (strcmp ("-ifit", *argv) == 0) { piv_par->ifit = atoi (*++argv); if (piv_par->ifit != -1 && piv_par->ifit != 0 && piv_par->ifit != 1 && piv_par->ifit != 2 && piv_par->ifit != 3) { gpiv_error ("%s: invalid value of Ifit (1, 2 or 3)", argv[0]); } piv_par->ifit__set = TRUE; --argc; argc_next = 1; /* * define interrogate at a line */ } else if ((strcmp ("-linec", *argv) == 0)) { piv_par->int_line_col = atoi (*++argv); piv_par->int_line_row_start = atoi (*++argv); piv_par->int_line_row_end = atoi (*++argv); piv_par->int_geo = GPIV_LINE_C; piv_par->int_line_col__set = TRUE; piv_par->int_line_row_start__set = TRUE; piv_par->int_line_row_end__set = TRUE; if (piv_par->int_geo__set == TRUE) { gpiv_error ("%s: only a horizontal line" " may be defined\n" " not a vertical, a point or an area of" " interest as well\n", argv[0]); } else { piv_par->int_geo__set = TRUE; } --argc; --argc; --argc; argc_next = 1; } else if ((strcmp ("-liner", *argv) == 0)) { piv_par->int_line_row = atoi (*++argv); piv_par->int_line_col_start = atoi (*++argv); piv_par->int_line_col_end = atoi (*++argv); piv_par->int_geo = GPIV_LINE_R; piv_par->int_line_row__set = TRUE; piv_par->int_line_col_start__set = TRUE; piv_par->int_line_col_end__set = TRUE; if (piv_par->int_geo__set == TRUE) { gpiv_error ("%s: a vertical horizontal line" " may be defined\n" " not an horizontal, a point or an area of" " interest as well\n", argv[0]); } else { piv_par->int_geo__set = TRUE; } --argc; --argc; --argc; argc_next = 1; /* * cov peak # to fit */ } else if (strcmp ("-peak", *argv) == 0) { piv_par->peak = atoi (*++argv); --argc; piv_par->peak__set = TRUE; argc_next = 1; /* * # piv values to stdout */ } else if (strcmp ("-p_piv", *argv) == 0) { piv_par->print_piv = 1; piv_par->print_piv__set = TRUE; argc_next = 1; /* * interrogation at point(row, col) */ } else if (strcmp ("-point", *argv) == 0) { piv_par->int_point_col = atoi (*++argv); piv_par->int_point_row = atoi (*++argv); piv_par->int_point_col__set = TRUE; piv_par->int_point_row__set = TRUE; piv_par->int_geo = GPIV_POINT; if (piv_par->int_geo__set == TRUE) { gpiv_error ("%s: only a point may be defined\n" " not an horizontal, a vertical line" " or an area of interest as well\n", argv[0]); } else { piv_par->int_geo__set = TRUE; } --argc; --argc; argc_next = 1; /* * overrides Rr.Row_start */ } else if (strcmp ("-rf", *argv) == 0) { piv_par->row_start = atoi (*++argv); piv_par->row_start__set = TRUE; piv_par->int_geo = GPIV_AOI; piv_par->int_geo__set = TRUE; --argc; argc_next = 1; /* * overrides Rr.Row_end */ } else if (strcmp ("-rl", *argv) == 0) { piv_par->row_end = atoi (*++argv); piv_par->row_end__set = TRUE; piv_par->int_geo = GPIV_AOI; piv_par->int_geo__set = TRUE; --argc; argc_next = 1; /* * pre-shift r (row) */ } else if (strcmp ("-rp", *argv) == 0) { piv_par->pre_shift_row = atoi (*++argv); piv_par->pre_shift_row__set = TRUE; --argc; argc_next = 1; /* * Symmetric phase only filtering */ } else if (strcmp ("-spof", *argv) == 0) { piv_par->spof_filter = TRUE; piv_par->spof_filter__set = TRUE; /* * validation parameter: residu type */ } else if (strcmp ("-val_r", *argv) == 0) { valid_par->residu_type = atoi (*++argv); valid_par->residu_type__set = TRUE; --argc; argc_next = 1; if (valid_par->residu_type != 0 && valid_par->residu_type != 1 && valid_par->residu_type != 2) { gpiv_error ("%s: invalid value of VALID.Residu_type (0, 1, or 2)", argv[0]); } /* * validation parameter: substitution type */ } else if (strcmp ("-val_s", *argv) == 0) { valid_par->subst_type = atoi (*++argv); valid_par->subst_type__set = TRUE; --argc; argc_next = 1; if (valid_par->subst_type != 0 && valid_par->subst_type != 1 && valid_par->subst_type != 2 && valid_par->subst_type != 3) { gpiv_error ("%s: invalid value of VALID.Subst_type (0, 1, 2 or 3)", argv[0]); } /* * validation parameter: threshold value */ } else if (strcmp ("-val_t", *argv) == 0) { valid_par->residu_max = atof (*++argv); valid_par->residu_max__set = TRUE; --argc; argc_next = 1; } else { gpiv_error ("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error ("%s: unknown option: %s", argv[0], *argv); break; } } /* * Check if filename or stdin /stdout is used */ if (argc == 1) { use_stdin_stdout = FALSE; strcpy(fname, argv[argc - 1]); } else if (argc == 0) { use_stdin_stdout = TRUE; verbose = FALSE; if (gnuplot == 1) { gpiv_error ("%s: an image filename for input has to be used " "in combination with 'gnuplot'", argv[0]); } } else { gpiv_error("\n%s: unknown argument: %s: %s", argv[0], *argv, USAGE); } } static gchar * make_fname (FILE * fp_par_out, char *fname_in, char *fname_out, GpivPivPar *piv_par ) /*----------------------------------------------------------------------------- * generates filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup(fname_in); strtok(fname_base, "."); /* * filenames for output PIV data */ if (fname_out != NULL ) { gpiv_io_make_fname (fname_base, GPIV_EXT_PIV, fname_out); if (piv_par->print_piv == 0) { if (verbose) printf ("\n# outputfile is: %s\n", fname_out); fprintf (fp_par_out, "\n# outputfile is: %s\n", fname_out); } } g_free (fname_base); return (err_msg); } #ifdef ENABLE_MPI static GpivImage * alloc_image_struct(void) /*----------------------------------------------------------------------------- * Allocates GpivImage structure */ { GpivImage *image = g_new0 (GpivImage, 1); GpivImagePar *image_par = g_new0 (GpivImagePar, 1);; image->header = image_par; return image; } static GpivPivPar * alloc_pivpar_struct(void) /*----------------------------------------------------------------------------- * Allocates GpivPivPar structure */ { GpivPivPar *piv_par = g_new0 (GpivPivPar, 1); return piv_par; } static GpivValidPar * alloc_validpar_struct(void) /*----------------------------------------------------------------------------- * Allocates GpivValidPar structure */ { GpivValidPar *valid_par = g_new0 (GpivValidPar, 1); return valid_par; } #endif /* ENABLE_MPI */ int main (int argc, char *argv[] ) /*----------------------------------------------------------------------------- * Main routine of rr to calculate estimators of particle image displacements * from PIV images */ { char *err_msg = NULL; FILE *fp_out = NULL, *fp_par_out = NULL; char fname_in[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_par[GPIV_MAX_CHARS]; GpivImage *image = NULL; GpivPivData *piv_data = NULL; GpivPivPar *piv_par = g_new0 (GpivPivPar, 1); GpivValidPar *valid_par = g_new0 (GpivValidPar, 1); #ifdef _OPENMP int np, nprocs, num_threads; #endif /* _OPENMP */ #ifdef ENABLE_MPI /* gint argc_mpi; */ /* gchar *argv_mpi[10]; */ int nprocs, rank = 0, namelen, root = 0; char processor_name[MPI_MAX_PROCESSOR_NAME]; #endif /* ENABLE_MPI */ #ifdef ENABLE_MPI /* * Initializing MPI */ MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); MPI_Get_processor_name(processor_name, &namelen); /* gpiv_warning("main:: 0 rank=%d nprocs=%d on %s", rank, nprocs, processor_name); */ /* argc_mpi = argc - 4; */ /* for (i = 0; iheader, piv_par, piv_data); /* * Add comments to PIV data and saving */ piv_data->comment = g_strdup_printf ("# Software: %s\n", RCSID); piv_data->comment = gpiv_add_datetime_to_comment (piv_data->comment); piv_data->comment = g_strconcat (piv_data->comment, "# Data type: Particle Image Velocities\n", NULL); if ((piv_par->print_piv == TRUE && use_stdin_stdout == FALSE) || use_stdin_stdout == TRUE) { fp_out = stdout; if ((err_msg = gpiv_write_pivdata (fp_out, piv_data, FALSE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } else { if ((fp_out = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: failing fopen %s", argv[0], fname_out); } if ((err_msg = gpiv_write_pivdata (fp_out, piv_data, FALSE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); fclose (fp_out); } #ifdef ENABLE_MPI } #endif /* * Free memory of images and data */ gpiv_free_pivdata (piv_data); if (image->frame1 != NULL && image->frame2 != NULL) { gpiv_free_img (image); } #ifdef USE_MTRACE muntrace(); #endif /* #endif */ /* __DISABLE */ #ifdef ENABLE_MPI #ifdef DEBUG gpiv_warning("main:: rank=%d: Calling MPI_Finalize()", rank); #endif /* DEBUG */ MPI_Finalize(); #endif /* ENABLE+MPI */ exit (0); } gpivtools-0.6.0/src/evaluate/Makefile.am0000644000175000017500000000057611073421514015123 00000000000000ENABLE_CAM = @ENABLE_CAM@ ENABLE_TRIG = @ENABLE_TRIG@ ENABLE_MPI = @ENABLE_MPI@ RTA_TOPDIR = @RTA_TOPDIR@ K_TOPDIR = @K_TOPDIR@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ @ENABLE_MPI@ bin_PROGRAMS = gpiv_rr gpiv_rr_SOURCES = rr.c EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ gpivtools-0.6.0/src/evaluate/Makefile.in0000644000175000017500000003277111073421522015135 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = gpiv_rr$(EXEEXT) subdir = src/evaluate DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gpiv_rr_OBJECTS = rr.$(OBJEXT) gpiv_rr_OBJECTS = $(am_gpiv_rr_OBJECTS) gpiv_rr_LDADD = $(LDADD) gpiv_rr_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gpiv_rr_SOURCES) DIST_SOURCES = $(gpiv_rr_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ @ENABLE_MPI@ gpiv_rr_SOURCES = rr.c EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/evaluate/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/evaluate/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gpiv_rr$(EXEEXT): $(gpiv_rr_OBJECTS) $(gpiv_rr_DEPENDENCIES) @rm -f gpiv_rr$(EXEEXT) $(LINK) $(gpiv_rr_LDFLAGS) $(gpiv_rr_OBJECTS) $(gpiv_rr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/src/validate/0000777000175000017500000000000011073421570013130 500000000000000gpivtools-0.6.0/src/validate/errvec.c0000644000175000017500000004567711073414772014527 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /* ----------------------------------------------------------------------------- errvec - searches the erroneous vectors in PIV data and substitutes with new values, if possible Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ------------------------------------------------------------------------------*/ #include #include #include #include /*#define PARFILE "errvec.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define USAGE "\ Usage: errvec [-a] [-b] [-c] [-g] [-h | --help] [-i | image_type] [|--no_b]\n\ [-n N] [-p | --print] [-r int] [-s int] [-t float] [-u | --surround] \n\ [-v | --version] [filename] < stdin > stdout \n\ \n\ keys: \n\ -a: Automatic threshold; calculates threshhold from \n\ residu histogram \n\ -b: calculates residu statistics to print histogram of \n\ N bins \n\ -g: graphical visualization of residu statistcs with \n\ gnuplot (needs -f)\n\ -h | --help: this on-line help \n\ -i | --image_type: image type (tif, gif, bmp, pgm, r, gpi). Default: png. \n\ --no_b: suppresses printing median residu histogram \n\ -n N: defines number of histogram of bins N for -b or -a \n\ -p | --print: print parameters to stdout \n\ -r N: residu type calculated from: snr (0), median (1) \n\ or normalized median (2) \n\ -s N: substitution of erroneous vector by: nothing (0), \n\ local mean from the surroundings (1), \n\ the median of the surroundings (2), next highest \n\ correlation peak (3) (needs -f) \n\ -t F: threshhold of residus to be accepted \n\ -u | --surround N: odd number representing the surrounding grid \n\ points to be used for local mean and median values. \n\ -v | --version: version number \n\ filename: input PIV file. Substitutes stdin and stdout \n\ " #define HELP "\ errvec searches the erroneous vectors in a PIV data set and eventually \n\ substitutes them with new values." #define RCSID "$Id: errvec.c,v 2.16 2008-10-09 14:45:01 gerber Exp $" /* * Global variables for the parameters */ static gboolean verbose = FALSE; static gboolean use_stdin_stdout = FALSE; static gchar *itype = "png"; static gboolean itype__set = FALSE; static guint nbins = 0; /* * Why does gpiv_count_pivdata work if struct is defined here, * but not in main? */ /* GpivPivData in_data, out_data; */ /* GpivBinData *klass = NULL; */ /* GpivLinRegData *linreg = g_new0 (GpivLinRegData, 1); */ #define GNUPLOT_DISPLAY_COLOR "DarkSlateGray" #define GNUPLOT_DISPLAY_SIZE 250 #define NEW_INT gboolean gnuplot = 0, gnuplot__set = FALSE; gboolean res_stats = FALSE, res_stats__set = FALSE; gboolean auto_thresh = FALSE, auto_thresh__set = FALSE; /* * Function prototypes */ int command_args(int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivValidPar *valid_par ) /* ---------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next = 0; /* * argc_next is set to 1 if the next cmd line argument has to be searched for; * in case that the command line argument concerns more than one char or cmd * line argument needs a parameter */ while (argc_next == 0 && (c = *++argv[0])) { switch (c) { case 'v': /* * Use Revision Control System (RCS) for version */ printf("%s\n", RCSID); exit(0); break; case 'h': printf("%s\n", argv[0]); printf("%s\n", HELP); printf("%s\n", USAGE); #ifdef DEBUG printf("\n%s\n", USAGE_DEBUG); #endif exit(0); break; /* * Automatic threshold value */ case 'a': auto_thresh = TRUE; auto_thresh__set = TRUE; valid_par->residu_max__set = TRUE; break; case 'b': /* calculates median values */ /* to print out to stdout in histogram of N */ res_stats = TRUE; res_stats__set = TRUE; break; /* * Visualize residu statistics with gnuplot */ case 'g': gnuplot = 1; gnuplot__set = TRUE; /* * also set to calculate median values */ res_stats = TRUE; res_stats__set = TRUE; break; case 'i': itype = g_strdup(*++argv); argc_next = 1; --argc; itype__set = TRUE; break; case 'n': nbins = atoi(*++argv); argc_next = 1; --argc; break; case 'p': verbose = TRUE; break; /* * residu type: snr or median */ case 'r': valid_par->residu_type = atoi(*++argv); --argc; valid_par->residu_type__set = TRUE; argc_next = 1; break; /* * substitution by mean, median or next highest cov. peak */ case 's': valid_par->subst_type = atoi(*++argv); valid_par->subst_type__set = TRUE; --argc; argc_next = 1; break; /* * maximum residu value allowed for */ case 't': valid_par->residu_max = atof(*++argv); valid_par->residu_max__set = TRUE; --argc; argc_next = 1; break; case 'u': valid_par->neighbors = atoi(*++argv); valid_par->neighbors__set = TRUE; argc_next = 1; --argc; break; /* * long option keys */ case '-': if (strcmp("-help", *argv) == 0) { printf("\n%s", argv[0]); printf("\n%s", HELP); printf("\n%s", USAGE); exit(0); } else if (strcmp("-print", *argv) == 0) { verbose = TRUE; } else if (strcmp("-version", *argv) == 0) { printf("%s\n", RCSID); exit(0); } else if (strcmp("-no_b", *argv) == 0) { res_stats = FALSE; res_stats__set = TRUE; } else if (strcmp("-surround", *argv) == 0) { valid_par->neighbors = atoi(*++argv); valid_par->neighbors__set = TRUE; argc_next = 1; --argc; } else if (strcmp("-image_type", *argv) == 0) { itype = g_strdup(*++argv); argc_next = 1; --argc; itype__set = TRUE; } else { gpiv_error("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: #ifdef DEBUG printf("\n%s\n", USAGE_DEBUG); #endif gpiv_error(USAGE); break; } } } if (argc == 1) { use_stdin_stdout = FALSE; strcpy(fname, argv[argc - 1]); } else if (argc == 0) { use_stdin_stdout = TRUE; verbose = FALSE; } else { #ifdef DEBUG printf("\n%s", USAGE_DEBUG); #endif gpiv_error("\n%s: unknown argument: %s: %s", argv[0], *argv, USAGE); } return 0; } static gchar * make_fname (char *fname_in, char *fname_img, char *fname_parameter, char *fname_out ) /* ---------------------------------------------------------------------------- * generates filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (use_stdin_stdout == TRUE) { gpiv_error("%s: Filename has to be set", RCSID); } if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } fname_base = g_strdup(fname_in); strtok(fname_base, "."); g_snprintf(fname_img, GPIV_MAX_CHARS, "%s.%s", fname_base, itype); if (verbose) printf("# Image file: %s\n", fname_img); gpiv_io_make_fname(fname_base, GPIV_EXT_PAR, fname_parameter); if (verbose) printf("# Data parameter file: %s\n", fname_parameter); if (res_stats == TRUE) { gpiv_io_make_fname(fname_base, GPIV_EXT_ERR_STAT, fname_out); } else { gpiv_io_make_fname(fname_base, GPIV_EXT_ERR_PIV, fname_out); } if (verbose) printf("# Output file: %s\n", fname_out); g_free (fname_base); return (err_msg); } int main (int argc, char *argv[] ) /* ---------------------------------------------------------------------------- * main routine to calculate erroneous vectors in a PIV data set */ { gchar *err_msg = NULL; FILE *fp_par_dat; gchar fname_in_piv[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS], fname_img[GPIV_MAX_CHARS]; FILE *fp; GpivImage *image = NULL; GpivPivData *in_data = NULL, *out_data = NULL; GpivPivPar *piv_par = g_new0 (GpivPivPar, 1); GpivValidPar *valid_par = g_new0 (GpivValidPar, 1); GpivBinData *klass = NULL; GpivLinRegData *linreg = g_new0 (GpivLinRegData, 1); g_message (":: 0"); gpiv_valid_parameters_set (valid_par, FALSE); gpiv_piv_parameters_set (piv_par, FALSE); nbins = GPIV_NBINS_DEFAULT; /* if ((c = strstr(argv[0], "medtst")) != NULL) { */ if (strcmp (argv[0], "medtst") == 0) { res_stats = FALSE; res_stats__set = TRUE; valid_par->residu_max = 0; valid_par->residu_max__set = TRUE; } command_args (argc, argv, fname_in_piv, valid_par); if (verbose) { printf ("# %s\n# Command line options:\n", RCSID); gpiv_valid_print_parameters (NULL, valid_par); } if (use_stdin_stdout == FALSE) { /* * Generating proper filenames */ g_message (":: 1"); if ((err_msg = make_fname (fname_in_piv, fname_img, fname_parameter, fname_out)) != NULL) { gpiv_error ("%s: Failure calling make_fname", argv[0]); } /* * Prints command line parameters to stdout and data par-file */ if ((fp_par_dat = fopen (fname_parameter, "a")) == NULL) { gpiv_error ("%s: failure opening %s for input", argv[0], fname_parameter); } fprintf (fp_par_dat, "\n\n # %s\n# Command line options:\n", argv[0]); gpiv_valid_print_parameters (fp_par_dat, valid_par); g_message (":: 2"); /* * Reading parametes from PARFILE (writing to data par-file will be done * after eventually calculating the threshold from the PIV dataset) */ gpiv_scan_parameter (GPIV_VALIDPAR_KEY, PARFILE, valid_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_VALIDPAR_KEY, valid_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if (res_stats == TRUE || auto_thresh == TRUE) { /* * We also need image evaluation parameters for piv now */ gpiv_scan_parameter (GPIV_PIVPAR_KEY, PARFILE, piv_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_PIVPAR_KEY, piv_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); gpiv_piv_print_parameters (fp_par_dat, piv_par); } fclose (fp_par_dat); } else { /* * use stdin, stdout */ gpiv_scan_parameter (GPIV_VALIDPAR_KEY, PARFILE, valid_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_VALIDPAR_KEY, valid_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if (res_stats == TRUE || auto_thresh == TRUE) { gpiv_scan_parameter (GPIV_PIVPAR_KEY, PARFILE, piv_par, verbose); if ((err_msg = gpiv_scan_resourcefiles (GPIV_PIVPAR_KEY, piv_par, verbose)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } } gpiv_valid_check_parameters_read (valid_par, NULL); if (res_stats == TRUE || auto_thresh == TRUE) { gpiv_piv_check_parameters_read (piv_par, NULL); } /* * Check parameters on correct values and adjust belonging variables */ if (use_stdin_stdout == TRUE && valid_par->subst_type == GPIV_VALID_SUBSTYPE__COR_PEAK) { gpiv_error ("%s: -f \"filename\" has to be used in combination with " "'peak'", argv[0]); } if (use_stdin_stdout == TRUE && gnuplot == TRUE) { gpiv_error ("%s: -f \"filename\" has to be used in combination with " "'gnuplot'", argv[0]); } /* * Reading input data */ if (use_stdin_stdout == FALSE) { if (valid_par->subst_type == GPIV_VALID_SUBSTYPE__COR_PEAK) { if ((image = gpiv_fread_image (fname_img)) == NULL) gpiv_error ("%s: %s", argv[0], err_msg); } if ((fp = fopen (fname_in_piv, "rb")) == NULL) { gpiv_error ("%s: failing fopen %s", argv[0], fname_in_piv); } if ((in_data = gpiv_read_pivdata (fp)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } fclose (fp); } else { if ((in_data = gpiv_read_pivdata (NULL)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } /* * estimation of critical residu by means of fitting a straight line * through inverse cumulative histogram data. * Fit depends on number and accuracy of bins. As a first approximation, * a relative good fit will be found for 10 data (residus) * per bin, defined by GPIV_NBINS_DEFAULT. * BUGFIX: To be improved by minimizing linreg.sumsqr (klass.nbins). * * Calculates threshold value if automatic threshold has been set */ if (auto_thresh == TRUE || res_stats == TRUE) { if ((err_msg = gpiv_valid_residu (in_data, valid_par, TRUE)) != NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } out_data = gpiv_cp_pivdata (in_data); if ((klass = gpiv_valid_residu_stats (out_data, nbins, linreg)) == NULL) { err_msg = "GPIV_VALID_RESIDU: error from residu_stats"; g_warning ("%s", err_msg); exit (1); } if (auto_thresh == TRUE) { valid_par->residu_max = gpiv_valid_threshold (piv_par, valid_par, linreg); } } else { /* * Validating PIV data on outliers and substituting * or calculating residu histogram */ if ((err_msg = gpiv_valid_errvec (in_data, image, piv_par, valid_par, FALSE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } out_data = gpiv_cp_pivdata (in_data); /* * Adding comment and timestamp to out_data * Writing PIV out_data (and valid parameters) to output */ if (res_stats == FALSE) { out_data->comment = g_strdup_printf ("# Software: %s\n", RCSID); out_data->comment = gpiv_add_datetime_to_comment (out_data->comment); if (use_stdin_stdout == FALSE) { if ((fp_par_dat = fopen (fname_parameter, "a")) == NULL) { gpiv_error ("%s: failure opening %s for input", argv[0], fname_parameter); } gpiv_valid_print_parameters (fp_par_dat, valid_par); fclose (fp_par_dat); if ((fp = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: failing fopen %s", argv[0], fname_out); } if ((err_msg = gpiv_write_pivdata (fp, out_data, TRUE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); fclose (fp); } else { if ((err_msg = gpiv_write_pivdata (NULL, out_data, TRUE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } /* * print median residus as a (CUMULATIVE!!) histogram */ } else { gfloat residu_max = 0.0; gchar *lcom = NULL; if (piv_par->int_size_f__set == FALSE) { gpiv_error ("\n%s error: int_size_f not set", GPIV_PIVPAR_KEY); } klass->comment = g_strdup_printf ("# Software: %s\n", RCSID); klass->comment = gpiv_add_datetime_to_comment (out_data->comment); klass->comment = g_strconcat (klass->comment, " straight line fitting results:", NULL); lcom = g_strdup_printf(" c0 = %f c1 = %f (= )", linreg->c0, linreg->c1); klass->comment = g_strconcat (klass->comment, lcom, NULL); g_free (lcom); lcom = g_strdup_printf(" cov00 = %f cov01 = %f", linreg->cov00, linreg->cov01); klass->comment = g_strconcat (klass->comment, lcom, NULL); g_free (lcom); lcom = g_strdup_printf(" cov11 = %f sumsq = %f", linreg->cov11, linreg->sumsq); klass->comment = g_strconcat (klass->comment, lcom, NULL); g_free (lcom); lcom = g_strdup_printf(" residu_max = %f", residu_max = gpiv_valid_threshold (piv_par, valid_par, linreg)); klass->comment = g_strconcat (klass->comment, lcom, NULL); g_free (lcom); if (use_stdin_stdout == TRUE) { gpiv_print_cumhisto_eqdatbin (NULL, klass, FALSE); } else { if ((fp = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: failure fopen %s", argv[0], fname_out); } gpiv_print_cumhisto_eqdatbin (fp, klass, FALSE); } /* * Plots histogram with gnuplot */ if (gnuplot) { gchar title[GPIV_MAX_CHARS]; snprintf (title, GPIV_MAX_CHARS, "residu statistics of %s", fname_in_piv); gpiv_cumhisto_eqdatbin_gnuplot (fname_out, title, GNUPLOT_DISPLAY_COLOR, GNUPLOT_DISPLAY_SIZE, linreg); } } /* * Freeing allocated memory */ gpiv_free_pivdata (in_data); if (use_stdin_stdout == FALSE && valid_par->subst_type == GPIV_VALID_SUBSTYPE__COR_PEAK) { gpiv_free_img (image); } if (res_stats == TRUE || auto_thresh == TRUE) { gpiv_free_bindata (klass); } if (itype__set) g_free (itype); if (verbose) printf ("\n"); exit (0); } gpivtools-0.6.0/src/validate/Makefile.am0000644000175000017500000000075110461415141015100 00000000000000ENABLE_CAM = @ENABLE_CAM@ ENABLE_TRIG = @ENABLE_TRIG@ RTA_TOPDIR = @RTA_TOPDIR@ K_TOPDIR = @K_TOPDIR@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ bin_PROGRAMS = gpiv_errvec gpiv_peaklck gpiv_uhisto gpiv_vhisto gpiv_errvec_SOURCES = errvec.c gpiv_peaklck_SOURCES = peaklck.c gpiv_uhisto_SOURCES = peaklck.c gpiv_vhisto_SOURCES = peaklck.c EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ gpivtools-0.6.0/src/validate/Makefile.in0000644000175000017500000003565311073421523015123 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = gpiv_errvec$(EXEEXT) gpiv_peaklck$(EXEEXT) \ gpiv_uhisto$(EXEEXT) gpiv_vhisto$(EXEEXT) subdir = src/validate DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gpiv_errvec_OBJECTS = errvec.$(OBJEXT) gpiv_errvec_OBJECTS = $(am_gpiv_errvec_OBJECTS) gpiv_errvec_LDADD = $(LDADD) gpiv_errvec_DEPENDENCIES = am_gpiv_peaklck_OBJECTS = peaklck.$(OBJEXT) gpiv_peaklck_OBJECTS = $(am_gpiv_peaklck_OBJECTS) gpiv_peaklck_LDADD = $(LDADD) gpiv_peaklck_DEPENDENCIES = am_gpiv_uhisto_OBJECTS = peaklck.$(OBJEXT) gpiv_uhisto_OBJECTS = $(am_gpiv_uhisto_OBJECTS) gpiv_uhisto_LDADD = $(LDADD) gpiv_uhisto_DEPENDENCIES = am_gpiv_vhisto_OBJECTS = peaklck.$(OBJEXT) gpiv_vhisto_OBJECTS = $(am_gpiv_vhisto_OBJECTS) gpiv_vhisto_LDADD = $(LDADD) gpiv_vhisto_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gpiv_errvec_SOURCES) $(gpiv_peaklck_SOURCES) \ $(gpiv_uhisto_SOURCES) $(gpiv_vhisto_SOURCES) DIST_SOURCES = $(gpiv_errvec_SOURCES) $(gpiv_peaklck_SOURCES) \ $(gpiv_uhisto_SOURCES) $(gpiv_vhisto_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = -Wall @ENABLE_CAM@ @ENABLE_TRIG@ gpiv_errvec_SOURCES = errvec.c gpiv_peaklck_SOURCES = peaklck.c gpiv_uhisto_SOURCES = peaklck.c gpiv_vhisto_SOURCES = peaklck.c EXTRA_DIST = Makefile.in INCLUDES = @GLIB_CFLAGS@ -I $(RTA_TOPDIR)/include -I . -I $(K_TOPDIR)/include LDADD = @GLIB_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/validate/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/validate/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gpiv_errvec$(EXEEXT): $(gpiv_errvec_OBJECTS) $(gpiv_errvec_DEPENDENCIES) @rm -f gpiv_errvec$(EXEEXT) $(LINK) $(gpiv_errvec_LDFLAGS) $(gpiv_errvec_OBJECTS) $(gpiv_errvec_LDADD) $(LIBS) gpiv_peaklck$(EXEEXT): $(gpiv_peaklck_OBJECTS) $(gpiv_peaklck_DEPENDENCIES) @rm -f gpiv_peaklck$(EXEEXT) $(LINK) $(gpiv_peaklck_LDFLAGS) $(gpiv_peaklck_OBJECTS) $(gpiv_peaklck_LDADD) $(LIBS) gpiv_uhisto$(EXEEXT): $(gpiv_uhisto_OBJECTS) $(gpiv_uhisto_DEPENDENCIES) @rm -f gpiv_uhisto$(EXEEXT) $(LINK) $(gpiv_uhisto_LDFLAGS) $(gpiv_uhisto_OBJECTS) $(gpiv_uhisto_LDADD) $(LIBS) gpiv_vhisto$(EXEEXT): $(gpiv_vhisto_OBJECTS) $(gpiv_vhisto_DEPENDENCIES) @rm -f gpiv_vhisto$(EXEEXT) $(LINK) $(gpiv_vhisto_LDFLAGS) $(gpiv_vhisto_OBJECTS) $(gpiv_vhisto_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errvec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/peaklck.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/src/validate/peaklck.c0000644000175000017500000002346211073414772014637 00000000000000/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */ /* -------------------------------------------------------------------- peaklck - test on peak-locking effects in PIV analyses. Copyright (C) 2002, 2003, 2004 Gerber van der Graaf This program 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, 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. ---------------------------------------------------------------------*/ #include #include #include #include /* #define PARFILE "peaklck.par" */ /* Parameter file name */ #define PARFILE "gpivrc" /* Parameter file name */ #define HELP "Optains histograms from PIV displacements: \n\ Peaklck tests PIV data on the so-called peak-locking effect \n\ by printing/displaying statistics of the particle displacements at \n\ sub-pixel level. Uhisto and vhisto output histograms of horizontal \n\ and vertical displacements" #define USAGE "\ Usage: peaklck | uhisto | vhisto \n\ [-n N] [-g] [-h | --help] [-n] [-p | --print] \n\ [-v | --version] [filename] < stdin > stdout \n\ keys: \n\ -n N: override number of bins \n\ -g: graphical visualization of with gnuplot \n\ -h | --help: this on-line help \n\ -p | --print: print parameters and other info to stdout \n\ -v | --version: shows version number and exits successfully \n\ filename: input PIV file. Substitutes stdin and stdout \n\ " #define RCSID "$Id: peaklck.c,v 2.14 2008-09-25 13:08:35 gerber Exp $" /* * General global parameters */ static gboolean print_par = FALSE; static gboolean use_stdin_stdout = FALSE; static gint operator = 10; #define GNUPLOT_DISPLAY_COLOR "DarkRed" #define GNUPLOT_DISPLAY_SIZE 250 int gnuplot = 0, gnuplot__set = FALSE; void command_args (int argc, char *argv[], char fname[GPIV_MAX_CHARS], GpivValidPar *piv_valid_par, gint *nbins, gboolean *nbins__set ) /*----------------------------------------------------------------------------- * Command line argument handling */ { char c; int argc_next; while (--argc > 0 && (*++argv)[0] == '-') { argc_next = 0; while ((argc_next == 0) && (c = *++argv[0])) { switch (c) { case 'n': /* default: nbins=10 */ *nbins = atoi (*++argv); *nbins__set = TRUE; argc_next = 1; --argc; break; case 'g': /* graphic output with gnuplot */ gnuplot = 1; gnuplot__set = TRUE; break; case 'h': printf ("%s\n", argv[0]); printf ("%s\n", HELP); printf ("%s\n", USAGE); exit (1); case 'p': print_par = TRUE; break; case 'v': printf ("%s\n", RCSID); exit (1); break; /* * long option keys */ case '-': if (strcmp ("-help", *argv) == 0) { printf ("\n%s", argv[0]); printf ("\n%s", HELP); printf ("\n%s", USAGE); exit (0); } else if (strcmp ("-print", *argv) == 0) { print_par = TRUE; } else if (strcmp ("-version", *argv) == 0) { printf ("%s\n", RCSID); exit (0); } else { gpiv_error ("%s: unknown option: %s", argv[0], *argv); } argc_next = 1; break; default: gpiv_error ("%s: unknown option: %s", argv[0], *argv); break; } } } /* * Check if filename or stdin /stdout is used */ if (argc == 1) { use_stdin_stdout = FALSE; strcpy (fname, argv[argc - 1]); } else if (argc == 0) { use_stdin_stdout = TRUE; print_par = FALSE; } else { gpiv_error ("%s: unknown argument: %s", argv[0], *argv); } } static gchar * make_fname (char *fname_in, char *fname_out, char *fname_parameter ) /*----------------------------------------------------------------------------- * generates filenames */ { gchar *err_msg = NULL; gchar *fname_base = NULL; if (fname_in == NULL ) { err_msg = "make_fname: \"fname_in == NULL\""; return (err_msg); } /* * Stripping filename */ fname_base = g_strdup (fname_in); strtok (fname_base, "."); /* * filename for output */ if (operator == GPIV_U || operator == GPIV_V) { gpiv_io_make_fname (fname_base, GPIV_EXT_UVHISTO, fname_out); } else { gpiv_io_make_fname (fname_base, GPIV_EXT_PLK, fname_out); } if (print_par) printf ("# Output file: %s\n", fname_out); gpiv_io_make_fname (fname_base, GPIV_EXT_PAR, fname_parameter); if (print_par) printf ("# Parameter file: %s\n", fname_parameter); g_free (fname_base); return (err_msg); } int main (int argc, char *argv[]) /*----------------------------------------------------------------------------- * main routine to tests PIV data on peak-locking effects */ { gchar *err_msg = NULL, *c = NULL; FILE *fp, *fp_par_dat; gchar fname_in[GPIV_MAX_CHARS], fname_parameter[GPIV_MAX_CHARS], fname_out[GPIV_MAX_CHARS]; gint nbins = 0; gboolean nbins__set = FALSE; GpivPivData *in_data = NULL; GpivBinData *klass = NULL; /* BUGFIX: made as pointers! */ GpivValidPar *valid_par = g_new0 (GpivValidPar, 1); if ((c = strstr (argv[0], "peaklck")) != NULL) { /* operator = PEAKLCK; */ } else if ((c = strstr (argv[0], "uhisto")) != NULL) { operator = GPIV_U; } else if ((c = strstr (argv[0], "vhisto")) != NULL) { operator = GPIV_V; } else { gpiv_error ("%s: unvalid program name or symlink", argv[0]); } /* * Setting parameters */ gpiv_valid_parameters_set (valid_par, FALSE); command_args (argc, argv, fname_in, valid_par, &nbins, &nbins__set); if (print_par) { printf ("# %s\n# Command line options:\n", argv[0]); gpiv_valid_print_parameters (NULL, valid_par); } if (nbins__set == FALSE) nbins = GPIV_NBINS_DEFAULT; /* * Reading parametes from PARFILE and resources */ gpiv_scan_parameter (GPIV_VALIDPAR_KEY, PARFILE, valid_par, print_par); if ((err_msg = gpiv_scan_resourcefiles (GPIV_VALIDPAR_KEY, valid_par, print_par)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); if (use_stdin_stdout == FALSE) { /* * Generating filenames */ if ((err_msg = make_fname (fname_in, fname_out, fname_parameter)) != NULL) { gpiv_error ("%s: %s\n", argv[0], err_msg); } /* * Prints command line parameters to stdout and par-file */ if ((fp_par_dat = fopen (fname_parameter, "a")) == NULL) { gpiv_error ("%s: failure fopen %s", argv[0], fname_parameter); } fprintf (fp_par_dat, "\n\n# %s\n# Command line options:\n", RCSID); gpiv_valid_print_parameters (fp_par_dat, valid_par); fclose (fp_par_dat); /* * Writing parametes to data par-file */ gpiv_valid_print_parameters (NULL, valid_par); } gpiv_valid_check_parameters_read (valid_par, NULL); /* * Reading input data */ if (print_par) g_message ("nbins = %d", nbins); if (use_stdin_stdout == FALSE) { if ((fp = fopen (fname_in, "rb")) == NULL) { gpiv_error ("%s: failure fopen %s", argv[0], fname_in); } if ((in_data = gpiv_read_pivdata (fp)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } fclose (fp); } else { if ((in_data = gpiv_read_pivdata (NULL)) == NULL) { gpiv_error ("%s: %s", argv[0], err_msg); } } /* * Calling program function and saving results */ if (operator == GPIV_U || operator == GPIV_V) { klass = gpiv_post_uvhisto (in_data, nbins, operator); } else { if ((klass = gpiv_valid_peaklck (in_data, nbins)) == NULL) { gpiv_error ("%s: gpiv_valid_peaklck__ni failed", argv[0]); } } if (use_stdin_stdout == FALSE) { if ((fp = fopen (fname_out, "wb")) == NULL) { gpiv_error ("%s: failure fopen %s", argv[0], fname_out); } gpiv_print_histo (fp, klass, FALSE); fclose (fp); } else { gpiv_print_histo (NULL, klass, FALSE); } /* * Graphical output with gnuplot */ if (gnuplot && use_stdin_stdout == FALSE) { gchar title[GPIV_MAX_CHARS]; if (operator == GPIV_U ) { snprintf (title, GPIV_MAX_CHARS, "Histogram U-velocities of %s", fname_out); } else if (operator == GPIV_V ) { snprintf (title, GPIV_MAX_CHARS, "Histogram V-velocities of %s", fname_out); } else { snprintf (title, GPIV_MAX_CHARS, "Peak locking statistics of %s", fname_out); } if ((err_msg = gpiv_histo_gnuplot (fname_out, title, GNUPLOT_DISPLAY_COLOR, GNUPLOT_DISPLAY_SIZE)) != NULL) gpiv_error ("%s: %s", argv[0], err_msg); } /* * Freeing allocated memory of matrices */ gpiv_free_pivdata (in_data); gpiv_free_bindata (klass); exit (0); } gpivtools-0.6.0/depcomp0000755000175000017500000003710010403071316012035 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gpivtools-0.6.0/aclocal.m40000644000175000017500000011320711073417471012335 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program 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. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # This was merged into AC_PROG_CC in Autoconf. AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/acx_mpi.m4]) gpivtools-0.6.0/README0000644000175000017500000000700610150321622011337 0000000000000030 july 2002 cmd line programs stable 1. INTRODUCTION =============== 1.1 GENERAL DESCRIPTION ======================= PHILOSOPHY GPIV-TOOLS is a set of command-line driven programs for the so-called Digital Particle Image Velocimetry (DPIV). It contains programs for image pre-processing, image analyses (resulting in particle displacement estimations, i.e. PIV data), validation on peak-locking effects and erroneous vectors (outliers) and post-processing functions for calculating (scalar) derivatives of the PIV data, like vorticity and strain. GPIV-TOOLS uses LIBGPIV intensively, that can be found in a separate distribution, where the core functions resides. Some (perl) scripts are included in the GPIV-TOOLS package, too, that control the command-line driven programs. These scripts are provided as examples that may be used and adapted for processing a defined chain of analyses, validation and post-processing or for batch-processing of a series of images/piv-data sets etc. Though the command-line driven tools are mainly intended for non-graphic processing, its outputs may be visualized by displaying with the aid of GNUPLOT or PLOTMTV. A Graphic User Interface program is available in the separate package GPIV. This program controls all the processes interactively and displays its results in a more advanced way. GPIV has been written with the aid of the GTK/GNOME libraries. The GPIV-TOOLS have been written in ANSI-C. It has been developed, and is operational, on a i386 computer running the LINUX Operating System and should work on any Unix-like platform, too. 2.1 LICENSE =========== is Free Software licensed under the GNU Public license terms. See the COPYING file for the license. 2.2 WARRANTY ============ This software is constantly under development. So, often, bugs and improvements are underway. The reliability of code rr has been tested with artificially generated PIV images (home brewed as well as by others) and with images obtained from experiments. The experimental data have been compared with analyzes from third-party software (mainly DaVies from LaVision INC). Though the software has been used by the author already for different projects, no warranty can be given. I would like to emphasize that the software is constantly under development. Any remarks on malfunction, improvements, new features are welcome. 3 COMPILATION AND INSTALLATION ================================ See INSTALL for a more extended description. Unpacking and compilation: gzip -d gpiv-0.2.tar.gz tar -xvf gpiv-0.2.tar ./configure make make install To remove the package from the system: make uninstall 4.1 USE OF THE GPIV-TOOLS ======================== In order to understand how the programs work, just type the program name with -h option. For the majority of the programs there are manual pages as well. Every program needs its specific parameters. The program parameters may be defined in a parameter file with its specific process key and parameter name. The image parameters of raw data images may be defined in a header file (filename.h), followed by its value. All required parameters can be defined in order of priority: - as a command line option. - in the image header ./filename.h or in the local parameter file ./gpivrc. - in the personal parameter file ~/.gpivrc. - in the system-wide parameter file (mostly in /etc/gpivrc). 5. FINAL REMARKS ================= I hope that the programs will work fine and that you'll enjoy them. Remarks and suggestions for improvements/additions are welcome. Gerber van der Graaf gpivtools-0.6.0/configure0000755000175000017500000112444411073417476012417 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # 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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 IFS=$as_save_IFS ;; 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_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done 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) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= 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=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # 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 after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, 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 # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' 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$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" exec 7<&0 &1 # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src/evaluate/rr.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef 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 datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP GREP EGREP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT RANLIB GNUPLOT HAVE_GNUPLOT_TRUE HAVE_GNUPLOT_FALSE PKG_CONFIG GLIB_CFLAGS GLIB_LIBS PERL HAVE_PERL_TRUE HAVE_PERL_FALSE PYTHON HAVE_PYTHON_TRUE HAVE_PYTHON_FALSE CONVERT HAVE_CONVERT_TRUE HAVE_CONVERT_FALSE PLOTMTV HAVE_PLOTMTV_TRUE HAVE_PLOTMTV_FALSE ENABLE_CAM ENABLE_TRIG CONTROL HAVE_CONTROL_TRUE HAVE_CONTROL_FALSE RTA_TOPDIR K_TOPDIR ENABLE_MPI MPICC MPILIBS MPIPYTHON HAVE_MPIPYTHON_TRUE HAVE_MPIPYTHON_FALSE BUILD_MPI_TRUE BUILD_MPI_FALSE ALLOCA LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG GLIB_CFLAGS GLIB_LIBS MPICC' # 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. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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 case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$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 ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -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'` 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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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'` 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; }; } 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 directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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 ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 the parent directory. ac_confdir=`$as_dirname -- "$0" || $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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # 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 this package 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 \`..'] 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] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-cam enable (IEEE-1394) camera --enable-trig enable (realtime) triggering --disable-rta=RTATOPDIR place where the RTAI code \ resides (default /usr/lib/realtime) --enable-k=KTOPDIR place where the installed kernel \ headers resides (default /usr/src/kernel-headers-2.4.27-adeos) --enable-mpi enable Message Protocol Interface (MPI) --enable-omp enable Open Multi-Processing (OMP) 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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config MPICC MPI C compiler command Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested 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 else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { 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` /usr/bin/hostinfo = `(/usr/bin/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 IFS=$as_save_IFS } >&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_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_arg'" ;; 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 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, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r 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 -f -r conftest* 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 -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file 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 $ac_precious_vars; 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 am__api_version="1.9" 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 # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk 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_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=gpivtools VERSION=0.6.0 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; 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_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= 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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then 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 # Check that 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' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 that 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 { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 { 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 ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag 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 ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac 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 depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; } if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_strerror=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 echo "${ECHO_T}$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 { 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 ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag 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 ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac 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 depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= 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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 { 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 ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" 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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag 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 ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac 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 depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_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_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 #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)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE { 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 cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* 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"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 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; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 vprintf 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF { echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } if test "${ac_cv_func__doprnt+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 _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _doprnt (); /* 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__doprnt || defined __stub____doprnt choke me #endif int main () { return _doprnt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_prog in gawk mawk nawk awk 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_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 IFS=$as_save_IFS 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 if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" 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 { as_var=$as_ac_Header; eval "test \"\${$as_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. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&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 size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_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. */ $ac_includes_default typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Extract the first word of "gnuplot", so it can be a program name with args. set dummy gnuplot; 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_GNUPLOT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$GNUPLOT"; then ac_cv_prog_GNUPLOT="$GNUPLOT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_GNUPLOT="true" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GNUPLOT" && ac_cv_prog_GNUPLOT="false" fi fi GNUPLOT=$ac_cv_prog_GNUPLOT if test -n "$GNUPLOT"; then { echo "$as_me:$LINENO: result: $GNUPLOT" >&5 echo "${ECHO_T}$GNUPLOT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if $GNUPLOT; then HAVE_GNUPLOT_TRUE= HAVE_GNUPLOT_FALSE='#' else HAVE_GNUPLOT_TRUE='#' HAVE_GNUPLOT_FALSE= fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; 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_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; 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_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { echo "$as_me:$LINENO: checking for GLIB" >&5 echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.0.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.0.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.0.0"` else GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.0.0"` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.0.0) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements (glib-2.0 >= 2.0.0) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi { echo "$as_me:$LINENO: checking for g_malloc0 in -lglib-2.0" >&5 echo $ECHO_N "checking for g_malloc0 in -lglib-2.0... $ECHO_C" >&6; } if test "${ac_cv_lib_glib_2_0_g_malloc0+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lglib-2.0 $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char g_malloc0 (); int main () { return g_malloc0 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_glib_2_0_g_malloc0=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_glib_2_0_g_malloc0=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_glib_2_0_g_malloc0" >&5 echo "${ECHO_T}$ac_cv_lib_glib_2_0_g_malloc0" >&6; } if test $ac_cv_lib_glib_2_0_g_malloc0 = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGLIB_2_0 1 _ACEOF LIBS="-lglib-2.0 $LIBS" else { { echo "$as_me:$LINENO: error: \"libglib not installed\"" >&5 echo "$as_me: error: \"libglib not installed\"" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; 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_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PERL="true" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="false" fi fi PERL=$ac_cv_prog_PERL if test -n "$PERL"; then { echo "$as_me:$LINENO: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if $PERL; then HAVE_PERL_TRUE= HAVE_PERL_FALSE='#' else HAVE_PERL_TRUE='#' HAVE_PERL_FALSE= fi # Extract the first word of "python", so it can be a program name with args. set dummy python; 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_PYTHON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PYTHON"; then ac_cv_prog_PYTHON="$PYTHON" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PYTHON="true" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_PYTHON" && ac_cv_prog_PYTHON="false" fi fi PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then { echo "$as_me:$LINENO: result: $PYTHON" >&5 echo "${ECHO_T}$PYTHON" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if $PYTHON; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi # Extract the first word of "convert", so it can be a program name with args. set dummy convert; 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_CONVERT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CONVERT"; then ac_cv_prog_CONVERT="$CONVERT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CONVERT="true" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_CONVERT" && ac_cv_prog_CONVERT="false" fi fi CONVERT=$ac_cv_prog_CONVERT if test -n "$CONVERT"; then { echo "$as_me:$LINENO: result: $CONVERT" >&5 echo "${ECHO_T}$CONVERT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if $CONVERT; then HAVE_CONVERT_TRUE= HAVE_CONVERT_FALSE='#' else HAVE_CONVERT_TRUE='#' HAVE_CONVERT_FALSE= fi # Extract the first word of "plotmtv", so it can be a program name with args. set dummy plotmtv; 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_PLOTMTV+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PLOTMTV"; then ac_cv_prog_PLOTMTV="$PLOTMTV" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PLOTMTV="true" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_PLOTMTV" && ac_cv_prog_PLOTMTV="false" fi fi PLOTMTV=$ac_cv_prog_PLOTMTV if test -n "$PLOTMTV"; then { echo "$as_me:$LINENO: result: $PLOTMTV" >&5 echo "${ECHO_T}$PLOTMTV" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if $PLOTMTV; then HAVE_PLOTMTV_TRUE= HAVE_PLOTMTV_FALSE='#' else HAVE_PLOTMTV_TRUE='#' HAVE_PLOTMTV_FALSE= fi { echo "$as_me:$LINENO: checking for fftw_plan_dft_r2c_2d in -lfftw3" >&5 echo $ECHO_N "checking for fftw_plan_dft_r2c_2d in -lfftw3... $ECHO_C" >&6; } if test "${ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfftw3 $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fftw_plan_dft_r2c_2d (); int main () { return fftw_plan_dft_r2c_2d (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d" >&5 echo "${ECHO_T}$ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d" >&6; } if test $ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBFFTW3 1 _ACEOF LIBS="-lfftw3 $LIBS" else { { echo "$as_me:$LINENO: error: \"libfftw3 not installed\"" >&5 echo "$as_me: error: \"libfftw3 not installed\"" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for main in -lgslcblas" >&5 echo $ECHO_N "checking for main in -lgslcblas... $ECHO_C" >&6; } if test "${ac_cv_lib_gslcblas_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" 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 main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gslcblas_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gslcblas_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gslcblas_main" >&5 echo "${ECHO_T}$ac_cv_lib_gslcblas_main" >&6; } if test $ac_cv_lib_gslcblas_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" else { { echo "$as_me:$LINENO: error: \"libgslcblas not installed\"" >&5 echo "$as_me: error: \"libgslcblas not installed\"" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for main in -lgsl" >&5 echo $ECHO_N "checking for main in -lgsl... $ECHO_C" >&6; } if test "${ac_cv_lib_gsl_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" 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 main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gsl_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gsl_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gsl_main" >&5 echo "${ECHO_T}$ac_cv_lib_gsl_main" >&6; } if test $ac_cv_lib_gsl_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSL 1 _ACEOF LIBS="-lgsl $LIBS" else { { echo "$as_me:$LINENO: error: \"libgsl not installed\"" >&5 echo "$as_me: error: \"libgsl not installed\"" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for gpiv_warning in -lgpiv" >&5 echo $ECHO_N "checking for gpiv_warning in -lgpiv... $ECHO_C" >&6; } if test "${ac_cv_lib_gpiv_gpiv_warning+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpiv $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gpiv_warning (); int main () { return gpiv_warning (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gpiv_gpiv_warning=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gpiv_gpiv_warning=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gpiv_gpiv_warning" >&5 echo "${ECHO_T}$ac_cv_lib_gpiv_gpiv_warning" >&6; } if test $ac_cv_lib_gpiv_gpiv_warning = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGPIV 1 _ACEOF LIBS="-lgpiv $LIBS" else { { echo "$as_me:$LINENO: error: \"libgpiv has not been installed\"" >&5 echo "$as_me: error: \"libgpiv has not been installed\"" >&2;} { (exit 1); exit 1; }; } fi for ac_header in stdlib.h string.h unistd.h \ fftw3.h \ gpiv.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&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 # Check whether --enable-cam was given. if test "${enable_cam+set}" = set; then enableval=$enable_cam; ENABLE_CAM="-DENABLE_CAM" fi # Check whether --enable-trig was given. if test "${enable_trig+set}" = set; then enableval=$enable_trig; ENABLE_TRIG="-DENABLE_TRIG" fi if test "${ENABLE_CAM}" == '-DENABLE_CAM'; then { echo "$as_me:$LINENO: checking for gpiv_cam_get_camvar in -lgpiv" >&5 echo $ECHO_N "checking for gpiv_cam_get_camvar in -lgpiv... $ECHO_C" >&6; } if test "${ac_cv_lib_gpiv_gpiv_cam_get_camvar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpiv $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gpiv_cam_get_camvar (); int main () { return gpiv_cam_get_camvar (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gpiv_gpiv_cam_get_camvar=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gpiv_gpiv_cam_get_camvar=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gpiv_gpiv_cam_get_camvar" >&5 echo "${ECHO_T}$ac_cv_lib_gpiv_gpiv_cam_get_camvar" >&6; } if test $ac_cv_lib_gpiv_gpiv_cam_get_camvar = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGPIV 1 _ACEOF LIBS="-lgpiv $LIBS" else { { echo "$as_me:$LINENO: error: \"(IEEE-1394) camera is not working in libgpiv. \ Enable (IEEE-1394) camera in libgpiv or disable it here by leaving out --enable-cam during ./configure\"" >&5 echo "$as_me: error: \"(IEEE-1394) camera is not working in libgpiv. \ Enable (IEEE-1394) camera in libgpiv or disable it here by leaving out --enable-cam during ./configure\"" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for raw1394_destroy_handle in -lraw1394" >&5 echo $ECHO_N "checking for raw1394_destroy_handle in -lraw1394... $ECHO_C" >&6; } if test "${ac_cv_lib_raw1394_raw1394_destroy_handle+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lraw1394 $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char raw1394_destroy_handle (); int main () { return raw1394_destroy_handle (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_raw1394_raw1394_destroy_handle=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_raw1394_raw1394_destroy_handle=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_raw1394_raw1394_destroy_handle" >&5 echo "${ECHO_T}$ac_cv_lib_raw1394_raw1394_destroy_handle" >&6; } if test $ac_cv_lib_raw1394_raw1394_destroy_handle = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRAW1394 1 _ACEOF LIBS="-lraw1394 $LIBS" else { { echo "$as_me:$LINENO: error: \"libraw1394 not installed\"" >&5 echo "$as_me: error: \"libraw1394 not installed\"" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for dc1394_create_handle in -ldc1394_control" >&5 echo $ECHO_N "checking for dc1394_create_handle in -ldc1394_control... $ECHO_C" >&6; } if test "${ac_cv_lib_dc1394_control_dc1394_create_handle+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldc1394_control $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dc1394_create_handle (); int main () { return dc1394_create_handle (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dc1394_control_dc1394_create_handle=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dc1394_control_dc1394_create_handle=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dc1394_control_dc1394_create_handle" >&5 echo "${ECHO_T}$ac_cv_lib_dc1394_control_dc1394_create_handle" >&6; } if test $ac_cv_lib_dc1394_control_dc1394_create_handle = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDC1394_CONTROL 1 _ACEOF LIBS="-ldc1394_control $LIBS" else { { echo "$as_me:$LINENO: error: \"libdc1394_control not installed\"" >&5 echo "$as_me: error: \"libdc1394_control not installed\"" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_libdc1394_dc1394_control_h+set}" = set; then { echo "$as_me:$LINENO: checking for libdc1394/dc1394_control.h" >&5 echo $ECHO_N "checking for libdc1394/dc1394_control.h... $ECHO_C" >&6; } if test "${ac_cv_header_libdc1394_dc1394_control_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_libdc1394_dc1394_control_h" >&5 echo "${ECHO_T}$ac_cv_header_libdc1394_dc1394_control_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking libdc1394/dc1394_control.h usability" >&5 echo $ECHO_N "checking libdc1394/dc1394_control.h 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 _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 libdc1394/dc1394_control.h presence" >&5 echo $ECHO_N "checking libdc1394/dc1394_control.h 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 _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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: libdc1394/dc1394_control.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libdc1394/dc1394_control.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: libdc1394/dc1394_control.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: libdc1394/dc1394_control.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: libdc1394/dc1394_control.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libdc1394/dc1394_control.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: libdc1394/dc1394_control.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libdc1394/dc1394_control.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: libdc1394/dc1394_control.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: libdc1394/dc1394_control.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: libdc1394/dc1394_control.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: libdc1394/dc1394_control.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: libdc1394/dc1394_control.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libdc1394/dc1394_control.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: libdc1394/dc1394_control.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: libdc1394/dc1394_control.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for libdc1394/dc1394_control.h" >&5 echo $ECHO_N "checking for libdc1394/dc1394_control.h... $ECHO_C" >&6; } if test "${ac_cv_header_libdc1394_dc1394_control_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libdc1394_dc1394_control_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_libdc1394_dc1394_control_h" >&5 echo "${ECHO_T}$ac_cv_header_libdc1394_dc1394_control_h" >&6; } fi if test $ac_cv_header_libdc1394_dc1394_control_h = yes; then : else { { echo "$as_me:$LINENO: error: \"missing dc1394_control.h\"" >&5 echo "$as_me: error: \"missing dc1394_control.h\"" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_libraw1394_raw1394_h+set}" = set; then { echo "$as_me:$LINENO: checking for libraw1394/raw1394.h" >&5 echo $ECHO_N "checking for libraw1394/raw1394.h... $ECHO_C" >&6; } if test "${ac_cv_header_libraw1394_raw1394_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_libraw1394_raw1394_h" >&5 echo "${ECHO_T}$ac_cv_header_libraw1394_raw1394_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking libraw1394/raw1394.h usability" >&5 echo $ECHO_N "checking libraw1394/raw1394.h 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 _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 libraw1394/raw1394.h presence" >&5 echo $ECHO_N "checking libraw1394/raw1394.h 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 _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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: libraw1394/raw1394.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libraw1394/raw1394.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: libraw1394/raw1394.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: libraw1394/raw1394.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: libraw1394/raw1394.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libraw1394/raw1394.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: libraw1394/raw1394.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libraw1394/raw1394.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: libraw1394/raw1394.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: libraw1394/raw1394.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: libraw1394/raw1394.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: libraw1394/raw1394.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: libraw1394/raw1394.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libraw1394/raw1394.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: libraw1394/raw1394.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: libraw1394/raw1394.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for libraw1394/raw1394.h" >&5 echo $ECHO_N "checking for libraw1394/raw1394.h... $ECHO_C" >&6; } if test "${ac_cv_header_libraw1394_raw1394_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libraw1394_raw1394_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_libraw1394_raw1394_h" >&5 echo "${ECHO_T}$ac_cv_header_libraw1394_raw1394_h" >&6; } fi if test $ac_cv_header_libraw1394_raw1394_h = yes; then : else { { echo "$as_me:$LINENO: error: \"missing raw1394.h\"" >&5 echo "$as_me: error: \"missing raw1394.h\"" >&2;} { (exit 1); exit 1; }; } fi fi if test "${ENABLE_TRIG}" == '-DENABLE_TRIG'; then { echo "$as_me:$LINENO: checking for gpiv_trig_openrtfs in -lgpiv" >&5 echo $ECHO_N "checking for gpiv_trig_openrtfs in -lgpiv... $ECHO_C" >&6; } if test "${ac_cv_lib_gpiv_gpiv_trig_openrtfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpiv $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gpiv_trig_openrtfs (); int main () { return gpiv_trig_openrtfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gpiv_gpiv_trig_openrtfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gpiv_gpiv_trig_openrtfs=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gpiv_gpiv_trig_openrtfs" >&5 echo "${ECHO_T}$ac_cv_lib_gpiv_gpiv_trig_openrtfs" >&6; } if test $ac_cv_lib_gpiv_gpiv_trig_openrtfs = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGPIV 1 _ACEOF LIBS="-lgpiv $LIBS" else { { echo "$as_me:$LINENO: error: \"(Realtime) triggering is not working in libgpiv. \ Enable (realtime) triggering in libgpiv or disable it here by leaving out --enable-trig during ./configure\"" >&5 echo "$as_me: error: \"(Realtime) triggering is not working in libgpiv. \ Enable (realtime) triggering in libgpiv or disable it here by leaving out --enable-trig during ./configure\"" >&2;} { (exit 1); exit 1; }; } fi fi # Extract the first word of "gpiv_control", so it can be a program name with args. set dummy gpiv_control; 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_CONTROL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CONTROL"; then ac_cv_prog_CONTROL="$CONTROL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CONTROL="true" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_CONTROL" && ac_cv_prog_CONTROL="false" fi fi CONTROL=$ac_cv_prog_CONTROL if test -n "$CONTROL"; then { echo "$as_me:$LINENO: result: $CONTROL" >&5 echo "${ECHO_T}$CONTROL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if $CONTROL; then HAVE_CONTROL_TRUE= HAVE_CONTROL_FALSE='#' else HAVE_CONTROL_TRUE='#' HAVE_CONTROL_FALSE= fi # Check whether --enable-rta was given. if test "${enable_rta+set}" = set; then enableval=$enable_rta; RTA_TOPDIR="$enableval" else RTA_TOPDIR="/usr/lib/realtime" fi # Check whether --enable-k was given. if test "${enable_k+set}" = set; then enableval=$enable_k; K_TOPDIR="$enableval" else K_TOPDIR="/usr/src/kernel-headers-2.4.27-adeos" fi # Check whether --enable-mpi was given. if test "${enable_mpi+set}" = set; then enableval=$enable_mpi; ENABLE_MPI="-DENABLE_MPI" fi if test "${ENABLE_MPI}" == '-DENABLE_MPI'; then for ac_prog in mpicc hcc mpcc mpcc_r mpxlc cmpicc 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_MPICC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MPICC"; then ac_cv_prog_MPICC="$MPICC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPICC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MPICC=$ac_cv_prog_MPICC if test -n "$MPICC"; then { echo "$as_me:$LINENO: result: $MPICC" >&5 echo "${ECHO_T}$MPICC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$MPICC" && break done test -n "$MPICC" || MPICC="$CC" acx_mpi_save_CC="$CC" CC="$MPICC" if test x = x"$MPILIBS"; then { echo "$as_me:$LINENO: checking for MPI_Init" >&5 echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6; } if test "${ac_cv_func_MPI_Init+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 MPI_Init to an innocuous variant, in case declares MPI_Init. For example, HP-UX 11i declares gettimeofday. */ #define MPI_Init innocuous_MPI_Init /* System header to define __stub macros and hopefully few prototypes, which can conflict with char MPI_Init (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef MPI_Init /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); /* 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_MPI_Init || defined __stub___MPI_Init choke me #endif int main () { return MPI_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_func_MPI_Init" >&6; } if test $ac_cv_func_MPI_Init = yes; then MPILIBS=" " fi fi if test x = x"$MPILIBS"; then { echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6; } if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_mpi_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6; } if test $ac_cv_lib_mpi_MPI_Init = yes; then MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then { echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6; } if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char MPI_Init (); int main () { return MPI_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_mpich_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpich_MPI_Init=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6; } if test $ac_cv_lib_mpich_MPI_Init = yes; then MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then { echo "$as_me:$LINENO: checking for mpi.h" >&5 echo $ECHO_N "checking for mpi.h... $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 int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 MPILIBS="" { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$acx_mpi_save_CC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then { { echo "$as_me:$LINENO: error: \"libmpi IS NOT installed\"" >&5 echo "$as_me: error: \"libmpi IS NOT installed\"" >&2;} { (exit 1); exit 1; }; } : else { echo "$as_me:$LINENO: WARNING: \"libmpi HAS BEEN installed\"" >&5 echo "$as_me: WARNING: \"libmpi HAS BEEN installed\"" >&2;} : fi CC="$MPICC" LIBS="$MPILIBS $LIBS" { echo "$as_me:$LINENO: checking for main in -lmpi" >&5 echo $ECHO_N "checking for main in -lmpi... $ECHO_C" >&6; } if test "${ac_cv_lib_mpi_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" 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 main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_mpi_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_main" >&5 echo "${ECHO_T}$ac_cv_lib_mpi_main" >&6; } if test $ac_cv_lib_mpi_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMPI 1 _ACEOF LIBS="-lmpi $LIBS" else { { echo "$as_me:$LINENO: error: \"libmpi not installed\"" >&5 echo "$as_me: error: \"libmpi not installed\"" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_mpi_h+set}" = set; then { echo "$as_me:$LINENO: checking for mpi.h" >&5 echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6; } if test "${ac_cv_header_mpi_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_mpi_h" >&5 echo "${ECHO_T}$ac_cv_header_mpi_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking mpi.h usability" >&5 echo $ECHO_N "checking mpi.h 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 _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 mpi.h presence" >&5 echo $ECHO_N "checking mpi.h 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 _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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: mpi.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: mpi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: mpi.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: mpi.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: mpi.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: mpi.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: mpi.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: mpi.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: mpi.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: mpi.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: mpi.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: mpi.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: mpi.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: mpi.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: mpi.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: mpi.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for mpi.h" >&5 echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6; } if test "${ac_cv_header_mpi_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mpi_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_mpi_h" >&5 echo "${ECHO_T}$ac_cv_header_mpi_h" >&6; } fi if test $ac_cv_header_mpi_h = yes; then : else { { echo "$as_me:$LINENO: error: \"missing mpi.h\"" >&5 echo "$as_me: error: \"missing mpi.h\"" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for gpiv_piv_mpi_bcast_pivpar in -lgpiv" >&5 echo $ECHO_N "checking for gpiv_piv_mpi_bcast_pivpar in -lgpiv... $ECHO_C" >&6; } if test "${ac_cv_lib_gpiv_gpiv_piv_mpi_bcast_pivpar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpiv $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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gpiv_piv_mpi_bcast_pivpar (); int main () { return gpiv_piv_mpi_bcast_pivpar (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gpiv_gpiv_piv_mpi_bcast_pivpar=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gpiv_gpiv_piv_mpi_bcast_pivpar=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gpiv_gpiv_piv_mpi_bcast_pivpar" >&5 echo "${ECHO_T}$ac_cv_lib_gpiv_gpiv_piv_mpi_bcast_pivpar" >&6; } if test $ac_cv_lib_gpiv_gpiv_piv_mpi_bcast_pivpar = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGPIV 1 _ACEOF LIBS="-lgpiv $LIBS" else { { echo "$as_me:$LINENO: error: \"gpiv_piv_mpi_bcast_pivpar is not working in libgpiv. \ Enable MPI in libgpiv or disable it here by leaving out --enable-mpi during ./configure\"" >&5 echo "$as_me: error: \"gpiv_piv_mpi_bcast_pivpar is not working in libgpiv. \ Enable MPI in libgpiv or disable it here by leaving out --enable-mpi during ./configure\"" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "mpipython", so it can be a program name with args. set dummy mpipython; 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_MPIPYTHON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MPIPYTHON"; then ac_cv_prog_MPIPYTHON="$MPIPYTHON" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPIPYTHON="true" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_MPIPYTHON" && ac_cv_prog_MPIPYTHON="false" fi fi MPIPYTHON=$ac_cv_prog_MPIPYTHON if test -n "$MPIPYTHON"; then { echo "$as_me:$LINENO: result: $MPIPYTHON" >&5 echo "${ECHO_T}$MPIPYTHON" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if $MPIPYTHON; then HAVE_MPIPYTHON_TRUE= HAVE_MPIPYTHON_FALSE='#' else HAVE_MPIPYTHON_TRUE='#' HAVE_MPIPYTHON_FALSE= fi if test "${ENABLE_MPI}" == '-DENABLE_MPI'; then BUILD_MPI_TRUE= BUILD_MPI_FALSE='#' else BUILD_MPI_TRUE='#' BUILD_MPI_FALSE= fi # Check whether --enable-omp was given. if test "${enable_omp+set}" = set; then enableval=$enable_omp; ENABLE_OMP="ENABLE_OMP" fi if test "${ENABLE_OMP}" == 'ENABLE_OMP'; then CC="$CC -fopenmp" { echo "$as_me:$LINENO: checking for main in -lgomp" >&5 echo $ECHO_N "checking for main in -lgomp... $ECHO_C" >&6; } if test "${ac_cv_lib_gomp_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgomp $LIBS" 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 main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_gomp_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gomp_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_gomp_main" >&5 echo "${ECHO_T}$ac_cv_lib_gomp_main" >&6; } if test $ac_cv_lib_gomp_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGOMP 1 _ACEOF LIBS="-lgomp $LIBS" else { { echo "$as_me:$LINENO: error: \"libgomp not installed\"" >&5 echo "$as_me: error: \"libgomp not installed\"" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_omp_h+set}" = set; then { echo "$as_me:$LINENO: checking for omp.h" >&5 echo $ECHO_N "checking for omp.h... $ECHO_C" >&6; } if test "${ac_cv_header_omp_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_omp_h" >&5 echo "${ECHO_T}$ac_cv_header_omp_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking omp.h usability" >&5 echo $ECHO_N "checking omp.h 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 _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 core 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 omp.h presence" >&5 echo $ECHO_N "checking omp.h 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 _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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: omp.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: omp.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: omp.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: omp.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: omp.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: omp.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: omp.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: omp.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: omp.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: omp.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: omp.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: omp.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: omp.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: omp.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: omp.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: omp.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for omp.h" >&5 echo $ECHO_N "checking for omp.h... $ECHO_C" >&6; } if test "${ac_cv_header_omp_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_omp_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_omp_h" >&5 echo "${ECHO_T}$ac_cv_header_omp_h" >&6; } fi if test $ac_cv_header_omp_h = yes; then : else { { echo "$as_me:$LINENO: error: \"missing omp.h\"" >&5 echo "$as_me: error: \"missing omp.h\"" >&2;} { (exit 1); exit 1; }; } fi fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } if test "${ac_cv_working_alloca_h+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 () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } if test "${ac_cv_func_alloca_works+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. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } if test "${ac_cv_os_cray+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. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; 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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 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 find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 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_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi ac_config_files="$ac_config_files Makefile src/Makefile src/dac/Makefile src/image/Makefile src/evaluate/Makefile src/validate/Makefile src/post/Makefile src/misc/Makefile man/Makefile" 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, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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 "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' 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_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_GNUPLOT_TRUE}" && test -z "${HAVE_GNUPLOT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_GNUPLOT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_GNUPLOT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PERL_TRUE}" && test -z "${HAVE_PERL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_PERL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_CONVERT_TRUE}" && test -z "${HAVE_CONVERT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_CONVERT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_CONVERT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PLOTMTV_TRUE}" && test -z "${HAVE_PLOTMTV_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_PLOTMTV\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_PLOTMTV\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_CONTROL_TRUE}" && test -z "${HAVE_CONTROL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_CONTROL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_CONTROL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_MPIPYTHON_TRUE}" && test -z "${HAVE_MPIPYTHON_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_MPIPYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_MPIPYTHON\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_MPI_TRUE}" && test -z "${BUILD_MPI_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"BUILD_MPI\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"BUILD_MPI\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # 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 # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 IFS=$as_save_IFS ;; 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_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done 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) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; 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'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # 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 after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, 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 # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' 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$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF 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 and configuration settings, 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 Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' _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 ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --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;; --he | --h) # Conflict between --help and --header { 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 ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { 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" ac_need_defaults=false ;; 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 CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/dac/Makefile") CONFIG_FILES="$CONFIG_FILES src/dac/Makefile" ;; "src/image/Makefile") CONFIG_FILES="$CONFIG_FILES src/image/Makefile" ;; "src/evaluate/Makefile") CONFIG_FILES="$CONFIG_FILES src/evaluate/Makefile" ;; "src/validate/Makefile") CONFIG_FILES="$CONFIG_FILES src/validate/Makefile" ;; "src/post/Makefile") CONFIG_FILES="$CONFIG_FILES src/post/Makefile" ;; "src/misc/Makefile") CONFIG_FILES="$CONFIG_FILES src/misc/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; *) { { 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 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for 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 _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim RANLIB!$RANLIB$ac_delim GNUPLOT!$GNUPLOT$ac_delim HAVE_GNUPLOT_TRUE!$HAVE_GNUPLOT_TRUE$ac_delim HAVE_GNUPLOT_FALSE!$HAVE_GNUPLOT_FALSE$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim GLIB_LIBS!$GLIB_LIBS$ac_delim PERL!$PERL$ac_delim HAVE_PERL_TRUE!$HAVE_PERL_TRUE$ac_delim HAVE_PERL_FALSE!$HAVE_PERL_FALSE$ac_delim PYTHON!$PYTHON$ac_delim HAVE_PYTHON_TRUE!$HAVE_PYTHON_TRUE$ac_delim HAVE_PYTHON_FALSE!$HAVE_PYTHON_FALSE$ac_delim CONVERT!$CONVERT$ac_delim HAVE_CONVERT_TRUE!$HAVE_CONVERT_TRUE$ac_delim HAVE_CONVERT_FALSE!$HAVE_CONVERT_FALSE$ac_delim PLOTMTV!$PLOTMTV$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF HAVE_PLOTMTV_TRUE!$HAVE_PLOTMTV_TRUE$ac_delim HAVE_PLOTMTV_FALSE!$HAVE_PLOTMTV_FALSE$ac_delim ENABLE_CAM!$ENABLE_CAM$ac_delim ENABLE_TRIG!$ENABLE_TRIG$ac_delim CONTROL!$CONTROL$ac_delim HAVE_CONTROL_TRUE!$HAVE_CONTROL_TRUE$ac_delim HAVE_CONTROL_FALSE!$HAVE_CONTROL_FALSE$ac_delim RTA_TOPDIR!$RTA_TOPDIR$ac_delim K_TOPDIR!$K_TOPDIR$ac_delim ENABLE_MPI!$ENABLE_MPI$ac_delim MPICC!$MPICC$ac_delim MPILIBS!$MPILIBS$ac_delim MPIPYTHON!$MPIPYTHON$ac_delim HAVE_MPIPYTHON_TRUE!$HAVE_MPIPYTHON_TRUE$ac_delim HAVE_MPIPYTHON_FALSE!$HAVE_MPIPYTHON_FALSE$ac_delim BUILD_MPI_TRUE!$BUILD_MPI_TRUE$ac_delim BUILD_MPI_FALSE!$BUILD_MPI_FALSE$ac_delim ALLOCA!$ALLOCA$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # 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 cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # 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. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $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'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $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'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? 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&@top_builddir@&$ac_top_builddir_sub&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #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. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" 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 rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $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'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $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'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (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 echo "====================================================================" if test x$PERL = xfalse ; then echo "Perl has not been found on this system." echo "Though, this is not provided for the building process" echo "Only some independant scripts will not work" echo "" fi if test x$CONVERT = xfalse ; then echo "Convert has not been found on this system." echo "Though, this is not provided for the building process" echo "Only some independant scripts will not work" echo "" fi if test x$PLOTMTV = xfalse ; then echo "Plotmtv has not been found on this system." echo "Though, this is not provided for the building process" echo "Only some independant scripts will not work" echo "" fi echo "Configuration succesfully finished" if test $ENABLE_CAM; then echo "with (IEEE-1394) camera enabled" fi if test $ENABLE_TRIG; then echo "with (realtime) triggering enabled." if test x$CONTROL = xfalse ; then echo "Gpiv_control has not been found on this system, and probably gpivtrig-rtl isn't" echo "resident as well. This script eases to install and uninstall the gpivtrig-rtl" echo "and RTAI kernel modules that are needed for the triggering of camera and lasers." echo "" fi fi if test $ENABLE_MPI; then echo "Using Message Passing Interface (MPI)" echo "for processing on distributed memory systems" fi if test $ENABLE_OMP; then echo "Using Open Multi-Processing (OMP)" echo "for processing on shared memory systems" fi echo "Type 'make' and 'make install' to build and install the gpiv-tools." echo "====================================================================" gpivtools-0.6.0/configure.in0000644000175000017500000001573011073416422013003 00000000000000AC_INIT(src/evaluate/rr.c) AM_INIT_AUTOMAKE(gpivtools, 0.6.0) AM_CONFIG_HEADER(config.h) AM_SANITY_CHECK AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AM_MAINTAINER_MODE dnl hints from autoscan START AC_C_CONST AC_FUNC_VPRINTF AC_PROG_AWK AC_PROG_RANLIB AC_TYPE_SIZE_T dnl hints from autoscan END AC_CHECK_PROG(GNUPLOT, gnuplot, true, false) AM_CONDITIONAL(HAVE_GNUPLOT, $GNUPLOT, , AC_MSG_ERROR("gnuplot not installed");) dnl if test x$GNUPLOT = xfalse ; then dnl AC_MSG_ERROR("gnuplot not installed"); dnl fi dnl dnl PKG_CHECK_MODULES(gpiv, glib >= 1.2.0) dnl AM_PATH_GLIB(1.2.0, , AC_MSG_ERROR("glib not installed")) dnl AC_CHECK_LIB(glib, g_malloc0, , dnl AC_MSG_ERROR("libglib not installed")) dnl AC_CHECK_HEADER(glib-1.2/glib.h, , dnl AC_MSG_ERROR("missing glib-1.2/glib.h") dnl ) PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.0) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) AC_CHECK_LIB(glib-2.0, g_malloc0, , AC_MSG_ERROR("libglib not installed")) AC_CHECK_PROG(PERL, perl, true, false) AM_CONDITIONAL(HAVE_PERL, $PERL) AC_CHECK_PROG(PYTHON, python, true, false) AM_CONDITIONAL(HAVE_PYTHON, $PYTHON) AC_CHECK_PROG(CONVERT, convert, true, false) AM_CONDITIONAL(HAVE_CONVERT, $CONVERT) AC_CHECK_PROG(PLOTMTV, plotmtv, true, false) AM_CONDITIONAL(HAVE_PLOTMTV, $PLOTMTV) AC_CHECK_LIB(fftw3, fftw_plan_dft_r2c_2d, , AC_MSG_ERROR("libfftw3 not installed")) AC_CHECK_LIB(gslcblas, main, , AC_MSG_ERROR("libgslcblas not installed")) AC_CHECK_LIB(gsl, main, , AC_MSG_ERROR("libgsl not installed")) dnl AC_CHECK_HEADER(gpiv.h, , dnl AC_MSG_ERROR("missing gpiv.h")) AC_CHECK_LIB(gpiv, gpiv_warning, , AC_MSG_ERROR("libgpiv has not been installed")) dnl AC_CHECK_LIB(gpiv, gpiv_scan_resourcefiles, , dnl AC_MSG_ERROR("libgpiv has not been installed")) dnl AC_CHECK_LIB(gpiv, gpiv_alloc_img, , dnl AC_MSG_ERROR("libgpiv has not been installed")) AC_CHECK_HEADERS([ stdlib.h string.h unistd.h \ fftw3.h \ gpiv.h \ ], , dnl AC_MSG_ERROR("missing one of the required library headers") ) AC_ARG_ENABLE(cam, [ --enable-cam enable (IEEE-1394) camera], [ENABLE_CAM="-DENABLE_CAM"] ) AC_SUBST(ENABLE_CAM) AC_ARG_ENABLE(trig, [ --enable-trig enable (realtime) triggering], [ENABLE_TRIG="-DENABLE_TRIG"] ) AC_SUBST(ENABLE_TRIG) dnl dnl Enabling IEEE1394 camera dnl if test "${ENABLE_CAM}" == '-DENABLE_CAM'; then AC_CHECK_LIB(gpiv, gpiv_cam_get_camvar, , AC_MSG_ERROR("(IEEE-1394) camera is not working in libgpiv. \ Enable (IEEE-1394) camera in libgpiv or disable it here by leaving out --enable-cam during ./configure")) AC_CHECK_LIB(raw1394, raw1394_destroy_handle, , AC_MSG_ERROR("libraw1394 not installed")) AC_CHECK_LIB(dc1394_control, dc1394_create_handle, , AC_MSG_ERROR("libdc1394_control not installed")) AC_CHECK_HEADER(libdc1394/dc1394_control.h, , AC_MSG_ERROR("missing dc1394_control.h")) AC_CHECK_HEADER(libraw1394/raw1394.h, , AC_MSG_ERROR("missing raw1394.h")) fi dnl dnl Enabling triggering using RTL/RTAI dnl if test "${ENABLE_TRIG}" == '-DENABLE_TRIG'; then AC_CHECK_LIB(gpiv, gpiv_trig_openrtfs, , AC_MSG_ERROR("(Realtime) triggering is not working in libgpiv. \ Enable (realtime) triggering in libgpiv or disable it here by leaving out --enable-trig during ./configure")) fi AC_CHECK_PROG(CONTROL, gpiv_control, true, false) AM_CONDITIONAL(HAVE_CONTROL, $CONTROL) AC_ARG_ENABLE(rta, [ --disable-rta=RTATOPDIR place where the RTAI code \ resides (default /usr/lib/realtime)], [RTA_TOPDIR="$enableval"], [RTA_TOPDIR="/usr/lib/realtime"] ) AC_SUBST(RTA_TOPDIR) AC_ARG_ENABLE(k, [ --enable-k=KTOPDIR place where the installed kernel \ headers resides (default /usr/src/kernel-headers-2.4.27-adeos)], [K_TOPDIR="$enableval"], [K_TOPDIR="/usr/src/kernel-headers-2.4.27-adeos"] ) AC_SUBST(K_TOPDIR) dnl dnl Enabling Message Passing Interface (MPI) for parallel computing dnl AC_ARG_ENABLE(mpi, [ --enable-mpi enable Message Protocol Interface (MPI)], [ENABLE_MPI="-DENABLE_MPI"] ) AC_SUBST(ENABLE_MPI) dnl USE_LAM 1 dnl AC_SUBST(USE_LAM) if test "${ENABLE_MPI}" == '-DENABLE_MPI'; then ACX_MPI(AC_MSG_WARN("libmpi HAS BEEN installed"), AC_MSG_ERROR("libmpi IS NOT installed")) CC="$MPICC" LIBS="$MPILIBS $LIBS" AC_CHECK_LIB(mpi, main, , AC_MSG_ERROR("libmpi not installed")) AC_CHECK_HEADER(mpi.h, , AC_MSG_ERROR("missing mpi.h")) AC_CHECK_LIB(gpiv, gpiv_piv_mpi_bcast_pivpar, , AC_MSG_ERROR("gpiv_piv_mpi_bcast_pivpar is not working in libgpiv. \ Enable MPI in libgpiv or disable it here by leaving out --enable-mpi during ./configure")) AC_CHECK_PROG(MPIPYTHON, mpipython, true, false) fi AM_CONDITIONAL(HAVE_MPIPYTHON, $MPIPYTHON) AM_CONDITIONAL(BUILD_MPI, test "${ENABLE_MPI}" == '-DENABLE_MPI') dnl dnl Enabling Open Multi-Processing (OMP) for parallel computing dnl AC_ARG_ENABLE(omp, [ --enable-omp enable Open Multi-Processing (OMP)], [ENABLE_OMP="ENABLE_OMP"] ) if test "${ENABLE_OMP}" == 'ENABLE_OMP'; then CC="$CC -fopenmp" AC_CHECK_LIB(gomp, main, , AC_MSG_ERROR("libgomp not installed")) AC_CHECK_HEADER(omp.h, , AC_MSG_ERROR("missing omp.h")) fi dnl No need to use -DENABLE_OMP: gcc will do that! AC_FUNC_ALLOCA AC_OUTPUT([ Makefile src/Makefile src/dac/Makefile src/image/Makefile src/evaluate/Makefile src/validate/Makefile src/post/Makefile src/misc/Makefile man/Makefile ]) echo "====================================================================" if test x$PERL = xfalse ; then echo "Perl has not been found on this system." echo "Though, this is not provided for the building process" echo "Only some independant scripts will not work" echo "" fi if test x$CONVERT = xfalse ; then echo "Convert has not been found on this system." echo "Though, this is not provided for the building process" echo "Only some independant scripts will not work" echo "" fi if test x$PLOTMTV = xfalse ; then echo "Plotmtv has not been found on this system." echo "Though, this is not provided for the building process" echo "Only some independant scripts will not work" echo "" fi echo "Configuration succesfully finished" if test $ENABLE_CAM; then echo "with (IEEE-1394) camera enabled" fi if test $ENABLE_TRIG; then echo "with (realtime) triggering enabled." if test x$CONTROL = xfalse ; then echo "Gpiv_control has not been found on this system, and probably gpivtrig-rtl isn't" echo "resident as well. This script eases to install and uninstall the gpivtrig-rtl" echo "and RTAI kernel modules that are needed for the triggering of camera and lasers." echo "" fi fi if test $ENABLE_MPI; then echo "Using Message Passing Interface (MPI)" echo "for processing on distributed memory systems" fi if test $ENABLE_OMP; then echo "Using Open Multi-Processing (OMP)" echo "for processing on shared memory systems" fi echo "Type 'make' and 'make install' to build and install the gpiv-tools." echo "====================================================================" gpivtools-0.6.0/config.guess0000755000175000017500000012546610310335103013007 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # 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 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. # # 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. 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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 -q "$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 ;' # 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 # 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 tupples: *-*-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=`(/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 ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null 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 # 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/[-_].*/\./'` ;; 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}" exit 0 ;; amd64:OpenBSD:*:*) echo x86_64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; cats:OpenBSD:*:*) echo arm-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; luna88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit 0 ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; 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'` exit 0 ;; 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 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; 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 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; 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 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; 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 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # 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 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; 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 \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; 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 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; 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 0 ;; *: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 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 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 0 ;; *:AIX:*:[45]) 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/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 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 # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 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 && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; 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 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; 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 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit 0 ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #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-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #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-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; 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 ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; 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-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; 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 0 ;; 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 0 ;; 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 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; 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 0 ;; i*86:*:5:[78]*) 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 0 ;; 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 0 ;; 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 i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 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 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; 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 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms && exit 0 ;; I*) echo ia64-dec-vms && exit 0 ;; V*) echo vax-dec-vms && exit 0 ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /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: gpivtools-0.6.0/install-sh0000755000175000017500000001273610150321623012472 00000000000000#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 gpivtools-0.6.0/config.sub0000755000175000017500000007547010310335103012451 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 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. # 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. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # 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. # 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 $0 [OPTION] 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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 0;; * ) 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-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) 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) os= basic_machine=$1 ;; -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 ;; -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/'` ;; -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*) 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 \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # 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-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # 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 ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; 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 ;; cr16c) basic_machine=cr16c-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 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; 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'm not sure what "Sysv32" means. Should this be sysv3.2? 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 ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; 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 ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; 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 ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; 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 ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; 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) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) 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 | ppc64-le | powerpc64-little) 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 ;; 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 ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; 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 ;; 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 ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; 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 ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-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 ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) 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. -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* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -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* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -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*) # 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* \ | -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 ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -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 *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) 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 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; 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 ;; *-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 ;; -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 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gpivtools-0.6.0/missing0000755000175000017500000002540611073414771012077 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gpivtools-0.6.0/config/0000777000175000017500000000000011073421570012015 500000000000000gpivtools-0.6.0/config/acx_mpi.m40000644000175000017500000000705711073417355013632 00000000000000dnl @synopsis ACX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl dnl @summary figure out how to compile/link code with MPI dnl dnl This macro tries to find out how to compile programs that use MPI dnl (Message Passing Interface), a standard API for parallel process dnl communication (see http://www-unix.mcs.anl.gov/mpi/) dnl dnl On success, it sets the MPICC, MPICXX, or MPIF77 output variable to dnl the name of the MPI compiler, depending upon the current language. dnl (This may just be $CC/$CXX/$F77, but is more often something like dnl mpicc/mpiCC/mpif77.) It also sets MPILIBS to any libraries that are dnl needed for linking MPI (e.g. -lmpi, if a special dnl MPICC/MPICXX/MPIF77 was not found). dnl dnl If you want to compile everything with MPI, you should set: dnl dnl CC="$MPICC" #OR# CXX="$MPICXX" #OR# F77="$MPIF77" dnl LIBS="$MPILIBS $LIBS" dnl dnl NOTE: The above assumes that you will use $CC (or whatever) for dnl linking as well as for compiling. (This is the default for automake dnl and most Makefiles.) dnl dnl The user can force a particular library/compiler by setting the dnl MPICC/MPICXX/MPIF77 and/or MPILIBS environment variables. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if an MPI dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the dnl default action will define HAVE_MPI. dnl dnl @category InstalledPackages dnl @author Steven G. Johnson dnl @version 2005-09-02 dnl @license GPLWithACException AC_DEFUN([ACX_MPI], [ AC_PREREQ(2.50) dnl for AC_LANG_CASE AC_LANG_CASE([C], [ AC_REQUIRE([AC_PROG_CC]) AC_ARG_VAR(MPICC,[MPI C compiler command]) AC_CHECK_PROGS(MPICC, mpicc hcc mpcc mpcc_r mpxlc cmpicc, $CC) acx_mpi_save_CC="$CC" CC="$MPICC" AC_SUBST(MPICC) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) AC_ARG_VAR(MPICXX,[MPI C++ compiler command]) AC_CHECK_PROGS(MPICXX, mpic++ mpiCC mpicxx mpCC hcp mpxlC mpxlC_r cmpic++, $CXX) acx_mpi_save_CXX="$CXX" CXX="$MPICXX" AC_SUBST(MPICXX) ], [Fortran 77], [ AC_REQUIRE([AC_PROG_F77]) AC_ARG_VAR(MPIF77,[MPI Fortran compiler command]) AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c, $F77) acx_mpi_save_F77="$F77" F77="$MPIF77" AC_SUBST(MPIF77) ]) if test x = x"$MPILIBS"; then AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [Fortran 77], [AC_MSG_CHECKING([for MPI_Init]) AC_TRY_LINK([],[ call MPI_Init], [MPILIBS=" " AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"]) fi dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the dnl latter uses $CPP, not $CC (which may be mpicc). AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi], [C++], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi]) AC_LANG_CASE([C], [CC="$acx_mpi_save_CC"], [C++], [CXX="$acx_mpi_save_CXX"], [Fortran 77], [F77="$acx_mpi_save_F77"]) AC_SUBST(MPILIBS) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then $2 : else ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1]) : fi ])dnl ACX_MPI gpivtools-0.6.0/mkinstalldirs0000755000175000017500000000132410150321623013263 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.2 2004/06/14 15:10:29 gerber Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here gpivtools-0.6.0/Makefile.am0000644000175000017500000000007210474636215012527 00000000000000EXTRA_DIST = Makefile.in ChangeLog.1 SUBDIRS = src man gpivtools-0.6.0/Makefile.in0000644000175000017500000004613211073421523012535 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure COPYING ChangeLog INSTALL config.guess \ config.sub depcomp install-sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/acx_mpi.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_MPI_FALSE = @BUILD_MPI_FALSE@ BUILD_MPI_TRUE = @BUILD_MPI_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONTROL = @CONTROL@ CONVERT = @CONVERT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CAM = @ENABLE_CAM@ ENABLE_MPI = @ENABLE_MPI@ ENABLE_TRIG = @ENABLE_TRIG@ EXEEXT = @EXEEXT@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GNUPLOT = @GNUPLOT@ GREP = @GREP@ HAVE_CONTROL_FALSE = @HAVE_CONTROL_FALSE@ HAVE_CONTROL_TRUE = @HAVE_CONTROL_TRUE@ HAVE_CONVERT_FALSE = @HAVE_CONVERT_FALSE@ HAVE_CONVERT_TRUE = @HAVE_CONVERT_TRUE@ HAVE_GNUPLOT_FALSE = @HAVE_GNUPLOT_FALSE@ HAVE_GNUPLOT_TRUE = @HAVE_GNUPLOT_TRUE@ HAVE_MPIPYTHON_FALSE = @HAVE_MPIPYTHON_FALSE@ HAVE_MPIPYTHON_TRUE = @HAVE_MPIPYTHON_TRUE@ HAVE_PERL_FALSE = @HAVE_PERL_FALSE@ HAVE_PERL_TRUE = @HAVE_PERL_TRUE@ HAVE_PLOTMTV_FALSE = @HAVE_PLOTMTV_FALSE@ HAVE_PLOTMTV_TRUE = @HAVE_PLOTMTV_TRUE@ HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@ HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ K_TOPDIR = @K_TOPDIR@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ MPIPYTHON = @MPIPYTHON@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PLOTMTV = @PLOTMTV@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ RTA_TOPDIR = @RTA_TOPDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = Makefile.in ChangeLog.1 SUBDIRS = src man all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/config @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-recursive distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gpivtools-0.6.0/config.h.in0000644000175000017500000000652111073414771012520 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FFTW3_H /* Define to 1 if you have the header file. */ #undef HAVE_GPIV_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `dc1394_control' library (-ldc1394_control). */ #undef HAVE_LIBDC1394_CONTROL /* Define to 1 if you have the `fftw3' library (-lfftw3). */ #undef HAVE_LIBFFTW3 /* Define to 1 if you have the `glib-2.0' library (-lglib-2.0). */ #undef HAVE_LIBGLIB_2_0 /* Define to 1 if you have the `gomp' library (-lgomp). */ #undef HAVE_LIBGOMP /* Define to 1 if you have the `gpiv' library (-lgpiv). */ #undef HAVE_LIBGPIV /* Define to 1 if you have the `gsl' library (-lgsl). */ #undef HAVE_LIBGSL /* Define to 1 if you have the `gslcblas' library (-lgslcblas). */ #undef HAVE_LIBGSLCBLAS /* Define to 1 if you have the `mpi' library (-lmpi). */ #undef HAVE_LIBMPI /* Define to 1 if you have the `raw1394' library (-lraw1394). */ #undef HAVE_LIBRAW1394 /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned int' if does not define. */ #undef size_t gpivtools-0.6.0/ChangeLog.10000644000175000017500000001244610456756423012420 000000000000002002-9-20 Gerber Van der Graaf * srs/evaluate/rr: all relevant functions in gpiv_eval.c of libgpiv * srs/evaluate/rr: fft library of fftw; arbitrary size of interrogation area's * srs/evaluate/rr: iterative interrogation process identic procedure as with piv-data from a previous analyses * srs/evaluate/rr: visualization with gnuplot * srs/evaluate/rr: single file for image(s); for x-cor 2nd image concatenated to first. srs/evaluate/rr: sprintf substituted by snprintf * srs/evaluate/rr: parameters in _PivEvalPar structure, defined as local variable * srs/evaluate/rr: removed option ad_int (automatic if int_size_1 > int_size_2) !!and cmpr (automatic for zero_off ad for adptive int. area size * srs/evaluate/rr: parameter key renamed from "Rr." to "EVAL." * srs/evaluate/rr: rr.par replaced by gpivrc to read local parameters from * srs/evaluate/rr: last iteration Int.Area2 +2 px * srs/evaluate/rr: include last_sweep in libgpiv interface,check magnituede last estimator * srs/evaluate/rr: analyse along line of rows or columns <==> AOI * src/validate/err_vec: all relevant functions in gpiv_valid.c of libgpiv * src/validate/err_vec: remove nr library * src/validate/err_vec: sprintf substituted by snprintf * src/validate/err_vec: parameters in _PivValidPar structure, defined as local variable * src/validate/err_vec: parameter key renamed from "Err_V." to "VALID." * srs/validate/errvec: errvec.par replaced by gpivrc to read local parameters from * srs/validate/errvec: remove check on residuals after processing * srs/validate/errvec: estimate critical residu from (inversed cumulative log) histogram and data yield. * src/validate/peaklck: all relevant functions in gpiv_valid.c of libgpiv * src/validate/peaklck: sprintf substituted by snprintf * src/validate/peaklck: parameters in _PivValidPar structure, defined as local variable * src/validate/peaklck: parameter key renamed from "Peaklck." to "VALID." * srs/validate/peaklock: pealck.par replaced by gpivrc to read local parameters from * src/post/manipiv: all relevant functions in gpiv_post.c of libgpiv * src/post/manipiv: sprintf substituted by snprintf * src/post/manipiv: parameters in _PivPostPar structure, defined as local variable * src/post/manipiv: parameter key renamed from "Ma." to "POST." * srs/post/manipiv: manipiv.par replaced by gpivrc to read local parameters from * src/post/s_avg: all relevant functions in gpiv_post.c of libgpiv * src/post/s_avg: sprintf substituted by snprintf * src/post/s_avg: parameters in _PivPostPar structure, defined as local variable # * src/post/s_avg: parameter key renamed from "Scale." to "POST." * srs/post/s_avg: savg.par replaced by gpivrc to read local parameters from * src/post/scale: all relevant functions in gpiv_post.c of libgpiv * src/post/scale: sprintf substituted by snprintf * src/post/scale: parameters in _PivPostPar structure, defined as local variable * src/post/scale: parameter key renamed from "Scale." to "POST." * srs/post/scale: scale.par replaced by gpivrc to read local parameters from * src/post/vorstra: all relevant functions in gpiv_post.c of libgpiv * src/post/vorstra: sprintf substituted by snprintf * src/post/vorstra: parameters in _PivPostPar structure, defined as local variable * src/post/vorstra: parameter key renamed from "Vos." to "POST." * srs/post/vorstra: vor.par replaced by gpivrc to read local parameters from 2003-6-3 Gerber Van der Graaf * src/misc: added piv2hdf and hdf2piv 2003-6-18 Gerber Van der Graaf * src/misc: man-pages and on-line help updated 2003-7-13 Gerber Van der Graaf * src/: libgpiv functions return char *error_message 2003-7-23 Gerber Van der Graaf * man: Updated and added man pages 2003-7-24 Gerber Van der Graaf * src/post: Symlinks of vorty, sstrain and nstrain to vorstra 2003-7-25 Gerber Van der Graaf * src/misc/process-chain: included hdf5 support (file extension .gpi) 2003-7-27 Gerber Van der Graaf * man: added man pages 2003-11-10 Gerber Van der Graaf * src: long option keys for -p, -h and -v and some others. Removed '--' for disabling options. * man: updated man pages 2005-1-19 Gerber Van der Graaf Initiation of Data Acquisition (DAC); trigerring of lasers and camera by using RTAI and Realtime Linux. Original code obtained from J. Soria. Recording images from IEEE1394 (Firewire) IIDC compliant camera's 2005-1-19 Gerber Van der Graaf all executables start with gpiv_ 2005-2-26 Gerber Van der Graaf cvs commit -m "structured of interrogate function by using gpiv_piv_isiadapt" == 2005-5-23 Gerber Van der Graaf * src/eval/rr.c: check on memory leacks: change of internal structure; gpiv_alloc_pivdata and gpiv_free_pivdata in main optimizing by printing progress only if percentage has been changed * src/valid/errvec.c, man/gpiv_errvec.1: long options, automatic threshold from piv dataset * src/misc/img2gpiv: combine 2 images for x-cross corr., naming option of first and second image frame. * src/image/t-avg-img.c, src/eval/rr.c: adpation to new interface for gpiv_matrix and gpiv_free_matrix 2005-5-23 Gerber Van der Graaf * src/eval/rr.c removed -o for reading old estimators from previous analyses as initial ones == patch1 0.3.2 2006-30-3 Gerber Van der Graaf * configure.in: library linked to libglib-2.0 instead of libglib-1.2 gpivtools-0.6.0/INSTALL0000644000175000017500000001722710150321622011516 00000000000000Basic Installation ================== These are generic installation instructions. 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: 1. `cd' to the directory containing the package's source code and type `./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. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. 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. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=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. gpivtools-0.6.0/ChangeLog0000644000175000017500000000425311073414771012247 000000000000002008-21-9 Gerber Van der Graaf * src/post/scale.c: Repaired reading from stdin * src/evaluate/rr.c, src/misc/series.py: parallellized with MPI and OMP 2008-7-14 Gerber Van der Graaf * man/gpiv_combine Added warning to set IMG.X_xorr to 0 * src/evaluate/gpiv_rr: extended for parallelised library with MPI * src/misc/gpiv_series: moved from Perl to Python, mpi-parallelised, added zero padding, removed numbered directories, adapted man page 2008-7-4 Gerber Van der Graaf * Repaired src/image/imgproc.c * replaced *par_default by NULL in gpiv_*_check_parameters_read * adapted programs using general parameters with key GEN * Changed gpiv_rr key names: --ia_size_i and --ia_size_f ia_shift 2008-14-2 Gerber Van der Graaf * Repaired src/misc/combing.c * Improved manuals 2007-12-12 Gerber Van der Graaf * Debugged 2007-10-11 Gerber Van der Graaf * src/*.c: Adapted to Libgpiv 0.5.0 API * src/eval/rr.c: removed keys for image options 2007-10-5 Gerber Van der Graaf * renamed all parameters *_logic to *__set and functions *parameter_logic to *parameter_set 2007-15-2 Gerber Van der Graaf gpivtools_0.4.0_patch1: * src/eval/rr.c, man/gpiv_rr.1: removed -c, -r options (as they are normally included in image header), added Gauss weighting and SPOF filtering. 2006-7-11 Gerber Van der Graaf * Support for Portable Network Graphics (native), tif, gif, pgm, and bmp image formats by translating with netbpm on the fly. * src/misc/combing.c, man/gpiv_combing: added, substitutes img2gpiv.c * src/post/aint.c, man/gpiv_aint.1: added * All programs that need a single input file, stdin / stdout may be overruled with 'filename' at the end of the key list (instead of old '-f file_basename' key option) * src/dac/rec_img: extended for double frame recording and saving (stdout) to png image * src/imgproc.c repaired bugs 2006-16-5 Gerber Van der Graaf * src/post/s-avg.c: bug repair by Sjaak Verdoold in make_fname 2006-16-7 Gerber Van der Graaf * DISABLE_DAC substituted by DISABLE_CAM and DISABLE_TRIG 2007-9-7 Gerber Van der Graaf * gpiv_* programs are adapted for libgpiv3 library interface * dropped gpiv_dav2piv as it is now supported natively. gpivtools-0.6.0/COPYING0000644000175000017500000004311010150321622011506 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program 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 Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.